In my case, as I am new to programming, I started to contribute to an existing project and I realized that some of the changes I made were causing side effects and they had no tests to show that my contributions were working as expected and that the existing features continued to function properly. So, I realized that I needed to implement tests to be more confident, reduce the amount of bugs and at the same time have clear documentation of what the existing code should be doing.
Software developer trying to bring order into his craft. I write about my journey, thoughts, and practices. Currently focused on web frontend with React.
It's awesome that you've reached that conclusion. Many people don't have those concerns and just go on and break things thinking that it's part of the job. I also believe that we can do better than that :)
Since you said that you're new to programming, I don't know if you're aware of the term legacy code or not, but what you're describing is part of the problems that we face when we work with legacy code. And in my opinion, working with legacy code is one of the hardest challenges of software development because we need to reverse engineer code into a design that allows us to test it. It's an entirely more complex scenario than writing tests from the get-go. So don't feel frustrated if you get to the point where you can consistently write tests for an app that's not yet written, but still find it hard to introduce tests to already existing projects :)
Yes, from what I have seen so far (which is not much), working with legacy code is more challenging but it is also much more likely than writing something from scratch or that already has well-established tests. But it’s good to know that even more experienced programmers also find this difficult, I’ll keep that in mind.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In my case, as I am new to programming, I started to contribute to an existing project and I realized that some of the changes I made were causing side effects and they had no tests to show that my contributions were working as expected and that the existing features continued to function properly. So, I realized that I needed to implement tests to be more confident, reduce the amount of bugs and at the same time have clear documentation of what the existing code should be doing.
It's awesome that you've reached that conclusion. Many people don't have those concerns and just go on and break things thinking that it's part of the job. I also believe that we can do better than that :)
Since you said that you're new to programming, I don't know if you're aware of the term legacy code or not, but what you're describing is part of the problems that we face when we work with legacy code. And in my opinion, working with legacy code is one of the hardest challenges of software development because we need to reverse engineer code into a design that allows us to test it. It's an entirely more complex scenario than writing tests from the get-go. So don't feel frustrated if you get to the point where you can consistently write tests for an app that's not yet written, but still find it hard to introduce tests to already existing projects :)
Yes, from what I have seen so far (which is not much), working with legacy code is more challenging but it is also much more likely than writing something from scratch or that already has well-established tests. But it’s good to know that even more experienced programmers also find this difficult, I’ll keep that in mind.