Colin Chang


Today I wrote and shipped now.js, a simple app that shows what I am doing now-ish. For the time being, it shows the music I am listening to and the books I am currently reading. It updates “automatically” at least once per day. I plan to add other categories like fitness tracking, food tracking, movie tracking, and location tracking. I also plan to change the look-and-feel, but I have not yet decided how best to present the information.

Feel free to read now.js’s source. I had in mind to achieve several goals with this project:

  1. Manipulate the DOM directly with javascript. No jQuery and no UI frameworks like Backbone.js.
  2. Interact with third-party APIs.
  3. Ship something fast. Do not sit on this project trying to perfect it. Code, focus, and then ship.

I had only written javascript previously in legacy codebases with frameworks and libraries already in place. I felt (and continue to feel) uncomfortable relying on frameworks and libraries for too long because I am afraid to use them as a crutch. And I just like to know what is happening behind the scenes.

Always good practice to interface with third-party APIs. I use Goodreads and regularly and I feel they represent me well.

I think of quite a few technical ideas, but most do not get much farther than prototyping stages. I read some advice to not dismiss building something easy, because building easy things builds your confidence for completing more difficult projects. So here I am, taking the advice seriously. I think the idea is that it is infinitely more productive when honing a craft to actually use that craft rather than halt and consider the most efficient way to do it.

I leveraged Google Feed API, which does much of the leg work of preparing rss feeds to a ready-to-use state for javascript wrangling. I chose to use a library here because it helped me focus on my primary learning goals. In the future perhaps I will revisit writing my own rss parser.

Accomplishing goal one just meant that I had to write pure javascript sans importing any help with DOM manipulation. I enclosed my app in a closure (though technically there is not much global namespace to protect at the moment), wrote lots of functions, and verbosely manipulated the DOM. I designed the app so it would not be very time consuming to scale additional rss feeds. I accomplished goal two by incorporating and Goodread’s rss feeds. I finished the first draft of the app in a few hours, which I consider fast enough for goal three. And I also shipped.

I feel like this is a good start. I definitely have a better appreciate for jQuery’s abstractions. I am glad to took a manageable goal and completed it.

UPDATE: Google has deprecated their feed api, so I’ve taken down the page.