Category Archives: Uncategorized

Java Puzzler

Yesterday I read an article of an interview with Joshua Bloch about Java. In the interview he talked about where Java was heading and some of its quirks. Here’s an example of a quirk he gave in the interview:


public class Unbelievable {
    static Integer i;
    public static void main(String[] args) {     
            if (i == 42)
                System.out.println("Unbelievable");
    }
}

Fairly innocuous bit of code … so what does it do? Well if you run it you get a NullPointerException, which is no surprise as the variable hasn’t been initialized. What is surprising is why the compiler didn’t pick this up at compile time! For example, if I modify the code to the example below, it doesn’t compile because the variable has not been initialized:


public class Unbelievable {
    public static void main(String[] args) {    
            Integer i; 
            if (i == 42)
                System.out.println("Unbelievable");
    }
}

Any Java experts out there care to explain this one to me? I compiled the above examples using Java 1.5 on the Mac.

CNBC Gives Financial Advice

Honda Rescued By?

According to the BBC, Honda have received financial backing that will allow them to compete next season but – as at the time of writing this – haven’t said from who. Step forward Richard Branson. Why? Well I reckon it would have something to do with Branson’s Virgin Fuels venture and wouldn’t be just a branding exercise. A Formula One car would be a perfect vehicle – in more than one sense of the word – to test high performance fuels etc – assuming they can be competitive of course – and the amount of data they would obtain from the car could increase the rate at which the fuels are developed; it would do no harm at the very least.

There have been rumors over the last couple of weeks about Branson getting involved in F1 so I am not exactly being 100% original in my prediction but then again, I could still be completely wrong!

What’s In A Name

Every now and again I keep coming across stupid acronyms / names for things. Here are a few that I have come across recently:

  • The British Association of Aesthetic Plastic Surgeons – came across this in some news article about boob jobs gone wrong. Nicely abbreviates to BAPS.
  • Git – distributed source code control system.
  • It seems the Sound class in ActionScript 3.0 supports an ID3 tag called TITS.
  • PerfAnal – a performance analysis tool for Java.
Clearly the people who name these things are either having a laugh or need to attend some marketing classes!! Still, I guess they are memorable.

Setting up a Samba file share with La Fonera

I have been playing around with La Fonera, which I received the other day. When it arrived I installed the latest firmware (2.1.0.2) and got that working without any problems (so far). One of the things you can do with it is plug in a USB drive in the back and then mount it over Samba. This is a brief note that describes how to set-up the Samba share and access it as a network drive on Mac OS X. I couldn’t find anything on the FON wiki so I had to poke around but it didn’t take too long to set-up.

Firstly, plug in a USB drive into the back of the router. Login to the FON management console and from the dashboard select: Services > Network Shares. The first time you go to the page, you will be prompted to enter a password for the Samba user; the default username is “fonero”, which you can’t change. You can always change the password later on by clicking on the key symbol on the share details page. That’s all you need to do on the router.

To mount the share do the following:

  1. Click the Finder icon in the dock
  2. Choose Connect to Server from the Go menu
  3. In the address field of the Connect to Server dialog, type the following URL: smb://FON;fonero@192.168.10.1/usb-discs
  4. Click Connect
  5. In the Authentication dialog enter the password that you chose when you set-up the Samba share on the router
If everything worked the USB drive should now be viewable as a network drive from the Finder window. All I need to do now is figure out how to unmount the USB drive from the router without trashing it 🙂

3 Skypephone

The other day I signed up to 3 and got myself a Skypephone. I have been playing around with it over the weekend and so far it’s pretty impressive. The phone comes with Skype, which allows you to make free Skype-to-Skype calls; you can also use Skype Out too, which means that it’s possible to make cheap international calls – much cheaper than making calls directly from the mobile! I called a friend of mine in Spain using Skype and the quality was pretty good; no different than if you were using Skype from a laptop. Best of all, it didn’t cost a thing! Skype instant messaging works well too, although it took me a while to get used to the predictive text feature as it works differently to the one on my previous phone.

