Thursday, April 29, 2010

Windows Live, or rather, not-so-live

Hey, look!  Microsoft has a preview of the new Windows Live Messenger.  I wonder what that looks like…

Hmm… not so good.


Tuesday, April 27, 2010

Conversation of the day

My six-year-old ran up to me the other day, very excited.

F: Dad!  Guess what I've been practicing?

Me [hoping to hear "piano" or "printing" or "being nice to my sister"]: What?  What have you been working on?

F: Fake barfing!  [followed by lots of fake barfing, some of it very convincing]

Me: That's great.  Hopefully you find a place to use that someday.

Thursday, April 22, 2010

Happy Earth Day

We have a real rainbow warrior on our team.  Alan will go the extra mile, every time, to lead a sustainable green life.  He skis to work in the winter.  He bicycles to work year-round.  In the snow.  In the sleet.  In the freezing rain.

Except today.

Today is Earth Day.  And Alan drove to work.

He claims it’s because he has a rub and tug massage appointment.  He didn’t want to ride his bike for 45 minutes to the appointment, and show up all sweaty.

Seems to me that would kill two birds with one stone – be nice to the Earth, and Kevin could skip the baby oil in today’s massage.

Every year is getting shorter

Our flagship product runs in twenty-six languages.  In most of them, the user interface looks great.  In languages such as Russian or Bulgarian, there are a few user interface items that have been translated so that the term displayed is very long.  There are places where some of the text is cut off.

So, off I go into Bulgarian and Russian to make some changes.  Most are trivial.  Then, I stumble across a comment that looked like the work ahead would be nasty.

// this is ugly, I know.  the alternative would take much longer....please refactor this later!
// this dialog was not originally created to handle internationalization.  Everything fits nicely
// in english, but try changing the locale...  Sooooo, the pain point here is the complicated way this
// dialog loads.  There are 3 initialize functions doing things...the last one called actually loads the
// remaining language string(s) I need to size and fit everything nicely. 
// so, rather than changing the way things load and initialize (which increases the risk
// factor significantly...I discovered that by trying to do it...yikes!), it's quicker FOR NOW
// to just pre-populate the label with the longest possible string it could have and size around that. 
// I know...badness...but at least it won't cut off labels when the locale is not english (issue 73157)

A few words jump out of that comment at me.

much longer


quicker FOR NOW

And the issue number referenced is kinda low - we're almost at 108000 now.  73157 must be years old.  Naturally, my first move is to svn blame to see when this happened.  Turns out, it was April 8, 2005.  And I created that issue.  Karma, I guess, that I'm the one to finally fix it.

The fix?  Set the AutoSize property to true on three or four controls.  About 10 minutes work, including the time to change locales and test it.

How many times has this happened to you?  You throw in a quick fix, intending to come back later to "do it right".  But you never seem to find the time.  Five years later, the bug is still there.

It's almost always quicker in the long run to do it now, no matter what your gut tells you.  Take the hit today, and you won't find yourself staring at a five-year-old bug someday.

Friday, April 16, 2010

Wednesday, April 14, 2010

The joke that never gets old

What’s new in my LinkedIn network today?  Oh look!  Someone’s moved down the street.

Is it awkward to send a “congratulations on your RIM job?” email?  Hmmm…


Kinda like me, that joke never gets old.

Another sign of the apocalypse

Yes, it’s Windows 95.  Running on an iPad.

Friday, April 09, 2010

Celebration gone wrong

We’re celebrating something today.  I’m not sure exactly what it is – some kind of product milestone.  In honour of hitting this milestone, there’s a big breakfast on tap in the cafeteria.

The product managers are serving waffles.

Anyone else find that eerily accurate?

Thursday, April 08, 2010

Conversation of the day

Chris has a trackball at his computer.  Very few people like using a trackball, so when he has a guest debugger over, he pulls a spare mouse out from under the desk and presents it for the guest to use.  Yesterday, John (who you may remember) sat down to help with a tricky problem, and Chris handed him the mouse.

John: What's this?

Chris: It's my guest mouse.  Most people can't use the trackball.

John [rolling the mouse wheel]:  Oh... It's so... smooth.

Chris: Is that alright?

John: I feel like I'm floating.  Seriously, I'm getting lightheaded...

Tuesday, April 06, 2010

Code of the day

I guess that's a "yes".

catch(Exception ex) 
    log.Error("Unable to refresh view. Reason: " + ex.Message); 
    //swallow it? 

There must be a better way...

Graphics g = CreateGraphics();
SizeF size = g.MeasureString("W", Font);
int charWidth = (int)size.Width;
Width = (int)(((charWidth*24) + 40) * 1.75);

Tell me this doesn't mean what I think it means...

private readonly string[] languageList = new string[]
    "Simplified Chinese",
    "Traditional Chinese",

private readonly string[] aliasList = new string[]
    "Simplified Chinese",
    "Traditional Chinese",