What I Have Changed My Mind About in Software Development
Tags: learning, programming
Published: 2023-09-16 06:30:02

---
title: What I Have Changed My Mind About in Software Development
published: true
date: 2023-09-10 12:23:05 UTC
tags: Learning,Programming,learning,programming
canonical_url: https://henrikwarne.com/2023/09/10/what-i-have-changed-my-mind-about-in-software-development/
---

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:

[![](https://henrikwarne1.files.wordpress.com/2023/09/stenmur.jpg?w=1024)](https://henrikwarne1.files.wordpress.com/2023/09/stenmur.jpg)

**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](https://dev.to/henrikwarne/on-comments-in-code-4545).

**Unit testing private methods.** I wrote a blog post called [Unit Testing Private Methods](https://henrikwarne.com/2014/02/09/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](https://henrikwarne.com/2012/06/17/programmer-productivity-emacs-versus-intellij-idea/).

**Using a debugger.** I like [trouble shooting using log statements](https://henrikwarne.com/2014/01/01/finding-bugs-debugger-versus-logging/) 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](https://dev.to/henrikwarne/working-from-home-cons-and-pros-2boo). 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.