News for hackers. Stuff that matters.
Re:Ask HN: Started a new job and their existing code sucks. ... by chatmasta on Thursday January 25, 2018 @05:05PM (#16235135)
If there’s literally no structure in place for running tests, then OP cannot just add “a simple test case.” OP also needs to build the test runner. That requires convincing his manager, who is likely the one responsible for this mess (by claiming maintainable code is not a priority).

Personally I think it’s irresponsible to hire new employees before having a maintainable project. It’s much easier to onboard employees and delegate to them when they have a safe dev environment and testable projects to break while they learn.

Re:Ask HN: Started a new job and their existing code sucks. ... by marenkay on Friday January 26, 2018 @01:46AM (#16237453)
- test infrastructure in every language is really a matter of minutes these days. Being able to run it locally is sufficient for a first step.

- hiring people for unmaintainable projects is literally the default for the majority of companies as everyone starts out small without directions and either fails or becomes something big. Legacy code is basically everywhere, clean code is the minority.

Re:Ask HN: Started a new job and their existing code sucks. ... by allthesethings on Thursday January 25, 2018 @07:52PM (#16236192)
You don't necessarily have to convince the manager, given a few prerequisites: it's possible to get at the code and build it locally, and you're willing to go around the team and do testing on your local machine. Not an easy task, unsupported, but it can be chipped away at over time, and if the project really is as stuck as it's made out to be, there will be parts of it that aren't changing rapidly and make for good low-hanging fruit.

Gradually that test suite will accumulate enough stuff that all OP has to do is walk into work, pull the latest, and make a few easy fixes before they finish coffee. They will look like either a hero or a monster, depending on how the politics work out. It's risky, but either way something will have been stirred up.

Re:Ask HN: Started a new job and their existing code sucks. ... by gtirloni on Thursday January 25, 2018 @08:22PM (#16236332)
Personally I think it’s irresponsible to hire new employees before having a maintainable project.

Have you ever been in a situation where you think "Gee, this is a mess but we are swamped here! Let's hire more people to help fix this" and then the new hire(s) joins the team and proceeds to bad mouth everything instead of helping to make things better? I have and it wasn't lack of communication or openness.

It's an attitude I can't empathize with.