| ▲ | charles_f 7 hours ago |
| Write tests. Most likely those 300k lines of code contain a TESST folder with 4 unit tests written by an intern who retired to become a bonsai farmer in the 1990s, and none of them pass anymore. Things become much less stressful if you have something basic telling you you're still good. |
|
| ▲ | layer8 5 hours ago | parent | next [-] |
| The problem with complex legacy codebases is that you don’t know about the myriads of edge cases the existing code is covering, and that will only be discovered in production on customer premises wreaking havoc two months after you shipped the seemingly regression-free refactor. |
| |
| ▲ | ljm 3 hours ago | parent | next [-] | | It helps if tests are well written such that they help you with refactoring, rather than just being the implementation (or a tightly coupled equivalent)
but with assertions in it. Rare to see though. I don't think being able to write code automatically means you can write decent tests. Skill needs to be developed. | |
| ▲ | mehagar 5 hours ago | parent | prev | next [-] | | I agree. This is one area I'm hoping that AI tools can help with. Given a complex codebase that no one understands, the ability to have an agent review the code change is at least better than nothing at all. | |
| ▲ | nijave an hour ago | parent | prev | next [-] | | You can infer based on code coverage. If coverage is low, tests are likely insufficient and change is risky | |
| ▲ | UltraSane 5 hours ago | parent | prev | next [-] | | If you save a log of input on the production system you can feed it to old and new versions to find any changed in behavior. | |
| ▲ | 5 hours ago | parent | prev [-] | | [deleted] |
|
|
| ▲ | karmakurtisaani 5 hours ago | parent | prev | next [-] |
| The best time to write tests was 20 years ago. The second best is now, provided you've applied to all the companies with better culture. |
|
| ▲ | ipsento606 3 hours ago | parent | prev [-] |
| I've been working on react and react native applications professionally for over ten years, and I have never worked on a project with any kind of meaningful test coverage |
| |
| ▲ | stronglikedan 3 hours ago | parent | next [-] | | over 20 years, many stacks, and same | |
| ▲ | locknitpicker 3 hours ago | parent | prev [-] | | > I have never worked on a project with any kind of meaningful test coverage That says more about you and the care you put into quality assurance than anything else, really. | | |
| ▲ | ipsento606 2 hours ago | parent | next [-] | | Presumably you mean me, and every current and former team-member I've ever had? If so, you're talking about hundreds of engineers. | |
| ▲ | AnimalMuppet an hour ago | parent | prev [-] | | Have you ever worked at a place where you were put on an existing codebase, and that code has no tests? Have you ever worked at a place where, when you try to fix that, management tells you that they don't have the time to do so, they have to crank out new features? Is ipsento606 working at such a place? I don't know, and neither do you. Why do you jump to the conclusion that it's their personal failing? |
|
|