Monday, March 30, 2020

Dehradun @Covid-19: The Challenging peaceful quarantine

I'm like, liking Dehradun, in fact it's quite brilliant.



It's quite peaceful here. You can have breakfast and take calls with mighty mountains overseeing you. Away from the hustle bustle of the city life. 


With Krishu showing his colors, and being extremely receptive to our inputs, we are experiencing how the potters would give shape and mould their pots.



Grand parent love and care can reach amazing heights. But age and time passing by is the only constant.



I have an isolated room here for exercising my adventures in business. And oh it's been a while I've been so busy and challenged to the core by the testing tough times! But all this, for all the right reasons i.e. rediscovering, reviving and contributing towards the survival and growth of Bigphi (turmswear.com) and the Bigphi family. We are doing our bit by providing solutions to deal with the pandemic by offering of covid essentials (masks/PPE/sanitizers/covid monitoring system). The good thing is that we are building on the strong foundation and expertise we have in nanotechnology, textiles, Embedded systems, logistics, software systems and supply chain to contribute whatever we can towards solving parts of the covid-19 puzzle. 


There's good weather, rain, bright sunshine, peace, birds chirping, sometimes Soni also chirps, in different directions. With the vehicles gone as a result of lockdown, the birds (including parrots, sparrows and mynahs) are all back with us. 

It's good, in fact it's brilliant!

Tuesday, March 24, 2020

Religion, science, mother nature and Corona virus covid 19

True religion = Science and mother nature. 


As an example, a trip to Nanda Devi national park is solemn to me because of nature, and not the religious, man-made so called wonders. The path filled with muck(mules primarily) as a result of the mass religious pilgrimage is deplorable. 

And as a result of this mindset the world calls you a modern world atheist!

Incidentally, historically the most ancient religions were based on nature gods/deities (mostly indicating the basic natural elements - sun, moon, water, earth, fire, rain, plants, animals) but they were superseded by witty, wise humans who were good at articulation(many via well written myth-ology) and oratory skills. 

To ensure their legacy + a sense of fear prevails(which leads to mind space control of the weak minds or weak situations that we all get in), they come up with a list of rules (many good ones, so abstract that it is open to all kinds of subjective interpretation). 
Put up all these rules in some scriptures(branding it Holy) and get distribution channels set up for the  brand (religion). 

The amazing thing about these modern day religions(brands) is that almost two millennial old rules are supposed to be valid even today. That's brilliant. Owing to the abstract construct of the rules there are logical interpretations that can be done in today's age, but I'm not sure if things would scale up for the old religions in modern world. 

The most intellectually strategic thing that the top religions did was to brand the nature based religions as archaic, derogatory Pagans. 

Science and art developed like crazy, many a times inspired by nature. But with the immense, never ending greed of human kind we messed up our mother nature so much so, that the so called science and technology progress is now a threat to human kind by:
  • Depleting forest cover
    • Amazon forest fires, really sad
    • Rampant blatant population expansion requires more land space, for so - called development. And urbanization. 
    • We want to go to Mars and space by super controlling ignition of the space ships, but can't control Australian fires which eradicated flora and fauna like crazy. Are you hearing this @ElonMusk. Fix mother earth first. Tesla is good, hyperloop is good. Build a company for improving tree cover or to become carbon negative as a world not just the big brother countries  imposing the responsibility on to developing countries, ensuring Rich gets richer, poor gets poorer. 
  • Investing shit loads in warfare and living in a sense of Fear of war
    1. Nuclear
    2. Biological weapons
    3. Chemical 
    4. And more innovative scientific means to war. 
  • Maritime ecosystems are messed up. 
    • Global warming
    • Fishing like crazy (trawling) 
    • Plastic
  • Ozone layer?
  • Plastic
    • We love plastic so much so that we want a new one every new trip we go to 
    • It's almost considered pristine. 
    • Fruits covered with plastic films are good, and pristine, ironically. And if we heat plastic we know how amazingly pristine the world looks. Anyone heard of micro plastics? 
    • Well, we've amazingly choked and messed up so many other animals as a result of excessively human-e? (pun intended) use of plastic
  • Human (e) Population
  • 3G ->4G -> unleash hell G, By killing the mynahs and sparrows we used to see in our childhood. By killing the bees which would've helped in pollination. 

Now nature is cruelly pushing we human beings to pay back and restore balance. Today the crony capitalist, stuck up in winning elections are messing up their countries. Unfortunately, the Might of mother nature was taken way too lightly. The world's largest economy, democracy and largest manufacturing countries were busy doing their thing(winning elections, making profits by hook or crook, preaching illogical stuff), when mother nature comes up with a new mutation(different RNA sequence) in a non living virus which will go inside your lungs(via air and contact) and change the way the world is forever. 

Hoping we human beings utilize our brain and science to help sustain life and peace on mother earth, by being at peace with mother nature. ๐Ÿ™

Tuesday, August 5, 2014

Languages..

