There’s always something new to learn and know about. It could be anything in your personal or professional life. New things always add a thrill, making you hyperactive around these tasks (well only if you’re interested). I always look for new technology and development practices. Recently, I dived into Continuous Integration and Continuous Development (CI/CD) and I realized it’s a huge unchartered territory for me.
I started off with Unit Testing. The most basic yet important testing mechanism that exists. Writing unit test cases for each feature function, the validation that was happening gave me a sense of purity and made me feel that I was writing clean code. Gradually advancing to more deeper concepts, I came to know about more intricacies and the need for writing test cases. Though, writing test cases add up the effort and you have to write code and its test case as well, some people think it’s just a waste of time. Well, it’s true, sometimes. If you’re planning a short project or playing around, cleaning your codebase and having regular test cycles doesn’t make much sense. In the long term, however, test cases help to see any side effects to your huge codebase and makes sure whatever modifications you made doesn’t hamper any other module.
I also came to know about TDD. Writing test cases for a function before you write the function, is basically TDD. It has its own pros and cons. Well, I generally get easily impressed by anything, so naturally, pros were higher than cons. Writing test cases first make sure the function fulfills a specific task and most of the time doesn’t go beyond the scope.
In the long term, even if you don’t follow TDD, all your previous test cases make your codebase even stronger and valid.
There were many failures also and some of them haven’t been solved yet. But the most driving factor for me is the curiosity to overcome these problems and figure out a way to add it to our development processes. Oh didn’t I mention? Don’t do anything new randomly. You should know how a new thing can add value to you. If you know that, you’ve solved the 50% of the challenge and will be motivated by 200%.