Sunday, August 21, 2011

Using node.js as my Microsoft Word (+Bonjour)

I love the fact that node.js works on windows.

It's super duper cool.

I wrote yet another markdown processor this weekend as I was kinda out of range of internet to go and import one. I'll fix that later since my version is very weak. I also got a new computer, and I'm doing things a bit different. This should give me an opportunity to solve old problems using new technology.

The first one is printing files between operating systems. My wife has a printer, and I don't. I could solve my problem by buying a wireless printer, installing bonjour, or a USB stick. I'm too lazy for a USB stick, and I don't print enough to justify a wireless printer. The idea of installing bonjour makes me sick (why, I don't know). So, I made marp.

Marp is simply put an HTTP server + markdown + a template. That's it. But, now I can print from my wife's machine by walking to it. This is kinda sucky, but it solves my problem to the point where I am happy.

After spending two hours debugging and getting the markdown + template to where I wanted it for the first version, I hooked it up to node.js and a couple of path handlers, and I was done. I have a thing.

This is why I love programming. When I have problems, I can solve them.

This is also why I love the potential that is node.js. I can throw things together really fast that do really powerful things (I would call making a custom http server that resides in one file a powerful thing). The language isn't too terrible. The velocity I get is terrific. I can hammer simple things out really quick. The concurrency model is very easy to understand, so I don't have the typical race conditions that I would with threads. I can poop little products (that perform well) out very quickly, so I can iterate.

I am nervous about doing bigger things with it, but I'm optimistic that the node.js community will figure that stuff out.

No comments:

Post a Comment