Archive for February, 2006

Linux Revisited

Over the last two weekends, I spent numerous hours trying to install OpenSuse Linux on my laptop. Actually, installing it wasn’t the real problem; getting the built-in wireless network adapter to talk to my wireless network was.

I remember the days when Linux was still fresh and new, and there were only one or two distributions. It was 1994 when I first installed Linux, probably RedHat, on a faculty computer, because they wanted their own webserver (after I persuaded them that the web was going to be big. Anyday now. I remember being awestruck at the end of ’93, when I first saw an Australian museum’s website with photos on it, so I went and made a website for the Rotterdam law faculty where I worked at the time, with scanned photos of the city of Rotterdam on it.) Linux came on a couple of disks back then, and installed and ran happily on an old 386sx that was gathering dust in a corner. Text only of course, no fancy GUIs available yet. Fortunately I had just had a Unix course for the Convex number-cruncher that the university had just bought (does Convex still exist?).
Continue Reading »

2006-02-23. No responses.

Start Your Own Campfire

After marvelling over the idea behind Campfire, I wondered how easy Rails would make it to start my own campfire. After all, the concept doesn’t seem to be all that complex: log people’s messages and feed them back to all the other people in the same chatroom. There’s some bells and whistles around that, like logging in, creating your own room, inviting others to join your room, etcetera. But I think, if you’ve got the basic concept covered, the rest will follow easy enough. And that basic concept didn’t proof to be all that hard to build — with Rails.

First, I created a very simple database table to hold all messages with a timestamp and username for each message. Then I created my Rails application, with one model class for the messages and one ChatController. ChatController contains an index method that initially reads all messages from the database and passes them and a fresh new Message object to the view. There’s a create method that will store a newly entered message in the database. And finally there’s a refresh method for periodically refreshing the div in the view that contains the message log. The index.rhtml displays the messages using a _messages.rhtml partial that is also used for refreshing them, with a periodically_call_remote call. To add some more Ajax, newly entered messages are sent back with a form_remote_tag, so the visitor never sees the screen blank for server requests.

That’s it, really. Nothing more to it. For the basics, anyway. I could think of a ton of features I’d like to add. First thing I’ll do is to add authentication; then put it on DreamHost and tell my colleagues and friends. We won’t be needing Campfire’s services, thank you very much. Blame Rails for making it easy.

Download the source here: Kampvuur (Dutch for Campfire) 0.1 BETA

Kampvuur screenshot

2006-02-21. One response.

News of the World

M. and I were just talking about how much the web has changed our lives. She can now find, read and print scientific articles for her work via large databases on the web; articles from bonafide, peer-reviewed magazines, that sometimes are not even published on paper anymore. In my own work, the web is indispensable as well: JavaDocs can be downloaded but are just as easily accessed online; and for most programming problems or weird error messages there’s an answer to be found via Google. We are all connected to an immense network of information and experience; connected to the world, it feels like. Next thing, I open up Bloglines, start reading the first post and wind up on this website (made in Holland I am proud to say) where the world map literally cries out its news flashes as they happen. Yesterday Campfire, today this; what will I find tomorrow? I love the web.

Screenshot from What’s Up. I guess, for Dallas, this is world news…

2006-02-18. No responses.