Erlang: Log to Files

Since I had a heck of a time finding out how to do something that ought to be really easy, I thought I'd post what I found.  If you want Erlang to write errors to a file instead of stdout, add this to the command line:

-kernel error_logger '{file, "/tmp/erl.log"}'

Maybe there's a better solution, in which case feel free to correct me.

Better Software 2010

Florence, Italy, is an extremely popular tourist destination, and for a good reason: it's absolutely full of beautiful architecture and famous art.  It apparently gets more than a million tourists a year.  So it felt kind of odd for me, as a foreigner, to hole up in a conference talking about computers, software and business within a stone's throw of this.

It was well worth it though.  "Better Software" was a very interesting conference, and extremely professional.  One anecdote: since there were so many people signed up, they did the lunch and coffee breaks in another facility nearby, about a block away.  However, the weather wasn't very nice, so the organizers rounded up a bunch of umbrellas, and put them near the door with a sign saying "take one if you need it", so that people could stay dry while going back and forth.  Of course, having grown up in Oregon, I don't trust the weather much, and carry an umbrella, but it was a really nice gesture and attention to detail.

I expected it to be good, but it ended up being a really great event.

Some memorable bits:

  • As always, it's good to catch up with old friends, and meet new people.
  • Giacomo "Peldi" Guilizzoni's talk about Balsamiq was really good: he's an entertaining speaker, and the success of his company is a great story.
  • Andrea Santagata gave an insightful talk about startups in Italy, and managed to cover a number of points that I've seen from people like Paul Graham and other "startup gurus".
  • I had some interesting discussions with people about open source, business and economics, a topic I gave a presentation on.
  • It was quite motivating to meet so many people working on cool things.  Italy absolutely does not have a talent problem.
  • The dinner was great: Bistecca alla Fiorentina for me, accompanied by red wine.

I suppose that, given the huge success of the event this year, they may look for a larger facility for future events, but I hope it doesn't end up in some soulless place in the suburbs; even if I didn't do any sightseeing, I liked being in the city center.

While the organizers would be more than capable of putting on a more international event, I enjoyed the focus on Italy, and the cool things people are doing here, and I feel it also contributed some to the positive atmosphere.  It's one thing to have some guy come in from abroad and tell you something, another to see someone like Peldi talk about how he did what he did.  And what with all the problems Italy has right now, some "positive energy" was more than welcome.  Like I said, Italy has a lot of really talented people; the problems lie elsewhere.

A big thanks to the organizers and everyone who came, and I hope to see you there next year.

Mochiweb proto-deb and hacking

I had some time over the weekend to play a bit with Mochiweb.  It's a very nice little bit of work, but kind of strange for an open source project.  I think both things come from the fact that it was built to do some very specific things in a business, and once those goals were accomplished, that suited the owner just fine.  There is no nice/fancy project home page, no links to documentation, and in general, all of the stuff you're supposed to do for a successful open source project.   The code, however, is good, fast, and pretty easy to deal with.

Anyway, I wanted to use it for a thing or two I'm working on, so I created some .deb packaging for it.  It's been ages since I've done that (indeed, I officially retired from Debian), so it's probably missing something, but I thought I'd throw it out there for people to have a look.

The git repository is here: http://github.com/davidw/mochiweb – my changes live in the 'deb' branch.

The big thing I've tried to do is make it so that if you have several mochiweb projects on the same machine, they'll all be started/stopped by the init scripts, if you so choose.  What you do is add a file with the path to the application to the /etc/mochiweb/apps directory, and when you do /etc/init.d/mochiweb start, it will start all of those.  At stop time, it will run the stop.sh script, which shuts things down.  It runs things as the user that owns the start.sh script, unless it's root, in which case it simply doesn't run.

The thing that's missing right now is a way to get the thing to write logs somewhere, and I'm not quite sure how to do that, so here's hoping someone will write in with a suggestion.

The .deb file I generated ought to be attached to this post, although there are no guarantees that I'll keep it up to date.