Cognitive Biases in Software Development
smyachenkov.com
Cognitive Biases in Software Development
1–10 of 127 posts
Re: Cognitive Biases in Software Development
#2Re: Cognitive Biases in Software Development
#3Re: Cognitive Biases in Software Development
#4Re: Cognitive Biases in Software Development
#5I think we should maybe aspire to find a frame of reference for evaluating when to change and not.
During development, I find iteration can be useful, i.e. when you have code that's 'hot in your mind' and can be re-worked.
Another key that the article doesn't seem to reference is encapsulation. It's one of the most golden concerns in software.
If 'ugly' is confined to a single function and doesn't leak outside - then it's almost pointless to re-write it.
On the other end of the spectrum, if an API is 'ugly' it leaks all around the code inside and out. Re-write is more expensive, but could possibly be more worth it.
Re: Cognitive Biases in Software Development
#6Re: Cognitive Biases in Software Development
#7It is part of human nature to be hugely biased to a completely absurd degree and software engineers and scientists are not immune to this effect.
The worst that I've seen this in (to the best of my ability, as I'm cognitively biased too) is in design patterns.
Typical scenario:
Object instantiation requires 50 parameters to be fully realized. Some coworker suggested that we instantiate an object with empty members and create 50 methods on an object that each take one parameter to load the object.
Apparently having a function that takes 50 parameters create the object was a code smell because it didn't have a fancy name. That fancy name was "builder pattern."
If you can't see how utterly stupid builder pattern is for this case... well... cognitive bias.
Re: Cognitive Biases in Software Development
#8Re: Cognitive Biases in Software Development
#9More 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 justify anything more.
It doesn't feel good and it's still hard to accept that I'm doing the right thing.
If the language I'm working in supported FP, then my world would be much better.
Re: Cognitive Biases in Software Development
#10Over the past few years I have grown disillusioned by the seemingly hyper focus on clean code concept. It seems perfectly logical to have readable code. But the excess that we programmers do with the concept.
Also experience with redactoring away a wart only to find there is now a wart somewhere else.