Friday, April 26, 2013

****

Its 7:45 pm and am still at office. Have a home , got sleep in my eyes but no courage to go back to sleep every night , thinking about the great adventure that I want to pursue on my own. The truth is , that am very much influenced by the life of hackers. Hackers are not what the bell rings in our ears about. Its not a negative term . But , when you achieve that level, the line between the good and the bad disappears. Hackers are the true coder. They have a life beyond the corporate control, and ease themselves in their own world. Now , coming back to real life what do you think is a good job to you? Earning a good sum of salary or having some more good job perks, job security , so that you go back to live a normal life, have kids and a house .If not , fulfil your parent's dream , make them proud. I don't think that is even worth living. Do not do drugs,do give exams , be a good student , child , in future a good parent and the list would go on as you spread your social tree. It keeps on adding to your burden , till you except the life as it is and becomes numb to things that once made your adrenalin rush to its peek.
The most important part of our existence is not to eat , work and go to sleep, praising lord for the wonderful day he has given us , but to define our own way of living. Who said that we should sleep at night and rise when sun rises. I don't want to blabber on and on for you to get bored and click on the next blog, because you are so bored that you have to read random blogs now. Its like we both have the same problem in life - boredom . But the difference lies in our approach of tackling with it. Here, am writing for your digest and you reading what I feel. You are even more helpless than I am .I guess I got my inspiration, from seeing that there are people that really don't have anything in their life worth thinking about. Instead , reading what other's having problem in their life. Well this is what life has become ,distracted by other's problem. One true example is the increasing use of facebook. Great invention of an evil genius to hover above his victims,and seeing them getting more distant from their inspirations . I am inspired by him not for his product but for his journey from a room's project to now , as you all know. His journey , his experiences is what that matter. I think we should gather experiences and not knowledge , because its what that would remains with you forever. Any experience that even doesn't matter to you now , would let you know its true nature in future. Steve Jobs even when he dropped from the college ,didn't stop attending class on calligraphy . At that time, he didn't know any importance of it. Do you know the idea of using calligraphy (that mostly use in microsoft office word ) was stolen from apple and that too even steve jobs.
Crave for experience and not for knowledge.
And Stop reading other's blogs , and work on your own.
World would be great if everyone writes and no one reads. 

Friday, April 19, 2013

Every One can Code

Coding is as easy as speaking . Learning to talk is actually our first step towards building an aptitude for coding. Every nation have different languages , just like in computing , you can choose any language . Every language has a history, a medium to convey things(execute things as well). That's why , great coders always refer a good code as a poetry. They equally use both languages in daily life, to speak and to write code in.
If its so easy , then everyone should be a great coder. Then , why is their difference between steve wozniak and you or me ?
The difference is that they are poets, and you are the one who is amused by their use of syntax(words), by the scenery created by their poetic code.They are well too familiar with the language that they can create jokes, story from the programming languages. You are a true coder, if you can understand their meaning and could share laugh at the jokes they just created from code. The adventure that they enjoy , would make people cry out loud , for there is no misery in life greater than power of our own code to make us dance all night at an inscrutable bug.
There are three types of coder that you can encounter , all are inspiring in their own ways. First category, is occupied by those people that are really thorough with the syntax, commands and acknowledges the reason behind the evolution of the language . There are many languages , with their own story of creation, the need they were made to fulfil. If you don't know why the language you are coding in was developed, then you should search for it to get a better understanding of the language and in the end ,create poetries . People falling into this category write neat codes , that are easy to digest. These people knows the true power of underlying structures and how to use it to their benefit. When you see code of the people  falling into this category , you are awestruck by the assembly of their code. Most industries wants you to fall into this category as per their coding standards.
These people fail in what the people from second category known for : Common Sense . The most advanced tool that can distinguish any geek/coder from a hacker.
People falling in this category have a strong sense of complexity(most common time/space) , they can handle the situation by the use of their common sense and the basic coding knowledge they acquire . These people don't write neat codes , but the thought process behind their logic is extra ordinary. They prefer to write the logic from the scratch and takes little or no help from the in-built functions that could have made their life easier, this is the picture where category 1 people have advantage in.
The third category comprises of people that have either built common sense over years in this field experimenting with the language , or hacking the language with only common sense to guide their way. In either case, they have it both , whether having good old experience with the language (becoming product managers in good reputated companies) or they had hacked the language earlier in their life with still better common sense developed from experiences they had, when we were still confused over what we want more in life. They are the real poets like : Mark Zukerberg , Steve Wozniak, Peter Norvig etc.
You want to see a really beautiful thing , go see the spelling corrector written by Peter Norvig.
http://norvig.com/spell-correct.html
and praise the beautiful mind.

Wednesday, April 17, 2013

Django queries v/s raw database queries

It has been quite some time romancing with django, and my favourite language python together. You didn't get the picture but here you are ,amused by the dirty picture created by your mind. Well, if there would have been anyone as simple as python , I would import her into my life. Django , a web framework is like friend of python , making you see that you can do anything by her side and how easy it is to be in love with her.
Ok , now enough of my love story. I have been working as an intern developing scripts for the datafeeder layer for the website MoneyuTrade.com . It has been some time experimenting with django's orm for handling very large database. Django provides clean and simple layer over database , that can be manipulated to keep the platform and your code, independent of the database and hence ,could be shifted from your workspace to another with minimal effort required in process.
But , in a relationship there are fights , time when you realise that there is no way around her to make her understand what you want to do. When you don't want to be so simple, that she could understand how harsh life is , and that it could not be made any simpler.You want some time alone from her , and want to do things the old way.
Here, I want to shift the focus on the raw queries, that is also provided by django , for when the time comes , when orm alone cannot efficiently do work or process queries, as you could have when using raw queries , depending on the database you are using . It kills the very soul of django to use raw queries.
You would ask that why would django allow raw queries ?
Why would she let me go, realising how much she had given me?
The answer is about the flexibility that django provides, if you aim at building a product that would be running on the same database or same type of database , then there is no harm in using raw queries, even there comes situation that you cannot make way around keeping time constraint in mind , and end up using the raw queries , that you have avoided so far. But, it would make the product platform-dependent , if that's the bargain you are willing to do, then don't hesitate in your decision.
I had also found myself in this situation, that the query I was trying to make was taking too much time (around 3-4 hours and still running) , even after avoiding loops . Even at first , I was told (by my mentor) to not use the raw queries , but as time constraint plays an important role , It was used in the end. Like, I said you have to choose between two factors ,to whom to favour time constraint or database-independent.
Still,  we should try not to use raw-sql queries as far as possible.But, there are always some exceptions, and try not to ruin the beauty of  her due to these little fights, and don't forget how simple she is.