« October 2007 | Main | December 2007 »

November 30, 2007

SRV records and ADSL routers

The last 2 ADSL routers I bought (the most recent 3 months ago) lack support of SRV DNS records.

When I get my IP address via DHCP, the router also sets itself as my DNS server. But if I use it, dig srv _xmpp-client._tcp.simplicidade.org gives me zero answers.

This, as you might imagine, sucks big time. This is a D-Link router bought in 2007, and basic SRV lookups are still missing in action.

Two applications I use on a regular basis have problems with this: XMPP clients and the Mac OS X 10.4.x version of ssh command line client.

Both of them use SRV lookups, and while ssh just becomes slower to connect, for XMPP clients this has a devastating effect because all of my accounts only have SRV records.

I know that you can use also fallback to a A record, but if you have out-sourced your XMPP server to someone like Google Apps for Domains, or if you use different servers for web and XMPP, it might not be as easy. There is also XEP-0156: Discovering Alternative XMPP Connection Methods but the business rules section (in particular rule 2) prevents us from using TXT records to provide the same information that is already in the SRV records.

The solution is to use a decent router, or upgrade to a decent firmware if available.

But in the meantime, this sucks.

Update: it's not a SMC router, but a DLink router, DSL-524T. Anyway, the firmware is the latest one available at my local support site, but the http://www.dlink.co.uk/ has a newer firmware, 3.00B01T02.UK-A.20060621. I'll install that one. A good thing is that this router supports OpenWRT, another option.

Update 2: all firmwares I could find for the D-Link would fail the upgrade process, so I gave up on any official firmware. Next step: OpenWRT.

I had a SpeedTouch 580 around (as a backup for the 510 I use at the office). The default firmware, 4.2.7, had the same problem with SRV lookups, but a quick update to 4.3.6 solved the problem and now I have SRV lookups again, yeah!

Bernstein software is now public domain

This is good news. Qmail distribution page is already updated.

Pity it took so long. 8 or 9 years ago, a public domain version of Qmail would rock. Now, not so much.

But even so, it will make things like qmail-ldap project easier to use.

Not work safe

A football match with the players using binoculars.

Not work safe because you'll make a fool of yourself laughing out loud. I know I did.

November 24, 2007

What every programmer should know about memory

A full (114 pages) PDF version of the series by Ulrich Drepper is now available.

Everything you ever wanted to know about memory...

November 21, 2007

0×5f3759df

Carmack is (still) god. At least one of them.

(via apostle pfig).

Update: a more accurate version of the source of the code.

Update 2: the real author stands up.

November 20, 2007

Amazon Kindle

I find it amusing that a search for Kindle in Amazon UK doesn't return any relevant results. So much PR, so little return.

Anyway, I'm carbon-oriented when we are talking about books. I prefer the paper-kind, not the electronic version. I subscribed O'Reilly Safari bookshelf for a while, but I stopped using them because of that.

Granted, the experience with Kindle could be better than a browser and a computer screen, the display is much better than the usual 72dpi of a LCD.

But still, I think that, taken everything in account, a paper book is more fun, useful, long-lived and even, if the paper companies get their acts together, more eco-friendly than any electronic alternative. At least I only have to "charge" my book once in his entire lifetime, right?

The thing that I feel lacking from the book business is an indexing service. I own about 100 technical books, on several topics, and I have most of them in shelfs for quick access. I have the capacity of memorizing the book that contains what I'm looking for, its a curse. Sometimes is freakish because I remember the exact chapter number, and the page layout. My memory sort-of works that way.

But I would love to have access to the full text index of the books in digital format. I would buy my books in the usual way, and with it, I could receive some code to download a copy of an inverted tree that I could plug into some software running on my local machine.

This way I would have a personal index of all the books I own.

Maybe Safari bookshelf could sell this, as an added service: the possibility of keeping a list of books I own and allow me to search just those. Not great, but a good start.

Update: Kindle is based on Linux, so Amazon has the source code available for download. Commentary by Robert Love.

Update 2: Another Robert Love post about the Kindle features. The lack of PDF support is disturbing.

File uploads

I like the new web-based upload tool that Flickr is using. I like it so much that I no longer use the Flickr iPhoto plugin. Update: there is a open-source project that matches most if not all the features of the Flickr uploaded: SWFUpload 2007.

One thing I could never understand is why don't browsers have a upload list with a progress bar? I mean, they have all the information they need to do it. Why haven't we seen that? Is there some technical limitation that I'm just not seeing?

Wide-Finder and Perl

The Wide-Finder project has been a lot of fun. For those who think that it is not a real-world problem I'll leave you with a quote from the Wide-Finder results page:

