Prioritization for Perfectionists, or: How I Learned to Stop Worrying and Love the Non-Perfection
Tags: production, code, perfectionism
Published: 2017-10-01 12:17:22

---
title: "Prioritization for Perfectionists, or: How I Learned to Stop Worrying and Love the Non-Perfection"
published: true
description: Are you a perfectionist? That kind of a person that can never say "I'm done", "it's ready" or "let's ship it"? The one who can't release the new feature unless it's polished and perfect? Read on to see how I managed to overcome this problem.
tags: production, code, perfectionism
---

Are you a perfectionist? That kind of a person that can never say "I'm done", "it's ready" or "let's ship it"? The one who can't release the new feature unless it's polished and perfect?

<!--more-->

Me too. I just don't seem to be able to stop. When I work on my personal projects, the backlog seems to grow every minute.
<pre>"Refactor this!"

"Improve that!"

"Make that button align with other buttons on another screen!"

"Improve drawing speed by refactoring X!"

"Write more comments to that algorithm!"

"Write tests for Y and Z cases!"

"Optimize this algorithm!"</pre>
And even:
<pre>"Redraw this icon", "change the color of this button", and "move this one pixel to the left".</pre>
I can't even publish an article in my blog without re-reading it many times and rewriting a couple.

I can't even tweet without deleting theÂ tweet and reposting it.

Guess how many times I changed the following header, just swapping the words in it there and back? :)
<h2>Ice and Fire</h2>
Yes, this header.
<h3>Pretty chill</h3>
My career started at a company where we paid much attention to code quality. This played along very well with my perfectionist nature. I could polish a four hour task for a couple of hours more than needed, before giving it out to code review. I was always in the mood of adding just a couple more tests to aÂ complex business logic module.

The company didn't have plenty of developers nor lots of money to hire more, but ourÂ users were demanding, had a lot of complex business requirements, and their work depended on our product and its quality very much. So the code quality was very important. Because of that, the bugs were fixed on time and completely, and the developers didn't spend lots of time adding new features, as the system grew.

And it worked: by investing some more time in the beginning, by being slower, we managed to save more time later. How many times have I looked at a new ticket and thought: now nice we've refactored that placeÂ a month ago! Now it's much easier to implementÂ this new task.

Some time has passed, and I found myselfÂ in a completely opposite company.
<h3>Hot lava</h3>
In this company the speed of delivery was valued more than anything. It was okay to ship completely messed-up code, but you should've done it on time. And no one is allowed to refactor. There's no time for that. Ship features, and ship fast!

This approach has its points. If you are not on time, you've failed, and never mind how good your code was. Also never mind how bad your code was, if it was on time and (at least partially) worked. The business was above all, the time was money, the product was important, the code was secondary and disposable.

No one cared too much about bugs too. Well, sometimes it fails, sometimes it displays invalid data, but there's no time to fix small things. No tests too. New features are more important.

But how many times have I looked at aÂ finished task and thought: it took me just half of the time it'd take if I was doing it as comprehensively as before.Â Sometimes it felt like slacking, I must admit, but it was much faster and more business-effective than in the previous company.

This approach was very new for me, and it took me some time to digest it, but I've found the middle ground at last.
<h3>My middle ground</h3>
In the winter, soon after I started at the second company, I also started a pet project - <a href="http://smartpuffin.com/wordcloud">a small Android app called Word Cloud</a>, which makes nice and colorful word clouds.


<img src="http://smartpuffin.com/wp-content/uploads/2017/10/words-0036.png" alt="" width="300" height="300" />


I can visibly compare how different my approach was back then, when I just started. I took time to refactor the code just because I didn't like it. I spent time fretting over perfect button sizes and best icons for them. I wanted to apply all the best coding practices there were.

The active work took a month, maybe two, of fairly relaxed coding in evenings and weekends. By the beginning of spring I had a finished project in my hands, ready to be used.

And still, it took me another half a year to ship it.

And I wasn't actively adding new features in that half-year.

I had an internal block in my head, and I just couldn't publish it. I was very afraid that the users will see how my buttons and their icons are not perfect. I felt uncomfortable that I had a circular dependency in my code. I was embarrassed that there's aÂ class in my code that's quite big, and I should have split it in smaller pieces. I was ashamed of anotherÂ singleton class. I was disgusted by the fact I'm reading the settings file more often than absolutely necessary. I was depressed that I had that five-line piece of code copied and pasted with just one small change. I had a class that was named badly.

Can you imagine? I couldn't publish the finished product until I fixed the bloody singleton and the blasted circular dependency and the abominableÂ naming.

So for half a year I was basically procrastinating. I was refactoring small things, adding comments, renaming things, but wasn't making any big changes or adding features. I was purely making my code better before publishing the app.

Then, one nice evening last October, I pulled myself together and pushed the button. (Pulled and pushed. What a pun!)
The app was live.
And nothing bad happened. Users were downloading the app, they were saying lots of nice things about it, they were asking for more features, and overall it went well.

This blew my mind. The users didn't notice my singleton and my massive badly named class! They genuinely didn't care about me having an <em>if</em> instead of a <em>switch</em>. They paid no attention to the lack of comments in a file. <em>Users didn'tÂ care about myÂ code.</em>

The second release took much less time. The third one, even less. I deliberately decided NOT to refactor some things that were bothering me. I firmlyÂ limited myself when I'm too involved with petty fixing and improving. I learned when to say to myself: "Stop, it's done, let's ship it" and "It's good already, don't worry too much".

It was like teaching myself to walk, but instead I was teaching myself to stop. The first stepÂ (orÂ stop, in my case) is hard, the second is easier, and so forth.

Since then, my releases pretty much don't depend on my perfectionism, but on readiness of features. By "ready" I don't mean "perfect", I mean "good enough, maybe better than average, but not perfect, if it takes too much time".

I still can dive deep into aÂ refactoring, but now it must be justified by a feature coming up, or by a bug I'm trying to fix. No more "just because I don't like it". No more preventive refactoring.
<h2>What about the code quality?</h2>
My code didn't become worse because of it.

Years of working in the company that values the code quality taught me how to write readable code from the very beginning, how to separate it in blocks with clearly defined responsibility,Â and where to put comments to make it even more clear.

But years of working in the company that values speed and the product taught me to value the product too.

I learnedÂ to make right trade-offs.

My code is not spotlesslyÂ perfect. But it is good enough to become a product.
<h2>Instead of the morale</h2>
Your users don't know about all your struggles. The productÂ isn't going to stop being interesting for them because there's a method in your code that accepts elevenÂ arguments. Yes, it would be nice to make them into a configurable object, but you don't have time right now, and it shouldn't stop you from shipping.

The users are not going to laugh at you because you have that dreaded singleton helper and don't have theÂ courage yet to make an object and pass it through everywhere you need it. Yes, you'll do it one day, but you shouldn't wait until you finally make it.

You shouldn't wait until you finally fix everything in the world, and your code is shining like a diamond. You should ship. The users care about the product, not the little imperfections.