I love coding.. The cool thing about coding is that it gives the developer the power to create stuff which can affect lives or solve a problem for a hopefully growing set of people and probably bring up smiles..
I've learnt and played with various languages.. I smile at myself when I think of the attitude that I had  towards languages.. Its changed radically..
  • I learnt C during my college days and loved it, enjoyed it thoroughly..
  • During college times, I was like. C is the only language I'll learn and I'll code anything I want to and everything, in C itself.. So I used to explore how to call run other code written in other languages like Calling Matlab code from C and vice versa.. Those were the pointer* days.. The idea that I'll do everything in C itself.. was a severely flawed notion that I had in mind which I've realized in the times to come..
  • Then came my job at Solidcore.. I was introduced to C++ another interesting language.. But in some ways a funny language coz of the excessive amount of control which C++ gives in terms of speed and OOPsies, the syntax seems to have become in some way complex coz of the backward compatibility with C..
    • An example of the control which C++ gives is like by default it gives you Compile time binding of methods but by using virtual you can impose late binding which has its overhead.. Now its upto you to decide whether you want to compromise on the extra instructions that are going to be there for polymorphism or you want the speed.. whereas in Java one would find dynamic binding itself.
  • Slowly I started getting interested in web and the associated technologies aka the J2EE stack for the backend. So I was introduced to writing enterprise solutions in Java. Java today is a language which gives you:
    • robustness - Its a compiled language, type safety, Brilliant concurrency support, Some of the most well thought out system libraries i.e. Collections etc.
    • scale - Coz of the inherent OOPsy nature.. 
    • speed of development coz of the brilliant editor support. Oh yes, Eclipse..  
Again as a result of my curiousness to check out the interfaces with the native world etc. I was introduced and did quite a bit of JNI coding.
  • You cant just develop a usable web product by only doing the backend.. So next comes Frontend and with it comes JavaScript.. One word which comes to my mind when it comes to Javascript is versatility.. Write any code and it would work well just in case its few lines.. But then, in today's world with the extra thick frontend layer and the many lines of Javascript that we got to write, if you're irresponsible with Javascript you end up with spaghetti code, which is a maintenance nightmare .. One has to be super disciplined. The good thing about Javascript is that if you know the patterns well, and the use the flexibility + versatility that the language provides in the right structured way, things work great and your code scales and is maintainable.. Add linting + powerful frameworks(AngularJs, JQuery) and your frontend is now taken care of.. 
  • You need to know a good scripting language.. Back in the days when there was no node.js I was introduced to Python.. A language which is elegant in itself.. Wrote quite a bit of code in Python and it was a thoroughly enjoyable experience.. Sometimes Python just reads like pseudo code.. Any piece of logic, file manipulations, etc and Python does the trick.. You understand the significance and power of the dict = {} and list = [] literals.. And how one could solve many problems.. I've mostly written one file python scripts which solve a simple problem to a fairly complex problem, like a tool or something.. But a whole product built on this would again mean learning frameworks + tools etc. Somehow Java and the J2EE stack fulfilled that need for me. Another point to mention is regarding the packaging of your scripts/tools.. Packaging the script as a binary using libraries like py2exe suddenly makes your script so very shippable, installable and usable for windows users.. 
All along, I've learnt that one needs to know their tools really well. The more you play with them, with their features the better you get at them.. After that all you need is a great product idea, or actually a few great ideas, (Coz, many of your ideas sound great, specially to you,) Out of the many great ideas that you execute successfully upon, finally, something will end up being great for hopefully many users.. And I, as a programmer could speak, interact and communicate with my users, via these very languages.. :) :)

Sunday, December 1, 2013

I love running

Yes I've fallen in love.. Unconditional love.. 

I love running.. Running is like meditation to me.. It's time devoted completely for me, where you get to talk to your inner self, when there are those self realizations.. Running is  like dope.. Makes me go high, super high..

Running helps me realize that deep down there's a sportsman in me, someone who's not going to give up, the 'never, ever give up' attitude gets revived again.. The thoughts that you're going to do all you can to set things right.. The fighting spirits echoes loud and strong.. You realize how lucky you are to have whatever you have. Blessed I am to have people like Gautam, Ashish and many other wonderful champs, this space-time continuum has introduced me to, the ones who would stand by me whatever happens and patiently bear all the bull crap 'yeh-woh, aise-waise' talk that I do :P.. 

When I run, poetry starts making sense:

เคชिเค˜เคฒे  เคจीเคฒเคฎ เคธा เคฌเคนเคคा  เคนुเค† เคฏेเคน เคธเคฎा
เคจीเคฒी, เคจीเคฒी เคธी เค–ाเคฎोเคถिเคฏाँ
เคจा เค•เคนीं เคนै เคœ़เคฎीเคจ, เคจा เค•เคนीं เค†เคธเคฎाเคจ
เคธเคฐเคธเคฐाเคคी เคนुเคˆ เคŸเคนเคจिเคฏाँ , เคชเคค्เคคिเคฏाँ,
เค•เคน เคฐเคนीं เคนैं , เค•ी เคฌเคธ เคเค• เคคुเคฎ เคนो เคฏเคนां
เคธिเคฐ्เคซ़ เคฎैं เคนूं,
เคฎेเคฐी เคธाँเคธे เคนैं, เคฎैं เค”เคฐ เคฎेเคฐी เคงเฅœเค•เคจें
เคเคธी เค—เคนเคฐाเคˆเคฏाँ , เคเคธी เคคเคจเคนाเคˆเคฏाँ,
เค”เคฐ เคฎैं, เคธिเคฐ्เคซ เคฎैं ,
เค…เคชเคจे เคนोเคจे เคชे เคฎुเคे เคฏเค•ीเคจ เคนो เค—เคฏा.

