7 Programming Myths that waste your time

Fireship www.youtube.com

Brief Summary

This video discusses common time-wasting practices in programming. It challenges the notion that using the latest technology is always necessary, warns against strict adherence to programming dogmas, and questions the value of striving for 100% test coverage. The video also advises against premature performance optimization and over-reliance on AI coding tools, emphasizing the importance of a strong foundation in problem-solving and critical thinking.

  • Focus on problem-solving skills over blindly adopting new technologies.
  • Avoid getting trapped in programming dogmas and aim for practical solutions.
  • Prioritize code quality and real-world performance over achieving perfect test coverage or premature optimization.
  • Use AI tools wisely, maintaining a solid understanding of fundamental programming principles.

The Myth of the Latest Tech

The video challenges the idea that programmers must always use the latest technology to stay relevant. While new technologies like Next.js, Kotlin, NoSQL, and Rust are appealing, the reality is that many industries still rely on older technologies like WordPress, PHP, Java, SQL, and C++. The fear of missing out (FOMO) can drive developers to learn these new technologies, but the majority of job opportunities are in environments using established tech stacks. Critical systems often run on COBOL, and Java continues to power billions of devices. CTOs often stick with the principle of "if it ain't broke, don't fix it," making it more practical to focus on well-established technologies. The video uses the example of Twitter's Fauna database, which ultimately failed, highlighting the risks of adopting proprietary, VC-funded technologies too early.

Programming Dogma

The video warns against adhering too strictly to programming dogmas, such as object-oriented purism or functional programming extremism. While these paradigms can be valuable, dedicating oneself exclusively to one can be a waste of time. JavaScript, for example, is a multi-paradigm language that can accommodate various approaches. The video recalls a period when functional programming was heavily favored, and using classes was frowned upon. Over time, the author realized that a balanced approach, incorporating elements from different paradigms, is often more effective.

The Trap of Clean Code

The video addresses the concept of "clean code," inspired by Uncle Bob Martin's book. While many of the book's principles, such as using meaningful names and writing small functions, are valuable, some can be taken too far. The "Don't Repeat Yourself" (DRY) principle, for example, can lead to excessive layers of wrappers and indirection, resulting in "paralysis by analysis." The video suggests a more pragmatic approach: "Repeat Until Good" (RUG), which involves duplicating code initially and abstracting it only when the repetition becomes burdensome.

The Illusion of 100% Test Coverage

The video questions the myth that 100% test coverage guarantees well-protected code. While testing is valuable, optimizing for complete coverage can be a waste of time and misleading. High coverage does not necessarily equate to high quality, as developers may write pointless tests that merely touch lines of code without catching real bugs. This can create a false sense of security and slow down CI builds, costing more money. The video emphasizes that quality, not quantity, is what matters in test coverage.

Premature Performance Optimization

The video argues against the idea that one should always optimize for performance. Benchmarking and optimizing code that doesn't run at a scale to justify those optimizations is a waste of time. It's more important to ensure code correctness first and then optimize for performance only when it becomes clear that the code is underperforming in production. Similarly, there's no need to over-engineer cloud infrastructure as if preparing to scale like Facebook when a simple VPS might suffice.

The AI Over-Reliance Myth

The video addresses the myth that AI is about to replace all programmers. While AI code-writing tools are powerful, many programmers waste time by relying on them too heavily. For example, AI might generate verbose code or create unnecessary frameworks. The key to success is to have a solid foundation in problem-solving. AI tools can boost productivity, but improper use can lead to wasted time. The video emphasizes the importance of understanding the math and computer science behind the code.

Summarize any YouTube video in seconds

Get summaries like this one for any video, in your language, with the free Summ app.

Download on the App Store
Get it on Google Play

Transcript

Full transcript of “7 Programming Myths that waste your time”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.

0:00 Recently, I unlocked a new achievement in life, a midlife crisis when I came to the realization that I've spent most of my adult life writing code. And most of that code is total garbage. It's code that never saw the light of a production server and was either abandoned, refactored, or left to rot in the graveyard of GitHub. As I reflected upon this further, I realized that many of the best practices, the hot game-changing frameworks, and the perfect folder structures didn't actually matter to the end user. I wasted countless hours chasing programming dragons that made me feel more productive but ultimately led nowhere. In today's video, we'll debunk nine smart ideas that waste your time as a programmer. And for each myth, we'll look at how it lures you in, why it's actually a trap, and most importantly, how to not do the things that I have done. Now, one of the main goals of this channel is to show you the latest tech

