A Minor Erlang Rant

In an earlier post, I compared node.js to Erlang: https://journal.dedasys.com/2010/04/29/erlang-vs-node-js – which admittedly has a whiff of apples and oranges about it.  Still, though, I think there's something to it.  Node.js is creating lots of buzz for itself these days.   Some of that will turn into actual production use, and at that point actual companies will have a vested interest in seeing the system improved.  Currently, it is not as 'good' as Erlang.  Erlang's VM has a built in scheduler, so you simply don't have to worry about manually creating bite-sized chunks of processing that feed into one another, it all "just works".  For instance, my current Erlang project involves reading from twitter's stream, and distributing that to IRC and the web.  It's pretty simple, works well, and is quite robust.

I haven't had the best of days though, and one little annoyance of the many I dealt with today really caught my eye.  I need to do an HTTP POST in Erlang, and:

  1. The documentation does not have examples.
  2. Here's an example of how to do a POST:
    http:request( post, { "http://scream-it.com/win/tests/posttest.cfm", [], "application/x-www-form-urlencoded", "x=2&y=3&msg=Hello%20World" }, [], [] ).

  3. Aside from being ugly and not very leggible, you'll note that he's passing the parameters as a string, and also has to manually include the "x-www-form-urlencoded" header.

  4. To create that string, you'd want to url encode it.  Actually, ideally, you'd just pass in a list of key/value pairs and let the library module handle it.

  5. However, there's nothing in the http module that does that.

  6. If you look through various bits of Erlang code on the web, you'll note many, many versions of url encoding and decoding, because the http module makes no mention of how one might go about doing so.

  7. It turns out, that the edoc_lib module does have a uri encode function!

  8. That isn't documented in its own man page.

  9. And certainly isn't linked to in the http page.

So, in 2010, doing an HTTP POST in Erlang is still a pain in the neck.  I'd be happy to put my money where my mouth is and submit a patch (at least one for the documentation), but you have to wonder why no one has fixed the problem so far – maybe they're not very accepting of patches?

Some difficult decisions?

I am, by nature, a tinkerer.  I love to build things to see how they will work or because I have an idea that I think is fun.  I am not so much of a natural business guy.  I go build something "because it's there".  Or rather, it's there in my mind, and I want to make it.

I earn money, however, via consulting work.  There are problems with this line of business though, namely that it doesn't scale very well unless, besides being good at a skill, you've also got the skills to build up a consulting business, which is very much about adding and managing people, something I'm not all that passionate about and would rather avoid.  So what happens is that you go through slumps with less than full capacity, and then things pick up again, and before you know it, you hit your upper limit and can't take on any new work, putting a ceiling over your potential earnings.  Sure, you can raise prices a bit, but that'll only get you so far.  For a while now, I've been considering this problem, and I think some sort of product would be an ideal way out.  Stories like Balsamiq's are inspirational, and along the lines of what I think might be nice.  Don't get me wrong, I like my clients and like to help people solve problems a lot, but it's a stressful job in that you're never very far from having no income.

I'm not much of an entrepreneur, though, in the sense of someone with a nose for making money.  I tend to think about building something cool first, and not really worrying about making money with it.  Predictably, some of the sites I have created are popular, but don't make any money.  Sure, they have some ads, but that doesn't really make much unless you get really huge page views or have some sort of content that attracts users who will click on very lucrative advertisements.  I've started to think that perhaps I should constrain myself in new initiatives to creating things that have a direct source of revenue: you want to use it, you pay.  In my daydream world, I'd probably just hack on open source all day long, but there's no money in that for someone like me who is not the author of some huge, famous piece of software, nor a particularly great hacker in any case (I've met some, like Andrew Tridgell, and it's a really humbling experience).

So that brings up the question of what to do with the aforementioned sites. One option would be to sell them off via a site like flippa.com, another would be simply to just let them sit there and stew, but they do take up some resources on my server, and require some maintainance now and then, and they're a bit of a distraction too (I start wondering about things to add or how to fiddle with them).  Maybe there's a way to make money from some of them, but I'm too blind to see it.

The ones I'm thinking about, are, in no particular order:

  • http://langpop.com – this one gets decent traffic, but programmers are about the best people in the world at ignoring advertisements.
  • http://leenooks.com – the Linux Incompatibility List attempts to point out hardware that people should avoid if they intend to run Linux on their computers.  Happily, there is less need for this site than when I conceived of it some 10+ years ago, but I think it's still a helpful resource.
  • http://linuxsi.com – (in Italian) this one is a place that highlights stores and consultants who are "Linux friendly".  Want to buy a computer with Linux?  There's probably a store near you.  I have had fun with this site, but, once again, no revenue.
  • http://squeezedbooks.com – "open source" business book summaries and discussion.  There are plenty of competitors in this space who make their money by churning out summaries and charging for access for them.  I had hoped to build a community interested in reviewing and discussing books out in the open.  There is a lot of fluff in business books, mostly because you can't sell a 10 page book that describes your idea, but need to pad it out with lots of examples and repitition and so on to make an actual book out of it, but that doesn't mean the idea at the heart of the book in question isn't an interesting or new one.