News for hackers. Stuff that matters.
Re:Absolute truths I unlearned as junior developer by enriquto on Friday June 07, 2019 @12:41PM (#20126399)
> the old Kernighan quote “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?”

This quote can be interpreted in an intelligence-positive way, to encourage you to learn by writing the cleverest possible code. Then, when you get to debug it, you will be forced to improve your skills. This interpretation is called Kernighan's lever [1] and it is very beautiful. The alternative is a life of boredom where you don't learn anything new.

[1] https://www.linusakesson.net/programming/kernighans-lever/in...

Re:Absolute truths I unlearned as junior developer by nikanj on Friday June 07, 2019 @03:39PM (#20127877)
”Prod is on fire and nobody can figure out your burrito pasta”

”Isn’t this a wonderful learning opportunity for all of us”

Debugging time is never a good time to start honing new skills.

Re:Absolute truths I unlearned as junior developer by cbsks on Friday June 07, 2019 @04:03PM (#20128070)
“Burrito pasta” is a great term! Is that something that you just came up with?

It sounds like spaghetti code but even worse because it’s covered with a messy layer of beans and guacamole and wrapped in layers of tortilla.

Re:Absolute truths I unlearned as junior developer by nikanj on Friday June 07, 2019 @05:16PM (#20128682)
Just came up with it. The complexity of monads and other post-grad level CS stuff mixed with good old spaghetti code.

Next up: some doofus who learned high-order Haskell in middle school, and takes offense of me calling it complicated.

PS: https://blog.plover.com/prog/burritos.html

Re:Absolute truths I unlearned as junior developer by enriquto on Friday June 07, 2019 @04:44PM (#20128450)
Of course, Kernighan's lever is most useful on individual projects. In an industrial context there are often other constraints. Nobody is saying that you have to always write the most clever code you can. But if you never do it, you will improve your skills very slowly, if at all.
Re:Absolute truths I unlearned as junior developer by spenczar5 on Saturday June 08, 2019 @12:13PM (#20133186)
Writing simple code is difficult, more difficult than writing clever code, and is a better skill to grow.
Re:Absolute truths I unlearned as junior developer by wtetzner on Friday June 07, 2019 @04:48PM (#20128479)
I would hope at least most of the debugging happened before the code made it to production.
Re:Absolute truths I unlearned as junior developer by munchbunny on Friday June 07, 2019 @04:30PM (#20128309)
I was just pondering this very issue. I think one of the reasons some teams end up with spaghetti code is because the developers are smart enough that they always muddle through it in the end. So when it comes to talking about technical debt, there's never a "it's too complicated," there's just "you're not trying hard enough." In that sense, it would help if the developers had a lower pain tolerance, because it would drive us to actually work hard to improve the ergonomics of our architectures.
Re:Absolute truths I unlearned as junior developer by spenczar5 on Friday June 07, 2019 @02:46PM (#20127508)
> The alternative is a life of boredom where you don't learn anything new.

Now that's an impressive logical leap.

Re:Absolute truths I unlearned as junior developer by jdlshore on Friday June 07, 2019 @12:49PM (#20126478)
False dichotomy, anyone? I learn more from trying new ideas than debugging complex code.
Re:Absolute truths I unlearned as junior developer by RugnirViking on Friday June 07, 2019 @02:30PM (#20127368)
I mean

When I try something new, usually what I learn is not that my assumptions were correct, but the more interesting part is where my assumptions were wrong. This usually only becomes apparent either when writing the code, or in some of the more interesting cases, when debugging.

Re:Absolute truths I unlearned as junior developer by joe_the_user on Saturday June 08, 2019 @12:18AM (#20130604)
This quote can be interpreted in an intelligence-positive way, to encourage you to learn by writing the cleverest possible code.

I would claim that any clever final result can be accomplished without any need for intermediate cleverness. Things that look clever to other people but are intuitive to you might be OK. Things that look clever to you should be avoided when possible.

Re:Absolute truths I unlearned as junior developer by gowld on Friday June 07, 2019 @03:17PM (#20127736)
That is absolutely horrific. I don't want to spend my energy learning the special skills needed to deal with things I should have been smart enough to prevent from ever existing.