Beware of Bad Programming Advice - Spotting Senior Juniorism

Web development, Career, Programming · Jun 4, 2023

Aspiring programmers are always looking for advice, especially from experienced developers who have walked the same path. However, not all advice is created equal. In fact, some advice can be downright dangerous, leading to poor coding practices and bad habits. This is where the phenomenon of "senior juniorism" comes in – where juniors write too much about the few things they know, completely oblivious to their own blind spots.

If I had to guess, I'd blame the fake it till you make it mentality first and foremost for this situation. While this phrase can be motivating, it's often taken too seriously, leading to bad advice and misinformation spreading like wildfire. When someone pretends to be an expert, they may inadvertently give advice that is outdated, incomplete or simply incorrect.

Another culprit is the fact that many developers are self-taught. The internet has given us access to a wealth of information, but it's also made it easier than ever to skip over the basics. This can be especially dangerous when it comes to security, where a single mistake can lead to a major breach.

Last but not least, lack of experience can also be a factor. While it's true that experience is not everything, it's more likely that you'll be exposed to different situations, problems and opinions over time, which will help you form a more balanced view of things. This sort of exposure is something that you simply don't have when you're just starting out.

Combining all of this with the learning in public mentality that is often pushed to new developers and things can easily get out of hand. Thus, it's imperative that we learn to spot bad advice.

To avoid falling for bad advice, it's important to understand the three types of knowledge: what you know you know, what you know you don't know, and what you don't know you don't know. It's important to acknowledge that there are many things we don't know, and be humble enough to admit it. Even the most experienced developers have gaps in their knowledge.

So how can you avoid falling for bad advice? One way is to pick reputable sources, such as books, articles, or experts in the field. However, even reputable sources can be biased or outdated. That's why it's important to do your own research, experiment with code, and develop your critical thinking skills.

As my writing (and this very post) is a source of advice in itself, I suggest you take it with a grain of salt, too. I'm not immune to this phenomenon and I've made many mistakes in the past, hopefully without causing too much harm. I've also followed and reproduced bad advice at times, privately or publicly. Here's a few examples of bad advice I've fallen for:

  • Coercion is always bad, except it isn't. It's a language feature that can be useful in certain situations and any confusion around it stems from not fully understanding how it works.
  • Never use classes in JS, because they're syntactic sugar on top of prototypes. This might be true, but to a beginner coming from an object-oriented background, it feels a bit like gatekeeping.
  • Avoid useEffect in React, opting for third-party hooks instead. Those hooks are certainly useful, but they use useEffect under the hood, so you'll eventually need to learn about it one way or the other.

I've definitely made my fair share of mistakes, and I'm sure I'll make many more in the future. However, I'm always trying to learn from them and improve my writing. I'm also trying to be more mindful of the advice I give, and I hope you'll do the same if you're sharing your knowledge with others.

In conclusion, senior juniorism can be a dangerous phenomenon that can lead to bad advice spreading To avoid falling into this trap, it's important to acknowledge the limits of your knowledge, pick reputable sources, do your own research, and develop your critical thinking skills. Remember, not all advice is created equal, and it's up to you to make informed decisions based on the specific context.

More like this

  • Technical debt

    Learn what technical debt is, its causes and symptoms, and how to deal with it.

    Web development · Oct 9, 2022

  • The benefits of writing

    Writing about a topic can often sound boring or worthless. But there are significant benefits to doing it from time to time.

    Web development · Nov 5, 2022

  • Escaping tutorial hell

    Many beginners get stuck in tutorial hell without even realizing. Here are 4 simple ways to escape tutorial hell and get back to learning.

    Web development · May 26, 2022