Live data from Hacker News

Ask HN: Are my expectations on code quality and professionalism too high?

news.ycombinator.com

291–300 of 306 posts

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#291
post #86
post #8

Earlier quoted context omitted.

Adequate test coverage is hard without rebuilding from scratch. Hard to expect in a big, old company. Except when a huge codebase have to be rebuild because python2 have to be replaced (one of our software provider is in this case).

Out of all the items on the list (code reviews, CI, etc), it seems like test coverage would be the simplest to improve? Assuming it has a test suite at all, use one of the various test coverage scanners (simplecov, coverage.py, etc) and check the output for a file with a low % of lines covered. Then write one or more tests to cover the edge cases not yet tested. It's a purely mechanical process unlike most of the oth…

"It's a purely mechanical process" - I thought on this for a while. I think if your testing is purely mechanical then you're probably not getting much value from it. Good tests need to be "smarter" than the code they are testing in a way.

Unit testing, for coverage (as a vanity metric) can be mechanical maybe, but integration tests are the way more valuable ones (for the most part) and way more complex.

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#292

Me as a manager at a startup: "Look, we have 5 months of runway. Does that make sense?" Young dev from large corp: "Yes. But if you don't use Terraform we wont be able to see our infrastructure changes over time. We don't even have a proper code review process." Me as a manager at a startup: "We have two micro instances. Do not install Terraform. Finish the import prototype... now." Young dev from large corp: "Sigh,…

Terraform is a bit of a straw man here.

OP was talking about code reviews and testing. He did mention infra as code but not TF specifically. He didn’t say it was a startup with 5 months runway (aka a soon to be dead company?)

TF is like Typescript: if you already know it why not use it? If you have to learn it on the job at a high pressure startup then maybe not. Not clear he is working at a startup or just a regular old company

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#293
post #186

Earlier quoted context omitted.

This, unfortunately and hilariously, rings quite true. Not to open the test-driven development can of worms, either, which seems to be part of the OP's dispiritment ... but I've yet to see any scenario where TDD was not a massive waste of time.

Depends. Is it the crazy religious TDD where you somehow are supposed to write tests before writing any code, despite the fact that you're making exploratory code ? TDD works best when you have figured out what to test for, unfortunately more than once I encountered people who wanted to write tests for exploratory code, in rigid TDD like environment. (sidenote: It's possible to do kind-of TDD with exploratory code in…

TDD excels at messing around with the design of an API.

As your basically exercising the API through the tests, your seeing how nice it is use.

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#294

Earlier quoted context omitted.

> And I can set up two micro instances with terraform in less than an hour. The post was more of a metaphor than a concrete example. However, as a manager I can’t count how many times my team has declared that they can do something in under a day only to have it become a part-time job for someone to maintain indefinitely, or a multi-week rabbit hole as they debug some unexpected behavior, or technical debt as they ne…

> engineers frequently assume the best-case scenario for their time estimates, while managers end up planning for the worst-case scenario I (engineer) have experienced exactly the opposite. On Thursday I say "It will most likely take me a week; I cannot possibly have it done in less than three days; if X is true -- which I can't know yet -- it will be more like two weeks". And that becomes a commitment to have the co…

I want to chime in that I, also a developer, mostly experienced the opposite. I hated giving time estimates, they were demanded, and sometimes when I overshot the optimistic time, managers were incredulous.

Very few people involved understand how difficult it is to estimate work for some/most projects. If you haven't explored the problem space pretty well, you can and will run into problems that are unique and very troublesome. And you can't know that ahead of time, except in a very hand-wavy way.

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#295

Earlier quoted context omitted.

> Young dev from large corp: "Sigh, ok, just saying in 2 years from now we wont be in a good spot". Except in my experience it’s not two years , it’s two months . And I can set up two micro instances with terraform in less than an hour. So soon you’re burning your three months of runway with development at 20-50% efficiency, and have no ability to pivot, if needed, because your infrastructure is rigid and hardcoded.…

> And I can set up two micro instances with terraform in less than an hour. The post was more of a metaphor than a concrete example. However, as a manager I can’t count how many times my team has declared that they can do something in under a day only to have it become a part-time job for someone to maintain indefinitely, or a multi-week rabbit hole as they debug some unexpected behavior, or technical debt as they ne…

[deleted]

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#296

Earlier quoted context omitted.