I feel alive when I run and that is what matters, that is what makes me fall in love over and over again.. :)

Wednesday, August 28, 2013

Realizing nature's paradox: Uttarakhand

Last year 2012, I had roamed in and around the Valley of Flowers, Kuari Pass, Badrinath, Hemkund Sahib.. Those memories and the immense beauty around, they are still fresh in my mind..

The current devastation around these same places makes me wonder..
How the very same nature can contradictorily strike back with all its fury... Hurts to think about the condition of the people who are caught up and are out there suffering..

Tomorrow its going to be another trek into the mountains, into the Himalayas, with some amazing friends..

Coz as its said..

"The core of man's spirit comes from new experiences. "

And ultimately in Lord Byron's words..
"There is a pleasure in the pathless woods;
There is a rapture on the lonely shore; There is society, where none intrudes,
By the deep sea, and music in its roar;
I love not man the less, but Nature more..."

With the hope that nature and the mighty Himalayas.. would shower on us with all its grandeur and beauty..

Into the wild

Of the very few times that I gather the patience and effort to complete a novel.
Mostly I end up reading non fiction. And there's a solid reason behind that..

Even though I respect all the amazement, that the imagination in fiction can produce. But, nothing can beat the purity that real life experiences has to offer. There's some assurance that the stuff actually happened or is concrete..
Also, There's awesomeness in what real life can show you or the variety of experiences and things different people and cultures go through.

Into the Wild is a book I wanted to read since long. I had watched the movie and I liked it. But a sub 2 hr watch wont answer all the questions. There are these lots of Whys and Hows? The Perspectives, that were missing.

The book does answer many of them.
It does explains to a huge extent the state or the thought process of a person who wants to shun society and wants to be alone for months together or maybe for life itself. My love for nature and the mountains gets reinforced when I try and relate with some of the thoughts presented. One gets to learn what not to do when you're in the wild. The final learning for me is that there's this yin-yang balance thing about obsessions which should never be broken. The complementary Yin's and Yang's should ultimately lead to happiness.

Tuesday, May 29, 2012

Joys of Spontaneity: A two wheel ride to Kaigal falls

Its year 2006, and its one lazy afternoon.  I had just finished with 2nd year engineering and it was summer vacations time. And the place is Kolar Gold Fields (KGF), some 100 kms near Bangalore.
Oh my, it’s been eight years now. But this is one trip which is all so very clear in my mind.

Srinidhi, my school pal had come home. Initially we were chit chatting. We had lunch. Slowly boredom creeps in. And that calls for some action. During school days we had heard of a waterfall nearby. Kaigal falls. We got to do this. Let’s go to this place, is the call. Now comes the planning phase. First of all how far is it? Ok that we both aren’t sure. So we call up some pals. Some say its 20kms some 15kms.

Its 3pm now. And the plan is clear. Once we start we should cover the 20+kms by 5pm. We'll hang out there till 6 or so. And then return back home to have some good food.

I start of on my bicycle which is the same one which I used to ride to school. It’s a Hero Devil which has gotten quite rickety now. It has no bell no lights. But then there’s something about your first love. Right? And sure I loved this two wheeler. 

My almost brand new Hero Devil :)

No bell, no lights not a big deal because the part of the ride where there would be no streetlights should be covered in daylight itself i.e. by 7 itself. And the brakes are pretty good even now. Ditto said my friend. So we start off for the ride. All excited. As always. :)

So en route we already knew that we are going to pass by a small town called VKota. And this water fall should be somewhere nearby this town. We keep on riding some 15 odd kms to reach VKota.. We inquire from the locals in VKota and they are like Kaigal falls should be another 20 kms from VKota.. When the first person tells us this we just think that this person doesn't really know about Kaigal falls.. But it so happens that after every 10 minutes that we ride we keep on hearing the same thing. i.e. Kaigal falls is another 20 kms to go. Its already 4.30+ so we got to decide what needs to be done and recheck our plans, That is, we either return back home or keep on riding and reach Kaigal itself.

We are like now that we've come this far we should just go to Kaigal falls. It’s a waterfall. So there should be a hotel or some facility to camp out there, where we could stay for the night and then return back the next morning. After all, it’s a famous tourist spot was the reasoning. ;)  So I call home from a PCO booth informing that I wouldn’t be returning home on that day. Next issue to be solved is food. We don't have anything to eat and drink. So we buy two bottles of water, two glucose packets and biscuit packets as we set off riding. After passing by VKota the views around gets really picturesque. I dint know the name of the place then but googling for it now it’s probably Koundinya wildlife sanctuary  that we were passing by. I tell my friend that probably we could come to this place itself some other time and camp here. Coz this looks like a nice beautiful place to trek. We are sipping off the water and pedaling the two wheeler away to glory. It’s about 6.15 now. And it’s quite a forest-y kind of an environment. Very few vehicles around. Lot of birds chirping. At times we do hear some voices which do sound like forest-y animals.

