A very special valentine’s day

Maybe you already knew, there is something special 00:31:30 Saturday February 14, 2009 in Europe/Amsterdam?

It’s 23:31:30 Friday February 13, 2009 in UTC. Now that’s an interesting moment.

At that time, how many seconds since 00:00:00 Januari 1, 1970 is it again? Well, not exactly 1234567890 seconds ago anyway.

But it so happens to be that unix systems keep time by counting the seconds from 00:00:00 Januari 1, 1970. And unix time does not count the leap seconds, so guess what… When it is 23:31:30 Friday February 13, 2009 in UTC or 00:31:30 Saturday February 14, 2009 in Europe/Amsterdam on your system’s clock, the internal unix time counter will indeed contain the value 1234567890.

Vista and an Apple Time Capsule

Oh my, that Redmond OS called Vista is truly a freakish beast. Today my girlfriends laptop refused to connect to my new Apple Time Capsule. I had my Time Capsule configured for personal WPA/WPA2 over 802.11 b/g/n. My girlfriends Vista laptop was able to connect and authenticate, but was unable to get a DHCP lease, it ended up with one of those 169.xxx.xxx.xxx addresses. The steps to remedy the problem were really bizarre.

I reconfigured my Time Capsule to use no wireless security. I then connected her Vista laptop, it could get a DHCP lease. I re-enabled all security. Adjusted the network settings on her laptop to use WPA2. And it works flawlessly, I can even do ipconfig /renew from a command prompt.

Vista: The dumbest operating system ever if you ask me.

I really ought to sleep…

I just wanted t see if I still knew how to write a quicksort by hand. Checked it against “Intruction to Algorithms, 2ND ed.” afterwards and it actually checks out. 🙂

package net.leenarts.algorithms.quicksort;

import java.util.Arrays;

