Live data from Hacker News

Cognitive Biases in Software Development

smyachenkov.com

81–90 of 127 posts

Re: Cognitive Biases in Software Development

#81
post #39

My 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…

I don't think this is the right mental model of coding. It seems a bit too similar to the idea that "most people simply cannot read". We all accept that nobody can read without instruction, practice, and feedback. Why is coding somehow different? If anything, I think reading is more foreign/difficult, because coding is explicit thinking, and we all think. Whereas reading is a completely synthetic act that starts with…

>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's funny joke than be creative and write original comedy.

Many people can learn basic physics equations like "f=ma" is "force equals mass times acceleration" but fewer are able to be generative and discover new physics equations that are accepted by the science community.

Most people can listen to music and appreciate it, but a smaller percentage can play instruments. And then within the set of musicians, an even smaller percentage can compose new original music. There must be something more to it than "training and practice" to explain why a 19-year old Chopin can compose sophisticated piano compositions while most 70-year old professional concert pianists that have performed for decades with more repertoire than Chopin have written no notable original music.

Coding may not be as hard as creating "Theory of General Relativity" but it's not the same as reading literacy.

Re: Cognitive Biases in Software Development

#82
post #44

Earlier quoted context omitted.

People think differently and the higher up in the abstraction level, the more diverse it will get. Like for example some people think in shapes and will get crazy if you do not format the code in the same shapes. Others think in words and writes the code as like they where talking to a human. Others have images in their head and doesn't really care how the code looks. Some people annotate their code so that it looks…

I have a coworker that names variables after Marvel and Disney characters.

After being tasked to do the same repetitive job over and over I became very bored, and to make it fun I changed the variable name in one of the repos. The funny name stayed there as some sort of artifact and probably still haunts the poor people tasked to maintain it. And it has become a war story about that time when one of my colleges was tasked to make a routine change, but for the life could not figure out was was wrong, only to find out that repo had a different variable name...

So your college probably need some more challenge. Put him on binary (assembly) optimization or something, where he doesn't have to come up with variable names.

That said, naming things is probably one of the most difficult tasks in programming.

Re: Cognitive Biases in Software Development

#83
post #39

My 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…

I don't think this is the right mental model of coding. It seems a bit too similar to the idea that "most people simply cannot read". We all accept that nobody can read without instruction, practice, and feedback. Why is coding somehow different? If anything, I think reading is more foreign/difficult, because coding is explicit thinking, and we all think. Whereas reading is a completely synthetic act that starts with…

Wanted to point out that parent is referring to people who are somewhat in occupation where "coding" is a requirement and probably all those people he is referring to had training or extensive training in that.

I do not think parent poster is referring to junior developers or just people on the streets.

Even though they work as developers and have experience they still don't get it. Just like people who mechanically read symbols and put it into words but don't get the meaning behind paragraphs or whole stories.

Re: Cognitive Biases in Software Development

#84
post #39

My 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…

I don't think this is the right mental model of coding. It seems a bit too similar to the idea that "most people simply cannot read". We all accept that nobody can read without instruction, practice, and feedback. Why is coding somehow different? If anything, I think reading is more foreign/difficult, because coding is explicit thinking, and we all think. Whereas reading is a completely synthetic act that starts with…

> similar to the idea that "most people simply cannot read".

I think you're probably right, but in a strictly semantic way: I think it's feasible that nearly everybody (excluding, say, the severely mentally handicapped) could learn to program to a reasonable level of proficiency, with enough effort. However, most people won't, so it ends up being the same as if most people can't.

Re: Cognitive Biases in Software Development

#85
post #72

Earlier quoted context omitted.

I don't think this is the right mental model of coding. It seems a bit too similar to the idea that "most people simply cannot read". We all accept that nobody can read without instruction, practice, and feedback. Why is coding somehow different? If anything, I think reading is more foreign/difficult, because coding is explicit thinking, and we all think. Whereas reading is a completely synthetic act that starts with…

Elaborating a bit more on this, I have made the observation that again those _most people_ don't care much reading (good) code from other people. There are many outstanding examples of code quality out there. For instance, I've found many good patterns and solutions by simply reading the Chromium source code, many of which I can apply directly to similar problems I'm facing myself for any given software project I'm d…

> I have made the observation that again those _most people_ don't care much reading (good) code from other people

Yes. Lack of reading is observable even inside code bases themselves.

Some contributors are more prone than others to not read the codebase they're working on and break patterns, use different file naming and folder structures, disregard currently existing code and re-implementing things from scratch, use a completely different code style, use tabs instead of spaces.

I don't think it's fair to assume that those people are doing this out of malice, or even to push their own style, because as soon as you mention that to them, they admit they were just not paying attention.

Re: Cognitive Biases in Software Development

#86
post #85
post #72

Earlier quoted context omitted.

Elaborating a bit more on this, I have made the observation that again those _most people_ don't care much reading (good) code from other people. There are many outstanding examples of code quality out there. For instance, I've found many good patterns and solutions by simply reading the Chromium source code, many of which I can apply directly to similar problems I'm facing myself for any given software project I'm d…

> I have made the observation that again those _most people_ don't care much reading (good) code from other people Yes. Lack of reading is observable even inside code bases themselves. Some contributors are more prone than others to not read the codebase they're working on and break patterns, use different file naming and folder structures, disregard currently existing code and re-implementing things from scratch, us…

Simpler still: they have a style and don't have the ability to change it on a dime. So they continue as they're accustomed to.

Re: Cognitive Biases in Software Development

#87
post #75
post #9

I work as a "consultant", building cloud based business software. Above all else, my job is to deliver value. Something I constantly struggle with is "clean code" vs just pumping out a mostly static transaction script and moving on. More and more, I write code I'd almost be embarrassed for colleagues to review. But for the type of work I'm doing (poorly defined, highly volatile, potentially short lifespan), I can't j…

> poorly defined, highly volatile, potentially short lifespan This. This is the reality of software development, especially in a startup. You have to quickly adapt your code to the client's needs and to the business constraints, because if there is no cash, the company wouldn't exist anyway. You can't do that with "perfect" code.

> You have to quickly adapt your code ... You can't do that with "perfect" code

Actually, I would say that the exact opposite is true: only perfect code is perfectly adaptable. The times I want to yell at my past self are the times that he wrote something quick and dirty that I now have to rewrite because the requirements have changed.

Re: Cognitive Biases in Software Development

#90
post #81

Earlier quoted context omitted.

I don't think this is the right mental model of coding. It seems a bit too similar to the idea that "most people simply cannot read". We all accept that nobody can read without instruction, practice, and feedback. Why is coding somehow different? If anything, I think reading is more foreign/difficult, because coding is explicit thinking, and we all think. Whereas reading is a completely synthetic act that starts with…

>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.

Post reply on HN