With the package I got I also get unlimited Internet use. The phone uses 3’s HSPDA network that offers high data transfer speeds and so far the speed has been good when “surfing” the web; much, much quicker than T-Mobile’s Web ‘n Walk, which I was on before! I can use the phone as a modem too, which means that I can connect it to my laptop and get Internet access on my laptop (I haven’t tried this yet). There are a bunch of applications pre-loaded on the phone including Facebook, MSN Messenger and a feed reader. 3 provide you with a free email address; this is useful as I wanted to be able to take photos on my phone and automatically publish them to my blog. Unfortunately I couldn’t get this to work with WordPress so I set-up a photo blog here instead – I was able to retrieve emails from the email account I set-up but the body of the email always ended up being empty for some reason! I also had a problem when I installed the latest version of GMail but, as it appears lots of people were having this problem, somebody came up with a solution to the problem.

There are two features missing that I would like to have:
  • Regular headphone jack so I can use the same headphones that I use for my iPod Touch.
  • The ability to access WiFi networks – this would work out cheaper for 3 because I wouldn’t need to use their network for data transfer.

 So far, so good. Oh, and you can make regular calls too 🙂

Well This Is Fun

So here’s the deal: I’m at home waiting for my router to be delivered by UPS and I’m bored. I can’t leave the house until my package arrives because in the great tradition of all delivery companies, they only deliver during “business hours” and can’t actually tell you when they are going to arrive! Knowing my luck, if I was to leave the house for more than 10 minutes, that’s when they would turn up. Great! So here I am. I called to make sure that it was being delivered today but when told by the (annoying) automated response to “have your tracking number ready” I got cut off; twice. I finally did get through to a real person and was told that it was indeed being delivered today – no, I wasn’t given a time. Plus I have no food in the house so I may just starve waiting for it to arrive. I think I’ll go and make another cup of coffee.

Update at 13.30: I’m still waiting and now I’ve ran out of cheese!

Update at 13.40: How’s that for timing? It has just arrived.

Don’t Try This At Home

… or anywhere for that matter! Went out to a Mexican bar on Kings Road on Friday night. On the menu – in the beer section – was something called a michelada. My friend and I asked what it was and were still confused after being told what it was. I decided to play safe and order what I had had before; he decided to try it. Hindsight is a wonderful thing 🙂 It was disgusting!

Turns out a michelada is basically the same as a Bloody Mary but with beer instead of vodka. Highly not recommended! To be fair it’s quite possible the bartender put a bit too much spice in it but it was undrinkable! Generally, I like to try different beers but this is one case when I’m glad I didn’t.

Incomplete Address

As I mentioned a few weeks ago I ordered a Fonera (developer version) from FON. As of yesterday it still hadn’t arrived so I logged a support ticket asking where it was. Anyway, I got a UPS tracking number so I went to the UPS site to see where my router was. According to UPS the router arrived in the UK on the 4th November but “the receiver’s address is incomplete …” – they claimed to have tried to contact me but they hadn’t. So I called up UPS and got one of those automated responses instructing me to “say each character of your tracking number one after each other.” After several attempts and “that is not a valid tracking number”, I got put through to a real person – by the way, it was a valid tracking number. Why these companies persist with voice recognition systems is beyond me! They don’t work! 

After speaking to the person at UPS it turns out that the address they had been given was something like: Flat B, London. Well I don’t know about you but I’m guessing there must be lots of Flat B’s in London; not really surprising that UPS didn’t know where to deliver it! 

I am a bit disappointed with FON’s order tracking – and the fact that they don’t appear to be able to enter an address properly. There doesn’t appear to be any means of checking on their website what orders etc I have made and the details of those orders. I got a quick response from support to my question, which was good, and was given the UPS number of my order. You would think this information would be made available to me online so I can see what is going on. If I had had this information, e.g. the tracking number, I would have been able to sort out this problem a lot sooner!

Anyway, the good news is that UPS are going to deliver it on Thursday (after I gave them the proper address).