Programmer Fuel

I can’t stand the taste of coffee – neither American, nor Italian – it all tastes like dirt to me.

Programmer Fuel

However, I too occasionally need a kick to keep me going even when I’m tired, and I’ve found just the thing here in Austria. Red Bull is the most famous Austrian “caffeine/energy drink”, but they also have a variety of similar products, which sell at lower prices. Recently, I noticed that you can even get the stuff in 1.5 liter bottles, rather than the more expensive 1/4 liter cans. Be careful though: I had a bit too much the other day, and my wife had to detach me from the ceiling.

If I had a good head for business, I’d find a way to make money exporting the stuff. At a bit more than a Euro per liter, it’s way cheaper than expensive cans of Red Bull.

Dynamic Languages in Desktop Applications

Ted Leung talks about the lack of dynamic languages in desktop applications. There’s something ironic about that: Ted works for Sun Microsystems. Sun Microsystems, back in the day, was a big contributor to Tcl and Tk. Despite not being the “in thing”, Tcl and Tk are used a lot more than people think. Not so much in the latest and greatest things being built now, due to the (undeservedly) “uncool” reputation, but in lots of products that are still chugging along, earning money and serving their users well, if not noisily so. Interestingly enough, my biggest client here in the Innsbruck area is one of these. They have offices worldwide, make a good living at what they do, and their user interface is mostly in Tk.

Oslo – October 20-22

A quick note: I’m going to be in Oslo from the 20th to the 22nd of October. I probably won’t have time to meet anyone, unfortunately, but if you are up for it, send me an email with a cell phone number and we’ll see what can be arranged.

Also, I’m trying out Dopplr. I’m not a frequent traveller, but I really like to meet people when I do go someplace new:

http://www.dopplr.com/traveller/davidnwelton

Making Applets Suck Less

With all the effort being poured into Javascript lately, it’s pretty evident that that’s the way forward. However, there are still some neat things you can do with applets that you can’t do with Javascript. For instance, I use the microemulator applet to let people play with a simulated phone on the Hecl web site.

Unfortunately, the user experience hasn’t that good. While playing around with the code for that site, Firefox crashed a number of times, and I’ve heard other browsers have trouble as well. No fun.

So it is with some satisfaction that I found this:

https://jdk6.dev.java.net/plugin2/

It’s an updated Java plugin that seems to work much, much better than the old one. Unfortunately it doesn’t appear as if it will be in the new Ubuntu, as it was released recently, but I’m quite happy to have something a bit more stable to develop with.

You can download that version of the Java SDK or JRE here:

http://download.java.net/jdk6/

It’s good to see this effort, even if it may be a bit late.

Visitors

I use Google’s Analytics system for several web sites I run, but find it a bit cumbersome for just getting a quick overview of what’s happening. For years, I’ve used my friend Salvatore’s visitors program to analyze web logs. It claims to be a “fast web log analyzer” and it is blazing fast – so fast that for all the sites I run, it only takes a few seconds to process a year or two’s worth of log files. For instance:

3724130 lines processed in 68 seconds
55 invalid lines, 0 blacklisted referers

And that’s not a particularly fast server that it’s running on, and of course it’s running with a high “nice” value. Visitors is probably not suited to huge sites, as that’s its only mode of operation – it doesn’t save data – but it’s a great option for everything but the biggest of log files.

Using it every day, there are a few things that I wanted to improve or tweak, so with Salvatore’s permission, I went ahead and put the code under version control over at Google Code: http://code.google.com/p/visitors/

rhtml-minor-mode-update

For those who use emacs with Ruby on Rails, and perhaps even use rhtml-minor-mode, I have published an update:

http://www.welton.it/freesoftware/files/rhtml-minor-mode.el

It now handles .html.erb extensions for layouts/ files and layouts/application.html.erb files (or .rhtml).

Something that would still be nice to see is some hacking to better integrate partials, which currently don’t really know exactly where they fit in their parent document. That would take some work though, as you’d have to scan for use of the partial in question and perhaps do some other parsing of ruby code. If you’re clever though, you could probably get the most common cases by looking for something like :partial => ......

Language Geekery: Reia Programming Language

This looks kind of interesting:

http://wiki.reia-lang.org/wiki/Reia_Programming_Language

In short: it’s a Ruby/Python type of language on top of Erlang. It has a mishmash of Ruby and Python syntax, and also does objects, implemented as Erlang processes.

Funny quote:

Reia uses an indentation-sensitive syntax. This allows Reia to look similar to Erlang without relying on “ant turd” tokens (i.e. , ; and .) to structure relationships between forms.

That made me laugh, and is in all seriousness, something that I do find to be a bit annoying in Erlang, especially when refactoring code. You can’t just move a line of code from one place to another; you move it, then change the line endings in both places.

My preference would be to do something more Ruby style rather than Python style for the following reason: the indentation thing makes it harder to use straight-up Python for templating purposes, whereas Ruby can be used as-is. Templates are something that I wouldn’t particularly want to do in Erlang, either, so doing them with this language might be a very nice alternative.

Anyway, it looks to be in its infancy. Unfortunately, it seems to require a more recent version of Erlang than what ships with Ubuntu Hardy. Maybe Intrepid will have something recent enough to run it.

It’s a little known fact that I originally wrote Hecl in Erlang, although, sadly, I can’t find the code any more.

Android Phone – I want one!

Early details:

  • Coming out in October.
  • UK in early November, Europe by first quarter 2009.
  • Simlocked to T-Mobile.
  • Source code! When the phone comes out. Hopefully someone will use it to unlock the thing.
  • 179$ – not bad.
  • MP3’s from Amazon.
  • Market app built in.
  • Neat use of Google Maps street view.

I’m sold, I want one. It might not be quite as flashy as the iPhone, but I want something open.

Caveat Emptor Dominium

Ok, my apologies, the Latin is incorrect, but the idea is this: I have run into an important limitation of Google’s domain registration system. Buyer beware.

Lately, I have been using Google Apps to register domains. At $10 a year for new domains, which come with all the nifty Google applications, email and so on, it’s a really good deal. However, there appears to be a potentially crucial problem: you can’t sell or transfer the domains, as far as I can tell. I would love to hear that I am wrong on this, but the person helping me through Google’s support channel first told me to “enter the new credit card details in the Google Checkout account associated with the domain”. Uh, sorry, but I want to transfer the whole thing, lock, stock and barrel. After another round of email, I got this:

To assign a different Google Account to the subscription you’ll need to
modify your billing information by following the steps listed below:

  • Enable automatic renewals for your account.
  • When you receive email notification of the impending charge, visit the
    link to the ‘Ordering page.’ – Authorize a new purchase for your domain
    registration renewal. This will replace the old subscription and charge
    your new billing information on the subscription expiration date.
    Automatic renewals will also be enabled going forward.

If you don’t have automatic renewals enabled, your email notification
won’t include an ‘Ordering page’ link to change the Google Checkout
account and purchase or renew Google Apps. You must first enable
auto-renew to be sent this link.

I don’t want to have to wait for the email notification, though! The domain won’t be automatically renewed until sometime next spring.

Hopefully this is either an oversight on my part or something Google will fix soonish, as buying a domain name that you can’t sell or otherwise give to someone else is of very limited use for some things. No, I haven’t gone into business as a domain name speculator/squatter, the domain in question is InnsbruckExpats.com, a site I registered for a friend a bit more than a year ago.