Monday 17 June 2013

Belated Fathers day wishes!!

Dear Dad,

It's father's day and so I write you this letter,
Thanking you for the ways you thought me to be better.
I want to say what has too long gone unspoken:
Without your direction, I would surely be broken.
Thanks for saving my butt when you deemed I needed you the most,
For teaching me independence and how to give a crowd rousing toast!
Sure, you can be thoughtless and sometimes you're a JERK.
Being your kid at times takes a lot of work.
You've always lead by example, some which to me, may appear bad.
But despite all your flaws, you'll still be my dad.
You're my role model, an inspiration, you see 
I'd like nothing more than you're pride in me!
So for all you've done and all you do, I'd just like to say:
YOU'RE THE GREATEST DAD!

HAPPY FATHER'S DAY!!!



What are the best sources to learn web coding (in a short time)?

 This entire article is adapted and added here for reference from the following site

It is a wonderfully well written article and I expect it would help some of my tech inclined readers.  

THIS ARTICLE IS IN NO WAY MY OWN AND HAS BEEN COPIED AND PASTED FROM THE WEBSITE LINK GIVEN ABOVE AND ALL CREDIT GO TO THE BLOGGER OF SAID SITE.

Starting web development and making a demo for your start-up, I think that is fairly easy. Currently there is a trend to spend months looking for the perfect Tech guy to be Cofounders with. I think it is just stupid - it is probably easier to start working on your product and while you are doing it; attract techies from the very platforms that you are learning from.

Now I am a hobbyist-techie and hoping to start on the professional-techie path very soon. I have been developing sites for the past 4 years and it is very rewarding.

Before everything, where to go?

  1. StackOverflow when you have a specific programming query
  2. Quora when you have architectural design like doubts
  3. SmashingMagazine when you want to get inspiration from other awesome sites and see good design tutorials + free resources
  4. Mozilla Developer Network when you are looking for documentation and tough tutorials on coding
  5. WebPlatform is like MDN but cleaner and better and younger. It may be too young at the moment and may lack some information but it will grow and become one of the best platforms for documentation and tutorials.
  6. Hacker News when you just want to see great people talk and not disturb them. Oh and this is one place where you also get the best start up information with detailed reviews and what not. Quality of discussion is so frigging awesome that you just don't want to ruin it by adding mediocre thoughts to it.
  7. Dochub.io when you need to know what parameters that function takes or other similar documentation. MDN is slower for these queries.
  8. Google / DuckDuckGo - Google, you know is great. DDG is awesome for programming related queries. It gives answers right then and there.

Where shouldn't you go?
  1. w3schools - While they are always the top on Google Search they have an outdated site. They might have good resources for some of the technologies but it will be hard for a reader to know when to trust it and when he/she shouldn't.
  2. Reddit - You will not be able to distinguish when you are being trolled and when the person is actually helping you out. There are decent subreddits like programming and web_design. If you can handle reddit it's great - it just takes a lot more effort than many other sources.
  3. Any site that doesn't look like it was made in last decade. Quick quality check:
    • All the code should be in perfect formatting
    • All the code should be brilliantly highlighted
    • The paragraphs should be well formatted and content should look neat overall
    • Too many links on the page, go away
    • Too many banner ads on the page, go away