> Young dev from large corp: "Sigh, ok, just saying in 2 years from now we wont be in a good spot". Except in my experience it’s not two years , it’s two months . And I can set up two micro instances with terraform in less than an hour. So soon you’re burning your three months of runway with development at 20-50% efficiency, and have no ability to pivot, if needed, because your infrastructure is rigid and hardcoded.…

I agree. While I'm a big proponent of "as simple as possible", often when people say "x is overkill", they mean "I don't know x" (where x != k8s of course).

Thing is, it really changes the equation of whether it's worth or not.

If you or some other senior engineer knows X, then perhaps they can implement X in an hour and things remain simple.

If your team does not know X, then it will take a week to learn X, understand it, try it out on a toy project and implement it in production (which alone might make it an overkill, because it's not worth a week) and it becomes quite plausible that we'll implement it wrong in a way that will bite us later.

So unless the benefit is huge, then it's quite reasonable to say "x is overkill" for your team simply because you don't know X.

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#297

Me as a manager at a startup: "Look, we have 5 months of runway. Does that make sense?" Young dev from large corp: "Yes. But if you don't use Terraform we wont be able to see our infrastructure changes over time. We don't even have a proper code review process." Me as a manager at a startup: "We have two micro instances. Do not install Terraform. Finish the import prototype... now." Young dev from large corp: "Sigh,…

I agree completely with this post.

If you happen to know the runway time you got before things start to fall apart economically, I don't think there's much to argue regarding code quality (and general maintenance of the platform).

In large companies, projects usually have a budget and some desired launch date. If that launch date is not met, your _worst_ case scenario is you're fired. While your best is the acceptance that It just got delayed by whatever factor affected the outcome.

With small companies, your worst case is you're fired and the company could go bankrupt (or something as bad).

Now, OP said he was at a mid-size company and I'd like to believe he could be a beacon of change as the company grows. Maybe all the other seniors were used to work in startups and just can't fathom doing development any other way.

Bottom line is, your expectations might be off depending on the scale of the company and their current objective.

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#298

Earlier quoted context omitted.

My take is that the highest tech debt is never duplication but always abstraction. Duplication make the job tedious and error-prone, but a wrong abstraction in the start and suddenly you have an insurmontable rewrite of everything for the unexpected change or feature that comes in and wasn't envisioned in the beginning. And it'll come, until you have product market fit and are not a startup anymore.

Agree, and in theory duplication is easy to refactor and clean up, but the nasty thing about duplication is that the instances can diverge in little ways, and then the person cleaning it up may not be able to tell if the differences are meaningful and need to be preserved, or accidents of maintenance.

My current job is cleaning up both kinds of tech debt for a startup. Duplication has created several bugs, but most of them were fixable in a few hours at most, and we finished cleaning them all up within 4 months. Bad abstraction has taken hours to months to clear up and we're still not done.

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#299

Earlier quoted context omitted.

> 20 years ago, having none of these basics was almost the norm I guess I worked at one of the best then. It still went out of business.

I just read the almost 20 year old Joel Test page for the first time in a long while and I was surprised by what it didn't contain. For example, it doesn't even mention unit tests. Which is no real surprise, because JUnit itself is only 23 years old. Things like code coverage tools didn't exist back then. And while there were some early tools for automated builds, like Mozilla Tinderbox, setting them up was a real ch…

Code coverage and automated testing tools existed and were mature when I started at my now defunct employer 20 years ago. In The Soul of a New Machine [0] (published 40 years ago) such tools were used and the author wrote about them without any indication that they were new or novel. Every new generation of developers thinks that the "old days" were primitive, but that's just not true.

[0] https://en.wikipedia.org/wiki/The_Soul_of_a_New_Machine

Re: Ask HN: Are my expectations on code quality and professionalism too high?

#300

The standards you've described are totally reasonable! This sounds like an amazing opportunity for you to have a really wide impact and a great chance for the company to level up their game using your experience. I'm sure you've thought about this already but it doesn't have to be a "fight" - in many cases what people need is some appealing reasons, e.g. describing how their world would be much more amazing if they i…

I recently joined a company(for less than ideal reasons) knowing they don't follow basic software practices. I felt frustrated in initial months and then took on challenge of evangelizing and implementing X.

But I'm getting too much resistance from "senior" developers who've been there for 15-16 years. Everyone agreed to do X and circumvented it the very next day.

This consumed so much of my time(outside office hours) and energy that now I feel why do I bother making a change when I'm not getting paid or even recognized for it.

Post reply on HN