Worth Doing · There is a steady drumbeat of commentary along the lines of “WTF? This is a trivial I/O-bound hack you could do on the command line, ridiculously inappropriate for investigating issues of parallelism.” To which I say “Horseshit”. It’s an extremely mainstream, boring, unglamorous file-processing batch job. There’s not the slightest whiff of IT Architecture or Social Networking or Service-Orientation about it. Well, that’s how lots of life is. And the Ruby version runs faster on my Mac laptop than on the mighty T5120. The T5120 is what most of the world’s future computers are going to look like! Houston, we have a problem, and the Wide Finder is a useful lens to examine it.

Anyway, last night I noticed that the top spot is now a Perl program by Sean O'Rourke. Its an extremely simple program, about 60 lines long. Worth a quick read.

Congrats Sean!

Storage and the growth of ZFS-based NAS

I've come across an interesting project growing around OpenSolaris. Its called NexentaOS and its a OpenSolaris branch.

The company behind NexentaOS is Nexenta. They use the OS to build a NAS appliance, NexentaStor, that runs on commodity x86/64 hardware, and offers very cool features: unlimited snapshots, snapshot replication, NFS, CIFS, FTP, Rsync and Amanda. Also, they use ZFS so you can grow your storage to extremely large pools, with both direct-attach storage or using iSCSI.

The cool part, the one that got me interested, is that they also make available a VMWare image, a NexentaStor Virtual Appliance, fully featured time-unlimited evaluation product (good for up to 6Tb) that you can download for free. I'll download the Quick Start Guide to see what can be done with this, but if this is really simple to use, it might just replace the small office NAS (around 500Gb RAID-1).

I found out about Nexenta via the Joe Little blog - Little Notes. Joe works at the Electrical Engineering department at Stanford University, and you can read how they are using Nexenta as a second tier storage for backups, keeping 6 months of daily snapshots. He also has a white-paper about multi-tier storage worth a read.

One last item: in the Community tab of the Nexenta website, I also found a RsyncShare, a open source implementation of RSYNC shares manager for Windows servers. It might be worth a look if you have to manage stuff like that.

I'll leave you with an article by Paul Murphy about OpenSolaris, NexentaOS and what they mean to Linux. Also very interesting stuff. The road to ZFS on Linux is still buried deep in incompatible licensing mud, so I don't expect to see a decent implementation running native on Linux soon. And I don't consider FUSE to be a production environment, sorry. So if running OpenSolaris or NexentaOS makes you dizzy, you might want to take a look at FreeBSD, given that ZFS support is already in there.

November 17, 2007

How do you like them apples?

Apples

Yes, I need a haircut. Yes, my wife refuses to admit that she's married to me with pictures like this floating around.

And yes, they where good apples. I think I ate about a dozen of them during the three days of Codebits.

(Picture from the Delfim Codebits gallery).

Codebits wrap-up

So Codebits ended last thursday night. It was the best conference I attended in a long time.

We had pretty good house (I would love to know official numbers, but I would say that about 300 people where around), and at the end of the contest, 47 projects, some goofy, some hardware hacks, a bunch of mobile hacks, and a lot of web stuff. I think it was a good participants to projects ratio.

The 90 seconds per project presentations where very cool, and it gave a very good rhythm to the whole thing. At the end, 10 lucky winners (I suppose the winner list will be online sometime next week) got a great set of prizes: Xbox 360, Macbook and Vaio laptops, O'Reilly books, iPods, and lots of other stuff.

