how to write better code by learning from other industries

Programmers often get stuck in their own little world, and for good reason – the field changes fast. But taking a step back and looking at how other industries solve problems can be a huge help. I was talking to a friend who works in construction, and he was telling me about all the planning that goes into building a house. It got me thinking about how we plan out our coding projects.

When I need to get my head around a new project, I often visit saneius.com to see what other people are working on and how they’re doing it. Seeing what’s worked for them can give me some ideas for my own work. The thing that always strikes me is how much overlap there is between different fields – the same principles that make a good building also make good code.

looking at the big picture

One thing that programmers can learn from architects is the importance of looking at the big picture. When you’re designing a building, you have to think about how all the different parts fit together. It’s the same with coding – if you’re just focusing on one small part of the project, you can lose sight of how it fits into the whole.

breaking it down into smaller pieces

On the other hand, programmers can also learn from writers – specifically, from their approach to breaking down big projects into smaller, manageable pieces. When you’re writing a book, you don’t just sit down and start typing – you break it down into chapters, scenes, characters. It’s the same with coding – if you break it down into smaller tasks, it’s a lot less overwhelming.

thinking about the user

Another industry that programmers can learn from is design. Designers are always thinking about the user – how are they going to interact with this product? What do they want to get out of it? It’s the same with coding – if you’re not thinking about the user, you’re going to end up with something that’s hard to use or doesn’t do what they need it to do.

putting it all together

So how do you put all these different principles together? For me, it’s about finding a balance between looking at the big picture and breaking it down into smaller pieces. You have to think about how all the different parts fit together, but you also have to focus on one task at a time. Here are some things that have helped me:

  • Taking a step back and looking at the project as a whole before I start coding
  • Breaking it down into smaller tasks and focusing on one at a time
  • Thinking about the user and what they need to get out of the product
  • Talking to people in other industries and seeing how they approach similar problems

The more I learn about other industries, the more I realize that we’re all dealing with the same basic problems – we just have different tools and approaches. By learning from each other, we can come up with better solutions and write better code.