1. It’s a different world out here

    Here’s something new I learnt yesterday about the middle east - every house has a little indicator stuck on the ceiling pointing towards Mecca. My Emirates flight had a Mecca locator up on the projector every so often. Many people carry a Mecca locator GPS device on them. Every one is quite aware of the direction to Mecca as their primary direction.

    All that orientation means that more people know the direction towards Mecca than the cardinal directions (N,S,E,W). This has some interesting implications for an application we’re developing for here. We can’t for example show a layout of a house and orient it to North and ask people to pick where they want their network points installed. People would just get confused. We have to orient our maps towards Mecca, or show a little Qibla arrow as they are called.

  2. Empirical evidence for software metrics

    Someone did the leg work and found some real evidence about software metrics:

    http://research.microsoft.com/en-us/news/features/nagappan-100609.aspx

    The results are interesting, but not surprising if you’ve developed software for a while:

    • “Code coverage is not indicative of usage” - Your hot spots need good code coverage, but not your cool spots.
    • TDD projects take 35% more time to complete, but are 60 - 90% better in terms of “defect density”.
    • Confirmed that having more assertions reduces defects. However, you can’t just mandate their use. Developers must have a culture of using them.
    • Organisational structure matters a lot (herding your cats)
    • Geographical distance doesn’t matter much if your distributed team feels like they’re working on the same team. Here’s an interesting quote - <i><large>”Most people preferred to talk to someone from their own organization 4,000 miles away rather than someone only five doors down the hall but from a different organization.”</i></large>

  3. Software Engineering ≠ Computer Science

    So why exactly is there a schism between computer science and the rest of the engineering world? It comes down to a fine red line according to this Doctor Dobb’s Journal article:

    http://www.ddj.com/architect/217701907 -

  4. Mental plaque

    When I tried to get to gmail.com, and Safari wouldn’t go there, I blamed Safari!


    I did what every self respecting person would do when faced with evidence contrary to everything they believe in. I believed that Gmail’s was a rock, and Safari was a bit mushier.
    I actually lodged a bug report with Apple. How embarrassing.

    Then when I read about it in the news today, I had a chuckle and did what every self respecting geek would do - talk about their mistake.
    Phew, I do have hope.

  5. I’m a salesman

    So here’s how it happened:

    While waiting for my turn with the bank teller I started googling define:teller. Why are they called Tell-ers I pondered.

    A frail voice from the right asked: What’s that?
    me: An iPhone

    I looked at the voice, and it came from an old woman - no younger than 70.

    frail voice: What does it do?
    me: ummm… I’m browsing the Internet. It has the Internet.
    frail voice: Hmmmm… You’re on the Internet? Over here?
    me: Yes, it has the Internet. This is a web browser, but there are other things it can do too.
    frail voice: Is it a phone? Can you make calls on it?
    me: Yes, it’s a phone too. You can make calls.

    And so we went. Her eyes lit up every time I did something unexpected like scrolling or zooming with my fingers. She liked the way my fingers glided all over the pretty screen.

    When I told her how much I was paying for it every month her eyes lit up even more. Apparently she was paying $50 for her home phone, and about the same for the Internet… and it was all stuck at home!

    Her partner sitting next to her grumbled something to her. My time with my teller had come. I smiled at her confident that she was going to get an iPhone soon.

    I should go into sales. I’ll find out about tellers some other day :-)

  6. Casino race condition

    This looks like an expensive race condition at a casino.

    “On May 3, 2007, Domino, of Galloway Township, N.J., bet $2.25 on a Harrah’s progressive slot machine that flashed she was the winner of $86,000. Casino officials, however, told her she actually won only $20,000 because another gambler had won the $86,000 jackpot three minutes earlier while playing another machine linked to the same system of progressive slot machines. When a jackpot is won, the meter is supposed to reset to the minimum prize of $20,000, said Harrah’s officials.”

  7. “Onward into the 2nd dimension!”

    Something moved my cheese.

  8. A mystery

    Hello, I am your super expensive database. Bow before me. Today I will reprimand you for doing something stupid. I know you didn’t mean it, but I’m going to be rude anyhow cause I have an attitude. All I’m going to tell you is ‘ORA-00942: table or view does not exist’. Don’t bother asking me anything else. Good bye.

    Oracle is currently at version 11. I’d like to be proven wrong, but I’m willing to bet that this error message and others like it are not going to have any context in them for generations to come.

  9. Kids play at office politics

    I’ve always thought that office politics was very similar to kindergarten politics. The entire spectrum of human deceit can be observed in both places. That sounds very bleak I suppose, but the common theme is human behaviour. Kids are just little humans remember?

    Through the interlinkedness of the interweb, here’s an interesting validation: Why We Banned Legos

  10. Don’t catch this

    Inexperienced programmers can teach you a bucket load more than experienced programmers. I was reviewing someone’s code recently when I came across something so nasty that I had to blog about it.

    Their reasoning was along the lines of - “that code kept throwing NullPointerExceptions, and this was the only way to proceed.” When I asked the inevitable question of “why was that code throwing a NullPointerException?”, the answer was an uninspiring “I don’t know”. A few moments spent debugging revealed a bug - that the developer had cloaked with the try-catch block. Scary to say the least!

    As I was regaining my composure, Joel who was watching all this in the shadows piped “Never catch NullPointerExceptions”. And what golden words they were! Almost anywhere you catch a NullPointerException, you are probably cloaking a bug. You should hunt for the source of the problem rather than cloak it.

    You could generalise that for all workarounds - not just those that involve catching unexpected exceptions. The golden words could be generalised as “Behind every workaround lies a nasty bug”. Doesn’t that sound too obvious to be told? I don’t know any more :-)As I was thinking about all this, I remembered something that I find extremely annoying about Objective-C. Any operation on a null* value results in another null value (rather than a NullPointerException). Thus in Objective-C, the code above would have the same effect without the try-catch block.
    The reason I find this extremely annoying is that every time I introduce a bug involving nulls, they propagate far far away from the original source of the bug. No exceptions are reported, and hence everything seems to be functioning correctly, except it isn’t! The symptoms are button presses being ignored; generated fields being mysteriously blank; empty files being writen, etc. The list goes on and on.
    The annoying NullPointerException is your friend :-)

    *For the purists, Objective-C refers to null values as nil values.

  11. Out of memory (not!)

    This has got to be the most annoying thing about running Java desktop applications. The dreaded out of memory error.

    Large applications like Eclipse require more memory than your usual hello world program. Sun in all of its good intentioned malice has decided for you that your desktop applications will be corralled into a limited amount of memory that is determined at the start.

    Your applications don’t gracefully slow down as they start using up swap space - like other non-Java desktop applications. There is no warning. It doesn’t matter if you were working on the cure to cancer and your machine had enough memory to shame an elephant. If your Java application hits the limit rightfully or wrongfully, you will lose your work.

    And no, it isn’t good enough for the application to tell me that I should’ve known better and increased the size of the heap. There is plenty of free memory on my computer - it needs to just use it!

    If you think about it, the error message is wrong. My computer is not out of memory. Eclipse isn’t out of memory either. It is just out of the horrible horrible limited block of memory that was chosen for it when it started up. 640k ought to be enough for everyone right?

  12. How soon we forget!

    Digital cameras have changed the photographic environment so much that we’re starting to forget the bad old days of film photography. At the PMA 2007 Photography Exhibition that I visited today, I was playing with a Canon SLR camera attached to a massive telescopic zoom lens. The lens was on show, and the camera was just there to show off the lens.

    A guy walked up to me and commented:

    Gee, they’ve taken off the LCD from the back of the camera. They must’ve done that to stop people from damaging it.

    I looked at the back of the camera, and was puzzled for a while. What an unusual camera back. Where indeed was the LCD? And then it dawned on me that I was holding not a digital SLR, but a film SLR!

    The backs of film SLRs are naked, black, and rather featureless. I’ve owned three film SLRs in my time, and yet I’d forgotten! The guy didn’t look like he was any younger than me. Looking around the exhibition after that for film cameras, I saw none apart from historical pieces in glass cabinets!What a strange experience! The future is now.

  13. Please help me find it!

    I’ve been reading a lot of lengthy documents online recently, and I’m finding the user interfaces of web browsers, PDF readers and other such applications to be severely lacking. Don’t even get me started about Zinio Reader.

    Apple’s Preview is a very good PDF reader, but it fails me when I want to search for words in a PDF document. In the following example, I searched for the word ‘inject’. After it found the page, I had to scan through the page line by line with my tired eyes until I found the near invisible gray highlighted word!


    I would like to poke the eyes out of the person at Apple that decided to highlight black text with a gray background! Yes, inverse video text was the only way to highlight text on a monochrome ANSI terminal when they were popular, but isn’t it high time to discard this old user interface maxim and come up with someting more friendly for my 1440x900 display? Something that is easy to find on a page swarming with uniform horizontal text. Perhaps an animation of dancing girls next to your text? Hmmmmm… I think I’ll settle for what a neat little PDF viewer called Skim does:

    Now that’s much better!

  14. The cleverest computer program

    I woke up one morning with the remnants of a strange computer related dream in my head:

    The cleverest programmer devised the cleverest program. When he was done, it asked him “How do you know I’m done?”

    I’m feeling completely lucid as I post this, and I don’t find it the least bit funny :-)

Vignelli theme by Robbie Manson