How my goal of becoming more organized made me a better developer

Hermano Portella Leite
5 min readJan 15, 2019

It was 2017 new years eve, when we all create all those goals for the year that is about to start, and I had chosen just one for my 2018: Become more organized. I wanted not only my bedroom to be organized, but it should stay this way, and it should be natural to me. I wanted to become an organized person. You know those people that are boring because everything has to be exactly in a specific place? That was my goal.

So I bought a book called “The Organized Mind: Thinking Straight in the Age of Information Overload” from Daniel J. Levitin, which is a book that shows with studies and examples how our brain deal with information.

Book that I read. In portuguese.

As I was reading the book, and things were making sense to me, I could notice that I was becoming more organized. I understood the reason to be organized, and how to achieve that. Great! My bedroom was not a mess anymore.

What I did not expect to achieve, when the goal was created in 2017, was that it would have a huge impact in my professional life as a developer. By reading this book and understanding some concepts proposed by the author, my code started to get cleaner, and my contribution in the projects increased.

Among all concepts described in the book the 3 that called my attention were:

  1. You do not need to organize everything;
  2. You should always be organizing something;
  3. Create good labels.

It is important to say that it improved my code only when practicing all concepts. Using just one of them would not help me, actually, it could make my code worst.

You do not need to organize everything

The main concept I absorbed from the book, was that in order to have my room organized, more important then putting things in a specific spot, was to understand why this thing was there. Being organized is a way of making it easier for our brain to remember where things are. As explained by the book, I will never have to look for my keys again if I know it will be on the first drawer close to the door, together with my wallet, car's document and cellphone.

Also, I've learned that it is hard to organize everything in the room, and this is not a problem, is just a part of the process, actually, it is important to have a place where things are not organized. Sometimes it consumes a lot of energy to think of a place to put an object. So if there is something, that has no place where it makes sense to be, it should go to the messy place (a place where everything that I don’t know where to put is). Thus, having a place where I can throw things that I don't know where to put, makes it easier to organize things that has a place where it makes sense to be. And this will help my brain to remember where everything is.

When coding, every developer wants to make it clean, organized, understandable, that every method has only one responsability, and a lot of other things. However it is hard to achieve all at the same time, and that is not a problem. As when organizing my room, is a part of the process. It is important to think where methods or classes are, if it makes sense to the architecture of the project. However, sometimes we should not get too stuck on that. Create the code, create things where they make sense to you (that “utils” class is always useful), don't bother to put everything in the correct place.

You should always be organizing something

It is impossible to organize all our things correctly at the first time. Sometimes things might be categorized in way, or put in a place, where it makes no sense a week from now, and that is not a problem, is just a part of the process. However, when you understand that the previous organization makes no sense, it should be changed and reorganized. As described in the book the goal of organizing things is to free our brain to remember where things are, and believe in the organization to be the support on that.

As I started to put this in practice, I notice I am always organizing things. Always creating new categories of objects and placing them in a place that makes more sense to me. It is interesting how naturally, when something is in its best spot, it won’t be moved from there. Meaning I might have found the easiest place to remember it.

When contributing in a project it is common to find code, written or not by you, which is not good, hard to understand and that could be better. The concept I saw in the book, of always be organizing something, made sense to me in the code as I should be always improving it. If I see some part of the code that could be improved, I must do it. Is a part of the process. As said by Robert C. Martin, the boy scout rule is that you should leave a place cleaner than how you found it.

Create good labels

One of the most important (also one of the hardest) step in order be organized, is to create good categories. Or in an easier way, give good names to groups of things. As written in the book, one of the reason to be organized is to use the world outside our brain to maintain information, this way memory and attention can be used more efficiently. Creating good categories and naming them correctly is a important part of this process. As explained by Daniel J. Levitin in the book:

Categories you create need to reflect how you use and interact with your belongings. That is, the categories need to make sense to you.

And also

An item or location with the wrong label is worse than an unlabeled item

Usually programmers, when trying to solve a problem, just want to make it work, and do not pay much attention on the names used in the code (variables, methods, classes, etc). Or even when we do care, we struggle to find good names. However, I learned that the magic of finding the best name is not a gift that just some people have. Finding the best name is a practice, and things need to be renamed 2, 3, 4 times until it gets to a correct one. Nowadays with the IDE's refactor tools things are much easier.

A code should look like a text, should have a readability. Like telling a story. Things should be named correctly and put in the correct place, this way next time you, or any other team mate, come back to this piece of code, won’t struggle to understand it and it will be easy to maintain.

--

--