First thoughts on Node.js

This weekend I took out some time to explore Node.js, with the possible goal of using it to replace a Django project. I had a pretty mixed experience and am interested in feedback from people who have used both – opinions wanted.

To be upfront and fair, I’ve been using Django for years but have only put about five hours into investigating Node.js, so my impressions are completely lopsided. But here’s what it looks like to me:

– Asynchronous programming is going to take some getting used to. That’s OK.
– Node.js is really, really fast out of the box. But part of that is surely because it doesn’t include very much.

– Django is a complete, cohesive, end-to-end solution, where all the parts fit together seamlessly (“the Mac way”). Node.js is a baseline on top of which you pick your own framework, your own ORM, your own db driver, your own URL routing system, etc. etc. (“the Unix way”).

– There are advantages to the unix way, but IMO systems like that are more difficult to get off the ground and more difficult to maintain. The parts don’t necessarily talk to each other like you’d expect, and the whole project doesn’t get upgraded at once. End-to-end systems like the Mac ecosystem and Django are a huge win for productivity. For comparison, note the relative obscurity of TurboGears (a bunch of disconnected parts) compared to Django. Django ate TurboGears’ lunch because its cohesive and consistent. Productivity and reliability are the most important factors for me.

– The Node world is extremely fragmented right now, with dozens of Node libraries, solutions, and frameworks all competing for attention. But Express seems to be the most popular framework for Node right now, so I’m really comparing Express to Django (not just node.js to Django). And yet…

– Express doesn’t even include a way to connect to a database. You have to add that on.

– Express doesn’t include an ORM – you need to add that on. I looked into some Node ORMs, but they didn’t seem nearly as complete or sophisticated as Django’s.

– Express doesn’t provide the range of helpful command line tools, data API, etc. that Django provides.

– Express certainly doesn’t include anything like the Django admin.

– Purely my opinion, but Python just feels more elegant than Javascript. Code is more compact and more readable. Not a big hurdle though, just a preference.

And so on and so on. Django feels like “batteries included” – Node feels like a rummage sale.

Overall, it feels like Node/Express is really young. It’s exciting in ways, and shows huge promise, but how long will it take for it to feel competitive with mature frameworks?

Perhaps if I spent more time with it I’d feel less critical. Please let me know what I’m missing!

Google+: View post on Google+

The Big Hole (Pony Trap)

The back yard mud hole (“pony trap”) saga continues, and the hole is now several times larger than it was last week. Since it’s been raining, it’s a glorious mudfest now.

Miles started building “a pony trap” in the back yard a few days ago. He’s been working on it every chance he gets – in the rain, barefoot, whatever. Today a friend came over to help him grow it – now it’s a huge production, with ramps, tubes, and water collection systems. The back yard sacrificed itself for the good of boyhood, and M has learned to take his own showers.

Hidden UI

A couple of days ago, I discovered that the space where my iTunes playlists were supposed to appear had gone totally blank. Freaking out a bit, I quit and relaunched iTunes. No joy. Restarted the computer. No joy. Started digging around in plist files with no luck. Web searches turned up nothing useful.

Today, discovered by accident that if you hover your mouse over the Genius or Playlists section header in the nav, the word “Show” appears. It’s a show/hide UI element without the traditional disclosure triangle. The user is given no clue before rollover that there’s even an element there to click. Since I hadn’t hidden the playlists intentionally, I had no idea it was even possible.

I wonder how many users accidentally hide their playlists and never get them back, or end up calling AppleCare or heading for the Genius Bar for help. A very un-Apple like UI decision, IMO.

Coincidentally, I recently spent time at work solving an almost identical UI problem, going the extra mile to make sure users didn’thave to roll over an area to find hidden controls. Maybe we should have gone the Apple route on this one? I don’t think so.

Wow, this just stopped me cold

In July 2010 I posted a writeup of my family’s experience in Kauai, which I found physically and spiritually cleansing (linked below). Tonight, I received the following comment, and am just not sure how to respond. It’s a bit racist, and full of obviously gross generalizations. But there’s a part of me that understands where this is coming from – a heart that just wants the old ways back, wants Hawaii back.

“Your race is a pestilence to my people, our culture and OUR way of life. Your stench has been filling our nostrils since the arrival of your kind. Your exploitation, your perversion and your robbery of our history and our land makes me sick. IÊ»m glad you had a nice time galavanting around the land of my fathers and mothers, IÊ»m glad you had fun seeing our wonderful island in all its beauty and thinking you have a right to even look upon it. I shall remember your trip, and your pictures, and when you return, for scourge always does, you will get no respect, no hospitality from me or my ohana, who outnumber all the citizens of KauaÊ»i.”

Kauai 2010 | scot hacker’s foobar blog
It’s sometimes said that Kauai is the last remaining vestige of “the old Hawaii” or “the real Hawaii” – the last bastion of island life as it was before much of it was taken over by hotel chains a…