So many good lessons for newer developers and good reminders for more experienced ones. It was due to the Bike Shedding Effect that I came to not appreciate code reviews. Every review seemed to break down into discussions of variable and method names. I tried several times to create "off topic" rules like no discussion of variable names, etc. It didn't work...ever. Now that I've been away from mandated code reviews f…
Cognitive Biases in Software Development
101–110 of 127 posts
Re: Cognitive Biases in Software Development
#102Earlier quoted context omitted.
That’s why pair programming works better than code reviews. Unless you have crazy amounts of time there is almost no chance a code reviewer can really understand the design of the change. So you end up with people picking on very local stuff like variable names. With pair programming you have two people who understand the history of the code and why decisions have been made.
But seriously, naming things correctly makes understanding the global system so much easier. The whole point of naming things is that you don't have to dive in this 60 LoC function, but rather can use its name to know what it does, and make a global mental model. If you're not naming things correctly, you effectively make it almost impossible to review the design, and that's why people starts with asking about names.…
Re: Cognitive Biases in Software Development
#103My personal observation (and view of course) is that most people simply cannot code. And I am not talking about that reverse-a-binary-tree or traverse-a-linked-list type of coding, but more profoundly they just cannot wrap their head around a problem and are able to create a sufficient solution with respect to the context of the code and its environment at the same time. Good software development is strongly connecte…
Depends on the definition of "can" I think, most people have potential to be able to code. By "can" I mean if they applied themselves to learning. The problem is there's just no easy way to somehow transfer the knowledge and experience of what it means to actually code. The Doening-Kruger effect is in full force because you can't tell if you can code until you can. Moreover, almost every technology today must cater t…
My time spent teaching makes me think otherwise. I saw so many smart, motivated young people who simply could not get their homework done. This was especially discouraging since my alma matter has a very strong focus on pedagogical programming.
There's something about programming that "clicks" for some people. They can look a the little pieces and immediately understand how to put them together. If you don't have that spark it's going to be an extremely challenging journey.
Re: Cognitive Biases in Software Development
#104There's also cognitive bias bias - prematurely jumping to the conclusion that some opinion is simply based on cognitive bias, and should therefore be dismissed or contradicted. Basically, it's good to use awareness of cognitive bias to moderate your own thinking, but if you signal to others that you think they are labouring under some bias don't be surprised if they shut down the discussion ASAP.
Re: Cognitive Biases in Software Development
#105Earlier quoted context omitted.
Depends on the definition of "can" I think, most people have potential to be able to code. By "can" I mean if they applied themselves to learning. The problem is there's just no easy way to somehow transfer the knowledge and experience of what it means to actually code. The Doening-Kruger effect is in full force because you can't tell if you can code until you can. Moreover, almost every technology today must cater t…
> If you are getting paid a lot it means you must be valuable, no? And if you actually are experienced and try to offer a newcomer some guidance in writing code that they won't regret having written a year from now, they'll accuse you of being a "perfectionist" who's wasting time trying to obtain some theoretical optimization.
Re: Cognitive Biases in Software Development
#106Earlier quoted context omitted.
>None of us start out life being literate, but few people lack the ability to become literate. Why is coding different? To elaborate on the sibling comments, coding is generative work instead of passive consumption like reading. This split becomes easier to see when looking at a bunch of domains. Most of people can learn to read a book but very few can write a good book. Similarly, it's easier to re-tell someone else…
Generative work is not all created equal. Most of programming we all do is like applying physics equations in practice. A tiny portion is truly on the cutting edge, more akin to physics research. Likewise, a lot more emails and discussion comments and school reports are written, per volume, than masterpiece books.
{people who can look at a real world problem, choose an appropriate physics model, and apply the right equations, correctly}
and
{people who can look at a real world problem, choose an appropriate logical model, and apply the right language/frameworks/code, correctly}
are probably really quite similar sets.
Re: Cognitive Biases in Software Development
#107Re: Cognitive Biases in Software Development
#108So many good lessons for newer developers and good reminders for more experienced ones. It was due to the Bike Shedding Effect that I came to not appreciate code reviews. Every review seemed to break down into discussions of variable and method names. I tried several times to create "off topic" rules like no discussion of variable names, etc. It didn't work...ever. Now that I've been away from mandated code reviews f…
That’s why pair programming works better than code reviews. Unless you have crazy amounts of time there is almost no chance a code reviewer can really understand the design of the change. So you end up with people picking on very local stuff like variable names. With pair programming you have two people who understand the history of the code and why decisions have been made.
Re: Cognitive Biases in Software Development
#109Earlier quoted context omitted.
But seriously, naming things correctly makes understanding the global system so much easier. The whole point of naming things is that you don't have to dive in this 60 LoC function, but rather can use its name to know what it does, and make a global mental model. If you're not naming things correctly, you effectively make it almost impossible to review the design, and that's why people starts with asking about names.…
Totally agree about the importance of naming. But the big problems that are hard to fix later come usually from design flaws, not from naming and often are overlooked in reviews.
Re: Cognitive Biases in Software Development
#110Naming stuff is not trivial and not a bikeshedding.
There should be naming guidelines just like how a team should have style guidelines. The discussions should happen when creating (or updating) these guidelines. Then these guidelines should be followed, no need for long discussions during code reviews. Variable name does not follow guidelines => Mark it as an issue, defer to the guidelines move on.
A standards-compliant name that interferes with understanding is not okay. A name everyone gets, which happens to not follow a rule in some rulebook, is probably fine.