4 ms·
Personally, for now, I like being one of the "maintainergineers". Often, when I read code written by "green fielders", I question their competence, and questio
by b0afc375b5 6y ago
Personally, for now, I like being one of the "maintainergineers".
Often, when I read code written by "green fielders", I question their competence, and question myself why I'm still working at this place. I admit this says more about my ignorance than anything else. I'm just saying what I feel at the moment.
All projects that I have been part of in my current company don't have automated tests (at least initially before I joined). Instead we rely on QA. Since I read a lot about things like DDD / well architected code I often dream working on a codebase where implementing features and fixing bugs isn't frustrating and deploying to production isn't nerve wracking.
Since the first step of refactoring is to have tests, in my first project I endeavoured to have unit/integration/e2e tests. They're a bit subpar for my taste, and can be a bit slow to run at times. However, these tests allowed me to sleep better at night after each deployment.
In the last few days, since joining a new (EDIT: non-greenfield, as a maintainer) project, all I've done is write unit/integration tests. (EDIT: I'm writing unit tests to what I currently consider very sloppy code, e.g., not using dependency injection, leaky abstractions like calling request() inside a model class (project uses laravel framework))
I like to think that what I have done and what I'm doing right now will enable me to write better architected code. As an extremely simple example, I find it harder to test `new FooClass` than its dependency injected counterpart. I hope I'll remember that next time I write code.
- NAHWheatCracker 6y agoI would love to be a maintenance engineer in my current job, if it was respected. Sadly, it's not and project managers drive for features. I agree that maintenance work is more likely to be instructive in creating well architected code. It has been a joy when it's possible to take a poorly build module, write tests, and refactor it into something simpler and more effective.
- Viliam1234 6y ago> All projects that I have been part of in my current company don't have automated tests On the rare occasions when I start on the green field, logging and unit tests are literally the first things I set up. It only takes a moment, and the time investment is paid back the first moment you investigate a bug. Doesn't mean I do unit tests religiously, but at least I do them sometimes.