Programming Languages are tools. Learning a tool doesn’t make you a developer.

If you learn how to use a saw and a hammer, that doesn’t mean you are able to build a house. Saws, hammers, screwdrivers – these are all tools. How you apply them to solve a problem (when and where) are techniques. There are multiple techniques you need to learn in order to understand how to build a house. While you still need to know how to use your tools, there’s fundamental concepts that you need to learn first, such as carpentry, masonry, and plumbing. Similarly, learning a programming language like JavaScript does not make you a programmer. You need to learn techniques for how to apply the tool to solve problems, not just learning the tool.

Tools can help you apply techniques and concepts, usually either in saving time or effort, or making a task easier than performing the task with your bare hands. Without a knowledge of these fundamental concepts you could certainly attempt to build a house (“I know what a house looks like so I know how to build one, right?”) and while you might end up with an end result that looks like a house, it will probably won’t be safe to live in. After the first winter storm you’ll probably find your roof leaks and you’ll be lucky if it’s still standing after being subject to strong winds.

Practice Makes Perfect

Knowledge of tools, concepts and techniques still does not mean you can apply them competently. Following with the house building analogy, if you read a book on house construction, could you successfully (and safely) build a house? Maybe. If you get your first job on a construction site and get some experience in house building and learn how to apply the techniques you’ve picked up from studying your house building book, it’s more likely for your next construction job you’ll be able to apply the knowledge and skills you’ve learned. Over time you’ll get advice, see what works and what doesn’t work, pick up tips and techniques that can save you time, growing your experience and competency.

Software development is no different. To improve your skills you need to get feedback on your work, you need to get advice on areas where you can improve, but just as importantly you need to practice your skills.

There’s commonly quoted advice that it takes 10,000 hours of practice to become and expert at anything. This has to be deliberate practice with the goal of improving your skills. For software development, spending 10,000 hours writing the same line of code over and over is not going to help you at all in becoming a better developer.

Don’t get caught up in comparing the pros and cons of different languages, or wanting to learn a specific language because you read it’s the ‘best’. Once you’ve learnt one you can more easily learn others. Spend time learning techniques and approaches to solve common problems. Learning a tool can be beneficial, but it’s not particularly useful if you don’t know how to apply it effectively.

As an industry we do a poor job of teaching new developers how to develop software

This is not a criticism of any specific school course, bootcamp or on the job training, it’s merely an observation over the years: early Spring and late Autumn/Fall there is always an increase online of very basic developer questions. These questions always include things like: “why doesn’t my code work”, “can someone debug this for me”, “why does this code not produce the result I’m looking for”, and even the flatout “please help me with my homework – here’s the assignment”

These points in time coincide with the start of a new term as new students are starting to learn a programming language, I guess it’s pretty much expected that we would see the number of these types of question increase during these times of the year. My point though is that these types of questions appear again and again every year. Every. Year.

Why have we not progressed past the point where new developers don’t need to ask basic questions as they are starting out? Why are software development courses not equipping new developers with basic problem solving skills to help them trouble solve basic problems for themselves?

Most of these questions and problems could easily be solved by the developers themselves if they stepped through their code in a debugger in their IDE and looked at what happens in their code step by step up to the point where something goes wrong usually because of a simple logic error.

Other problems could easily be solved by applying basic problem solving and software development core techniques:

  • breaking a large problem down into smaller parts
  • writing unit tests to test each smaller part of the app in isolation to confirm each part works by itself
  • testing with a range of valid and invalid values to find what works and what doesn’t work
  • using log statements to trace execution through an app
  • identifying what changed since it was last working, incrementally backing out last changes to find the point where a change was added that broke something
  • using a debugger

There’s too much emphasis on learning a programming language to write code, and not enough focus on techniques to develop software. None of things I listed above are new ideas or concepts, experienced developers have applied these concepts daily for decades. It seems we’re failing short in training new developers if we’re missing out the basics.

What is the ‘main thing’ in software development?

Software development is about solving problems. It’s about solving problems in an effective way that adds value. It isn’t about programming languages and writing code. Programming languages are tools. We use tools like Cloud compute to run our solutions, and we build solutions with tools like programming languages and frameworks.

It’s all about solving problems.

If you’re getting started in software development as a career and are putting all your effort into learning a programming language, remember that’s just a tool. It’s how you use it to solve problems which is the important part.

Essential best practices and principals of effective software development

The software development industry is full of best practices and recommendations, many that evolve and change as our technology changes. There are some core concepts that remain beneficial even though programming languages and runtime technology platforms have changed over time.

Here’s a summary of some core principals that can help us develop software systems more effectively:

KISS – Keep it Simple, Stupid

Unnecessary complexity in code is technical debt that will to cost you at some point in the future – it’s more likely to contain unexpected and hard to find bugs, and complicated code it harder to understand, and therefore harder to maintain. Keep it simple.

DRY – Don’t Repeat Yourself

Avoid duplication in code. Duplicated blocks of code are a maintenance risk. If there is bug in a block of code that exists in multiple places, fixing the issue in only one place means that the issue still remains in those other blocks of code. When other developers are maintaining the code in the future, it may not be obvious that the same code exists elsewhere.

YAGNI – You aren’t gonna need it

The cost of maintaining a system increases in relation to the more code that is part of your product or solution. Why? Because the more code you have, these’s a higher risk for things to break, go wrong, increased effort for testing, and so on. You won’t have bugs in code you don’t have (you may have missing features but that’s a different problem). It makes sense therefore that you shouldn’t build additional features that you or your customer doesn’t need or want. The YAGNI rule is that if you don’t need it, don’t build it. Don’t make your job harder by increasing the possibility for things to break, or increasing the overhead of maintenance by building unneeded features that need to be fixed, updated, tested in the future. Don’t write code you don’t need.

Design/plan/structure your code to enable easier unit testing

Not everyone agrees whether Test Driven Development (TDD) should be followed as an absolute rule or not, but thinking about your tests first has a benefit that can be taken and used to your advantage even if you don’t subscribe 100% to the TDD approach. If you think about structuring your code in a way that makes it easier for you to test, then it’s immediately easier and takes less effort to write your unit tests, compared to code where there was no effort or thought into how the code could be tested. Simpler code is (usually) easier to test, compared to overly complex code that is usually much harder. Simpler code is easier to understand and maintain.