Tuesday, November 9, 2010

Striving for eloquence in Javascript

I have always wanted to learn JavaScript, to do cool things, after witnessing the awesomeness everywhere on the web. My previous start with Eloquent JavaScript ended pretty soon after I reached the difficult(then) stuff. But, this time, after reading the JavaScript guide at MDN, I have decided to get comfortable with JavaScript. I downloaded the free book and started reading from my laptop.

The book is really enjoyable for a beginner like me. I have read through the first four chapters dealing with values, variables, flow, functions and error handling. Then started the chapter on Functional Programming. This took me some time to finish. The author made up interesting stories to form a base for the exercises and explanations. 'The programming book by the recluse' in chapter 7 was fun. He has introduced the traditional functions from functional programming one by one. The over enthusiastic use (as confessed by the author himself) of forEach, map, reduce, filter, negate, compose, any, every etc. didn't cause much trouble for me after the experience with SICP.

The next chapter, Searching, was not intended to introduce new concepts in JavaScript. It posed two similar problems from graph theory. I took some time to understand the algorithms and worked through the exercises with some difficulty. I need to finish this chapter and two more tomorrow.

Another extremely useful thing was - the JavaScript editor+console within the book. With basic syntax-highlighting and auto-indent, it was really helpful. Having coded in Python and Scheme for sometime, I was having troubles with semi-colons initially, but got into the zone after sometime. Cross-compilers like pyjamas and coffeescript were in news recently but I will concentrate on learning js for now and then dive into jQuery.

JavaScript is failing the spell check here. Isn't the spell checker written in JavaScript? :P

No comments:

Post a Comment