Okay, so what do you need to learn?
  1. HTML - the very core of it all is HTML. If you care about the full form: Hyper Text Markup Language. As the name suggests, it is a markup language. It is used to distinguish some parts of your page from others. You will use
    <h1>
    tags to mark important headings,
    <p>
    for paragraphs and what not. The basic principle is simple: the document is like a tree, a node below, sort of inherits the properties of the parent.
  2. CSS - the makeup. Because beauty that lies in the eyes of the beholder, is not really there if you don't put effort. CSS is again pretty simple to understand. However it can be tricky to use.
  3. Javascript - because it's cool to be dynamic. HTML and CSS on their own are pretty static. You cannot really capture things, move things, update things without page refresh. Javascript is the language that you will use to bring some life to your pretty doll.
  4. The Server Side - Now, it is very likely that you will be making a dynamic content site. A site where you will present different users with different content or different content based on where the user is. Most likely you wouldn't want to manually code every single page and every single paragraph of it all. This is where you will use server side technology. You see, HTML-CSS-JS are just client side presentation stuff, your actual content will lie on servers in databases and you will use some server side language like PHP, Python, JS, Ruby, Java, Scala etc to get information from the database. And here comes another challenge: the communication between your server logic and the database. Usually you will use SQL but there are neater, newer things available that might suit your needs better.
  5. Domains - All things done, this is still a challenge. If you are developing a product - you will probably launch it with a domain of your own. Now buying domains is easy. It is a little trickier to find a good registrar though. As much as you would want to go to http://www.godaddy.com/ (and a lot of people do), they have been criticized a lot in recent past for their stand on SOPA. Protests included movement of all Wikipedia domains to http://www.namecheap.com/. You will often find much cheaper services on the web but I suggest you go to a registrar that has some good reputation for reliability. Note that registrars don't really earn a lot of money from selling you domains but from value added services. A large portion of their earnings are from renewals - check hidden costs and feature prices; a lot of times things look cheap the first year but are insanely expensive next year later.
  6. Hosting - Finding a good hosting service and using it the right way is a very challenging task. There are several types of hosting available:
    • Shared Hosting: The cheapest, most common and easy to use option. Requires the least amount of knowledge and development time. Options are largely PHP based on Apache servers with MySQL support. These options are very restrictive, but on the other hand service provider worries about most of the issues including security. There are hundreds of such service provides which give you web space and bandwidth at about $50 an year. Performance is poor.
    • Platform as a Service (PaaS): Fairly recent addition and getting propular. Google App Engine and Heroku are two solutions. Good for small startups and apps that can suddenly go viral. Service provides give a wide variety of packages, libraries and tools to build on. Requires more effort to deploy things than Shared Hosting but a things are a lot less restrictive. Unfortunately these solutions are costlier to maintain when you exhaust the free quotas.
    • Infrastructure as a Service (IaaS): You will get Virtual Machines that you can do absolutely anything with without worrying about uptime, hardware maintenance and upgradation. Scaling is not as easy as in PaaS and neither is deployment, but it is cheaper. It is also more open and you have complete control over the entire stack.
    • Self Hosting: Not for newbies. At all. It is challenging, requires you to buy servers, bandwidth and static IP; keep things running - day in and day out. This can probably be cheaper than any other solution but it is significantly more work. More than that, it requires you to have confidence as well as experience. Absolute freedom, obviously.
  7. HTTP & REST - Understanding of HTTP is also essential. This is like the theoretical part of Web Development. You might skip this initially, but developing these concepts will not only give you confidence but also bring maturity in construction of interfaces and APIs. http://tomayko.com/writings/rest... is a (controversial because of its naming but) a very awesome blogpost about REST and stateless systems.

    You will also need understanding of HTTP Status Codes, Sessions and Cookies.