Some road signs and inquiries lead us to a mud road to Kaigal falls. As we approach near the falls, nature has DJ'ed in lot of music into the background. There are birds chirping as they return back to their nests. Different kinds of monkeys also seem to be in the mood to riaz(practice music) off, their vocal skills. The sound of the water falls is getting louder and adding to our excitement. One issue is there doesn't seems to be a soul around. Instead we do spot rabbits, hares hopping and running around. Cool it is. Riding along the mud road we reach the spot beyond which we can’t ride a cycle. Hmm, so we walk a bit and finally spot the falls. We are so very happy. So after raising a glucose + water toast to the beautiful place we decide that as its getting dark we should first find the hypothesized hotel/camp site to spend the night through, before playing around in the waterfall.

After some exploration of the place around we are yet to find people. Also our hypothesis about hotels and accommodation around seems to be completely wrong. But we were relieved to spot a bungalow kind of a place nearby. And lucky for us there's a bulb outside the house that’s glowing. We reach there and we start knocking the door but there isn’t any response. After about 3-4 minutes of trying to find a soul there and constant knocking with awesome natures background sounds. Nobody comes out. No human voices heard and to our horror suddenly the bulb switches off. Damn! We both are like running as fast as we can to our cycles. And we don't stop till we reach the end of the mud road. Either there was a scared soul inside that house or there’s immense potential of lot of TV serial like stories around what happened.

Its almost 7.30 now. And we again start planning about what needs to be done now. We decide to ride till VKota town and stay there for the night. And with no light source in both our cycles we knew it’s going to be tough. Also the road had an interesting condition, the sides of the road were very steep. So just in case we slipped from the tar road to the muddy part on the sides, while getting back to the tar roads there were lot of chances that one would fall, depending on the kind of tires, which was again screwed. Hence, both of us fell. I was the slow cycling champion at school but when I fell I realized that after a level we are slaves of the kind of terrain we ride in. There was no light at all. We had to rely on the few vehicles with their headlights on, that passed by to get an idea of the road that we need to ride by. Slowly and steadily we battled out and reached VKota at some 10 or so.

Weird town/village VKota is. They seem to religiously follow the first part of the "Early to bed, early to rise  ..." quote. The few hotels which were there, were already closed. We did wake up some of the hotel owners. And enquired about the rates and availability. We considered the option of taking a bus to home, as there dint seem to be enough value staying at a hotel there, the hoteliers there dint seem to be interested in hosting us either. There were quite a few policemen in this place coz of the area's geography. This place is in Andhra Pradesh and is border to both Karnataka and Tamil Nadu. The policemen were quite suspicious but they suggested to take a bus back to KGF. So we waited at the bus stand to find a bus back to KGF. Out of the few buses which were going to KGF most of them dint allow us to load the cycle on bus and take us along. Finally at around 12 at night and some amount of convincing we got lucky. We put the cycles on the bus. And the bus went on at a wonderfully slow pace. We dint mind at all. We were too tired to talk, both of us took a nap and reached KGF bus stand at some 1.30am or so. It was another 7-8 kms from the bus stand to my home. But this was a well-lit route. We reached home finally at some 2.30 or so. I dint want to knock the door to wake everyone up and get all the scolding’s. So, I went to my brother's room's window and I called for him to open the door for me. He, like a good, sleepy, zombie boy just opened the door dint ask any questions and went back to sleep. :)

I gathered all the stuff that's there to eat at home. We finish hogging. And finally it’s time to sleep. Amazing day of adventure it’s been. It’s been scary at times. Had the share of fun moments. Lot of good decisions, lot of crazy decisions. This was the first of the marathoner kind of an event for me. I had cycled more than 70 something kms in a day for the first time. I almost felt like superman! Finally it’s time to tell goodbye to the day gone by. I lie down in the bed. This is the wonderful quote which sums up my thoughts about life and such adventurous events that happens in life.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!”
― Hunter S. Thompson(Probably)

Friday, July 15, 2011

I scrape as a timepass, and its fun

'Scraping' the name itself sounds negative even though in my view Scraping is a real boon to developers when there's no API(REST, XML based, etc) already published.. REST APIs are very widely adopted. Lets discuss something about REST first:
REST is basically like, there are some resources(objects) on a server. Now these resources can be accessed via the same old HTTP GET, POST, DELETE... (maybe after authentication which these days is mostly via OAUTH). In response to the HTTP request the server sends back the JSON string. The gud thing is JSON is quite readable and can be parsed very easily. So the resources/services on a server can be communicated with the clients via the HTTP requests and the JSON responses.
Lets compare that with scraping..
  • When we want to scrape there's again a HTTP request to a server.
  • Server sends some HTML, CSS and JS.
Now there are issues with the HTML and the JS content sent.
HTML issues:
  • Browser seem to handle any hopeless HTML  sent.
  • So the content becomes tough to parse coz people i.e. the HTML content writers seem to be sloppy.
If proper HTML standard is followed by every content writer then its very easy to parse it and use it.. but when the HTML code is gone case we rely on libraries which heuristically parse and give you good searchable objects to enjoy with programmatically. The logic that the libraries would work is fairly simple ..

If browser's can parse hopeless HTML to a degree that the browser still renders bad HTML good on it, implies there is parsing code available with the browser. Mozilla Firefox source code is open. There's lots to learn there..
But to get a quick scrape done we really don't need to look into the browser's HTML parsing code. Instead we've got people who've made great libraries probably looking at the browser's HTML parsing code.
For my scraping needs I've enjoyed with BeautifulSoup when I code in Python and Jsoup when I code in Java. Playing with these libraries is sheer fun.. To get a feel for how good beautifulsoup is check this code that I wrote long time back. This just gets all Indian railway train information data like schedule of different trains and train stoppages from http://www.indianrail.gov.in/ and makes SQL queries to persist the same data.

Ok so now that we've discussed that HTML parsing is more of an issue solved, lets talk about the JavaScript part of the HTTP response..
  • Scraping Static pages is easy as explained above. 
  • Today pages are dynamic. And ajax calls really make the user experience better.
So now if we are scraping a dynamic page we need to understand and render the Javascript code too.. Whoa.. But just think of it in terms of the browser..
"The browser understands JS and Ajax and renders the content received from AJAX calls."
But this case is very different and is far more different in comparison to the HTML issue.. The JS code interacts with the HTML and CSS so now we need to emulate the whole browser itself. That is when COM(Component Object Model) objects enter into the picture. We basically have to emulate the full browser and COM helps in doing that. Check out how to programmatically use Internet Explorer COM objects with some of the python code:
from win32com.client import Dispatch
ie = Dispatch("InternetExplorer.Application") #Do stuff with the ie object
 Ok so scraping the dynamic pages is tougher in comparison to static pages.. But it can be done. 
Also many a times one can get the right data by finding out the URL to which to ajax call goes and then use the response received. 
There's still lot of functionality which can be achieved from many of the static pages still available.. 
For example:
Visualizing realtime stock data is crucial for traders. Now in many of the Stock Tracking websites available the stock data being viewed is some 2 minutes behind the actual time. Also there are websites where a HTTP request to a server for a Stock returns the realtime price of it.. But the problem there is that pages have to be refreshed again and again to check the current price.. Also in one web page in the browser you can check only one Stock at a time.. 
So me and a friend of mine(he is a big market lover :) ) tried to solve the above two issues and these were the minimum functionality that had to be solved:
  1. Choose the companies from NSE that the user wants to track. 
  2. Aggregate all the stock prices of the companies in one page.
  3. Auto refresh the prices via AJAX every 10 seconds or so.
So we made a Simple and basic Realtime stock monitoring application which achieves the above, this uses GWT and the Google App Engine to host which are some interesting things to talk about.. Probably for some other post. Even though the User interface isn't good but still it serves the purpose.

Ok so scraping Static pages can be visualized as an API itself, albeit the fact that the content will change with time.. And the chances that the scraping code breaks when the content changes is always there.. One small tip to avoid breakages to some extent is to use CSS classnames if they exist while scraping, that way hopefully if the page author wants to restyle he/she would change the CSS properties of that class instead of the class name..

Finally Scraping is fun for developers like me coz it helps solve many interesting problems.. But think in terms of  how the search engine giants Google etc. work . They rely big time on scraping and crawling.. Their bots have to literally crawl the whole web and scrape data based on their algos to help their servers index and search.. So scraping itself is a huge revenue generator too but for now I will enjoy the fun part of scraping .. Hopefully some time in the future I scrape to create revenue.. :)


P.S. I scrape just for timepass.. Please dont sue me.. ;)

Saturday, May 28, 2011

Serendipity..

This post is about an interesting event that happened last weekend..
Its 21/5, ~10pm.. I am returning back from Airport to Gurgaon.. The following are the sequence of events that take place..
  • Me in a shared cab a pretty gal sits next to me..
  • The cab goes from airport to Gurgaon
  • Lots of silence initially...Finally when gurgaon seems to be nearby she asks the driver about some hotel.. Driver doesn't know..
  • I step into the conversation.. She tells me about the place.. Even I dont know.. but I tell her to ask Justdial and give her the no.
  • Fortunately or unfortunately justdial doesn't give out any concrete information..
  • So I call up a friend of mine to know where exactly this hotel is.. And he knows..
  • I tell her about it.. 
  • She agrees to take an auto with me to the metro where.. I had kept the bike, so i tell her about it.. I tell her that I'll drop her to that hotel on the bike .. she agrees.. 
  • So after the auto ride and some talk we head to the bike..
  • Even on the bike I get to talk to her and all.. and even she's like talking rigorously and all, like lot of the gals do..
  • She tells she is an airhostess and is new in gurgaon..
  • She's searching for a PG..
  • The hotel arrives..
  • She says bye..
