What is Refactoring? Design Patterns? Why should you learn it today!

Woo
3 min readMay 15, 2022

--

Problem

I know someone who employs a few programmers. There’s this one superstar programmer in that firm, who can get an app from concept to launch very quickly. The problem is, the other programmers that work for this fella complain that his code is dirty. The boss can’t fire him, because he gets stuff done, but at the same time worries that if this programmer leaves, no one can understand his code.

There is a common misconception, that you need to gain years of experience to make your code squeaky clean, or learn how to create software design documents (with software architecture).

Intent

Of course, it’s probably better that you have a Senior Developer do the software architecture, but what if you could take a look at the cheat sheet on the best software design solutions that the best developers in the world have found?

Solution

Meet Design Patterns. They’re what you need to learn, today, if you are a developer, whether Junior or Senior.

So what are they? According to refactoring.guru

“Design patterns are typical solutions to commonly occurring problems in software design. They are like pre-made blueprints that you can customize to solve a recurring design problem in your code.”

The author, Alexander Shvets, explains that while a programmer can go on working for years without knowing a single design pattern, and even implement some patterns without knowing what they are, learning these patterns will give you problem solving skills for all sorts of patterns of problems that developers have encountered in the past.

In other words, you can go from Junior to Senior pretty quickly.

In addition, there’s this concept called “refactoring.” Alex also has a good online course on that. It makes dirty code into clean code. There is a famous book by “Robert C. Martin” called “Clean Code” but Alex’s interactive online course dives into it even deeper by giving before and after examples of code refactoring for several popular programming languages.

I haven’t been asked to write this, and I haven’t been paid to write this. I’m just writing this to organize my thoughts on this matter, which are:

  1. If you’re just learning how to code, learn one language and learn it well. Just make the app work. It’s common knowledge that if you can code well in one language, you can probably code in all languages.
  2. After you mastered that one language, perhaps go back to your code and try refactoring everything.
  3. Thereafter, learn design patterns to understand concepts in software architectural design and voila! You’re a senior developer.

Above is probably an oversimplification, and (if this medium account gets any traction), the commenters will chew me out for this. Anyways, I’m still kind of at Phase One for PHP and JavaScript (the web stacks). But I’m excited to translate “Dive into Design Patterns” by Alexander Shvets, which I think is a very important book for our times.

The last book on Design Patterns was in 1994 by this “Gang of Four” (known as the GoF book). And it seems that Alex paid a bunch of experts on various programming languages on UpWork (and perhaps other platforms) to refine the examples that he came up with for various programming languages.

The Korean version (translated by yours truly), is just a delight to read, and I hope my efforts manifest into a bunch of Senior Korean Developers being created and into making Korean a force to reckon with in the IT field. (So far, I, honestly believe India has that spot).

Anyways, enough with my rambling. Check out refactoring.guru if you’re a developer, who already somewhat mastered a programming language, and want to become senior right away.

--

--

Woo

I apologize if my medium articles are all over the place, but I am writing more to organize my thoughts and for my own learning. Maybe one day I’ll organize it.