Wednesday, December 22, 2010

Played with jQuery and spent some time on StackOverflow

StackOverflow is really addictive once you get to the stage where you can help people by answering some more-than-trivial questions. I have been spending a lot of time each day and sometimes it feels like a waste of my time. It probably is, now, when I should be learning more and then think about helping even more. True, it makes me look up stuff I wouldn't have come across if I worked on my own, but moderation is needed in looking for questions to answer. The game mechanics of SO are amazing with all its reputation points and badges. If ever I am going to build an addictive service, SO will be one of the most important case-studies.

JavaScript is such a beautiful language (if you neglect the bad parts). Learning it over a few weeks, I understand how powerful and expressive it can be. It is the browser that made it look bad. Watching the Crockford video on "The metamorphosis of Ajax" has cleared the mist I always used to see on Internet Explorer. Microsoft, in the early years of the browsers, really pushed JavaScript 'in the browser' to newer heights. I will keep on encouraging my friends to move away from the IEs, but will not blame Microsoft as being evil.

I have learned a good amount of jQuery and JavaScript over the week. I am looking forward to put all the learning to use. I have some ideas for small web applications. What better way to test your knowledge and skill than to try and build things using them.

Wednesday, December 15, 2010

Reading books and answering questions on StackOverflow

JavaScript Cookbook appeared to be targeted at beginners. So, I took a break from that book and dived back into jQuery. This time, I chose Manning's "jQuery in action". Even though it is for beginners-intermediate, the writing style was good. Before introducing a selector or method, the purpose it serves, the functionality it can replace and the cross-browser issues with JavaScript implementations (if any) were discussed.

The book was divided into two parts. The first deals with Core jQuery - selectors, DOM manipulations, events, animations etc.. I have read through the chapters till events though it was like a revision. At places, I would have liked the explanation to be crisper, but it was impressive nonetheless.

After a break of 2 months, I have started answering questions on StackOverflow. Gained a lot of reputation points by answering questions on JavaScript, jQuery, Python, RegEx etc. In 3 days, my reputation has grown from 129 to 671. I used knowledge gained in JS, jQ and answering the questions made me revise some stuff and look for better explanations. The sudden overflow of n00bs who didn't even know that they have to search before asking annoyed me a bit.

I have posted quite a few programming answers. Here is some advice I gave to a guy who sounded like he was lost:
  1. Don't give up. Persist. Ask for help if you don't understand something.
  2. Practice deliberately. Practice, keeping in mind that you are doing stuff to get better at something.
  3. Read books, biographies and autobiographies of great people will help. You will realize that there are many people who did great things after starting when they were older than you.
  4. Write. At least, keep track of the things you have done, learnt.
  5. Talk, if possible argue, with smart people.
  6. Keep all forms of stupid entertainment to minimum. TV, chatter, browsing etc..

Friday, December 10, 2010

More reading from JavaScript Cookbook

It's getting tedious now, the book, because of a lot of repetition and too much explanation. It probably has to do with the chapters I have read today - Forms, Debugging and Error Handling, DOM. The debugging chapter was just a bunch of recipes familiarising the reader with development/debugging tools in different browsers. And the DOM chapter was boring because the stuff introduced in the beginning of the chapter is repeated again and again in the recipes. It seems like the books is targeted at absolute beginners.

This is the only thing I am doing now. I need to get more stuff into the day to keep me hustling when this stuff gets boring. I am yet to decide whether I should order a jQuery book or not. I don't even know whether it is wise to get a book on jQuery because any book on the subject becomes more dated everyday and the online documentation is excellent, not to mention the infinite tutorials.

At home, we have been planning to get a puppy lately, mostly a German Shepherd. We need to figure out some issues and take decisions. I could finally do some research about dog breeds, mostly on Wikipedia and AnimalPlanet.

Thursday, December 9, 2010

Continued reading JavaScript Cookbook

The next 3 chapters in the cookbook were about Functions, Events and Browser objects. Most of the recipes were pretty basic but I still read through each of them for the sake of repetition. Three chapters is less than what I have aimed for in the morning, but it's ok. Many recipes talked about cross-browser compatibility etc. while mentioning that most of the JavaScript libraries take care of most incompatibilities. Maintaining the state within page using location object's hash property was new stuff for me.

After a long period of inactivity on StackOverflow (I have been learning a lot of stuff, but never questioned or answered), I have asked a question today. It was about currying in JavaScript. A snippet I posted was not behaving as I expected. It was because I forgot to put a return before a statement. I felt stupid and the guys who answered reassured that it happened with everybody. One commenter mentioned that currying was not the same as partial application. I read about it and this is one kind of hidden benefit from participating in communities like SO. I think I should keep spending some time in StackOverflow.

Having many ideas in mind, but not knowing which is worth executing is painful. I know that I need to prototype but I don't know what's stopping me from taking that step. Anyway, getting up to speed in the technologies I am going to use will be a good intermediate step.

Wednesday, December 8, 2010

Started reading JavaScript Cookbook

I have started reading this book to get up to speed with JavaScript. I have finished the first 5 chapters today which were really basic, after my time with JavaScript over time. Now, I have to pick up more speed and finish this book as soon as possible. The book also deals with the latest technologies introduced with HTML5 which, I hope, is very useful. The first 5 chapters just felt like a revision of the Methods chapter in the GoodParts book. And coming to know about the introduction of map, filter, every etc. in ECMAScript5 through Crockford's video lectures on JavaScript, I was bored with the fifth chapter dealing with Arrays. As a whole, it is a good start and I need to finish the book soon.

I have adopted Jerry Seinfeld's productivity technique "Don't break the chain" and made two sheets to make sure that I keep working towards my goals. I am desperate to be more productive and this is one more attempt at it. I don't understand why I am not spending the whole day learning. I am using about 6 hours a day in learning to code. The remaining time seems to evaporate without me knowing.

The next few days should be spent learning more JavaScript and jQuery. Once I get upto good speed with both, I will make some basic apps on GAE. After feeling comfortable with basic apps, I wish to restart my adventures with Django. All along, I should concentrate on improving my Python skills whenever possible. I just need to get more time out of the day. I don't think I really need breaks during study. I am really feeling down because of all the confusion. I should pick myself up.

Monday, December 6, 2010

Fell ill and starving for Ideas

I have been learning stuff for a few weeks now, but there is a dissatisfaction because I am not really using all that I have learned immediately. I understand that I will eventually put it to use some day or the other, it just bothers me that I am not doing it right now. I have been thinking of some ideas to implement to test my knowledge and skill, but I am stuck at choosing which to execute. A few of them are done to death, but I feel that I can do better or it's worth doing for learning's sake.

I wanted to get started with a micro-framework in Python and Flask seemed to be the new hot choice. The documentation is very good and I have finished the QuickStart and Tutorial sections. I feel stuck now because I really can't understand what to do now except start making something. May be I should do that.

Mind controls the body, but it can be the other way around, ask any unhealthy man. My sitting posture in the new chair has brought pain to my ribs. I couldn't stand the pain for a day, but taking pain killers controlled everything and it was gone before I experienced it again. I need to be careful about my posture etc. and make sure that these things don't get in my way.

Wednesday, December 1, 2010

The basics of WSGI etc.

After reading up on CGI, FastCGI, mod_python for the sake of understanding history, I have started reading about WSGI. It is the current standard interface between servers and frameworks or applications written in Python. There were some great tutorials for learning WSGI here. These introductions were good. I want to read the wsgiref tutorial as well and then probably start exploring werkzeug.

I have little experience with Django and AppEngine and I want to get better at both. Flask is another framework I want to get familiar with. The Web excites me more than other stuff I can do with programming. I should probably write an essay explaining why I like it more than others. Here again, I remind myself to start blogs for coding and opinions. I need to get my own domain and host my personal website soon.

Though this is not the first time I played badminton, I was skeptical about it thinking that it wouldn't be fun, mostly because of my love of cricket. It was foolish to think like that and I am enjoying it now. The other best thing that has happened is that I am waking up at 4.45 a.m. everyday.