News for hackers. Stuff that matters.
Re:Ask HN: Are my expectations on code quality and professio... by ransom1538 on Friday June 05, 2020 @07:32AM (#23427342)
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, ok, just saying in 2 years from now we wont be in a good spot". [Then proceeds to blow 2 hours complaining on hacker news.]

Re:Ask HN: Are my expectations on code quality and professio... by danpalmer on Friday June 05, 2020 @08:47AM (#23427845)
This is why it's important that early team members are experienced engineers. They know which corners should be cut today to get the prototype out, and which shouldn't because they'll take 30 mins to do "properly" and save a day of work before the runway is even up.

I work in a small company that has all the things the author mentioned and that can work quickly as a result. Almost none of it comes from "we'll do it this way", almost all has evolved over time as we've been able to gradually introduce more rigour to our development process. Much is down to some great engineers at the beginning setting us on that path.

Re:Ask HN: Are my expectations on code quality and professio... by rezonant on Friday June 05, 2020 @09:01AM (#23427991)
I highly agree here. Do not staff a very new startup with junior engineers and expect a good outcome.

Furthermore, you absolutely do need to cut corners _somewhere_, but a seasoned team understands that taking on such tech debt will require a reduction in velocity at some point in the near future. It is then incumbent upon engineers to ensure management understands that the team is borrowing from future velocity to deliver quicker, and it's incumbent on management to facilitate remedying that tech debt at the earliest available convenience. If management does not facilitate removing tech debt by allowing for such refactoring/structural work it is then incumbent on engineering to stop offering the shortcuts that temporarily increase velocity, because there's already too much tech debt to be had, and to take on more will reduce velocity unacceptably.

A good startup has experienced engineers and experienced managers who understand this dynamic.

Re:Ask HN: Are my expectations on code quality and professio... by JamesBarney on Friday June 05, 2020 @12:53PM (#23430639)
I really wish we had more precise terms for tech debt.

For instance I think type/schema debt (where your domain model has changed from your original type/schema debt) is very painful and has a very high interest rate.

I think duplicate domain logic has a medium to high interest rate.

I think code organization(what methods go where) has a low to medium interest rate.

I think white spacing, duplicate non-domain logic and code style has a low interest rate.

Re:Ask HN: Are my expectations on code quality and professio... by tarsinge on Friday June 05, 2020 @05:15PM (#23434057)
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.
Re:Ask HN: Are my expectations on code quality and professio... by ahefner on Friday June 05, 2020 @06:21PM (#23434706)
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.
Re:Ask HN: Are my expectations on code quality and professio... by muzani on Sunday June 07, 2020 @10:35PM (#23453061)
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 professio... by megameter on Friday June 05, 2020 @11:30PM (#23436580)
The difficulty in our current culture with abstraction mostly derives from taking "don't repeat yourself" too far and using that to mean "apply any compression strategy you can find to this code" which could range from enterprise generalization and configuration to APL-style code-golfing.

A gentler, more helpful admonition would be "find the theme, reuse the theme". If you only set out to compress the code you obscure the theme of the code, but if you set out to elevate the theme as you find it, you are likely to let more code rest in a form that is duplicated but a reasonable reflection of the themes currently present.

Re:Ask HN: Are my expectations on code quality and professio... by tracker1 on Friday June 05, 2020 @06:42PM (#23434836)
Was going to say the same... I've been in projects where the abstractions made what should be a trivial 30-60min change, with tests, blows up to almost a week just because all of the layers that need to be worked through.

To GP: schema debt is usually from adding stuff before you need it... it's almost always pre-mature and one should have a good migration strategy in place early on in order to support destructive (or at least not-simple) restructuring over time.

Re:Ask HN: Are my expectations on code quality and professio... by miltondts on Friday June 05, 2020 @01:07PM (#23430822)
Even better if those could be demonstrated by studies/concrete data instead of "I think/feel..."
Re:Ask HN: Are my expectations on code quality and professio... by raihansaputra on Friday June 05, 2020 @09:23AM (#23428193)
Really, really agree. Especially on the last point. Having a small, experienced team is I think the least risky way to build products. Taking the right shortcuts is the big advantage here. Not only about technical debts, but also on reducing planning things to the last detail and reducing overhead on researching best practices for a non-proven stack.
Re:Ask HN: Are my expectations on code quality and professio... by jrs235 on Friday June 05, 2020 @11:35AM (#23429734)
Can you clarify your last sentence? Do you mean not spending too much time planning things out to too much detail?
Re:Ask HN: Are my expectations on code quality and professio... by raihansaputra on Friday June 05, 2020 @11:19PM (#23436524)
cies is correct but I'd like to expand the point. A junior engineer (like me) might have encountered tens of systems, and work in less than ten. Senior/more experienced engineers encounter and work in much more. They know which things to implement. For example, let's implement an authentication system for a SaaS. The junior engineer will ask for specs to the brim to avoid missing anything. How to do forget password? Password requirements? Social logins? While the experienced can see the contexts, pick the suitable decision and implement it quickly. They will be more concerned whether the auth will need to support OAuth to smooth out onboarding or to put it off later because their target demographic is more familiar with email/password. These kinds of shortcuts compound to reduce anxiety, increase velocity, and to iterate faster when the product hits the market.
Re:Ask HN: Are my expectations on code quality and professio... by cies on Friday June 05, 2020 @12:58PM (#23430704)
I think what is meant is that a senior can shoot these things more/less from the hip, hence needing less research time.
Re:Ask HN: Are my expectations on code quality and professio... by eitally on Friday June 05, 2020 @10:04AM (#23428649)
I suggest it's frequently less about knowing which corners to cut, and more about knowing hard from easy, to avoid future impedance mismatches between eng & sales/marketing (or even internal business leadership).

One of the very most frustrating things for an exec is downtime. The next worst is inaccurate time estimates for IT work. If you don't have at least some experienced architects/developers, it's normal to find yourself in the position where nobody knows what they don't know, and that's a bad look for everyone involved. It's also why a lot of bigco's have been outsourcing internal appdev to MSPs over the last 10+ years. It de-risks projects, eliminates skilled labor shortages, and ensures reasonable QoS... in theory. It doesn't always work out that way, but that's the objective.

Re:Ask HN: Are my expectations on code quality and professio... by danjac on Friday June 05, 2020 @11:29AM (#23429654)
Experienced engineers are hard to get though, unless they are founders themselves. Early-stage startups tend to rely on the cheapest engineers they can find, and only hire more experienced devs when they've accumulated a pile of technical debt and poor decisions.
Re:Ask HN: Are my expectations on code quality and professio... by Zenbit_UX on Friday June 05, 2020 @03:50PM (#23433113)
That's why who your technical partner is is so important. Pick someone smart who you wouldn't be able to afford otherwise or pay for it now and later.
Re:Ask HN: Are my expectations on code quality and professio... by Random_ernest on Friday June 05, 2020 @09:13AM (#23428093)
For some years I was the developer you talk about, who always knew everything better, now I am a manager at a startup. So I was able to see both sides of the discussion.

I feel like it always comes down to a communication issue. Team members need to feel heard, and feel acknowledged that you fully understood what they are suggesting. On the other hand they need to understand that there are constraints that force a decision that might not technically be the best, but is pareto optimal. When this discussion occurs I sometimes bring up the analogy of these space movies where they put everything on a table that the astronauts have up there and try to make something out of it that mostly consists of duct-tape. Sure there are better tools, but the stuff on the table is all we have. Another thing that took me very long to understand as a developer is that innovation is a risk that might not always make sense economically. A thing that took me long to understand as a manager is that the happiness of your devs is one of your most precious resources that you have to manage well.

Re:Ask HN: Are my expectations on code quality and professio... by rrradical on Friday June 05, 2020 @10:59AM (#23429310)
A coworker introduced me to the concept of a 'novelty budget', and I find it really useful. If my team is taking on a new project, there are many ways to improve on how things have been done in the past. But doing anything new carries some risk. If every part of the project is new, it will be very risky.

So I use the idea of a novelty budget to negotiate with my engineers. "What things do you really want to change? Let's focus on that, and use tried and true, albeit suboptimal, methods for the other stuff, to stay within our novelty budget." Down the road, once you can handle more risk, you can introduce one of those changes that were originally punted.

Re:Ask HN: Are my expectations on code quality and professio... by ChrisMarshallNY on Monday June 08, 2020 @03:48PM (#23460042)
I like that!

"Novelty Budget"

Re:Ask HN: Are my expectations on code quality and professio... by brayhite on Friday June 05, 2020 @08:09AM (#23427556)
Your scenario can be a lose-lose situation as it applies to the question. Speaking from experience, you can do the “agile” approach do fail fast, release faster, but with no buy-in from leadership to address the breaks in the future, your compounding problems on problems.

So, short-term, you have happy leaders who see releases as they want, and unhappy devs who are in a shitshow of code.

Long-term, if your startup is either acquired or starts to grow a strong revenue stream, leaders need to appease their new owners or their influx of new customers, and you can’t slow down because either a.) the new board needs to be impressed to justify their large acqui-investment, or b.) your new customer base is too big to risk losing. So you keep building on bad code, maybe squeezing in a few skunkwork refactored that only the dev peer reviewing and QA know about, and accept any delay on release as the result.

The approach should be somewhere in between, ideally with the engineering team being empowered to tell leadership “yo, we have a bomb of bugs just waiting to burst if we add one more feature with duct tape, let’s prioritize time to address it”.

If leadership doesn’t trust your team, then you have bad leadership.

Re:Ask HN: Are my expectations on code quality and professio... by rezonant on Friday June 05, 2020 @08:44AM (#23427829)
So much this. There is such a thing as YAGNI in the early and tight days of a startup but tech debt is something that needs to be constantly addressed, and you as a manager need to trust your team to put in the proper engineering as a solution grows. Is quick and dirty fine for a prototype or MVP? In theory yes, but understand that a lot of devs have seen that turn into the final product (with customers on it within days of the "prototype" being finished in some cases). I've seen it with some of the worst codebases I've ever encountered, and those "prototypes" and "MVPs" were never overhauled with a scalable architecture, and the startups end up running out of steam because they did not invest in their product codebase, or better, have a sustainable pace of development that allows the solution to constantly remain high quality.

Don't have the runway for that? Are you managing the startup as well as you could? Why did you tell your investors that you could do it in five months of dev time?

Re:Ask HN: Are my expectations on code quality and professio... by darkerside on Friday June 05, 2020 @08:43AM (#23427820)
Is there any situation under which leadership shouldn't buy in to exactly what tech wants to do?
Re:Ask HN: Are my expectations on code quality and professio... by pletsch on Friday June 05, 2020 @09:05AM (#23428023)
Does a captain of a ship do exactly what his crew wants all the time? No, because they're steering a ship and sometimes they have to make moves that not everyone will agree with.
Re:Ask HN: Are my expectations on code quality and professio... by mondoshawan on Friday June 05, 2020 @11:22AM (#23429559)
Erm... That's not how sailing works. Yes, the Captain needs buy-in all the time, since they are ultimately responsible for the ship and crew both in the eyes of the law and survival wise. Also, most of the time the crew is at the helm.

Source: I'm a trained sailor.

Re:Ask HN: Are my expectations on code quality and professio... by chasd00 on Friday June 05, 2020 @09:29AM (#23428252)
Scotty wasn't on the bridge, he didn't know what was out the window.
Re:Ask HN: Are my expectations on code quality and professio... by karatestomp on Friday June 05, 2020 @10:40AM (#23429073)
Point of order: Scotty was frequently on the bridge commanding the ship, and there's a strong argument to be made that he was the second-best at the job, after Kirk. Certainly 3rd best.
Re:Ask HN: Are my expectations on code quality and professio... by chasd00 on Friday June 05, 2020 @01:04PM (#23430791)
i voted you up, it was a risky analogy given my limited knowledge of Star Trek compared to the majority here :)
Re:Ask HN: Are my expectations on code quality and professio... by darkerside on Friday June 05, 2020 @11:56AM (#23429955)
This is a little embarrassing. I asked what I thought was a well-designed question to frame the problem in a way that made my own conclusion obvious. Clearly, I missed the mark, so I'll be more straightforward now.

Engineers below the upper senior levels typically operate with an "infinite" mindset in making these choices. We all laugh at the relevant XKCD[0] because there's a grain of truth in there. This isn't a knock on engineering, it's just the nature of operating at the lowest levels. You become involved in the problem and you solve for local maxima.

Leadership done well is going to offering transparency to the people on the ground level, communicating timelines and strategy in a way that is relevant to the problem at hand, so people know, for example, how long they can spend solving a particular problem.

Where this sometimes goes wrong is, the higher you go in leadership, the lesser certainty there is. There are no "right" answers, there isn't perfect information, and yet, decisions must be made. If engineering is operating on different base assumptions, those decisions will look wrong (and they might be). And yet, someone needs to get people aligned and moving forward, because moving fast in the wrong direction is typically better than moving too slow, even in the right direction.

[0] https://xkcd.com/974/

Re:Ask HN: Are my expectations on code quality and professio... by SAI_Peregrinus on Friday June 05, 2020 @01:42PM (#23431402)
Or this one, which provides good info on whether to take the time to automate something: https://xkcd.com/1205/
Re:Ask HN: Are my expectations on code quality and professio... by adrianN on Friday June 05, 2020 @09:32AM (#23428274)
Hopefully there are situations where the leadership has more information available than the engineers.
Re:Ask HN: Are my expectations on code quality and professio... by an_d_rew on Friday June 05, 2020 @09:28AM (#23428237)
> 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.

Neither scenario is “correct”, there is only “judgement”, and it can be devastatingly incorrect either way.

A lot of people with strong or extreme opinions (too little or too much tech debt) are inadvertently being fooled by “personal survivor bias“.

Re:Ask HN: Are my expectations on code quality and professio... by PragmaticPulp on Friday June 05, 2020 @09:58AM (#23428589)
> 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 neglect to document their solution, or a productivity bottleneck as everyone else must now either learn Terraform or wait for the Terraform guy to be available to help and so on.

When I transitioned from IC engineer to engineering manager, I quickly learned that engineers frequently assume the best-case scenario for their time estimates, while managers end up planning for the worst-case scenario. The catch is that it’s difficult to tell an engineer that their time estimate could be an order of magnitude or more short of a realistic estimate without implicitly insulting their abilities in the process. ICs also quickly forget that many of us managers were once over-optimistic IC engineers as well.

Re:Ask HN: Are my expectations on code quality and professio... by ThrowawayR2 on Friday June 05, 2020 @10:54AM (#23429238)
> "I quickly learned that engineers frequently assume the best-case scenario for their time estimates, while managers end up planning for the worst-case scenario."

To be fair, bad managers (and there are a lot of them out there) often get really angry if you give a reasonable worst case scenario time estimate for a task, even if you can back it up.

Re:Ask HN: Are my expectations on code quality and professio... by bradlys on Friday June 05, 2020 @03:20PM (#23432705)
Indeed. You learn in all roles that the only way to get your projects pushed through is to give overly ambitious timelines. If you were conservative or realistic, nothing would ever progress.

I've constantly been on projects where someone said, "This will only be a month of work for maybe 3 engineers." That project quickly becomes 5 engineers over a year because of empty promises.

That said, some of these projects frequently time a very long time because there's dishonesty in time estimates. If they were honest with estimates, you wouldn't have to cut corners. They try to cut corners to push a project through quickly - but it backfires constantly... Which leads to more work rather than doing the more effective and reliable part of lots of non-visible work before seeing visible results.

Re:Ask HN: Are my expectations on code quality and professio... by eitally on Friday June 05, 2020 @10:12AM (#23428762)
When I was managing a large, distributed team of mostly mediocre engineers (at a poor bigco), it was common to take the best case estimate (provided by a senior engineer or architect), add 50-100% because due to lack of similarly experienced engineers responsible for day-to-day coding, add 25-30% for SQA, and add 50% for "business" delays (usually LOB heads who couldn't agree on features, or who asked for utterly stupid things that we'd have to explain away before we even got started ... like a web UI with a 52 column table meant to emulate the previous Excel-based "system"). The result was frustration all around because the senior engineers knew our estimates were crazy high compared to what they'd be able to do independently, our business stakeholders were mad because of the cost, and our CIO couldn't understand why it seemed literally nothing was doable in less than several thousand person hours. Good times.

But when you 1) don't have an constructive relationship between CIO/CTO and business leaders, and 2) offshore everything not to follow-the-sun but purely to save money (and then pay bottom of the barrel even in lower cost regions -- that company still only pays engineers 10-12 lakh in south India), you're going to get an inefficient org creating crap quality software.

Re:Ask HN: Are my expectations on code quality and professio... by PragmaticPulp on Friday June 05, 2020 @10:21AM (#23428863)
It sounds like you had distributed decision making authority but concentrated accountability for the outcome. Worst-case scenario.

> the senior engineers knew our estimates were crazy high compared to what they'd be able to do independently

Interestingly, I worked at a company where teams of engineers were given wide latitude to design, implement, and deliver their features in isolation. The theory was that engineers could be more productive if they were left alone to make the decisions.

I'd say it worked about 1 in 4 times. The other 3 out of 4 times, engineers created their own labyrinth of over-engineering, spent too much time building things as reusable frameworks instead of simply getting the job done, and over complicating the system with unnecessary "Wouldn't be cool if..." type features.

Re:Ask HN: Are my expectations on code quality and professio... by tracker1 on Friday June 05, 2020 @06:50PM (#23434894)
I find my sense of laziness keeps me from going too far down a rabbit hole most of the time.
Re:Ask HN: Are my expectations on code quality and professio... by user5994461 on Friday June 05, 2020 @02:48PM (#23432280)
When I was in a large organization, the upper management roadmap was based on quarters and year. Like Q1 2020 Q2 2020. That's a very large granularity of 3 months.

This had the benefits of ignoring the usual variations of software planning. Any development task could take 1 week or 4 weeks (if it goes well or not). This stops being an issue when the planning is quarterly because few weeks of jitter doesn't matter.

The question is then, do we have time to do this task next quarter, as well as the other 3 tasks we scheduled there? otherwise we'll plan it for the quarter afterward.

Re:Ask HN: Are my expectations on code quality and professio... by wool_gather on Friday June 05, 2020 @11:46AM (#23429856)
> 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 code on master by next Wednesday.

Perhaps I've just been unfortunate, but most of the time when I have given qualified or worst-case scenarios, I have been pressed to assume the best, and that's what gets written down.

Re:Ask HN: Are my expectations on code quality and professio... by mod on Sunday June 07, 2020 @03:22AM (#23445458)
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 professio... by karatestomp on Friday June 05, 2020 @10:13AM (#23428763)
> 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.

Fucking that. Only skip the basics entirely if you don't plan to hire anyone in those 5 months (no or inadequate tests, no scripted way to create a dev instance? You just cut their first-two-months productivity in half.) and are 1000% sure no-one's gonna horrifically break prod, and don't mind dev velocity dropping ~10% (and/or bug rate and "of shit it's on fire" calls increasing alarmingly) every month over the next 6 months.

There's a lot of room between "we need a k8s cluster with autoscaling, three kinds of databases, lambdas, blah blah" and "LOL develop on prod YOLO!" IME this kind of thing never gets added in month 4 because there's already too much tech debt. Add it in month 1. A couple days and 10s of dollars/month setting up or buying tools & services to keep your team confidently moving fast over the next half-year is some of the most valuable work you'll do.

[EDIT] oh and in the specific case of Infra as Code or fully-scripted deployments, around month 4 when your stuff's a bit more complicated it makes your answer "yeah, give me these couple pieces of info and put me in touch with one of their tech guys and I'll have it done by lunch tomorrow" instead of "uhhhh... fuck... uh.... two weeks? Hopefully?" when your sales guy says "we've got a huge deal almost closed but they need our thing hosted on govcloud/on-prem/European servers, can we do that?"

Re:Ask HN: Are my expectations on code quality and professio... by partomniscient on Friday June 05, 2020 @09:41AM (#23428385)
At the same time, it also means collectively we don't know what we're doing to get where we're going and are just throwing stuff at a wall to see what sticks.

It also made me think of the Apollo 13 movie.

The engineering/process people got the thing into space, the adaptable/dynamic solve it with 'gaffer-tape and whatever is laying around' people got the thing home.

We still need both approaches for different reasons.

“Personal survivor bias“ accidentally chooses a side for you.

Experience eventually makes one realise there aren't diametrically opposing sides, just different capabilities needed in different circumstances.

Re:Ask HN: Are my expectations on code quality and professio... by p_l on Friday June 05, 2020 @10:46AM (#23429149)
Except the people who did the "tape it together"? Those were the same people who made the long process before. That's why they could just tape it together, they were deep in the knowledge of the system they were fixing and thus could tape a kludge together to get them back.
Re:Ask HN: Are my expectations on code quality and professio... by partomniscient on Friday June 05, 2020 @10:51AM (#23429201)
But that's because in those days the people that built the thing have to do production support once it goes live. That doesn't happen so much in larger organisations because they have separate teams divided along "add/build something new" and "keep it going" boundaries without a lot of cross-pollination.
Re:Ask HN: Are my expectations on code quality and professio... by p_l on Tuesday June 09, 2020 @04:27AM (#23464831)
There's also the difference between building bottom up with full knowledge of what you built, like the Apollo program team had (even if they bought something externally, the people who made it were available to the team, and/or the team studied the items in depth).

And then there's modern world of slapping together libraries that are often not known, sometimes with closed source, sometimes without real documentation. I've had to use disassembler in the past to access framework we were supposed to use...

Re:Ask HN: Are my expectations on code quality and professio... by gowld on Friday June 05, 2020 @10:08AM (#23428704)
Twitter had the fail whale for years. Same with reddit. Facebook moved fast and broke things. What engineers often don't understand is that engineering is not important to the business, only the preceptor of it is. Even these huge companies are only backfilling engineering on their core critical components, while new experimental projects are sloppy messes. The only reason half the stuff is solid is that it gets to free ride on comping built for the critical core.
Re:Ask HN: Are my expectations on code quality and professio... by kirubakaran on Friday June 05, 2020 @09:43AM (#23428411)
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).
Re:Ask HN: Are my expectations on code quality and professio... by lucasyvas on Friday June 05, 2020 @11:16AM (#23429506)
I think this is 100% true. I've never used the term overkill personally.

If I don't know something, I simply say I don't know. And if I do, I always position the trade off of the choice relatively and weigh it.

Re:Ask HN: Are my expectations on code quality and professio... by PeterisP on Sunday June 07, 2020 @05:26AM (#23445994)
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 professio... by kirubakaran on Monday June 08, 2020 @02:19PM (#23459175)
The GP of my comment says:

> Me as a manager at a startup: "Do not install Terraform. Finish the import prototype... now."

The team knows Terraform. The manager probably does not. I was responding to that.

Re:Ask HN: Are my expectations on code quality and professio... by Scarblac on Friday June 05, 2020 @03:11PM (#23432584)
Well introducing some new technology that people will have to learn is often overkill, if there is already a slightly less optimal way to do it that the whole team is familiar with.
Re:Ask HN: Are my expectations on code quality and professio... by OJFord on Friday June 05, 2020 @11:28AM (#23429642)
Do you know k8s?
Re:Ask HN: Are my expectations on code quality and professio... by kirubakaran on Friday June 05, 2020 @11:41AM (#23429795)
Haha perhaps not well enough, thus proving my earlier point :-)
Re:Ask HN: Are my expectations on code quality and professio... by mcv on Friday June 05, 2020 @04:41PM (#23433716)
If you can set something up in an hour, don't discuss it; show it. Spend the hour, show it works. If it does, fantastic. If it doesn't, drop it.
Re:Ask HN: Are my expectations on code quality and professio... by nonines on Friday June 05, 2020 @08:30AM (#23427723)
The point I think you're making is that "it depends" and I agree with it.

I've seen companies that have no funding issues building products that they know they will need to maintain in coming years and still follow a few or none of the best practices.

But I've also seen people building SW that no one can guarantee that will ever be used (and gets scrapped after a few months) spending days and weeks setting up the perfect agile CICD setup and arguing in endless pedantic discussions in code reviews.

Re:Ask HN: Are my expectations on code quality and professio... by rezonant on Friday June 05, 2020 @08:50AM (#23427872)
All things with balance, and I agree analysis paralysis and overengineering are real problems to avoid...

but I'm sorry you can't deploy without CI/CD unless it's like a desktop or mobile app or something. You don't skip that for servers. Does it have to be perfect? Hell no, but it needs to be in place before you can seriously call it shipping

Re:Ask HN: Are my expectations on code quality and professio... by phonebanshee on Friday June 05, 2020 @11:52AM (#23429918)
I'm guessing that you work on server-side stuff, because most people who do mobile/desktop work would say exactly the opposite if they desperately had to come up with a general rule: do whatever you want for servers, but you have to do things right for mobile/desktop. Those are your servers, and you can fix them whenever you want. You push software to end users, and it's gone forever.
Re:Ask HN: Are my expectations on code quality and professio... by rezonant on Friday June 05, 2020 @12:41PM (#23430482)
I do, mostly. Also anticipated there'd be at least one mobile/desktop app dev who would swoop in to say it's important there too and I agree! It's just so common to have two servers to deploy to, and as soon as you do, you aren't going to repeat manual steps to deploy your software on them. I guess in that sense app stores are sort of like CI for apps :-P

But indeed, especially on mobile where you need to have releases go through external validation, CI/CD can save you a lot of time.

Re:Ask HN: Are my expectations on code quality and professio... by gowld on Friday June 05, 2020 @10:11AM (#23428741)
Plenty of Unicorn IPOs disprove this thesis.
Re:Ask HN: Are my expectations on code quality and professio... by afarrell on Friday June 05, 2020 @08:21AM (#23427646)
When that dev gets older, he'll get the self confidence be honest about his reasons and say, "No. Then we won't be able to see our infrastructure changes right now and in 2 weeks time we will be confused enough that our forward progress will slow significantly."
Re:Ask HN: Are my expectations on code quality and professio... by BerislavLopac on Friday June 05, 2020 @08:13AM (#23427581)
> Then proceeds to blow 2 hours complaining on hacker news

You are absolutely right, that was wrong. They should have instead ignored you and install Terraform.

Re:Ask HN: Are my expectations on code quality and professio... by rezonant on Friday June 05, 2020 @08:47AM (#23427841)
Why not both?!
Re:Ask HN: Are my expectations on code quality and professio... by jerkstate on Friday June 05, 2020 @08:50AM (#23427873)
<next week> where's the import prototype? check it out, I moved our metrics stack to InfluxDB and Grafana! Now we can scale to 10,000 instances no problem!
Re:Ask HN: Are my expectations on code quality and professio... by yowlingcat on Friday June 05, 2020 @11:29AM (#23429658)
I am not convinced that you are competent enough to be an engineering manager at a big company with oversight from an experienced manager, nevermind at a startup. You've revealed a cascading set of failures here that are 100% your responsibility and then have the audacity to caricaturize your well intentioned junior engineer:

1) Having 5 months of runway is an existential problem that your CEO's fundraising should have addressed 7-12 months ago

2) Lacking a proper code review process ensures that you'll pay pounds of prevention long term instead of ounces of prevention, which over the long term is not a frugal usage of your already scarce engineering resources

3) Your senior engineers should be having the conversation with your junior engineers about the tradeoffs of heavier vs lighter forms of code review and CI process. Unless...

4) You hired a junior engineer as your early or first employee without a senior engineer and are unwilling to do the necessary work mentoring them yourself

You are responsible for each of these failure modes. Who made the decisions to get the company to a place where it only has 5 months left of cash? Who made the decision as a startup manager to let other managers take it there? Who made the choice to hire the junior engineer? Who made the decision to forgo proper code review standards?

It sounds like your junior engineer has a sense that they are on a sinking ship. Maybe they're right. You're one of the captains. Turn it around, or cut your losses and learn from your mistakes. Saying this as someone who has been a startup manager, I think it is a profound breach of the duty of leadership to not do so, which is what it sounds like you are doing right now.

EDIT: In case you need some pointers or some food for thought, I think that another HN thread that's also on the front page could be a great place to start:

Remember that management is not the same as IC work at a higher seniority. It is a fundamentally different vocation. You really need to internalize that to be effective and it is tricky.

https://news.ycombinator.com/item?id=23427110

https://news.ycombinator.com/item?id=23429785

Re:Ask HN: Are my expectations on code quality and professio... by RookyNumbas on Friday June 05, 2020 @12:21PM (#23430268)
I am not convinced that you have ever worked at the average startup. Your points are incredibly divorced from the reality most face.

Years worth of runway is not the norm. Having your choice of senior engineers to hire right away is not the norm. Most startups exist as sinking ships.

It sounds like you lucked in to a company that raised a shitload early on and so had the luxury to make these decisions.

Re:Ask HN: Are my expectations on code quality and professio... by yowlingcat on Friday June 05, 2020 @01:34PM (#23431274)
> Your points are incredibly divorced from the reality most face. > It sounds like you lucked in to a company that raised a shitload early on and so had the luxury to make these decisions.

I worked for a string of them early on in my career. I was miserable and worried that I'd never get anywhere better because of the scarlet letter of working at a failed company (and several of them) would be my first impression. Rather than blaming it on luck, I resolved to figure out where I went wrong and how I could avoid it in the future.

While you cannot remove the element of timing and large scale market events outside of your control, startups are about making (and learning to make) calculated risks. Mediocre startup operators love this kind of argument (so and so can do things because they raised more money than us because they're lucky not because they executed better) because it lets them escape the consequences of their own unforced errors and ineffective execution. You won't hear this argument from effective operators because it would get laughed out of the room. They know that they have to operate proactively, not reactively from (and even before) their first fundraising event.

The most well run companies have a tendency to create exponentially more, not less, expansion and subsequent job opportunities. My advice is don't work for a risky early stage company until you learn what success looks like somewhere bigger. At an early stage startup that's on the right track, you'll see a lot of the same things just in a smaller org. But it's hard to know what you should require unless you've at least seen what it looks like to work at a well oiled machine. Folks that tell you otherwise are either ignorant or willfully trying to pull the wool over your eyes.

Re:Ask HN: Are my expectations on code quality and professio... by scarface74 on Friday June 05, 2020 @12:13PM (#23430159)
Counterpoint: Twitter's codebase early on was a well known clusterf%%% that was impossible to scale reliably and was consistently causing the fail whale. They found product market fit, got funding and improve their code.

Counterpoint #2: Amazon's code base was a monolith and highly dependent on Oracle. The rest is history.

The order of priority is to have a product that customers want, convince investors to give you more money to continue your growth and improve your infrastructure and hopefully become profitable or at least have an exit strategy.

Re:Ask HN: Are my expectations on code quality and professio... by user5994461 on Friday June 05, 2020 @02:22PM (#23431951)
Twitter was founded in 2005. Amazon in 1995.

Git didn't exist, SVN didn't exist before 2000. Common languages in use today didn't exist or were in their first versions (go, python, java, etc...). Most of the unit testing frameworks and IDE that are taken from granted weren't invented yet.

There were different expectations back then. No software company should be running in 2020 with no version control, no unit test and no CI.

Re:Ask HN: Are my expectations on code quality and professio... by scarface74 on Friday June 05, 2020 @02:50PM (#23432298)
Source control very much did exist in 1995. Twitter was initially built on top of Ruby.

Java was very big in the Enterprise by 2005 and yes there were plenty of IDEs back in 1995. Amazon I believe was originally built on a C code base.

There are plenty of companies that have no automated unit tests and do quite well with manual testing.

But we aren’t just talking about source control and unit testing we are talking about code quality.

Re:Ask HN: Are my expectations on code quality and professio... by user5994461 on Friday June 05, 2020 @03:37PM (#23432922)
Double checking the dates. CVS is 1990 (source control before SVN before git). Visual Studio first release is 1997. Eclipse and IntelliJ are both 2001 one month apart. PyCharm is 2010. Jenkins CI is 2005 (initially named Hudson). Teamcity is 2006.

Code quality is limited to the tools available at the time. It was an uphill battle to preach for (automated) scripted builds or any form of (automated) testing without having the later tools/frameworks/infrastructure at disposal.

Funfact: The java compiler was still fixing "bugs" in 2016 to be able to produce an identical JAR between builds.

Nowadays if an intern opens PyCharm. He can get right away a lint report on the current file and entire codebase, finding potential bugs and questioning why is this thing not running automatically on commit. This pushes quality up organically quite a bit. By comparison doing embedded C++ development in the 2000's, I can only recall of one company having a static code analyzer, that costed no less than $50k for a handful of small projects (they charged by line).

Re:Ask HN: Are my expectations on code quality and professio... by erik_seaberg on Friday June 05, 2020 @03:45PM (#23433043)
I can't really blame them for nondeterministic builds. Not only was Java slower but computers in general were slower when javac was written, so recompiling unchanged source files was an obvious waste that everyone tried to avoid (by checking mtimes, because hashing every file was also pretty expensive).
Re:Ask HN: Are my expectations on code quality and professio... by scarface74 on Friday June 05, 2020 @04:51PM (#23433817)
I doubt very seriously that Amazon was running on Windows servers so I fail to see the relevance of Visual Studio. Even so, the first version of Visual C was released in 1993 (https://winworldpc.com/product/visual-c/1x).

C is not a new language. People have been writing large well structured C code for decades. The first C linter was written in 1978. Even PC-Lint was written for C in 1985.

Re:Ask HN: Are my expectations on code quality and professio... by sanderjd on Friday June 05, 2020 @12:00PM (#23430007)
I think this is generally a great comment, but just to note: you seem to characterize the "5 months of cash" thing as a decision. But most startups fail, and all of those startups at some point (or multiple points) in time only had 5 months of runway left, which is not always (I would say not usually) because they decided it was ok to have that little runway, but because they could not avoid it despite their best efforts.

But you're totally right that this is not the junior dev's problem!

Re:Ask HN: Are my expectations on code quality and professio... by yowlingcat on Friday June 05, 2020 @01:39PM (#23431363)
> they could not avoid it despite their best efforts

I think we're making the same point, but I don't disagree. I think this is what I'm getting at. A CEO who cannot raise and is at 5 months of cash left has a) effectively gotten a vote of no confidence from their existing investor base, or b) they are not asking because then they are delaying the inevitable and eventually impossible to ignore conclusion a). Not being able to avoid low cashflow despite your best efforts is a failing on the CEO's role. The CEO is the last line of defense in terms of responsibility, and fundraising is supposed to be one of their core competencies and responsibilities. It's why the job is not for everyone.

Re:Ask HN: Are my expectations on code quality and professio... by viraptor on Friday June 05, 2020 @08:27AM (#23427702)
The time when you have 2 micro instances is the best time to implement terraform. You can do it in 5min, existing infra is obvious, and you likely can explain it to 2 other people and be done.

Once you're established, growing, and accumulating features it will take weeks/months. (And if you need a duplicate environment for staging, how many clicks will it take?)

Re:Ask HN: Are my expectations on code quality and professio... by jpdb on Friday June 05, 2020 @09:07AM (#23428041)
I thought the same thing, but after reading what the comment said again it wasn't a "use terraform or don't" story, it was terraform vs "import prototype".

Generally for most resources, I feel like I can write terraform just as fast as I could create the resources in the console.

Probably not a good example, but I agree with the sentiment that you have to prioritize the business.

Re:Ask HN: Are my expectations on code quality and professio... by phonebanshee on Friday June 05, 2020 @11:59AM (#23429995)
And it depends on existing skillsets too. I did a recent project where I almost certainly would have used Terraform if I already knew how. But the choice was between "learn Terraform" and "do this in a Makefile," and the "learn Terraform" was clearly crazy overhead at the time.
Re:Ask HN: Are my expectations on code quality and professio... by aerophilic on Friday June 05, 2020 @09:16AM (#23428121)
This. Though, I think the exact example may be debatable.

The (appropriate) question was “We have 5 months of runway, does this make sense?”

Assuming the manager is halfway competent in listening to their team, then this should be a useful focusing activity for both the dev and the manager.

In business, and in life, it isn’t about what you “can” do, it is more about focusing on the handful of things that give you the biggest “bang” for the buck. Think Pareto law, and how you can get 80% of a result, for 20% if the effort.

So, in the context of the scenario, the developer should be asking themselves: 1. What problem does <insert tool/process> solve now or will solve in next 5 months? 2. How painful is the problem, and what is it’s frequency (High impact, but low probability; moderate impact, but high probability).

3. What is the cost of the new process/tool to the team? (Time, cognitive load, $$$ that could be spent elsewhere).

As long as ratio of value to cost is large (10X or more), in the timeframe that matters (in this example 5 months, for most companies time is measured in years), and you can articulate it, selling the idea should be a no brainer.

However unless you can truly get that 10X(or more) return, then it might be better to focus your improvement activities elsewhere.

All that said, I do think the “Command voice” at the end is a bit of an issue... at least for me. You are “pulling rank”. This is “okay” if you have built up the “rep”/karma/trust to do so, but unless you have, will likely make the dev (long term) run for the hills. It might take a bit more time/coaching to explain something like the above to them, but that is an investment in people that lasts a lifetime, whether or not the startup lasts past 5 months.

Re:Ask HN: Are my expectations on code quality and professio... by julius_set on Saturday June 06, 2020 @04:32AM (#23437626)
You’re assuming the manager hired senior engineers who can competently know the best strategies in each. By contrast an inexperienced engineer might take the worst path
Re:Ask HN: Are my expectations on code quality and professio... by myvoiceismypass on Friday June 05, 2020 @08:28AM (#23427713)
Rapid prototyping does not mean abandoning established programming practices that help people feel confident about their work.
Re:Ask HN: Are my expectations on code quality and professio... by crad on Friday June 05, 2020 @10:10AM (#23428730)
In my org, I have created a process to clearly define what makes a prototype different from a MVP. It appears to be somewhat successful for what my goals were, which was to prevent prototypes from turning into long-term production code.

Prototypes have no restrictions that we would normally place on code (coverage %, automated pipelines, etc) and can only be created in a sandbox AWS account that has no access to our internal systems. It allows developers to prove out concepts or work with product to quickly iterate on PoC.

On the other side, PoC's have a limited lifespan and if successful, are expected to be re-implemented as an MVP, following our internal standards and guidelines.

Re:Ask HN: Are my expectations on code quality and professio... by ncallaway on Friday June 05, 2020 @10:46AM (#23429146)
This is excellent. I'm always a bit wary of treating something as a "prototype", because of the number of times I've seen things evolve into the actual product.

I like the separation of AWS accounts.

Re:Ask HN: Are my expectations on code quality and professio... by onion2k on Friday June 05, 2020 @09:31AM (#23428270)
Yes it does. The clue is in the name - prototyping. A prototype is only supposed to prove the concept works; it doesn't need to be good.

The problem is that most companies can't do prototyping because they don't have the resources. They build a prototype, and then they don't throw it away and build the proper version and they use as production.

Re:Ask HN: Are my expectations on code quality and professio... by brain5ide on Friday June 05, 2020 @09:48AM (#23428470)
I was hoping to see the word 'protoduction' in your comment.
Re:Ask HN: Are my expectations on code quality and professio... by jbn on Friday June 05, 2020 @12:20PM (#23430252)
This is such a good word, great find!

There are so many things in production that are prototypes (even when people/companies cannot allow themselves to recognize them as such...), having a word for this pattern is great.

Re:Ask HN: Are my expectations on code quality and professio... by commandlinefan on Friday June 05, 2020 @12:19PM (#23430239)
Yes. There's a reason why best practices are called "best".
Re:Ask HN: Are my expectations on code quality and professio... by p_l on Friday June 05, 2020 @10:41AM (#23429092)
Experience recently went the other way around.

"It's just simple project, don't bring out the big guns".

Somehow, a simple requirement of "make sure we can backup it all and load it elsewhere, manually, nothing fancy" made it so that I lost 5 days purely due to acceptance of manual work at the start.

Re:Ask HN: Are my expectations on code quality and professio... by chousuke on Friday June 05, 2020 @11:12AM (#23429464)
I'm gravitating towards trying to pick automation tools that I can replace easily, but I don't skip automating things.

Often, creating things using proper automation tools ends up being significantly faster than doing things manually, and the result is better.

If I'm setting up a proof-of-concept, I'll at the very least try to write a shell script that contains whatever it is I did to get a host set up.

If doing stuff for production, I might have one instance where I set up things manually while simultaneously writing the appropriate automation to get another instance up and running. That allows me to iterate the set-up quickly while allowing me to verify the result by recreating it from scratch using the automation I made.

Re:Ask HN: Are my expectations on code quality and professio... by bcardarella on Friday June 05, 2020 @12:39PM (#23430475)
I would argue the mid-level devs are more dangerous in this regard than junior devs. Mids tend to follow rules and really consider them gospel. Seniors know when and how to break those rules. Juniors are a bit all over the place in terms of outcomes and expectations.
Re:Ask HN: Are my expectations on code quality and professio... by generalk on Friday June 05, 2020 @08:57AM (#23427941)
Folks are focusing on "five months of runway" or other minor details and missing the big picture here.

Big companies typically have fewer constraints on time, money, and developers. They can have very mature development processes because of that.

Small companies typically have tighter constraints. It's not as if this hypothetical manager doesn't want better process, but if the things to spend time on are "better deployment methods" or "ship this feature in time to land a critical contract," there's no choice there.

OP has, potentially, a unique position here. If they can find a way to use their experience to help implement small process changes without grinding development to a halt, they can seriously improve their team and maybe emerge as a leader as well.

This is different from "we need to stop and do all-team code reviews before every PR merge!" The time may not be there, and the management buy-in sure isn't.

But encouraging teammates to add new tests with each new feature, and helping folks who may not know how to do that, can have a huge impact. Taking an hour or so Friday afternoon to gather the team and casually review merged PRs or do a sprint post meeting over drinks can be a good unwinding activity.

OP's got an opportunity here.

Re:Ask HN: Are my expectations on code quality and professio... by qqqwerty on Friday June 05, 2020 @01:42PM (#23431396)
Exactly this. In a similar situation I am aware of, a senior dev came in, found some measurable bottlenecks, convinced non-technical management that they could be fixed, and then fixed them. He is now the CTO.

They key here is to find problems with the current environment that can be tracked. Downtime, performance, bugs in prod, etc... If you can't find any measurable issues that management can relate to, then quite frankly, there isn't really any reason for management to invest in solutions to problems that don't exist.

Re:Ask HN: Are my expectations on code quality and professio... by zebraflask on Friday June 05, 2020 @10:36AM (#23429028)
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.

Re:Ask HN: Are my expectations on code quality and professio... by baggachipz on Friday June 05, 2020 @10:42AM (#23429098)
Thank you, it feels like heresy whenever I say that... like it's one of those grim realities you're not allowed to point out. I'm all for automated testing in a sane manner, but TDD is so rigid and over-engineered.

"Can't fail your TDD tests..."

taps forehead

"If there's no code to test"

Re:Ask HN: Are my expectations on code quality and professio... by p_l on Friday June 05, 2020 @10:49AM (#23429182)
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 certain environments - essentially, you start writing code from top to bottom and fill in missing bits using debugger all the time)

Re:Ask HN: Are my expectations on code quality and professio... by rileymat2 on Friday June 05, 2020 @04:28PM (#23433575)
I have only toyed with it on personal projects. But that is kind of a misrepresentation from what a lot of them propose. You typically will not be writing more than a part of a test, just enough to get it to fail, before writing the code.

It can work good as a built in driver to exercise the code you are trying to write as you go. It also gives you a chance to test the interfaces to the code you are making as you go for usability, because you are coding to it.

There are actually some really interesting videos demonstrating the RED/GREEN/REFACTOR cycle they propose.

Re:Ask HN: Are my expectations on code quality and professio... by p_l on Monday June 08, 2020 @04:08PM (#23460215)
That's why I mentioned "crazy religious". I've seen it got that far in real world, which warps TDD to the point where a good technique is thrown away by people disgusted with the pushed purity message.

It doesn't help that often, even otherwise good material about TDD, didn't really talk about cases like exploratory coding - working from messing around in a REPL, formalizing the code into TDD skeletons, is pretty powerful method, but isn't (wasn't?) mentioned often when I learnt the most about TDD (granted, that was 2005-2015)

Re:Ask HN: Are my expectations on code quality and professio... by UK-Al05 on Saturday June 06, 2020 @10:09PM (#23444171)
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 professio... by tjbiddle on Friday June 05, 2020 @10:39AM (#23429063)
If you're only running two micro instances, I'm assuming the rest of your infra is small.

Likely would have been a single day project to have everything inside of Terraform.

Re:Ask HN: Are my expectations on code quality and professio... by scarface74 on Friday June 05, 2020 @12:07PM (#23430087)
I agree/

I work for a company that took all sorts of shortcuts that we are digging our way out of now. But guess what? If they hadn't taken those shortcuts, they would have run out of money before they found product market fit, would not have referenceable customers (B2B), would not have been able to secure funding and the company wouldn't be around today and well enough capitalized for them to pay me to help improve processes.

Re:Ask HN: Are my expectations on code quality and professio... by gowld on Friday June 05, 2020 @10:05AM (#23428664)
It's because we hire "software engineers" but we actually want them to be "business hackers", but lie to customers and regulators about the quality and integrity of the product. Then we mock them for trying to do the job they were hired for. The fact that pogrammers bias toward rule following (the computer doesn't react well to people bluffing) is part of the conflict.
Re:Ask HN: Are my expectations on code quality and professio... by ornornor on Friday June 05, 2020 @10:34AM (#23429010)
That's not what OP is talking about though.

Not using prod DBs for development is common sense and best practice.

Not pushing to prod is common sense and best practice.

Same thing about breaking tests, spaghetti code without review.

It's not some pie in the sky, engineer-wants-to-tinker-with-shiny-toys like using Terraform or Kubernetes would be if you only have 10 paying users and two microservices.

Re:Ask HN: Are my expectations on code quality and professio... by avilesj on Sunday June 07, 2020 @09:48PM (#23452801)
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 professio... by _bxg1 on Friday June 05, 2020 @10:27AM (#23428943)
Worth noting that the OP said "mid-sized company", which probably means one that doesn't have a runway measured in months. That makes a big difference.
Re:Ask HN: Are my expectations on code quality and professio... by quickthrower2 on Saturday June 06, 2020 @08:06AM (#23438579)
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 professio... by hannofcart on Friday June 05, 2020 @08:48AM (#23427854)
This story is so eerily close to what happened at my company, even as regarding specifics that I was tempted to ask if you are a colleague. :)
Re:Ask HN: Are my expectations on code quality and professio... by marcinzm on Friday June 05, 2020 @09:38AM (#23428361)
That seems like very myopic management since a) motivated employees will work harder b) technical debt has a continual productivity hit even in the short term. If spending 20 hours on terraform saves the team 100 hours of debugging over the next 6 months then that may be a net win. Keep in mind that due to context switching and flow even a 10 minute "fix it now" bug will use up 2-4 hours worth of productivity.
Re:Ask HN: Are my expectations on code quality and professio... by sanderjd on Friday June 05, 2020 @11:54AM (#23429943)
Newly hired experienced eng lead a year after this conversation: "Ok we won the product-market fit lottery with our prototype - awesome! - now we should begin identifying the highest value pieces to reimplement with better practices, so that we can scale the team and product effectively".

You as a manager at a slightly more mature startup: "What, you want to rewrite? No, everyone knows rewrites don't work! Just hire up and keep moving fast."

Experienced eng lead after a few months of burning out on a miserable project: "I have better options for this, here is my resignation."

Board member after another few years and lots of turnover: "It seems like we're no longer able to execute because of all our technical debt. You have been a great manager for this early stage of the company, but now we need to bring in the mature company professionals. Thank you for your service."

end scene

I do not even claim that this is a bad outcome. It really is important to execute quickly early if you are going to have any chance of success. I have made the mistake of being too slow too early. But path dependency is also a big deal, and there is rarely (never?) an obvious bright line point at which it is clear that the time is right to up the professionalism game. It is not hard to get into a situation where the team is spending nearly all their time baling water out of a sinking ship that you're still trying to sail while competitors speed past you in newer sleeker dryer ships. I also think the hiring / turnover risk is a real problem. There are companies with good engineering practices, which make work much more pleasurable, and you are competing against them for talent.

But I think this is a false dichotomy. I think there are a set of practices that don't introduce so much friction that they are an existential threat early on, but that are small steps in the right direction down the path to practices that scale well.

I think it is telling that you went straight to Terraform in your example, although nothing like that was alluded to in the OP. I would agree with you that Terraform does not belong in this low-friction-step-in-the-right-direction category of practices. But I think all or most of the practices the OP actually listed do fall into that category. Code review, in conjunction with automatic style fixing (which most languages have tools for now), is low friction and has immediate value. Same thing for unit tests. I do think a whole end-to-end testing setup is beginning to be more friction than can be afforded, but unit tests are easy (especially if you choose languages with type systems that allow you to dispense with tests that verify the type contracts are being satisfied). Automated deployment is actually both a step in the right direction and something it would slow down your early execution to not have.

There is a huge gray area, and I think it is really difficult to strike the right balance (to wit: I've never seen or personally accomplished this balance satisfactorily), but I think it is the right way of framing it. I think the right mindset for you as a manager at an early startup is not "we don't have time for that!" but "will the ROI of that be worth the time?", and that you need to do the hard work to explain that that thinking to and get buy-in from your developers.

Re:Ask HN: Are my expectations on code quality and professio... by planxty on Friday June 05, 2020 @08:16AM (#23427607)
I think you have some things to learn, as a manager, and as an engineer.
Re:Ask HN: Are my expectations on code quality and professio... by hef19898 on Friday June 05, 2020 @09:38AM (#23428353)
I'm no SWE, so it might not be 100% applicable here.

As a manager, one of the your tasks are to make sure that your team knows why they are doing what they do. That way, when there is no time for lengthy discussions, they don't feel demoralized when you give them an order they disagree with.

Another task is, to make sure to get the best out of your team. That means to use the experience and knowledge of people as much as possible. Not doing that only drives down motivation.

What happened to me in the past, in a different domain, was somewhat similar to OP. I was explicietly hired because of my FANG background to imporve operations of a new business unit for a German unicorn. So that's what I started to do. Map processes, talk to the team, shadow them, identify issues and problems, work out KPIs and SOPs... the drill. Ony to be shit down by my manager at every turn "because we have 1,000s of proplems right now and nne are addressed by what you are doing". That sucked, it really did. My impression was, that they wanted FANG level withut putting the effort in. Just having someone with the right experience doesn't magicaly solve your problems.

In the above example, when time is critical, implement it. But hen have an pen discussion with your team about best practices, and maybe use whatever solution your "bi-corp" people have in mind.

Re:Ask HN: Are my expectations on code quality and professio... by acomar on Friday June 05, 2020 @01:29PM (#23431197)
people usually can't articulate what they want and they always want to skip the hard bits. look to what they do rather than what they say and find a way to slowly pull them towards what they ought to want. it takes a long time but you can make things better under conditions like that.
Re:Ask HN: Are my expectations on code quality and professio... by projektfu on Friday June 05, 2020 @10:31AM (#23428970)
If you have a team of 5, and one wants to implement terraform or some other package like that, what is the current cost to the rest of the team that is unfamiliar with the new software? Will that one person be hobbled for the next few months trying to get their work done and support the other engineers who get blocked by tech they haven’t learned as well? Was the system viable using shell scripts or however it was originally set up? Is it going to tick off another developer who put effort into the current orchestration?
Re:Ask HN: Are my expectations on code quality and professio... by p_l on Friday June 05, 2020 @10:52AM (#23429209)
Would you even have cross-cutting concerns in a team of 5? Given previous experience, it's quite common that if you have a team of 5, it will be reasonable to assume everyone is sharing a bus factor of 1~1.5 and one person will be the infrastructure master. Letting them use whatever tools to leverage until you can have more runway is good.
Re:Ask HN: Are my expectations on code quality and professio... by projektfu on Friday June 05, 2020 @01:52PM (#23431556)
I agree, unless the introduction of a tool for everyone could slow down 4/5 of the team. Startups usually have inexperienced people but the successful ones have talented people. Sometimes hiring an inexperienced big company employee causes these issues because they “know how it should be done” instead of having the experience to exercise judgement. It’s not a management failure to say, “let’s think about that in 5 months after we have a working product.”

The tradeoffs are not obvious. It could be that terraform is as important to this startup as version control would be, they just don’t know it. But if it ain’t broke....

Btw, I’ve worked at a startup (25 years ago) that had no version control and I was the one who identified the problem and introduced it. I also was unaware we needed it or what it could do for us before we had our first pucker-up moment with the source code. After version control we moved faster and slept better. Or we would have if we weren’t pulling all nighters.

The startup failed anyway.

Re:Ask HN: Are my expectations on code quality and professio... by reallydontask on Friday June 05, 2020 @08:38AM (#23427777)
Don't we all?

What exactly do you mean?

Two micro instances don't seem to warrant using Terraform

Re:Ask HN: Are my expectations on code quality and professio... by dangus on Friday June 05, 2020 @09:18AM (#23428141)
Once you're experienced writing Infrastructure as Code, you always use it, no matter how small the project is. Right now I run a single micro instance for a personal project and I've got the whole thing Terraformed, which took me less than a workday - VPC, subnet, security groups, S3 buckets, and a basic provisioning script to setup the instance's software and cron jobs.

It is (eventually, once you learn it) faster and more intuitive than bothering with the AWS console, and I often reference Terraform's own AWS resource documentation over the AWS docs since it usually has better information density.

Anyway, the issue is all beside the point, I think we realize that Terraform was used as a placeholder example. Another example might be setting up single sign on, Active Directory, and other things that are truly not necessary for a company of that scale.

The other part of this that if you've got a startup with 5 month runway and 10 employees, hiring an Infrastructure as Code SME is probably not the best use of your dollars. Sure, I was able to put this side project in Terraform in under a day, but I also can't write a front-end application to get myself out of a wet paper bag.

Re:Ask HN: Are my expectations on code quality and professio... by reallydontask on Friday June 05, 2020 @10:40AM (#23429071)
> Once you're experienced writing Infrastructure as Code, you always use it, no matter how small the project is.

It's a good idea to start early with IaC but one of the marks of a good engineer is knowing what tooling to use for each circumstance.

Your app might be a perfect fit for Terraform or it might not, I couldn't possibly comment. Given the info you've provided it seems excessive but it's hard to say for sure

Re:Ask HN: Are my expectations on code quality and professio... by ncallaway on Friday June 05, 2020 @10:52AM (#23429218)
I can't think of a project of any size that terraform would be excessive for.

Agree, if you're introducing it to a new team and don't have time to teach the tooling that could be problematic.

But being somewhat familiar with Terraform I would use it to launch a single EC2 instance. Because it's about as fast to do that as it would be for me to use the AWS Console.

It's not that I think Terraform is needed for that small of a project, it's that it adds no cost even for tiny projects.

Re:Ask HN: Are my expectations on code quality and professio... by reallydontask on Friday June 05, 2020 @12:39PM (#23430473)
The original comment suggested that Terraform was being introduced at the wrong time.

You are right that size is not the best measure of suitability.

Re:Ask HN: Are my expectations on code quality and professio... by hef19898 on Friday June 05, 2020 @09:42AM (#23428403)
Not sure about the run-way thing. I'm also partially a six sigma / lean guy, and doing things right in the first place is a key lesson I learned, sometimes the hard way (aerospace definitely drove this home as well).

I would make the case that, even with 5 months of runway, you should invest in a solid foundation. Because if the company goes down, it does. Only a little bit earlier. if it doesn't, which is I assume the reasoning behind the company in the first place, getting the basics right now has a huge impact on runway and scalability later on.

Re:Ask HN: Are my expectations on code quality and professio... by metalforever on Friday June 05, 2020 @01:27PM (#23431161)
The problem is that sometimes, the overhead isn't the right decision from a cognitive load perspective and a fiscal perspective (cost of infrastructure + developer time).
Re:Ask HN: Are my expectations on code quality and professio... by adrianN on Friday June 05, 2020 @09:48AM (#23428468)
If the infrastructure is simple, the Terraform is simple too.
Re:Ask HN: Are my expectations on code quality and professio... by OJFord on Friday June 05, 2020 @11:34AM (#23429718)
> Two micro instances don't seem to warrant using Terraform

That doesn't really make sense, it's not like there's some huge fixed cost of using Terraform, the whole point of infrastructure as code is that all the infrastructure is code, i.e. it's all variable cost.

Small infrastructure as small code.

And then it's all there when you expand. Change `num_micro_instances = 2` to `4`. `10`.

Re:Ask HN: Are my expectations on code quality and professio... by UK-Al05 on Friday June 05, 2020 @08:51AM (#23427890)
They probably warrant CI and tests though.
Re:Ask HN: Are my expectations on code quality and professio... by blub on Friday June 05, 2020 @11:33AM (#23429704)
If that team can't even do code review and they're pushing to production as OP said, maybe the startup should proactively close shop and everyone should go back to something they're competent at, like growing potatoes.
Re:Ask HN: Are my expectations on code quality and professio... by p0nce on Friday June 05, 2020 @08:16AM (#23427605)
How long has your startup been in existence? If it's more than a few years and you haven't found market fit then it explain why you have "5 month of runway"