MobileVNC has opened its eyes

Sort of. This is one of the very first images MobileVNC displayed, after a weekend full of debugging sessions and headsmacking the keyboard.

MobileVNC - First glimpse at the RFB

There appears to be a little bug with the colors, I’ll sort that out soon. The color palette is distorted because I have only a byte to encode the color info. I chose to encode it in the form of RRRGGGBB, so what that means is that the number of available colors amounts to 7*7*3=147, if I’m not mistaken.

I was mentioning the debugging sessions. I received a harsh lesson this weekend: I’ve been told numerous times “don’t code sensitive stuff when you’re tired”, but I always thought that with enough focus I can manage to get it done without b0rking it up. That code was written about 4 weeks ago, sometime around 3 AM, after a long, busy day, and a long, busy week.

Well, that focus kind of backstabbed me, not once but multiple times: I was very careful in certain parts of the implementation but I introduced the sort of bugs that only rookies do: I was erroneously comparing a variable with a counter i, instead of j (two nested fors), I forgot to add break; in a switch condition, and I confused rows with columns when drawing something on the screen. Another nasty bug was related to writing 32 and 16 bit values to a stream, because I coded that part thinking “ow, I’ll come back to this one later”. I certainly did go back to that part, after noticing that the VNC server was showing me the middle finger.

Why did this take me something close to two days? All that time I was looking for more serious bugs in the implementation, so it was a “can’t see the forest from the trees” kind of situation. I was very confident that the code was ok, because I was so careful when I first wrote it a month ago, I could not believe I overlooked such trivial things. But every headbutt from life is a step forward… sortof :)

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • del.icio.us
  • digg
  • Fark
  • Furl
  • Reddit
  • Spurl
  • YahooMyWeb

Leave a comment

Please be polite and on topic. Your e-mail will never be published.