News for hackers. Stuff that matters.
Re:Death by design patterns, or On the cognitive load of abs... by mjevans on Monday May 29, 2023 @06:06PM (#36118678)
Long ago I read something like...

A debugger needs to be smarter than the person who wrote the code being debugged.

If someone is at their smartest when writing a section of code, they are thus unable to successfully debug problems involving that code.

Re:Death by design patterns, or On the cognitive load of abs... by alwaysbeconsing on Monday May 29, 2023 @06:19PM (#36118770)
Indeed; this is called Kernighan's Law:

> Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?

https://en.wikiquote.org/wiki/Brian_Kernighan

Re:Death by design patterns, or On the cognitive load of abs... by phendrenad2 on Monday May 29, 2023 @07:48PM (#36119496)
There's a similar saying in cryptography: "Anyone can design a lock that's so complex they can't break it".
Re:Death by design patterns, or On the cognitive load of abs... by TeMPOraL on Monday May 29, 2023 @08:18PM (#36119711)
Both do seem a bit bullshit, though.

I hate to go against the Wisdom of the Ancients here, but there is no point at which you're too dumb to debug your own code. With increasing code cleverness, you may lose the ability to make quick mental jumps when debugging it - but this only forces you to be methodical. With a methodical approach, you will find the bug - the thing you might be missing is not smarts, it's patience.

As for cryptography: digital locks are broken by default. It takes care and smarts to design one that isn't trivially breakable. Trying to design a lock that's too clever for you to understand will almost always yield a lock that's broken just past the boundary of your understanding, so you should be able to break it once you realize it's possible and you put a little effort.

As for physical locks: same as above, plus you can always break it literally, by applying enough physical force.