Yeah, so where do you learn this crap?
  1. HTML: https://developer.mozilla.org/en...
  2. CSShttps://developer.mozilla.org/en...
  3. Javascript:
    • https://developer.mozilla.org/en...
    • http://www.codecademy.com/langua...
      This is a brilliant code-while-you-learn tutorial. It explains you nearly all the concepts of Javascript in an easy to understand manner.
    • http://yuilibrary.com/theater/
      Look for Douglas Crockford lectures. He is God. I was unaware of the stupidity of w3schools' tutorials and learnt 'Javascript' from there - biggest mistake of my life in Web Development. Crockford changed it all. These lectures are so rich in content that I had to watch them multiple times just to comprehend and tie it all together, or at least the most of what I have learnt.
  4. MySQL:
    http://dev.mysql.com/doc/refman/...
    It is less likely that you will need PostgreSQL or MSSQL as most of the hosts provide MySQL. Almost the differences are visible, you can start with MySQL and than quickly grasp others when required,
  5. PHP
    http://uk.php.net/getting-started
    http://php.net/manual/en/tutoria...

    You are most likely to use PHP, not because it is the best language to code in but because of its ubiquitous hosting. It is also incredibly easy to begin with - unfortunately it turns out that this comes out to be an issue later. There are various frameworks that may make your application code a lot more structured and remove the need for template coding: Symfony, Zend, CakePHP and CodeIgniter are some of them. Most of the frameworks that you will find will be MVC - it is the modern way of web application architectures. MVC stands for Model - View - Controller; you can read about this more on wikipedia: http://en.wikipedia.org/wiki/Mod...
  6. Javascript Libraries and frameworks
    You don't want to code Javascript yourself. It is tricky to get it right in a browser, trickier even to get it right in all. There are libraries like JQuery, Mootools, YUI Library and Prototype, that have easy to use pre-built functions and utilities that you can use for most small things. They are also extendable with a large set of plugins and extensions that increase the functionality even more.

    Now, even this is not sufficient at times at your client side JS might still got out of hand and become impossible to manage. Frameworks like Sencha and Backbone.js can help you with structuring your code in comprehensible patterns.
  7. XAMPP
    http://www.apachefriends.org/en/...
    Sure you can learn all these, but how will you test it? Setting up XAMPP on your local machine is one of the easiest ways to get the complete stack of technologies: Apache - PHP - MySQL on your machine.
  8. Python and Django
    If you choose to be a little more adventurous, you can start with Python and Django instead. Python is a neat, beautiful, only-one-way-to-do-one-thing, functional language that will make it easier for you to build complex systems.

    Official Python tutorial, I think, is a good resource to start with: http://docs.python.org/tutorial/ Google's Python class has also gotten good reviews: http://code.google.com/intl/sv/e...

    To develop web applications with Python, people generally use Django (https://www.djangoproject.com/). Django is quick, it's brilliant and it is widely used. You will find enough resources online and enough support on various forums.
  9. Java and Google App Engine
    Java is everywhere and people use it for everything. One good way for developing a demo is to use Java and host it on GAE (https://developers.google.com/ap...). GAE offers free hosting for smaller applications and decent amount of integration with Google Technologies like Contacts, Mail etc so that you can quickly create a social layer on it. Of course, if you need to add Facebook integration you will have to do it on your own. However one major issue is that GAE only supports NoSQL a datastore (API to BigTable, AFAIK). You can read about NoSQL here:http://en.wikipedia.org/wiki/NoSQL. Note that for most use cases, you do not really case much if the database if SQL or NoSQL. But since SQL databases are everywhere, people generally feel more comfortable with them.
  10. NoSQL databases and Cache Stores
    Previous point reminds me of adding this, for bigdata you might need NoSQL databases (http://en.wikipedia.org/wiki/NoSQL). There are various types of NoSQL databases (example graph, document etc) but key-value stores are the most common.
    • Cassandra, BigTable, HBase are some large scale Key-Value stores
    • Key-value stores are also often used as in-memory storage for caching purposes. Redis and memcached are two very common names in this sphere
    • CouchDB and MongoDB are two document stores that are also insanely popular

Now some alternative server side languages that I have zero/negligible experience with:
  1. Ruby and Ruby on Rails
    http://www.ruby-lang.org/en/
    http://rubyonrails.org/
  2. Javascript and Node.js
    http://nodejs.org/

Friday 7 June 2013

10 Sentences that can change your life

1. People aren't against you; they are for themselves.

2. Climb mountains not so the world can see you, but so that you can see the world.

3. You learn more from failure than from success.  Don't let it stop you.  Failure builds character.

4. The most dangerous risk of all - The risk of spending your life not doing what you want, on the bet that you can buy yourself the freedom to do it later.

5.  Go where you're celebrated.  Not where you are tolerated.

6. The person that you will spend the most time with is yourself, so better try to make yourself as interesting as possible.

7. If you accept your limitations, you go beyond them.

8. People often say that motivation doesn't last.  Well, neither does bathing.  That is why it is recommended daily.

9. Everyone you meet is afraid of something, loves something, and has lost something.

10.  Comfort is the enemy of achievement - Stay Hungry, Stay Greedy......

If you want something real badly - beg, borrow or kill...(Stealing is for the wusses...)

Enjoy Life!!!

Tuesday 4 June 2013

This is Water....

David Foster Wallace, was the most brilliant American writer of his generation. In the speech, I have added here, he reflects on the difficulties of daily life and 'making it to 30, or maybe 50, without wanting to shoot yourself in the head'





There are these two young fish swimming along, and they happen to meet an older fish swimming the other way, who nods at them and says, "Morning, boys, how's the water?" And the two young fish swim on for a bit, and then eventually one of them looks over at the other and goes, "What the hell is water?"

If you're worried that I plan to present myself here as the wise old fish explaining what water is, please don't be. I am not the wise old fish. The immediate point of the fish story is that the most obvious, ubiquitous, important realities are often the ones that are the hardest to see and talk about. Stated as an English sentence, of course, this is just a banal platitude - but the fact is that, in the day-to-day trenches of adult existence, banal platitudes can have life-or-death importance. That may sound like hyperbole, or abstract nonsense. So let's get concrete ...
A huge percentage of the stuff that I tend to be automatically certain of is, it turns out, totally wrong and deluded. Here's one example of the utter wrongness of something I tend to be automatically sure of: everything in my own immediate experience supports my deep belief that I am the absolute centre of the universe, the realest, most vivid and important person in existence. We rarely talk about this sort of natural, basic self-centredness, because it's so socially repulsive, but it's pretty much the same for all of us, deep down. It is our default setting, hard-wired into our boards at birth. Think about it: there is no experience you've had that you were not at the absolute centre of. The world as you experience it is right there in front of you, or behind you, to the left or right of you, on your TV, or your monitor, or whatever. Other people's thoughts and feelings have to be communicated to you somehow, but your own are so immediate, urgent, real - you get the idea. But please don't worry that I'm getting ready to preach to you about compassion or other-directedness or the so-called "virtues". This is not a matter of virtue - it's a matter of my choosing to do the work of somehow altering or getting free of my natural, hard-wired default setting, which is to be deeply and literally self-centred, and to see and interpret everything through this lens of self. 

By way of example, let's say it's an average day, and you get up in the morning, go to your challenging job, and you work hard for nine or ten hours, and at the end of the day you're tired, and you're stressed out, and all you want is to go home and have a good supper and maybe unwind for a couple of hours and then hit the rack early because you have to get up the next day and do it all again. But then you remember there's no food at home - you haven't had time to shop this week, because of your challenging job - and so now, after work, you have to get in your car and drive to the supermarket. It's the end of the workday, and the traffic's very bad, so getting to the store takes way longer than it should, and when you finally get there the supermarket is very crowded, because of course it's the time of day when all the other people with jobs also try to squeeze in some grocery shopping, and the store's hideously, fluorescently lit, and infused with soul-killing Muzak or corporate pop, and it's pretty much the last place you want to be, but you can't just get in and quickly out: you have to wander all over the huge, overlit store's crowded aisles to find the stuff you want, and you have to manoeuvre your junky cart through all these other tired, hurried people with carts, and of course there are also the glacially slow old people and the spacey people and the kids who all block the aisle and you have to grit your teeth and try to be polite as you ask them to let you by, and eventually, finally, you get all your supper supplies, except now it turns out there aren't enough checkout lanes open even though it's the end-of-the-day rush, so the checkout line is incredibly long, which is stupid and infuriating, but you can't take your fury out on the frantic lady working the register. 

Anyway, you finally get to the checkout line's front, and pay for your food, and wait to get your cheque or card authenticated by a machine, and then get told to "Have a nice day" in a voice that is the absolute voice of death, and then you have to take your creepy flimsy plastic bags of groceries in your cart through the crowded, bumpy, littery parking lot, and try to load the bags in your car in such a way that everything doesn't fall out of the bags and roll around in the trunk on the way home, and then you have to drive all the way home through slow, heavy, SUV-intensive rush-hour traffic, etc, etc. 

The point is that petty, frustrating crap like this is exactly where the work of choosing comes in. Because the traffic jams and crowded aisles and long checkout lines give me time to think, and if I don't make a conscious decision about how to think and what to pay attention to, I'm going to be pissed and miserable every time I have to food-shop, because my natural default setting is the certainty that situations like this are really all about me, about my hungriness and my fatigue and my desire to just get home, and it's going to seem, for all the world, like everybody else is just in my way, and who are all these people in my way? And look at how repulsive most of them are and how stupid and cow-like and dead-eyed and nonhuman they seem here in the checkout line, or at how annoying and rude it is that people are talking loudly on cell phones in the middle of the line, and look at how deeply unfair this is: I've worked really hard all day and I'm starved and tired and I can't even get home to eat and unwind because of all these stupid goddamn people. 

Or if I'm in a more socially conscious form of my default setting, I can spend time in the end-of-the-day traffic jam being angry and disgusted at all the huge, stupid, lane-blocking SUVs and Hummers and V12 pickup trucks burning their wasteful, selfish, 40-gallon tanks of gas, and I can dwell on the fact that the patriotic or religious bumper stickers always seem to be on the biggest, most disgustingly selfish vehicles driven by the ugliest, most inconsiderate and aggressive drivers, who are usually talking on cell phones as they cut people off in order to get just 20 stupid feet ahead in a traffic jam, and I can think about how our children's children will despise us for wasting all the future's fuel and probably screwing up the climate, and how spoiled and stupid and disgusting we all are, and how it all just sucks ...

If I choose to think this way, fine, lots of us do - except that thinking this way tends to be so easy and automatic it doesn't have to be a choice. Thinking this way is my natural default setting. It's the automatic, unconscious way that I experience the boring, frustrating, crowded parts of adult life when I'm operating on the automatic, unconscious belief that I am the centre of the world and that my immediate needs and feelings are what should determine the world's priorities. The thing is that there are obviously different ways to think about these kinds of situations. In this traffic, all these vehicles stuck and idling in my way: it's not impossible that some of these people in SUVs have been in horrible car accidents in the past and now find driving so traumatic that their therapist has all but ordered them to get a huge, heavy SUV so they can feel safe enough to drive; or that the Hummer that just cut me off is maybe being driven by a father whose little child is hurt or sick in the seat next to him, and he's trying to rush to the hospital, and he's in a much bigger, more legitimate hurry than I am - it is actually I who am in his way.
Again, please don't think that I'm giving you moral advice, or that I'm saying you're "supposed to" think this way, or that anyone expects you to just automatically do it, because it's hard, it takes will and mental effort, and if you're like me, some days you won't be able to do it, or you just flat-out won't want to. But most days, if you're aware enough to give yourself a choice, you can choose to look differently at this fat, dead-eyed, over-made-up lady who just screamed at her little child in the checkout line - maybe she's not usually like this; maybe she's been up three straight nights holding the hand of her husband who's dying of bone cancer, or maybe this very lady is the low-wage clerk at the Motor Vehicles Dept who just yesterday helped your spouse resolve a nightmarish red-tape problem through some small act of bureaucratic kindness. Of course, none of this is likely, but it's also not impossible - it just depends on what you want to consider. If you're automatically sure that you know what reality is and who and what is really important - if you want to operate on your default setting - then you, like me, will not consider possibilities that aren't pointless and annoying. But if you've really learned how to think, how to pay attention, then you will know you have other options. It will be within your power to experience a crowded, loud, slow, consumer-hell-type situation as not only meaningful but sacred, on fire with the same force that lit the stars - compassion, love, the sub-surface unity of all things. Not that that mystical stuff's necessarily true: the only thing that's capital-T True is that you get to decide how you're going to try to see it. You get to consciously decide what has meaning and what doesn't. You get to decide what to worship.

Because here's something else that's true. In the day-to-day trenches of adult life, there is no such thing as atheism. There is no such thing as not worshipping. Everybody worships. The only choice we get is what to worship. And an outstanding reason for choosing some sort of god or spiritual-type thing to worship - be it JC or Allah, be it Yahweh or the Wiccan mother-goddess or the Four Noble Truths or some infrangible set of ethical principles - is that pretty much anything else you worship will eat you alive. If you worship money and things - if they are where you tap real meaning in life - then you will never have enough. Never feel you have enough. It's the truth. Worship your own body and beauty and sexual allure and you will always feel ugly, and when time and age start showing, you will die a million deaths before they finally plant you. On one level, we all know this stuff already - it's been codified as myths, proverbs, clichés, bromides, epigrams, parables: the skeleton of every great story. The trick is keeping the truth up front in daily consciousness. Worship power - you will feel weak and afraid, and you will need ever more power over others to keep the fear at bay. Worship your intellect, being seen as smart - you will end up feeling stupid, a fraud, always on the verge of being found out. 

The insidious thing about these forms of worship is not that they're evil or sinful; it is that they are unconscious. They are default settings. They're the kind of worship you just gradually slip into, day after day, getting more and more selective about what you see and how you measure value without ever being fully aware that that's what you're doing. And the world will not discourage you from operating on your default settings, because the world of men and money and power hums along quite nicely on the fuel of fear and contempt and frustration and craving and the worship of self. Our own present culture has harnessed these forces in ways that have yielded extraordinary wealth and comfort and personal freedom. The freedom to be lords of our own tiny skull-sized kingdoms, alone at the centre of all creation. This kind of freedom has much to recommend it. But there are all different kinds of freedom, and the kind that is most precious you will not hear much talked about in the great outside world of winning and achieving and displaying. The really important kind of freedom involves attention, and awareness, and discipline, and effort, and being able truly to care about other people and to sacrifice for them, over and over, in myriad petty little unsexy ways, every day. That is real freedom. The alternative is unconsciousness, the default setting, the "rat race" - the constant gnawing sense of having had and lost some infinite thing. 

I know that this stuff probably doesn't sound fun and breezy or grandly inspirational. What it is, so far as I can see, is the truth with a whole lot of rhetorical bullshit pared away. Obviously, you can think of it whatever you wish. But please don't dismiss it as some finger-wagging Dr Laura sermon. None of this is about morality, or religion, or dogma, or big fancy questions of life after death. The capital-T Truth is about life before death. It is about making it to 30, or maybe 50, without wanting to shoot yourself in the head. It is about simple awareness - awareness of what is so real and essential, so hidden in plain sight all around us, that we have to keep reminding ourselves, over and over: "This is water, this is water."

· Adapted from the commencement speech the author gave to a graduating class at Kenyon College, Ohio

Haphazard Thoughts (A Mixture of Original and Borrowed tit bits of wisdom) - Part 2

* If one person has an imaginary friend, they're considered crazy, but if many people have the same imaginary friend it's religion 

* When injustice becomes law, rebellion becomes duty!

* There are 3 kinds of people in this world, those who make it happen, those who watch it happen and those who wonder what the heck happened?

* etc., - end of thinking capacity

* God is a comedian, playing to an audience too afraid to laugh!!

* I'm very busy doing things i don't need to do, in order to avoid doing anything I'm actually supposed to be doing! 

* Why do DVD player remotes have an open and close button when you have to get up and go change the DVD anyway!?

* Vegans are not vegetarians because they love animals, but it is because they hate plants!

* Mephobia- Fear of becoming so awesome that the human race cannot handle it anymore and everyone dies.

* If the king actually wanted to put Humpty Dumpty together again he shouldn't have given the first chance to all his horses, instead of all his men!  Governments have and always will be run by fools!