BEHIND THE SCENES

Bug bytes: Rich Siegel

BBEdit’s creator recalls how he unwittingly turned his text upside down.

BBEdit

Legendary text and code editor

VIEW

Among the most respected Mac developers, Rich Siegel has been coding since the seventh grade. He began his career coding for the Mac in 1987, and his company, Bare Bones Software, recently celebrated the 25th anniversary of its flagship product, BBEdit.

Coders and writers rely on this Swiss Army knife of text editors for everything from editing source code to crafting prose – and Siegel and his team have delivered for a quarter century.

But even the best developers make mistakes. We talked to Siegel about his most egregious error.

The gaffe

“We were working on an update to BBEdit to support Retina displays, and I was changing the internal rendering from the legacy QuickDraw to Core Graphics. It was a huge amount of work, because it touched every part of the product.”

“After I got everything stitched back together and opened a file, I discovered that every line of text was now displayed upside down. It was pretty hilarious.”

“I realised what the issue was: QuickDraw and Core Graphics use different coordinate systems.”

Even syntax highlighting won’t help you make sense of this code.

Lesson learned

“We now have a better bug-tracking system, so there’s a workflow to it: an issue gets created, it gets tested and when the code is committed we retest the fix with additional cases. That’s a central theme for us: whenever we make a mistake, especially if it’s something we haven’t seen before, we try to learn from it.”