public class QuickSort {

public static void main(String[] args) {
int[] A = {3,8,5,9,2,7,4,6,2,9,1,4,2,7,5,4};
doQuickSort(A, 0, A.length -1);
public static void doQuickSort(int[] A, int p, int r) {
if (p

Near miss with phishing mail

Recently I came back from a snowboarding vacation. Only half an hour home after a 12 hour drive I had to check my e-mail.

Too bad I missed the sender and recipient address on an e-mail message. I f-ed up and clicked a link leading me to a PayPal phishing site. I logged in and the site asked for my credit card details straight up. WTF!?! PayPal wouldn’t do that.

I immediately changed my password for PayPal. They didn’t have time to harvest my account. But they sure tried, because PayPal has blocked my account and has me jumping through the usual hoops to let me prove I’m still in control of my PayPal account.

Sigh! Just when I was about to purchase MarsEdit. I never thought I would fall for one of those phising e-mails. But finally I almost missed one, I never thought I would be so stupid.

Moral of this story:

Always double check the links you click in e-mails.

Thule SnowPro Ski/Snowboard carier on a Mini Cooper supplied roof rails

The Mini Cooper parts catalogue details a 2 Board Snowboard roof carrier. I ordered that and thought I could carry my snowboards to some snow covered slopes in the near future. Turns out Mini is not yet manufacturing these things or something. Bottom line, I couldn’t get what I needed.

Next stop Automat, it’s one of those shops where people go to pimp their cars in a very very bad way. They’ve got all sorts of decals, plastic bumpers that would make Dolly Parton jealous, ridiculously over-powered car stereo amplifiers that’ll suck your battery dry and make your ears pop. I should have went there all dressed up in a trenchcoat with a hat and sunglasses like some sleezeball going for a pop at one of the local “ladies of pleasure”.

snowpro746.jpegAnyway, I digress. They’ve got Thule roof carriers too. And I needed a set bad, because it did take a while before word got back that I could not get the BMW part. I ordered a Thule Snowpro, model nr. 746.

The problem is, the brackets supplied with Thule parts only fit they small square bars here in the Netherlands. To make it fit their streamlined bars you need some adapter costing 20 euros. And then it still is a question if these adapters are going to fit my Mini rails. Because the profile on top of my bars are a lot wider. I wouldn’t want my snowboards to go flying of and crash into someone’s windshield, now would I? For the 888 adapters see the image below.

05x_thule_adapter_888.jpg Anyway, I put in a call to my tool-time-Tim super dad. He’s got a garage full of tools and I don’t, so he can actually manufacture stuff. We measured everything and then fabricated 4 little adapters of our own. Made of a solid aluminium bar, 4 bolts, 4 nuts and some locking washers. Total tally at the end of the day 1,65 euro’s. Eat that Thule… Oh, and we the bolts and stuff we used are air service rated, so if you winch my car up by the rails, it wont be the bolts or bolts that’ll break. 😉

I’ll post a picture of the end result when my digital camera is charged again.

Now I’m off to the garage again. 🙁 I was killing time because the garage won’t have service personnel available until 9. Got a flat tire… 🙁 🙁 And I don’t wanna drive 90 kilometers on a flat tire, even when they’re run flats.

I keep forgetting that -u does an uninstall of old macport versions

macports-logo-top.pngAccording to the MacPorts port command man page the option -u: “uninstall non-active ports when upgrading and uninstalling”.

Just running port upgrade all the time litters your systems with lots and lots op old archived versions of installed ports.

To correct this whole mess you could run “sudo port -u uninstall”. This should uinstall any archived versions you might have. You might need to add a -f to that to make it work: “sudo port -uf uninstall”.

You might have some trouble when you force a removal like this when one of your installed ports is linked against an older version of a library. This can be fixed by replaying some steps on this page.

Basically this post is a reminder for myself. But just maybe someone might find this useful too.

NL-JUG J-Spring 2008 preperations

NL-Jug memberLast things I heard, the NL-Jug team is hard at work preparing the next J-Spring scheduled for april 16th. I’ve entered a session proposal. I’m hoping they’ll think my proposal is an interesting one. Right now I’ll keep the details to myself, but hopefully there is more to come.

Also of note is that the conference’s by the NL-Jug are getting more popular every time.

Java: The dark side of Programming

There is an interesting discussion going on right now on the internet. It boils down to an argument along the lines of: Java rots your brain.

Long version: “Learning Java (or any imperative language with a “bad” type system) as a first language hinders your abilities as a programmer.”

The overall consensus seems to be that to learn proper programming, one should first do the math and then learn to code. I personally do agree to the opinion that of a proper Comp-Sci course curciculum should contain plenty of math. The thing I don’t agree to is the opinion that everybody without a proper math foundation is by definition a crap programmer. While not knowing something other then imperative programming is dangerous, it does not make every bit of code written by that person a bastard child of the devil. The thing is that there are people out there claiming to be the next super genious since Einstein, Nobel or Curie. Those are the people making foulish statements, claiming to know how things should be done. But when entering a discussion based on theory wipe out instantly. Those are the kind of retards you should recommend making a career change or to just generally to shut the fuck up. The problem though is that the bigest wind blowers usually have pretty good people skills. So whining about it, kicking and screaming won’t do you any good. It will only make you look like the retarded idiot while instead the other guy deserves that title.

So the problem is not how to detect and avoid these awful demon-spawns. You’ll just have to deal with them. There are usually three options, from easiest to hardest they are:

  • Blissfully ignore them and deal with the crap they generate.
  • Go around them and risk being hit with a stick because you’ll accused of not being able to interpret an organizational chart. (Managers love to delegate shit so it doesn’t bother them.)
  • Get rid of them and risk being dumped out yourself.

Which of these options to choose is entirely up to you. Usually it depends on how long you’ve been on the project. How receptive higher management is to your cries. The trust you and your oponent has with higher management. And a whole crap load of other fuzzy touchy feely things which aren’t based that much on logic. Believe me when I say you won’t win on being right alone. I’ve been there.

On the matter of Java induced brain rot. I’d probably be drooling right now if that were true. But I do believe that a theoretical foundation helps seeing beyond the lines defined by a particular language. If you don’t know what’s out there it is easy to think that the boundaries set by a language are the limit of all possibilities. Also when being a single minded (language wise) programmer you limit yourself because things like XSLT (declarative paradigm) and recusion (basics of functional paradigm) in an imperative language will likely seem very scary and complicated, while in fact it usually is dead simple.

Some recent related links:
Should Java be banned from schools?
Does Java cause self-delusion?
The Perils of JavaSchools