|
|
Subscribe / Log in / New account

How to ruin Linus's vacation

How to ruin Linus's vacation

Posted Jul 20, 2011 2:25 UTC (Wed) by elanthis (guest, #6227)
In reply to: How to ruin Linus's vacation by neilbrown
Parent article: How to ruin Linus's vacation

This is the same reason why authors of prose have editors. Your internalized assumptions make it so your eyes can pass right over "obviously" bad constructs and not notice.

It's also why "check your assumptions" is the first rule of debugging I teach to new coders. :)


to post comments

How to ruin Linus's vacation

Posted Jul 20, 2011 2:44 UTC (Wed) by jzbiciak (guest, #5246) [Link]

Indeed.

This is also why I find debugging with print and assert statements to be much more helpful than single stepping, in the vast majority of cases. Single stepping was more useful to me when I didn't necessarily understand all the language constructs. That was 20-25 years ago, though.

Nowadays, if I have some weird bug, it's because something I think is true is not, or some other "invisible-to-me" error. A judiciously placed print statement (perhaps guarded by an 'if' to filter out the noise) makes it easy for me to prove or disprove my assumptions about what's happening in the code, though, without disrupting any of the code around it. I can compare working cases to non-working cases easily and in a batch-wise manner after the fact. Very useful.

How to ruin Linus's vacation

Posted Jul 21, 2011 19:19 UTC (Thu) by nas (subscriber, #17) [Link] (4 responses)

This is way the "Rubber Duckie Test" is effective.

How to ruin Linus's vacation

Posted Jul 22, 2011 19:58 UTC (Fri) by smurf (subscriber, #17840) [Link] (3 responses)

IMHO you mean "This is *why …".

Please enlighten us what this test means; not everybody is damiliar with the idiom.

How to ruin Linus's vacation

Posted Jul 23, 2011 9:45 UTC (Sat) by smurf (subscriber, #17840) [Link] (2 responses)

*familiar. *grumble*

How to ruin Linus's vacation

Posted Jul 23, 2011 21:38 UTC (Sat) by neilbrown (subscriber, #359) [Link] (1 responses)

I hadn't heard of it either .. but search engines are our friends.

http://lmgtfy.com/?q=Rubber+Duckie+Test

Pick the wikipedia link on Rubber Duck Debugging.

How to ruin Linus's vacation

Posted Jul 25, 2011 18:08 UTC (Mon) by Lennie (subscriber, #49641) [Link]

I just knew the "janitor effect".

I presume the name comes from working late because you can not figure out a problem. Then the janitor comes and he can sees you are kind of frustrated and asks what the problem is.

You try to explain it to the janitor in simple terms and then you understand your problem and can fix it.

Then you go home happy I guess.

The ducky is just a way to try and induce that state of mind with an inanimate object where you are trying to explain the problem to someone else in simple terms.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds