Fred S. never much cared for zebra striping, the UI pattern that was all the rage after Mac OS X launched in 2001. It found its way into other Mac applications, web pages, even onto Linux. Like a tsunami of alternating grey-and-white waves, it overtook everything in its path.

After numerous requests from users, the project manager for WeightTracker asked Fred to add zebra striping to the weight journal window. Fred had inherited oversight of the application after the original developer, Louis, had been poached by their underperforming rival.

Louis, not a fan of Visual Basic's built-in functions, had written his own toolkit for WeightTracker, so Fred used Louis's evenOrOdd function to determine what color each row of the weight table should display. He incremented WeightTracker's version number and pushed up his changes.

QA immediately pushed them back: the zebra striping wasn't displaying in France.

Fred had never bothered to look at the evenOrOdd code, but it didn't sit well not knowing how it worked. He laughed when he found it.

iBoucle = 0 
While (FileImg.ListCount > 0) 
 iBoucle = iBoucle + 1 
 If InStr(Str(iBoucle / 2), ".") > 0 Then 
 ...

evenOrOdd takes a number, divides it by two, converts it to a string, and returns true if there is a . character present. It works perfectly if you use periods for decimal markers.

However, in France (and most of Europe), the decimal marker is ,, not .. Louis, who Fred knew was a French programmer, should have known this.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!