Live data from Hacker News

What is “good taste” in software engineering?

seangoedecke.com

141–150 of 245 posts

Re: What is “good taste” in software engineering?

#141
post #86

> In other words, immature engineers are too inflexible about their taste. They know what they like, but they mistake that liking for a principled engineering position. I have come across this although I think quite experienced engineers can suffer from this kind of immaturity. Aeons ago I used to help friends with their Computer Science assignments. I remember the temptation to rewrite their code because I didn't li…

"Good taste" I have found comes from experiencing "good" API's and other "good" code. You know good code (and API) when you see it — and in time you should be able to write it as well. In short though, it's hard to have good coding taste when you are new to the field. (But, as you point out, it's not true that experience guarantees you will acquire taste — you have to both be looking out for it, recognize it, and be…

I'd argue the opposite, and go further and say there is no "good" code, only "not bad" code. I feel like most of what I think is good is because it's the only remaining option left after removing the "bad" ones. It's also way easier to find out why something is "bad" vs why something is "good" for some reason, not sure why.

In the end, all code comes with tradeoffs, so I'm guessing we're really talking about good/bad tradeoffs, rather than the actual code itself.

Re: What is “good taste” in software engineering?

#142
post #86

> In other words, immature engineers are too inflexible about their taste. They know what they like, but they mistake that liking for a principled engineering position. I have come across this although I think quite experienced engineers can suffer from this kind of immaturity. Aeons ago I used to help friends with their Computer Science assignments. I remember the temptation to rewrite their code because I didn't li…

>> I have come across this although I think quite experienced engineers can suffer from this kind of immaturity.

Experience does not always result in maturity. It is actually pretty common for engineers to become more set in their ways as they gain experience, especially if they've seen some success, because that success has convinced them that the way they do things is the right way.

Re: What is “good taste” in software engineering?

#144
> What kind of code “looks good” to you? What kind of code “looks ugly”? IMO this is not taste, it's your pattern recognition skill based on what you think is better in terms of correctness, performance and maintainability.

> Which design decisions you feel really good about, and which ones are just fine? It's not just a feeling, it comes from reasoning.

Good taste == good skill isn't it?

When someone chooses a functional lang over an object oriented one - is this because of better taste? They’ve learned, through experience, what kinds of problems map more cleanly to immutability and composition versus encapsulation and state. Their "taste" for one paradigm over another is just a reflection of the skills they’ve built up in recognizing tradeoffs, debugging pain points, and anticipating long-term maintainability. What looks like taste is really just expertise shaping intuition.

I get why the author feels a team member who doesn't align with the team's goals has bad taste. But it's really just this - the opinions they have formed from their experience don't match yours.

Re: What is “good taste” in software engineering?

#146
> good taste is the ability to select the right set of engineering values for the particular technical problem you’re facing

I don't think this makes sense. Firstly because engineering values aren't the same thing as engineering requirements; I don't want someone's "values" to end up making a product unsafe or unreliable (these aren't "taste", they're non-negotiable requirements). But secondly because, in engineering at least, your personal opinions shouldn't matter.

Taste is all about opinion and self-expression. Your taste is different than my taste? That's fine. Your engineering is different than my engineering? That's not fine. The same building, with the same architectural plans, same location, same everything, shouldn't be built 6 different ways depending on the "taste" of the engineer. Trusses and struts aren't to your "taste"? Tough luck, buddy. Engineering is about precision, science, math. It's not a plate of spaghetti.

A PR could be said to be a "review of taste", that nit-picks in a PR are just judgements of personal taste. But that's not what PRs are supposed to be. They're actually a replacement for QA. In normal products, a Quality Assurance process is a secondary one that verifies products are built correctly. But in software engineering today, PRs take the place of QA (and design reviews). This means a PR isn't about taste, but about quality.

Higher quality implies good taste, but they aren't the same thing. Style, fit, context, etc are as much a component of "taste" as quality is. Therefore I think "taste" in software engineering should be limited to the optional or irrelevant parts. All the things that you care about, but don't actually affect the engineering quality of the end result. And if that's true, then it means we probably need to have hard definitions of what affects engineering quality.

For example: most people would argue that variable names are very important. That how you name a variable affects its "maintainability". But in reality, the names could be random, and the program would operate the same way. That doesn't mean that variable names are irrelevant. But it does mean there's a categorical difference in what it is, and why it's important. That needs to be codified and taught to new CS students.

Re: What is “good taste” in software engineering?

#147
post #86

> In other words, immature engineers are too inflexible about their taste. They know what they like, but they mistake that liking for a principled engineering position. I have come across this although I think quite experienced engineers can suffer from this kind of immaturity. Aeons ago I used to help friends with their Computer Science assignments. I remember the temptation to rewrite their code because I didn't li…

I had exactly the same experience with giving CS assignment help. Although at the time, I didn't quite have the wisdom to work within their existing approach and tended towards more radical rewrites. Not that I thought they were idiots, I just didn't like their approaches - and didn't take the time to try to understand them.

Re: What is “good taste” in software engineering?

#149
post #61

Earlier quoted context omitted.

I'll have to disagree. Developers coming from functional programming and developers coming from C programming, for instance, have very different definitions of "readable", and neither is obviously wrong. Similarly, developers used to channel-based, async-based or mutex-based concurrent programming will all have very different criteria for "readable" code, again none of them obviously wrong.

Those are just paradigms, ways of solving problems. There’s a difference between familiarity and readability. Sometimes you have to learn stuff before understanding them. Readability is how easy it is to do that, given familiarity with the base concepts that the code use.

You are correct.

Yet it's pretty easy to find people who consider that `map()` or `filter()` are simply not readable – or, on the other side of the aisle, that having a loop variable is detrimental to readability.

And of course, these criteria change with time, industry and programming language used.

Post reply on HN