Eventually I dont get to know her name.. Also I could've given her my cell no. coz I could've search for PGs on the internet and help airhostesses you know.. ;)

But I'm just happy I helped a gal who was lucky enough to find a decent guy like me.. at the night.. or else things can get pretty dirty and bad here in gurgaon/NCR when a gal who's alone meets gone nut case people at night..

Such interesting things should keep on happening.. But I shouldn't be screwing up as I did this time..

Saturday, May 7, 2011

Learnings from punctures and Lassi's - Note to myself.. :)

I've always loved learning new stuff..
I've enjoyed learning stuff which I find interesting, mostly things which are logical which have some kind of pattern..
Be it programming the computer to do useful stuff or learn playing the guitar..
The quest for learning should never die..
Coz when learning stops I guess life stops.. 

This post is about an interesting learning I had about learning today..
The series of events start off day before yesterday..

  1. I found that the bike which I use for commute from office to work and vice versa (Thanks Hims :) ) was punctured when I was leaving the office to go out and swim... 
  2. I go to Mishraji who's an ever helpful and differently awesome colleague in office and I borrow his huge Royal Enfield Bike.. 
  3. I swim and return back to office.. 
  4. And then Mishraji drops me to my home too.. 
  5. Next day I'm back to office with Hims my flatmate.. 
  6. Now starts off the struggle to get the puncture fixed..
  7. I borrow the activa from the only female colleague in office at 5 pm with a 45min timeline.. 
  8. There was this puncture shop which I go to, and I ask the approx 35yr aged guy, who runs the shop, to get someone to come with me to office and remove the tyre from the bike which was parked at my office instead of me getting the bike to his shop..
  9. Now here comes this kid quite young but he's got a smile out there.. 
  10. Me and this kid we head to the office.. 
  11. This guy is into his work of removing the tyre etc. He leaves the tools etc there in the office parking in the basement itself..
  12. Now we take the tyre back to the puncture shop..
  13. He fixes the puncture and we headback to office..
  14. Now comes the challenging task for him to put the tyre to the right spot.. He seems to try out all the ways he knows..  But he doesn't succeed.. 
  15. There's a combination of anger and pity in my mind.. Pity is coz of the fact that this chap is so young.. He shouldn't be doing this.. So even I go in try to set the tyre at the write place.. But even I cant do anything.. I was wearing a new shirt that day and I was very conscious of the shirt not spoiling..  The guard uncle in the basement who's been observing the whole fiasco also steps in finally, even he angrily questions the kid.. The kid unfortunately has no answers.. He mumbles probably he has to call his 35 yr old uncle to fix this.. But I summarily reject that option coz the activa and the lady who gave me the activa has left for the day and I dont have any vehicle to take the kid from office to the shop and vice versa.. I communicate the same to him.. The guard who had come also started helping the kid out and boom.. Finally the tyre is set into the right place.. I praise the guard.. He scolds the kid.. 
  16. Next, when all the final touches are done I take the kid back to his shop.. This is when I start being curious, I ask him all kinds of questions.. 
      1. What's his name? Ashok
      2. What's his age? 13
      3. Where's he from? Near itarsi, MP
      4. Where do his parents stay and what do they do? No mom, Dad works as a daily wager.. 
      5. How did he get into repairing punctures? Parents told him to do so.. 
      6. Who's the 35 yr old uncle.. ? His answer - He's ustaad.. He teaches me.. I love learning.. 
      7. How much are you paid? Nothing .. The ustaad uncle gives me food twice daily and I am learning something every day.. :) .. This is something which made me happy and sad all at once.. 
      8. Tum school jate ho? Silence.. 
  17. His silence creates silence in my mind too .. I hate it when I cant do anything.. 
  18. I am scared that coz this kid took extra time for getting the bikes' tyre fixed his ustaad uncle might punish him.. But all I do is go pay the ustaad money.. and return back home.. 
  19. Next day is again normal.. I go to office in the morning.. Its some 6.30 in the evening,  I head to the bike to swim again.. After about 200 metres I again find to my despair that the same tyre is again punctured.. 
  20. I again drag the bike to the Ashok's shop.. When I reach there.. This kid again smiles .. He's again into fixing the bike.. He reveals that the walnut itself has torn away from the tube so the tube itself has to replaced.. Now I'm reminded of the fact that the kid had not tightened the nut of the tube to the tyre properly.. But I now think that its coz of him and his inexperience and also the society which makes many kids do work they dont deserve at their age.. These and many other thoughts like these keep my mind preoccupied.. In the meantime this kid has again set the tube into the tyre.. Its again his task to set the tyre into the right place in the bike.. I again ask him .. Can you do it? He smiles I'll try if I cant I'll ask ustaad uncle to fix it.. The ustaad finally fixes the tyre I pay him and he leaves for some time.. Now again there's a conversation which starts off with this kid Ashok.. 
    1. I find that there's another kid who's sitting in the shop.. This kid is dressed better.. He's combed neatly.. He's managing the cash.. So I ask Ashok about who the other kid is .. He tells that the other kid is the ustaad's son.. 
    2. Does ustaad's son go to school? Yes he does.. - Hmm.. That saddens me.. Double standards..  
    3. Where do you stay? He points out a house nearby.. 
    4. What did you have for lunch? - Roti.. 
    5. Take this extra money.. Use it when you want.. - He says no I cant take that..
  21. I see a juice corner nearby .. I tell Ashok to come with me.. Luckily he comes with me.. I ask him what would be want to take? Juice or lassi.. - He says lassi.. 
    1. I again find that the Juice corner guy is also some 16 yrs something.. 
    2. I tell him to make two glasses of lassi.. 
    3. He starts off preparing .. I again converse with Ashok.. 
    4. Now even this juice corner guy springs up into the conversation... 
      1. He starts off saying how much he likes Maths.. 
      2. Juice guy - "If some1 teaches me Maths 1 hour daily I can do well.. I can learn all the other things and finish my tenth.. "
        1. I dont know what comes in my mind I ask him.. How much is 13*7? - He promptly says 91.
        2. 16*9 - 144
        3. Ok.. 19* 19? -- He starts thinking and gives up.. He says.. he can do it.. All along Mr. Ashok is smiling .. When he hears 19*19 even he asks the juice guy ... Bolo Bolo.. 
        4. Finally the juice guy says .. 19* 19 bhi ho jayega.. Take this lassi its done.. 
    5. I give the lassi to Ashok.. 
    6. Think what I can do .. And I just leave after paying for the lassi.. The juice guy is like.. Apka bhi ban gaya hai.. I tell him you have the lassi.. or give it to Ashok.. 
  22. I just quit the shop and all .. I drive to the pool and just with lots of thoughts in my mind.. There's helplessness.. Lot of it..
  23. I had just learnt free style properly some 2-3 days ago.. I decide that its time to learn some other stroke.. I ask the trainers there about the toughest stroke out there.. And now I'm learning butterfly stroke.. Ashok is still learning how to fix punctures, tyres, the juice guy is learning Maths.. Life moves on.. The wheel of learning is also moving steadily :) , (:

