Tip for beginners: There's no such thing as "weird" in programming

Published under Thoughts.

After mentoring junior developers for over 4 years, and participating in online chat groups related to programming, the first piece of advice I’d give to new programmers is:

There is no such thing as "weird" or "coincidence" in programming.

That is, everything has an explanation. Whether or not you know (or understand) the explanation is what makes a problem feel "weird".

Computers are machines that are programmed to do specific actions when specific events occur. Let’s take a look at an example where a (now common) problem seems to be a weird one, but in reality has a simple explanation:

Physical example

A couple years ago, Apple released a new keyboard for its MacBook and MacBook Pro models. This new keyboard has a mechanism called the "butterfly mechanism" as opposed to the previous "scissors mechanism". The problem with these keyboards is that eventually keys will start double or even triple pressing when you type them. However, the problem randomly occurs and usually cannot be reproduced on demand.

This is the type of problem where you might think there’s some crazy software bug that "randomly" causes keys to be duplicated. However, in reality the explanation is simple: The new butterfly mechanism allows dust and small particles to become stuck under the key. Hence, when a key is pressed, the stuck particle may cause the key to stick or even be triggered again, causing the duplicate key press.

Software example

Even though the example I gave above is due to a physical defect, the same concept applies to software problems.

Unless you’re using bleeding edge technology that is unstable or doesn’t have comprehensive testing, the bugs you run into probably have a reasonable explanation, you just don’t know it yet.

One of the most common areas this type of problem could occur for new web developers is with CSS. I would define CSS as quirky and fragile, meaning very tiny changes can make a very big impact on the outcome of the product.

With CSS, it's very easy to hack and slash your way through problems to get something to "just work". Meanwhile, you don't actually know how its working behind the scenes.

Why is this a problem?

When you move on from a problem without understanding the cause, you don't learn anything. When you don't learn anything, you don't grow. When you don't grow, you stay stagnant. You get the idea 🙂

Note: I understand that not everyone has the luxury to spend the time required to fully understand a bug. If you can, set a reminder to come back in the future to revisit the problem.

Let's not forget, as programmers/web developers/whatever you want to be called, we're hired to solve problems. In order to solve a problem, you need to understand the problem. That's problem solving at its core.

The more you know in your area of expertise, the better you'll be at it.

In closing

I see this problem most commonly with junior developers, however it happens to everyone. Senior developers are not immune to it, but I believe part of progressing from a junior developer to becoming a senior developer is learning how to understand both problems and their solutions.

Thanks for reading!

Did you find this post useful? Let me know on Twitter! If you found an issue with the content, submit a pull request!

Subscribe to my newsletter to know when I publish more content in the future.

❤️ Likes: 0
📣 Retweets: 0
💬 Replies: 0
🙊 Mentions: 0