Skip to content

JavaScript Marathon: How to Write Clean Code

This article was written over 18 months ago and may contain information that is out of date. Some content may be relevant but please refer to the relevant official documentation or available resources for the latest information.

Writing clean code is an essential part of any developer’s toolkit. Not only does it ensure legibility, but it also helps you and other developers understand what your code is doing at a quick glance.

In this article, I’ll share with you the key takeaways from Nacho Vazquez’s session on writing clean code. These points can be found in Uncle Bob’s book “Clean Code: A Handbook of Agile Software Craftsmanship”.

Host

Nacho Vazquez @nacho_devc
  • Software Engineer, This Dot Labs

Key Takeaways

  • Clean code is more of an art and intuition!!
  • To become effective at writing clean code, constant practice is needed!
  • In order to write clean code, a combination of proper naming with variables, functions and components is needed.
  • Don't be afraid to use long names for your variables

Naming Lessons for Programming!

JSMarathon  N_V SS #1
  • No abbreviations
  • Avoid disinformation
  • Make meaningful distinctions
  • Pronounceable names
  • Searchable names
  • Use domain-specific names
  • Abstraction and code-splitting is effective, yet needs to be managed carefully
JSMarathon N_V SS #2
  • Abbreviations
    • Don't Repeat Yourself
    • Write Everything Twice
    • Avoid Hasty Abstractions
    • You Ain't Gunna Need It
  • Don't abstract prematurely. Wait until it becomes necessary (if your code starts to become hard to read for example).
JSMarathon N_V SS #3

If you missed the #javascriptmarathon make sure to head on over and watch it. Nacho shares a lot of useful information in such a short period of time alongside practical examples.

This Dot is a consultancy dedicated to guiding companies through their modernization and digital transformation journeys. Specializing in replatforming, modernizing, and launching new initiatives, we stand out by taking true ownership of your engineering projects.

We love helping teams with projects that have missed their deadlines or helping keep your strategic digital initiatives on course. Check out our case studies and our clients that trust us with their engineering.

Let's innovate together!

We're ready to be your trusted technical partners in your digital innovation journey.

Whether it's modernization or custom software solutions, our team of experts can guide you through best practices and how to build scalable, performant software that lasts.

Prefer email? hi@thisdot.co