←back to thread

303 points FigurativeVoid | 3 comments | | HN request time: 0.408s | source
Show context
namuol ◴[] No.41842187[source]
I always come back to this saying:

“Debugging is the art of figuring out which of your assumptions are wrong.”

(Attribution unknown)

replies(2): >>41842329 #>>41843213 #
1. throwawayForMe2 ◴[] No.41843213[source]
I always thought of what I learned in some philosophy class, that there are only two ways to generate a contradiction.

One way is to reason from a false premise, or as I would put it, something we think is true is not true.

The other way is to mix logical levels (“this sentence is false”).

I don’t think I ever encountered a bug from mixing logical levels, but the false premise was a common culprit.

replies(2): >>41843424 #>>41845987 #
2. motohagiography ◴[] No.41843424[source]
some possible examples:

security with cryptography is mostly about logical level problems, where each key or operation forms a layer or box. treating these as discrete states or things is also an abstraction over a seqential folding and mixing process.

debugging a service over a network has the whole stack as logical layers.

most product management is solving technical problems at a higher level of abstraction.

a sequence diagram can be a multi-layered abstraction rotated 90 degrees, etc.

3. hnick ◴[] No.41845987[source]
I'm not sure if it qualifies as mixing logical levels but I once tracked down a printer bug where the PDF failed to print.

The culprit was an embedded TrueType font that had what (I think) was a strange but valid glyph name with a double forward slash instead of the typical single (IIRC whatever generated the PDF just named the glyphs after characters so /a, /b and then naturally // for slash). Either way it worked fine in most viewers and printers.

The larger scale production printer on the other hand, like many, converted to postscript in the processor as one of its steps. A // is for an immediately evaluated name in postscript so when it came through unchanged, parsing this crashed the printer.

So we have a font, in a PDF, which got turned into Postscript, by software, on a certain machine which presumably advertised printing PDF but does it by converting to PS behind the scenes.

A lot of layers there and different people working on their own piece of the puzzle should have been 'encapsulated' from the others but it leaked.