0:45 you need to use to be relevant. But it's actually a myth that you need to use the latest tech to be relevant. In fact, you might even become more hirable by focusing on old dinosaur technologies like WordPress and PHP still runs most of the web applications out there. Java runs most of the enterprise world. Most databases are SQL based and C++ runs most of the low-level systems. However, there are shiny new replacements for tech like this, including Nex.js, Cotlin, NoSQL, and Rust. And the lure is a massive feeling of FOMO if you're not mastering the bleeding edge of these so-called superior technologies. To be clear, I'm not discouraging you from learning these. They're awesome, but it's important to understand that most of the real world, where the jobs exist, are not going to change their dinosaur tech stacks anytime soon. The critical banking systems still run on Cobalt, and Java will still be powering 3 billion

1:31 devices long after everybody watching this is dead. Most CTOs are smart enough to know that if it ain't broke, don't fix it. Here's a real life example. A few years ago, engineers from Twitter released a hot new database called Fauna. It was a pretty solid product, and I even made a video about it. But the technology was proprietary, VC funded, and like most startups, the business failed recently. They have no choice but to shut down their servers. And if you were an early adopter, you're now screwed and would have been much better off with a boring SQL database. Adopting tech too early is one thing, but adhering to programming dogma can waste even more time. The problem with programming is that there are many different ways to solve the same problem, but some people out there believe that there's only one true way to write code. Some common cults out there include the object-oriented purists and the functional programming extremists. I've been a member of both

2:17 cults and have learned a lot from them, but dedicating your entire life to just one of them is a waste of time. I mostly code in JavaScript, which is a multiaradigm language that can satisfy all of these cults. In 2018, functional programming was having a renaissance in web development. But back then, if you use classes in your code, you were literally Hitler. And I found myself bending over backwards to try to do everything in the most functional way possible. no mutable state and higher order functions everywhere. But a few years later, after the spell wore off, I eventually realized that classes can be pretty useful. And my code today often includes a combination of things I've learned from both of these cults. But another time waster to watch out for is clean code, which comes from a legendary book written by Uncle Bob Martin, known as the handbook for agile software craftsmanship. Most of the advice in this book is great. Use meaningful names, write small functions, use

3:03 consistent formatting, and so on. But some of the advice is a little more nuanced, like the dry principle of don't repeat yourself, which means you shouldn't duplicate or write the same code over and over again. And on the surface, that seems like a good idea. But also, when you try too hard to keep things clean, you might end up with an endless layer of wrappers, interfaces, and pointless indirection. It's paralysis by analysis, and you end up spending more time refactoring than building actual features that people want. I think a better acronym would be rug, repeat until good. duplicate code at first and then pull it into a single abstraction after the repetition becomes painful. Clean code also recommends test-driven development and testing can be extremely valuable, but it's a myth that 100% test coverage means that your code is well protected. Your boss, who has no programming experience, is likely a big fan of code coverage tooling that

3:48 will show how much of your source code is executed when a test suite is run. It's interesting, but optimizing for 100% coverage is often a huge waste of time and can often be misleading because high coverage does not equal high quality. Optimizing for coverage encourages developers to write pointless tests that just touch lines and not catch real bugs. And even worse than wasting time, it provides a full sense of security. And then on top of that, it makes your CI builds even slower, which is going to cost you more money. When it comes to test coverage, it's quality, not quantity that matters. But one thing that truly must matter is performance. Well, actually, it's a myth that you should always optimize for performance. Yet another time waster is benchmarking and optimizing code that just doesn't run at the scale to justify those optimizations. It's far more important to make sure that your code is correct and then only optimize for performance

4:35 when it becomes painfully obvious that your code sucks in production. On a similar note, you also don't need to optimize your cloud infrastructure like you're about to scale like Facebook. Like I used to think that I needed this complex serverless micros service architecture with global sharding and edge caching, but it turns out that one small VPS is perfectly fine for my five users. And then finally, that brings us to the elephant in the room, the myth that AI is about to replace all programmers soon. There are some awesome AI codew writing tools out there, but it's becoming more and more clear that many programmers are now wasting a bunch of time relying too much on AI. For example, Claude Sonnet 3.7 is really good at writing code, but it's also notoriously verbose. You might ask it to build a simple website and it'll just randomly engineer some new JavaScript framework from scratch. And because you forgot how to write code, you'll just approve it and move on with your life.

5:21 AI programming tools are both the greatest productivity booster I've ever seen in my life, but when used improperly, they can also be the biggest time waster. The key to success is to have a solid foundation in problem solving. And you can start building that foundation for free today thanks to this video sponsor, Brilliant. A hard truth is that code is useless if you don't understand the math and computer science behind it. Brilliant helps you learn these concepts quickly by providing short, fun, interactive lessons, which is a method proven to be six times more effective than watching video lectures. But most importantly, you'll build critical thinking skills through problem solving, not memorizing. Before you try to jump into Vibe Coding, I'd highly recommend taking their thinking and code course to build a timeless problemolving foundation where you'll learn how to actually think like a programmer. Try everything Brilliant has to offer for a

6:06 free for 30 days by visiting brilliant.org/fireship org/fireship or scan the QR code on screen and get 20% off an annual premium subscription.

Share

More video summaries