I really like this quote from Jeff Bezos:
“Anybody who doesn’t change their mind a lot is dramatically underestimating the complexity of the world we live in.”
Lately I have been thinking about what I have changed my mind about in software development. Here are the things I came up with:
Self-documenting code. I used to think that the names of the classes, methods and variables should be enough to understand what the program does. No comments should be needed. Over the years I have realized that some comments are needed and useful. These days I add comments when there is something particularly tricky, either with the implementation, or in the domain. Every time I came back to code where I wrote a comment, I am happy that I took the time to do it. I have written more about this in On Comments in Code.
Unit testing private methods. I wrote a blog post called Unit Testing Private Methods, where I argued that you might as well make them package private, so you can easily write tests for them. However, several people commented and argued that you can test the private methods through the public interface. After a bit of thinking, I ended up agreeing with them, and changed my approach.
Using an IDE. Many years ago, I was using Emacs when writing code. I was quite happy with that, and didn’t particularly feel that anything was lacking. However, one day my colleague Johan showed me what IntelliJ IDEA could do. I was sold, and never looked back. The biggest difference is navigation – it is so much easier to move around in a code base with one. Nowadays, I can’t imagine not using an IDE. I have written more on this in Programmer Productivity: Emacs versus IntelliJ IDEA.
Using a debugger. I like trouble shooting using log statements and printf. It is simple and effective, and works in many situations. However, when I started writing Go code several years ago, my colleague Erik showed me how nice it is to explore the state of the program when a test case fails. I had used debuggers before, but he showed me a great use case for them.
Working remotely. Even during the pandemic, when I was working from home full time, I was skeptical of working remotely. However, I have changed my mind, and I now think working from home is great. The downside is still that I miss the face-to-face interactions. But working remotely allows me to work for companies I previously could not work for. Not having to commute is a another big plus. On balance, I think the advantages outweigh the disadvantages.
Using ChatGPT. When ChatGPT came out, I was impressed with what it could do. However, I was a bit skeptical of exactly how it would work in software development. But my colleague Filip kept telling me of all the cases where he used ChatGPT to help with development. So I decided to put some more effort into seeing how I could use it. For me, the main use has been for minor stand-alone tasks. For example, to generate a first draft of a Python script, to write a SQL INSERT/UPDATE trigger, or giving me a sed regular expression that removes the initial time stamp (when present) from log lines. In all these cases, it has been a great time saver.
Conclusion
Am I changing my mind about enough things? I don’t know. But it is definitely worthwhile to once in a while examine your beliefs about how to develop software. In many of the above cases, it took somebody else to show me, or convince me, of other ways of working. My conclusion is that collaboration and pair programming is important for spreading good ideas.
What have you changed your mind about when it comes to software development? Let me know in the comments.
Top comments (0)