How I improved tenfold as a JS developer

24 May 2013

The reason for me starting JS was out of plain curiosity to play with the DOM. You might all know how learning goes these days—I started and completed the CodeAcademy course, read a few blog posts—and thought that I was great at JS.

I couldn't be more wrong.

My journey as a JS developer had just started—I just wanted to manipulate the DOM with JavaScript, and I perhaps I wrote ugly code, caring only about the final outcome.

Here are what changes I made to drastically improve how I write JS, and how others read my code.

I distinctly remember that the last few slides of an amazing presentation by Chris Coyier changed my mind, and I started using jQuery.

I still remember the (poor) 'vanilla JS' tutorials I wrote—Those weren't backward compatible, and the code was, frankly, ugly.

Read a few great books

I finally got around finishing 'Javascript: The Definitive Guide' by O'Reily Media. What parts didn't make sense back then, made a lot of sense now. I also read (a bit of) 'Eloquent Javascript', which went a bit in depth with it's explanation.

I believe that reading the two books, and seeing the way the experts wrote JS, opened my eyes and made me think—"Wow, Namanyay, you write shit code. These guys are so better!" and made me want to improve.

Learnt a few JavaScript design patterns

From this book, I learnt the revealing module pattern, a pattern which I now love and use extensively in JS. I believe this is the single most important change that improved the quality of my JS.

Being humble

…And I learnt all of this only because I admitted to myself that I had been writing poor code, that I could improve. If I hadn't understood that, I would've remained the amazing JS programmer I thought I was.