If the author reads this: Dark theme completely FUBARs the code snippets. Sample: https://i.imgur.com/QUO48fn.png
Cognitive Biases in Software Development
31–40 of 127 posts
Re: Cognitive Biases in Software Development
#32I used to have this problem all the time with the managing director:
MD: Company X has a really nice and simple help system. Why can't we do the same?
Me: We can, but we need a product owner, a designer, a developer and a tester full time on this for at least a couple of months.
MD: I don't understand why we can't just copy what they did.
Re: Cognitive Biases in Software Development
#33Over 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.
I think what's worse than that obsession, and perhaps is actually what you meant, is the concept of "elegant" code. Elegant code is easily just as bad as spaghetti code. I can't even begin to quantify how many hours of my life were wasted because someone thought it was more important to make something elegant rather than understandable. I get that it's satisfying to make something that "makes sense" if you've built a…
Re: Cognitive Biases in Software Development
#34I 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…
Re: Cognitive Biases in Software Development
#35If the author reads this: Dark theme completely FUBARs the code snippets. Sample: https://i.imgur.com/QUO48fn.png
How did you change theme to Dark?
Re: Cognitive Biases in Software Development
#36Earlier quoted context omitted.
Maybe there are just lots of FAANG engineers on HN, but it's amusing how many people overestimate the size and scope of the projects most software developers work on. There's so much discouragement and pessimism if a software wasn't written to handle millions of requests, or intended to live on for 15+ years. On the contrary, there's software written all the time that has a realistic lifetime of a few years before it…
But, how would the developer know about the lifetime of the code. How would the developer know if code will never be extended or will remain stale for the rest of the life?
Re: Cognitive Biases in Software Development
#37The entire human race is a cognitive bias, you can't have christians and muslims be right at the same time. One population of religious people must be wrong and therefore a huge portion of the population must be cognitively biased to an extreme degree of believing in something completely wrong. It is part of human nature to be hugely biased to a completely absurd degree and software engineers and scientists are not i…
You cannot win against the prevailing wisdom. Try having a public mutable field on a class, and watch people lose their ever-loving minds. But why do we have more than half of the classes' exposed with getters and setters? Mmmmfh.
I think the problem is that it is really hard to reason about software in the large. So we reason about software in smaller and smaller granularity, e.g. classes. And then we want to load down every single class with armor as if it needs to be protected against the wild hordes of unwashed masses who will rampantly mutate it. But most classes naturally fit into a larger unit, a cohort of classes, and they are coupled with each other, and they mutually share state. You can't understand the whole thing by staring at a single class, anyway. But it feels like we are doing the right thing because we are told every class needs armor. Nevermind that now every class is 3x bigger, and so the whole thing is 3x bigger, which makes it 9x harder to fit in your head! Uggh!
Re: Cognitive Biases in Software Development
#38I call this, Developer Inertia: It's hard to learn others' code, but it's easy to fix to bugs in others' code. It's easy to write your code, but it's hard to fix bugs in your code. It's good to have someone else looking at your work in established projects. Pair programming provides some value to overcome this problem. Overcome your weakness, you'll become a better developer.
You call what? Can you be more specific?
> I call this, Developer Inertia:
should read
> I call this "Developer Inertia":
Re: Cognitive Biases in Software Development
#39Also, it just seems as if many are unable to step back and look at the broader side of things when coding. Asking questions like: Are we using the right concepts here? Did we develop sufficient abstractions? Case in point: I was just refactoring a code base for a client where the code was paved with a `MemoryHolder` type, where simply `Buffer` would have been the better name for the same concept.
Re: Cognitive Biases in Software Development
#40Earlier quoted context omitted.
No, sorry. Wasting too much time is BS. Use a good name and be done with it. You're naming a variable, not the title of your Magnum Opus. Edit: I think people are reading too much into the initial dismissiveness and not going past the 1st line. More important than picking the perfect name: - Being consistent with the naming (you called it a 'bolt' keep calling it a 'bolt' for the same type of object and for its life…
You're naming a variable, not the title of your Magnum Opus. You're naming a variable, and that name is probably the most important documentation about that specific point in the code. A lot of the time a useful name will be quite obvious, so you should use one. If you see code that has variable names like a, i, myVar, value, etc then it's usually a sign the developer didn't think very hard about the code that they w…
You can always read the context and see 'for value in list_of_values' or understand what's it that you're working with right now.
Yes, be more explicit on the tricky parts, but sometimes i = i+1 is just fine.