Friday, April 22, 2011

Unix + Marketing

I had a friend who had posted this:
The Microsoft vs. Linux war didn’t help with the disdain toward marketing among software geeks, hackers and slashdotters. It feels good to believe that Windows succeeded mostly because of marketing and money spent by the mega-corporation. If Linux had the marketing muscle of Windows, it would rule the world.

But I thought otherwise. Coz the reality is as contradictory as it looks to the normal eyes..

Actually..
Mac OS X is a unix based OS, and I guess even Apple has spent huge cash on marketing Mac. And in my view Apple has a marketing overload kind of strategy i.e. they sell everything and anything they can, They add value to some open source product and pitch it fervently to the market to earn cash. Remember the only way which not so geeky chaps could download music on a Mac or any Apple device was iTunes, which proves that they are marketing pros. Also Android is based on a modified Linux Kernel. Same goes with Google Chrome OS. So even google has taken up unix + marketing seriously to counter two huge requirements i.e. the mobile space and the cloud.. iOS which powers all these apple devices i.e. the iphone's and the ipad's is again unix based.. So Unix + Marketing has been tried since a long time with some success.. iOS /Android / Chrome OS might give a definitive answer to the question in the coming future.. Ultimately all these upcoming OSes have their roots in unix so Unix is already ruling the world with whatever marketing has been done upon.

Sunday, December 19, 2010

Chemically toxicated BrainStorming

Ok So all this happened on a Saturday..
Saturday evenings are perfect coz its Sunday the next day..
So there are no concerns about when to sleep on a Saturday evening.

This Saturday there were some pals from college who had gathered at a friends place in Delhi.

To start off there were the customary Hi's and Hello's.
Then we started discussing cricket as Mr. IdiotBox was out there in its full glory screening India's battle against the awesome pace attack of SA at centurion. All that was the traditional crico-religion talk we Indians get into so frequently even though our assessments of Indian cricket wont cause any difference to the guys there in SA until unless one of us goes on to become the next Lalit Modi :)

Our pal had been out on a EuroTrip.. He enthusiastically portrayed all his experiences to us and most of us were all ears..

That done.. Next ppl started thinking what to do next..

Hence came in the intoxicant..
To fetch the intoxicant we went out at some 9.40 by the time we reached the theka.. it was 9.55 pm.
There were some ppl who were purchasing the intoxicant..
But just before the clock was about to strike 10 things changed radically around that place..
There were so many hands with 500 rupee note trying to get hold of some intoxicant and the sellers of the intoxicant were tensed they had to shut their tent at 10 pin point.

That is when I realised how "Vijay Mallya" became "Vijay Mallya". Boy o boy those quotes around those two Proper Nouns denote the Brand name that is Vijay Mallya..

SO with that realization my friend loads the intoxicants in his school bag..
Yes there was a time that school bag would contain sources of knowledge aka books..
But now that same bag had intoxicants.. And the ppl related to that bag were so very concerned about the contents ..