Of all the projects, two of my favorite projects won a prize: a Pong game based on distance sensors, and a presentation about a slideshow organizer for pictures of porn sites (the presentation didn't include the pictures of those sites, but he did put up a porn movie in the background, audio-only during his 90 seconds...). Just for the record, the last one won the humor category.

Two other projects that didn't win but deserve a mention: the first, called GPlat. Its a simple website for playing games. I liked it because it matches some of the work I want to do with the SAPO Messenger client. The second, Use Your Head, is another pong game but this time you control your pad using a web-cam and facial recognition.

(Update: I was mistaken, Use Your Head did win a prize. Thanks to JoaoP for the correction)

Use Your Head, photo by Delfim Machado

Celso and Pedro are to be congratulated. They did an amazing job putting this together, and they where able to get an amazing set of support people. Congrats to all of them.

You can look at updated photos by Delfim and also see what people uploaded to SAPO Fotos and Flickr.

As for me, it was a blast participating, and being part of the jury. If they had pre-bookings, I would put my name down for the next year.

Update: more links to photos, videos and blog posts:

Update 2: official wrap-up post by Celso.

November 15, 2007

api.destakes.com

Another thing that showed up during Codebits: the Destakes API.

Simple, and to the point. Like it should be.

Kudos to Carlos.

Codebits update

The Codebits event is awesome. The haven't had this much fun in a long time.

You can look through some great pictures of the event at Delfim's gallery.

The F.E.V.E.R. concert last night was pretty cool, although I'm not a fan of their kind of music. Even through out the concert people where still coding like good geeks.

Update: uploaded some pictures of my own to Flickr.

Olà Portugal

So, at last, the Apple Online Store opens in Portugal.

One quick tip:

Safariscreencapture001

It's Olá, not Olà...

(Kudos to Miguel)

November 13, 2007

codebits: gentlemen, start you torrents

Codebits started a couple of minutes ago, and I'm really impressed with the number of people who showed up.

This is already a big success.

More later, now back to Mike Culver presentation.

November 12, 2007

git-darcs-record

A cool script, git-darcs-record, that adds darcs-style interactive record to git.

Recommended.

November 08, 2007

XMPP and AIM

After the Google/AOL agreement in late 2005, speculation regarding the interoperability between AIM network and GTalk network was rampant.

A screenshot of a new GMail client shows some AIM integration.

Unfortunately, the image shows "Sign out of AIM" which means that they seem to be doing a multi-platform client, and not XMPP federation. That is to say: you can login with your AIM credentials and talk with your AIM friends, inside the GMail interface, but you cannot use your GTalk account to talk to AIM buddies.

Of course, this is just a screenshot someone took somewhere. Their camera could be of the Photoshop brand. I do hope so.

If this is really what's going to happen, then the IM silos are still holding up.

SAPO Services and IM

pfig mentioned the public SAPO APIs and noticed the lack of instant messaging APIs.

I worked at SAPO in the IM department and we created some APIs for the service. In fact you can see them at work in the Webmail service (the presence status of your email recipient is shown, like the green indicator in the Mail.app message list) or even better, look at the SAPO homepage, login in the right-hand side column, and check the tab "Amigos".

The problem is that the vast majority of the information the instant messenger team has is not public, so we need to have that information protected. So some type of authentication is required. I'm hoping that SAPO chooses OAuth...

So yes, you don't have them right now. I expect them to show up in the future.

Test::Harness and Devel::Cover

I've been using the alpha/beta's versions of Test::Harness for a couple of weeks now, and I'm very happy with them.

This week, Test::Harness 3.0 was released so it should start to flow naturally to all of you unsuspecting users. There are people more qualified than me to tell you what was changed and why it is a worthy upgrade.

One thing that I noticed during the beta phase was that the HARNESS_PERL_SWITCHES environment variable is no longer supported, so the classic way to run your tests under Devel::Cover:

 HARNESS_PERL_SWITCHES=-MDevel::Cover prove -l t/*.t

no longer works.

Until bug 25559 is fixed (patch is available in the ticket), the last recipe in the Devel::Cover perldoc works:

PERL5OPT=-MDevel::Cover prove -l

(you no longer need t/*.t with the new prove).

Happy testing!

Codebits

In case you have been living under a rock, the best geek conference in Portugal is just around the corner.

Codebits

Codebits has everything you need to have loads of fun hacking: a big place, decent bandwidth, cool conference track, and access to SAPO APIs that you might need to build your next site (soon to be at developer.sapo.pt). Follow the blog for the latest updates and check the FAQ for everything else.

And you get to meet a bunch of crazy geeks, just like you.

So come on down, bring your laptop and your brain, and let them provide the rest. Hurry though, we are down to the last places now.

I'll be around the three days.

November 05, 2007

Android

You remember when Google started using the "beta" moniker with several of their sites? It started with the main search engine. And it started the Beta trend that still lives on today.

Today Google started a new trend but forgot to place the same style moniker in the logo: vapor.

You see, the promise of "write once, run anywhere" has been made several times, and it seems that it get shoot down due to politics. Its not that its impossible to do it, its just that it makes companies that are competing with each other commodities, and that makes it hard for them to innovate or standout.

I do wish success to the Open Handset Alliance, if not for anything else, because I think Apple needs competition to the iPhone, to make it even better.

We'll have to wait until the 12th to see the SDK, but the first thing I'll look for is a test suite that I can run on my "new" Android-compatible handset to see if he really is compatible. The way I look at it, if this standard environment doesn't have a full open and available test suite that the devices are required to pass before having permission to be called Android-compatible, then this is nothing more than a joke.

November 01, 2007

ODF

I wanted to write something about this but I didn't know what.

Rui did it for me.

Update: some counter arguments.