

Yes, it’s an accident - the power button is just a touch sensitive spot on the printer - but they do like to play witn paper, so this would invariably lead to more shenanigans.
Writer, teacher, data driven humanist. Tech geek, model builder, mini-painter, reader. He/Him.
Yes, it’s an accident - the power button is just a touch sensitive spot on the printer - but they do like to play witn paper, so this would invariably lead to more shenanigans.
I just spit out my coffee reading that, and I wasn’t drinking coffee at the time…
Which is why I don’t mind if they break it - it would let me justify getting a decent laser jet printer.
W. T. F.
I will repeat my earlier statement: I hate printers.
I appreciate the info, but I wasn’t looking for a solution - I just wanted to vent a little…
Meh.
I’ll agree, docstrings are better for documenting a function than just a comment.
However, the author seems to jump through hoops in the next example to break one function into four, just to avoid some single line comments. Unless those code blocks make sense as functions (they’re used/duplicated elsewhere), you’re just making work for yourself. Why not turn it into 12 functions? One for each line of code?
I’m reminded of the admonition that there are only two hard problems* in computer science – cache invalidation, and naming things. The more functions you have, the more things you have to name.
The rest of it – name your magic numbers, use tuple unpacking, comment “why” instead of “what” – is good practice. I’m just not a fan of making functions just to avoid writing a comment.
* And off by one errors.
Meh, if that happens I’ll just replace the cheap commodity printer… I’m not fixing anything, except the cats.