I was just thinking " Lo School chale hum" when I looked at his bag and grinned.. :D

Back to the room and then placing the intoxicants at the right places.. Intoxicants should have its effects dispersed into the bodies slowly.. So in comes in the glasses which restrict the quantities that can be consumed at a time..

And after the cheers started the conversation :
The points which are discussed:

  • Risk Aversion..
  • The favoured and customary Indian Routes being Risk free..
  • The condition of Gurgaon routes :P
  • Minimal requirements - Roti, Kapda Makaan, etc.
  • What after minimal requirements are met?
  • Facebook in India ?
  • China has its own social networking site and has a some Billion $ eval.
  • Stereotype Indian mentality which wants a degree..
  • Academic pathways are so very programmatic in India..
  • Why Indians find American culture cool even though India is so very culturally gifted.. ?
  • "The Social Network" Movie - passion, Enthusiasm
  • Bread Pakodas and networking? :P - Ppl outsourcing..
  • Serendipity - during placements? - What were the pointers doing to us at BTech?
  • Are the MBA chaps very interested in those stock tickers..
  • Stock market ruining lives of ppl..
  • Speculation has huge alluring powers..
  • Hedging..
  • Futures and options..
  • Gandhi...Merits /demerits
  • Jawahar Lal nehru
  • World wars
  • Vallabh Bhai patel
  • Kashmir
  • Origins
  • Languages
  • Mahabharat
  • Suyodhan v/s Duryodhan - power which the historians have
  • Logic
  • Technology
  • Probability
  • Market penetration through acquisition
  • Innovation
  • Potential in India
  • Hi Slopes v/s continuous slope v/s sustainability
  • Market Cannibalism
  • many more :)

Saturday, July 10, 2010

Facebook Badges Bug!!

Facebook profile Badges doesn't seems to be updating the badge's current city information available in my facebook profile database. If the current city info cant be retrieved from the DB to badge then why give user the option. Bug!! Bug!! Bug!!

Is it because of facebook's privacy setting?? Grr.. I donno.. The point is, facebook badges gave me the option to display the current city on the badge, But it dint retrieve this info from its DB.

This is my facebook profile page which lists my Current City to be: Gurgaon..


Now this is the my Profiles badge page which lists my Current City to be None!!!



The above images aren't clear. Link to clearer images: http://bit.ly/bFrZwA

Sunday, July 4, 2010

Batch file miseries Part 1 !!

Batch files are useful:
  1. Coz you know if its some reasonably contemporary Windows it would work. Obviously the batch file must have been written correctly..
  2. Running of the bat files wouldn't require any separate tool installation etc. Until and unless you've got a messed up windows sytem which has the cmd.exe replaced or the PATH variable messed or many others ;)
  3. The for loops, if conditionals, variable assignments etc. to script are already there.
  4. Using Bat files is a much faster way to browse and work with your machine instead of using the mouse.
But.. The no. of dangerous buts which come up when it comes to batch file scripting are..

Batch file scripting sucks big time
e.g. Simple bat file.. Arrg.. Not that simple coz u'll come up with lot of "was unexpected at this time." and all other kinds of errors.

@echo off

set TESTVARIABLE=init

if "%TESTVARIABLE%"=="init" (

set TESTVARIABLE=used

if "%TESTVARIABLE%"=="used" (

echo This was logical
) else (
echo Bat files suck big time..
)

)


Guess what the output would be?
Bat files suck big time :D

The good thing is that this above problem has a solution even though its rather dirty considering its such an elementary problem if someone wants to script batch files.

Solution:
  1. check the registry key "HKLM\Software\Microsoft\Command Processor\DelayedExpansion"
  2. If it does'nt exist then add the registry key by using regedit or by using this command: reg add "HKLM\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1
  3. Just in case u think that the above script should be working logically when u want it to is to invoke cmd.exe with the flag /v:ON i.e. cmd.exe /v:ON .. On all the other times the default Windows behavior of sucking with bat files would continue :P
  4. To enable the logical behavior only for a particular scope in a batch file we can use setlocal ENABLEDELAYEDEXPANSION. This way logical behavior would be reflected until the bat file execution is over.
The Hkey_Current_User hive can also be changed instead of HKLM if your machine is a multi user machine and u dont want this change to affect other users.

There's one more gotcha:

Once the Delayed Expansion behavior is enabled by using the above methods. To refer to the variables in a different scope we use retrieve the value of the variable by enclosing it with ! instead of %

So the batfile also needs to be changed and it becomes this:

@echo off

setlocal ENABLEDELAYEDEXPANSION
set TESTVARIABLE=init

if "%TESTVARIABLE%"=="init" (

set TESTVARIABLE=used

if "!TESTVARIABLE!"=="used" (

echo This was logical
) else (
echo Bat files suck big time..
)




So that was one of the hopeless default setting of Windows XP. There are many other hopeless ways in which Windows bat file interpreter makes life bad for people scripting in Bat files.. Hence Python and other scripting languages are a requirement..