In this series we ask ThoughtWorkers to talk about a challenging time for them. A time when learning a new programming language challenged and then changed the way they thought.

This month, Adam Scott tells us his story.

A long time ago, I decided to learn ruby. Up to that point, the only languages I had any real exposure to were: Java, and a smattering of C++ and JavaScript. In retrospect, my code was terrible. The incident that made me feel extremely foolish was my attempted overuse of dependency injection. All my objects had dependent services injected into them through constructors. I couldn’t work out why none of the tutorials had mentioned DI as a principle. My code looked messy and strange. I was missing a trick.

Then it hit me. The basic rules I had learned for Java, and had assumed where true for all languages, were far more limited than I had realised. It opened my eyes, that I like everyone else, could easily fall into the trap of Dunning–Kruger. I didn’t know half as much about programming as I thought I did, and learning a new language reminded me that there is always a better way of solving any problem.

With Ruby, the solution was to use other testing, injection and meta-programming techniques, and not to constrain my thinking to that of the Java world.