Month of JavaScript

I don't like JavaScript. For the time working in WEB I've wrote much of JS code, but mostly it was DOM manipulation with jQuery, not big deal.

So the last task was the same: dependent select elements. I did it with jQuery and DOM bindings. So good unless maintaining and expanding are needed.
Time has come - I have to learn vanilla JavaScript.

All February I tried to read the news and blogposts about JS. I've read some books and a few dosen blogposts.


"If Hemingway wrote JavaScript" by Angus Croll. The book is more funny than useful. In this book, the author imagines what the code would look like if it was written by famous writers. And that's damn brilliant! I recognized myself in Hamingway, I write similar code ( I think everyone does like that). Although the book is entertaining, it has a few interesting tricks from the freakiest authors.

"JavaScript: The Good Parts".The book isn't bad, it's aimed at those who already know JS and want to enrich their knowledge. What I didn't like about the book is the style of presenting information: sometimes everything is clear, sometimes it seems that the author has cut some parts out in order to make the book shorter. The book isn't long and can be read during the weekend. And you definitely should do it.


Another useful source is - Angus Croll's blog. Although it's been abandoned for a while, old entries contain lots of useful information.

Besides reading books, I had to find out how to write tests for JS. De facto standard is Jasmine, but it's for browsers. For my task I needed a browser at the very last moment, so I decided to find out what can be done with node.js and how to run tests in the console. It turned out that the popular library for BDD testing in ruby world also exists for JS! It's mocha! Together with chai.js they make a wonderful couple which can be run as if you worked with rspec.

Even after a closer acquaintance with JavaScript I still think it's a terrible language. I'm sure, a kind of js framework will definitely come into the stack of a web-developer. And that is inevitable.