<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hüseyin Polat Yürük</title>
    <description>The latest articles on DEV Community by Hüseyin Polat Yürük (@h_polatyuruk).</description>
    <link>https://dev.to/h_polatyuruk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F118627%2Fc2accf0f-6cd4-455e-a991-6418d4f3c720.jpg</url>
      <title>DEV Community: Hüseyin Polat Yürük</title>
      <link>https://dev.to/h_polatyuruk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/h_polatyuruk"/>
    <language>en</language>
    <item>
      <title>3 Coding Stages: Writing. Avoiding. Deleting.</title>
      <dc:creator>Hüseyin Polat Yürük</dc:creator>
      <pubDate>Thu, 27 Jun 2019 09:46:56 +0000</pubDate>
      <link>https://dev.to/h_polatyuruk/3-coding-stages-writing-avoiding-deleting-2j82</link>
      <guid>https://dev.to/h_polatyuruk/3-coding-stages-writing-avoiding-deleting-2j82</guid>
      <description>&lt;p&gt;&lt;strong&gt;Iceberg&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is how I see all the hidden facts that we developers usually forget or tend to ignore when we are excited about writing code or implementing something new.&lt;/p&gt;

&lt;p&gt;In the form of an iceberg…&lt;/p&gt;

&lt;p&gt;The iceberg looks small and beautiful from the outside, so people tend to forget its actual size and what hides beneath the peak. What people see from the outside is actually just the tip.&lt;/p&gt;

&lt;p&gt;Writing code is the same thing.&lt;/p&gt;

&lt;p&gt;When you start writing code, you are too focused on what you have to write, and you don't focus on how much it may cost you down the road. Or, you ignore it.&lt;/p&gt;

&lt;p&gt;As the years pass, all your experience and the mistakes you make teach you that what you used to ignore is actually the most important thing you must consider.&lt;br&gt;
So what are those important facts that, as a developer, you usually forget?&lt;/p&gt;

&lt;p&gt;Every line of code you write is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code that has to be read and understood by other programmers&lt;/li&gt;
&lt;li&gt;code that has to be tested and debugged&lt;/li&gt;
&lt;li&gt;code that will increase defects in your software&lt;/li&gt;
&lt;li&gt;code that probably will introduce new bugs in the future&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the beginning, you just see the code. You think, what can go wrong? But actually, it's just the tip of the iceberg.&lt;/p&gt;

&lt;p&gt;In a developer's programming life, it takes some time to develop the ability to see the whole of the iceberg. To see that, you have to pass through the three coding stages in your programming life.&lt;/p&gt;

&lt;p&gt;Let's speed up time and check each of the stages together.&lt;/p&gt;

&lt;h2&gt;1. Writing code as much as possible&lt;/h2&gt;

&lt;p&gt;Remember this time? You had just started your programming career as a junior developer. You were hungry, foolish. You were always on the lookout to write some more code lines and for problems to solve. You said yes to every possibility that required you to write code. You were too excited. You spent hours and days on it. You forget about sleeping.&lt;/p&gt;

&lt;p&gt;Being too excited and writing code as much as you can in that stage is good. This is how it should be. This is how we learn to program. This is how we practice being a better developer. In the meantime, while we are writing that bunch of code, we make a lot of mistakes too. And that is totally fine. They are just small mistakes. Nothing can stop you from writing code.&lt;/p&gt;

&lt;p&gt;After some time, maybe four to five years, you start learning the new programming facts that you didn't know before. You face the reality beyond the code. You have just seen the tip of the iceberg with writing code, and now you are curious to see what is under the sea.&lt;/p&gt;

&lt;p&gt;This is the stage where you see that every code has to be read, understood, tested, debugged. You've just understood how important future maintenance is for your software to last longer.&lt;/p&gt;

&lt;h2&gt;2. Learning when not to write code&lt;/h2&gt;

&lt;p&gt;After you experienced a few programming horror stories, you found yourself thinking about how you can avoid writing unnecessary code, because you knew how much it can cost you.&lt;/p&gt;

&lt;p&gt;In this stage, you were learning when not to write code to avoid being a victim of another horror story. You were still excited about writing code, but you were wise enough to know that less code is better. Simplicity is your ultimate guide here. You understood that it's harder to read code than to write it. That's why you started focusing on more readable, understandable, and simpler code.&lt;/p&gt;

&lt;p&gt;In this stage, you followed a few simple rules that transformed you into a better programmer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing less code.&lt;/li&gt;
&lt;li&gt;Keeping your codebase small&lt;/li&gt;
&lt;li&gt;Saying yes to what is essential and saying no to rest of it&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;i&gt;
Knowing when not to code is possibly the most important skill a programmer can learn. - &lt;a href="https://www.amazon.com/Art-Readable-Code-Practical-Techniques/dp/0596802293"&gt;The Art Of Readable Code&lt;/a&gt;
&lt;/i&gt;
&lt;/blockquote&gt;

&lt;h2&gt;3. Deleting code as much as possible&lt;/h2&gt;

&lt;blockquote&gt;
&lt;i&gt;
One of my most productive days was throwing away 1000 lines of code. - Ken Thompson
&lt;/i&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this stage of coding, you understand exactly what Ken Thompson was trying to say with the above sentence.&lt;/p&gt;

&lt;p&gt;You know that the more code you have, the more places there are for bugs to appear. It takes longer checkouts or compiles. It takes longer for a new employee to understand your system. There's more stuff to move around if you have to refactor.&lt;/p&gt;

&lt;p&gt;Furthermore, more code often means less flexibility and functionality. You understand it based on your own experience. You know when not to code, but, at the same time, you know that by deleting the unnecessary codes or refactoring complex solutions with simpler, more elegant ones, you can decrease defects in your software.&lt;/p&gt;

&lt;p&gt;In this stage, you discovered all parts of the iceberg. You know what is under the sea. The next time you see a new iceberg, you will be more careful, and you will not make the same mistake as the Titanic did.&lt;/p&gt;

&lt;p&gt;The key idea of this piece is not that writing code is your enemy. You are a programmer. Writing code is your passion and it will always be. It will cover a big part of your life. I just want you to understand what is behind all of that code writing and that with each line of code you have written, you accept the burden that comes along.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;Don't surround yourself with unnecessary codes.&lt;/i&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>The most important skill a programmer can learn</title>
      <dc:creator>Hüseyin Polat Yürük</dc:creator>
      <pubDate>Sat, 18 May 2019 10:49:04 +0000</pubDate>
      <link>https://dev.to/h_polatyuruk/the-most-important-skill-a-programmer-can-learn-5gpf</link>
      <guid>https://dev.to/h_polatyuruk/the-most-important-skill-a-programmer-can-learn-5gpf</guid>
      <description>&lt;p&gt;&lt;strong&gt;No, no, no, no, and no. And no.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A big NO. Clear as that.&lt;/p&gt;

&lt;p&gt;All you have to do is to bring those two letters together and say the word.&lt;/p&gt;

&lt;p&gt;Now, let’s say it together. NOOOOOOO!&lt;/p&gt;

&lt;p&gt;Good start.&lt;/p&gt;

&lt;p&gt;But wait a minute. Say NO to what and when?&lt;/p&gt;

&lt;p&gt;Well, this is the important point where most of the programmers (even seniors) get easily confused.&lt;/p&gt;

&lt;p&gt;As a programmer, writing code is the biggest part of your job. In your programming lifetime, you will have to deal with different kinds of code requests. Each request will force you to make difficult decisions. That all is OKAY. Nothing wrong with that. This is what everyone expects from you, as a programmer: Writing code. However, here is a question: Should you write all the code that is requested from you?&lt;/p&gt;

&lt;p&gt;This question brings us to the most important skill a programmer can learn:&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
Knowing when not to code is possibly the most important skill a programmer can learn. — &lt;a href="https://www.amazon.com/Art-Readable-Code-Practical-Techniques/dp/0596802293"&gt;The Art Of Readable Code&lt;/a&gt;
&lt;/em&gt;
&lt;/blockquote&gt;

&lt;p&gt;I couldn’t agree more. Why is that?&lt;/p&gt;

&lt;p&gt;Programming is the art of solving a problem. So naturally, programmers are problem solvers. As programmers, when we have a new problem in front of us ready to be solved or any other reason that needs from us to write code lines, we get excited.&lt;/p&gt;

&lt;p&gt;And that is okay because we are programmers. We love writing code.&lt;/p&gt;

&lt;p&gt;However, getting too excited about writing code makes us blind. It causes us to ignore some important facts that can cause bigger problems we will have to deal with in the future.&lt;/p&gt;

&lt;p&gt;So, what are those important facts that we tend to ignore?&lt;/p&gt;

&lt;p&gt;Every line of code you write is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code that has to be read and understood by other programmers&lt;/li&gt;
&lt;li&gt;code that has to be tested and debugged&lt;/li&gt;
&lt;li&gt;code that will increase defects in your software&lt;/li&gt;
&lt;li&gt;code that probably will introduce new bugs in the future&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As Rich Skrenta wrote, &lt;a href="http://www.skrenta.com/2007/05/code_is_our_enemy.html"&gt;code is our enemy&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Code is bad. It rots. It requires periodic maintenance. It has bugs that need to be found. New features mean the old code has to be adapted.&lt;/p&gt;

&lt;p&gt;The more code you have, the more places there are for bugs to hide. The longer checkouts or compiles take. The longer it takes a new employee to make sense of your system. If you have to refactor there’s more stuff to move around.&lt;/p&gt;

&lt;p&gt;Furthermore, more code often means less flexibility and functionality. This is counter-intuitive, but a lot of times a simple, elegant solution is faster and more general than the plodding mess of code produced by a programmer of lesser talent.&lt;/p&gt;

&lt;p&gt;Code is produced by engineers. To make more code requires more engineers. Engineers have n² communication costs, and all that code they add to the system, while expanding its capability, also increases a whole basket of costs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s so true, isn’t it? The programmers who inspire you with their productivity and coding mentality are those who know when to say no and when not to code. The software that is easy to maintain, that lasts long and keeps helping their users is the one that doesn’t contain any unnecessary code lines.&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
The best code is no code at all, and the most effective programmer is the one who knows when not to code.
&lt;/em&gt;
&lt;/blockquote&gt;

&lt;h2&gt;How can you know when not to code?&lt;/h2&gt;

&lt;p&gt;It’s natural to get excited when you’re working on a project and think about all the cool features you’d love to implement. But programmers tend to overestimate how many features their project needs. Many features go unfinished or unused or simply make the application overcomplicated. You should know what is essential for your project to avoid making this mistake.&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
Understanding the purpose of your software and its core definition is the first step to know when not to code.
&lt;/em&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let me give you an example. Let’s say you have software that has only one purpose: managing emails. And for that purpose, sending and receiving emails are two essential features to your project. You can’t expect that software to manage your to-do list as well, can you?&lt;/p&gt;

&lt;p&gt;So you should say NO to any possible feature requests that are irrelevant to this definition. This is the moment you can be exactly sure that you know when not to write code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
Never expand your software’s purpose.
&lt;/em&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you know what is essential for your project, you will be conscious next time when you evaluate possible code requests. You will exactly know your requirements to write code. Which feature should be implemented? Which code is worth to write? You will question everything because you will know exactly how unnecessary code can kill your project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
Knowing when not to code keeps your codebase small.
&lt;/em&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OvXcfMiq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/0%2AFXiJvr_jr-a-J4ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OvXcfMiq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/0%2AFXiJvr_jr-a-J4ss.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are only two or three source files when you start your project. All looks so simple. It takes just a few seconds to compile and run the code. You know where to find exactly what you’re looking for.&lt;/p&gt;

&lt;p&gt;Then, as the project grows, more and more source files fill your directory. Each code file contains hundreds of code lines. To organize them all, you will need multiple directories soon. Remembering which functions call other functions is more difficult, and tracking bugs requires a bit more work. Managing your project becomes difficult, and you need more programmers to help. &lt;a href="https://en.wikipedia.org/w/index.php?title=Communication_overhead&amp;amp;action=edit&amp;amp;redlink=1"&gt;Communication overheads&lt;/a&gt; increase as the number of programmers increases. You get slower and slower.&lt;/p&gt;

&lt;p&gt;In the end, the project becomes huge. Adding new features is painful. Even making small changes takes hours. Fixing present bugs always introduces new bugs. You start missing deadlines.&lt;/p&gt;

&lt;p&gt;Now, life is a struggle for you. Why?&lt;/p&gt;

&lt;p&gt;Because you didn’t know when not to code, you said YES to every possible feature request. You were blind. Coding something new caused you to ignore essential facts.&lt;/p&gt;

&lt;p&gt;It’s like a horror movie, right?&lt;/p&gt;

&lt;p&gt;This is what will happen if you keep saying YES to everything. Know exactly when not to code. Eliminate all unnecessary code from your project. This will make your life easier and make your software last longer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
One of my most productive days was throwing away 1000 lines of code. — Ken Thompson
&lt;/em&gt;
&lt;/blockquote&gt;

&lt;p&gt;I know that knowing when not to code is so hard. Even for senior programmers. Perhaps what I wrote in this article is hard to understand for junior programmers, and that is okay and understandable.&lt;/p&gt;

&lt;p&gt;I know you have just started your programming journey and you want to write code. You are so excited about that. This is good. Never lose this excitement but also never ignore the important facts. We learned them by making our own mistakes. You will make mistakes as well, and you will learn from them as well. But at least you can be more conscious if you can learn from our experience.&lt;/p&gt;

&lt;blockquote&gt;
&lt;em&gt;
Keep coding but know when to say no to coding.
&lt;/em&gt;
&lt;/blockquote&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>How to make peace with deadlines in software development</title>
      <dc:creator>Hüseyin Polat Yürük</dc:creator>
      <pubDate>Fri, 10 May 2019 13:11:30 +0000</pubDate>
      <link>https://dev.to/h_polatyuruk/how-to-make-peace-with-deadlines-in-software-development-2l3l</link>
      <guid>https://dev.to/h_polatyuruk/how-to-make-peace-with-deadlines-in-software-development-2l3l</guid>
      <description>&lt;p&gt;&lt;strong&gt;D E A D L I N E…&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a developer, this is one of your biggest nightmares or should I say your enemy? Name it whatever you want.&lt;/p&gt;

&lt;p&gt;Admit it. It scares you a lot. Even now, while you are reading these sentences, it makes your hair stand on the end.&lt;/p&gt;

&lt;p&gt;Wondering how I know that?&lt;/p&gt;

&lt;p&gt;I know because I've felt the same. But now the fear is in the past. I've made peace with deadlines. I've embraced them.&lt;/p&gt;

&lt;p&gt;So I suggest you do the same thing. Embrace them, make peace with them. This is the only way that you can defeat them.&lt;/p&gt;

&lt;p&gt;Ok but, how you can do that?&lt;/p&gt;

&lt;p&gt;There are some facts that we all tend to ignore when it comes to setting a deadline. My aim here is to show them to you so you can see that it takes so little to bury the fear and start enjoying life while you are working on your project without worrying about dates.&lt;/p&gt;

&lt;h2&gt;Work in a calm environment&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2A5XE-sESZlqh99MfY.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2A5XE-sESZlqh99MfY.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't rush. Don't force anything.&lt;/p&gt;

&lt;p&gt;The first thing first you should know is that you can't find your peace by setting unrealistic dates and forcing your team to work in a rush. There are companies that throw out big words and show unrealistic things to motivate their team to move forward. But while there are some facts obvious to everyone in the team, how can you expect them to believe in what you are saying if it is far away from reality?&lt;/p&gt;

&lt;p&gt;Without a fixed - and most importantly believable - deadline, you can't work calmly. Yes, keeping the calm is the key here. When you don't trust the date, or when someone tells you to do everything within a limited period of time, or someone adds more tasks to the project without giving you more time, you start working maniacally. This is not work anymore. This is hell.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;When you are under stress and pressure, you can't be productive. When you are calm, you are also conscious which means that you can make better decisions.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Our estimates suck&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2AhlTIsZkB9xCxDdw1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2AhlTIsZkB9xCxDdw1.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Windows users will remember that window dialog. The estimation in the dialog is exactly like our estimations, isn’t it?&lt;/p&gt;

&lt;p&gt;Let’s admit it. Our estimates suck. We think we can guess how much time something will take. We have a tendency to believe that whatever we guess will come true.&lt;/p&gt;

&lt;p&gt;However, generally, when we are guessing, we ignore some important factors that can affect our assumptions. Why? Because we are too optimistic.&lt;/p&gt;

&lt;p&gt;To me, the first step in making peace with the deadline and getting better at setting deadlines is to admit that we are terrible estimators. When you embrace this fact, you will be conscious next time and it will prevent you from underestimating the requirements. And here is a solution for you to get better at estimating:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Divide the big things into smaller things. The smaller it is, the easier it is to estimate. This will increase your chances of having more accurate estimations.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Good enough is fine&lt;/h2&gt;

&lt;blockquote&gt;&lt;strong&gt;“Perfect is the enemy of good.” — Voltaire&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;People like big challenges. We are best at finding a complicated solution for a simple problem. But here is a fact:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Every problem has its own simple solution that you probably ignore.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;Don’t chase a perfect solution. Your first version doesn’t have to be perfect. Build a half product that can work. If you wait too much, you will waste your limited resources and precious time, or you will miss the deadline and even worse do nothing at all because you are chasing perfection. The solution is:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Find the solution that will bring you a lot of value and requires little effort. And don’t forget, good can be turned into great later.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Don’t be too optimistic. Be realistic.&lt;/h2&gt;

&lt;p&gt;I see managers that are too optimistic which makes them set optimistic deadlines to motivate the team. This is so wrong. I’m not telling you that you should be pessimistic about the future. On the contrary, I am telling you that you should be able to see every possibility that can create a bottleneck. Once you can see them, you can consider them and have a more accurate estimation.&lt;/p&gt;

&lt;p&gt;There are different teams in the company. Engineering, business development, marketing, etc. When the business development team forces you to give them a deadline in the very near future, you shouldn’t get affected by them. They want their job to be done as soon as possible.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Remember that every team thinks about their own side.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Differentiate between “you have to do”, “you could do” and “you want to do”&lt;/h2&gt;

&lt;p&gt;Understanding is the key here. What are the core requirements for releasing your product? Usually, the product team has a hard time differentiating them.&lt;/p&gt;

&lt;p&gt;When you have a meeting, one of the team members will say, “we could implement it, it will bring us that much value” or another one will say “We should put this into release.” They are looking from their own perspective. Ok, we can implement this and it can bring us some value, but the important question is that “do we need it now? In the first version?”&lt;/p&gt;

&lt;p&gt;The answer is NO in most cases.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;The things that you have to do are what you should focus on. Eliminate things you could do and you want to do. They are not even negotiable in most cases.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Say no by default&lt;/h2&gt;

&lt;p&gt;There is one important fact that we usually forget when we say “Yes” to something. We are saying no to the things we already need to complete.&lt;/p&gt;

&lt;p&gt;When you say yes to something new, you’re not thinking about the impact it will have on your existing to do’s.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Let’s add more tasks to the project after we’ve set the deadline. (Your project should get smaller over time, not larger.)”&lt;/em&gt;&lt;strong&gt;NO.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“We focused on what matters, ok. But what about the details? Let’s consider what kind of details we have that can make problems in the future.” &lt;/em&gt; &lt;strong&gt;NO.&lt;/strong&gt; &lt;em&gt;Ignore every detail for the first version. Don’t try to predict the future.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Finding more time for things isn’t the problem here. Too much stuff to do is the problem. Differentiate between “&lt;strong&gt;must-haves&lt;/strong&gt;” and “&lt;strong&gt;nice-to-haves&lt;/strong&gt;”.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;The only way to get more done is to have less to do.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Never change the deadline&lt;/h2&gt;

&lt;p&gt;I see development teams with a bad habit that can affect their product development badly: deadline rescheduling.&lt;/p&gt;

&lt;p&gt;When they miss the deadline, they set a new one. If they can’t meet this one, they set another one. When they do this repeatedly, it becomes a habit. Then this bad habit turns into their culture. Other teams in the company lose trust and question the developers’ work. Even worse, the developer team itself can lose trust in each other. In themselves as well.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Changing the deadline is essentially an admission of failure. It is making statements like, “We failed to plan requirements, we didn’t say no enough, we didn’t focus on what matters, we pushed our teams to do unreasonable things in an unreasonable time.”&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Be aware that there will be always some problems&lt;/h2&gt;

&lt;p&gt;Being too optimistic causes you to ignore the fact that there may be some problems. Be aware. Probably something will go wrong. And this will cause you to lose some time on fixing things. So better to be prepared for bad scenarios. I am not saying that you should be pessimistic and you should try to predict the future and prepare yourself and your team for the unknown. Just find a balance between optimism and pessimism. Be realistic.&lt;/p&gt;

&lt;p&gt;My experience showed me that, in software development, some things always go wrong. My advice to you is:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Add some time to your deadline before you set it by considering that something may go wrong.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Don’t add more people to a project&lt;/h2&gt;

&lt;p&gt;A lot of people think that they can speed up the process if they add more people to the project. However, they miss a very important point. Let’s remember &lt;a href="https://en.wikipedia.org/wiki/Brooks%27s_law" rel="noopener noreferrer"&gt;Brooks’s law&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Adding &lt;a href="https://en.wikipedia.org/wiki/Human_resources" rel="noopener noreferrer"&gt;human resources&lt;/a&gt; to a late software project makes it later. — Freed Brooks&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Brooks%27s_law" rel="noopener noreferrer"&gt;According to Brooks on Wikipedia&lt;/a&gt;, there is an incremental person who, when added to a project, makes it take more, not less time. So why does it work this way?&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
It takes some time for the people added to a project to become &lt;a href="https://en.wikipedia.org/wiki/Productivity" rel="noopener noreferrer"&gt;productive&lt;/a&gt;. You will have to educate them first. You have already limited human resources and you will have to dedicate those resources to educate new member. Also since they are new, they will introduce new bugs that move the project further away from completion.
&lt;/li&gt;
&lt;li&gt;
    &lt;a href="https://en.wikipedia.org/wiki/Communication_overhead" rel="noopener noreferrer"&gt;Communication overheads&lt;/a&gt; increase as the number of people increases.
&lt;/li&gt;
&lt;li&gt;
Adding more people to a highly divisible task, such as cleaning rooms in a hotel, decreases the overall task duration. However, other tasks including many specialties in software projects are less divisible. Another great example of this by Brooks is: while it takes one woman nine months to make one baby, “nine women can’t make a baby in one month”.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another bit of evidence from Richard Dalton to understand why adding more people is wrong is:&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;“Teams are immutable. Every time someone leaves or joins, you have a new team, not a changed team.” — Richard Dalton&lt;/strong&gt;&lt;/blockquote&gt;

&lt;h2&gt;Don’t procrastinate&lt;/h2&gt;

&lt;p&gt;Let me help you to understand what I mean. Last week, we had a meeting about defining the deadline for a new feature of our product. We were talking about which tasks are our priority and how we should implement them in an effective way.&lt;/p&gt;

&lt;p&gt;There was a task on which we have heavily wasted our time. There were three ways to implement that task but somehow we were stuck. We couldn’t choose because developers were trying to predict the future. They were starting each sentence with “What if”.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;You can’t predict what the future will bring you. Don’t over-prepare yourself for the unknown.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;I am not talking about big technical decisions here. Of course, if you have to decide on your core technology, you should sleep on it to find the right solution. But don’t spend your time on small things. Uncertain things increase meetings and block your progress because your backend process is continuously working on them.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Don’t procrastinate it, decide on it and move forward.&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;Change your mentality from “Let’s think about it” to “Let’s decide now”. Decisions will speed up your progress. When something is decided, it will be clear to everyone in the team. Everyone will exactly know what to do.&lt;/p&gt;

&lt;h2&gt;Communicate: See where is the bottleneck?&lt;/h2&gt;

&lt;p&gt;You planned everything. You defined what to focus on and what to do. You know exactly how much time it will take (probably you will be wrong). So, the deadline has been settled. Is it enough?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NO.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As I mentioned above, there is always a possibility that something can go wrong. While your team members are working on their tasks, something can block them. Something can stop them to finish their tasks on time. You have to see where is the bottleneck and what it is.&lt;/p&gt;

&lt;p&gt;Communication is the key here. You have to keep teams synced. Sometimes team members can go into a box and it can be very hard for them to see what is happening out of it. This is where you should enter the scene. Once you have identified the bottleneck, remove it so your team members can continue from where they were stuck.&lt;/p&gt;

&lt;p&gt;I wish you to meet all deadlines:)&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>Lessons Learned About Rewriting Code As 10+ Years Experienced Developer</title>
      <dc:creator>Hüseyin Polat Yürük</dc:creator>
      <pubDate>Tue, 19 Mar 2019 13:39:23 +0000</pubDate>
      <link>https://dev.to/h_polatyuruk/lessons-learned-about-rewriting-code-as-10-years-experienced-developer-2o0j</link>
      <guid>https://dev.to/h_polatyuruk/lessons-learned-about-rewriting-code-as-10-years-experienced-developer-2o0j</guid>
      <description>&lt;p&gt;&lt;strong&gt;12 months.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the time we wasted while rewriting our software from scratch.&lt;br&gt;
Twelve long months in the software market.&lt;br&gt;
Without innovation.&lt;br&gt;
Without moving forward.&lt;br&gt;
Really, I cannot stop asking this question to myself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;What could we achieve in this fast-moving world in 12 months?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Tuesday, January 20, 2015, 5:10 PM, AntiMalware product is finally going its first public beta."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After hours without sleeping, the first release note that would give a start to our new journey was published on the website.&lt;br&gt;
I was working for one of the small cybersecurity companies which provides security software for end users and enterprise companies. Our software protects users against malware. It cleans their computer if they get infected. Our AntiMalware was one of them.&lt;br&gt;
The first beta version's feedbacks and impressions were promising. We were four developers, working on that product and constantly fixing bugs, iterating new versions by improving the product.&lt;/p&gt;

&lt;h3&gt;
  
  
  First stable version
&lt;/h3&gt;

&lt;p&gt;After two months working on bug fixing, improving and coding, we released the first stable version of AntiMalware.&lt;/p&gt;

&lt;p&gt;What were users saying?&lt;/p&gt;

&lt;p&gt;Most of our users' feedbacks were great, and they liked the product. This was keeping our team motivated. We were actively working on the product to improve our core features.&lt;/p&gt;

&lt;h3&gt;
  
  
  The airplane is taking off.
&lt;/h3&gt;

&lt;p&gt;2016–2017.&lt;/p&gt;

&lt;p&gt;Our golden years before the big storm.&lt;/p&gt;

&lt;p&gt;AntiMalware was living its best times. It was becoming our flagship product. Users were recommending it to their friends. Every blog and forums related to security were recommending our software. It was the first option when it comes to rescuing infected users.&lt;/p&gt;

&lt;p&gt;Downloads, installations, sales.&lt;/p&gt;

&lt;p&gt;Every metric was going up, the user base was growing quickly over months. Founders were happy, the team as well. This was the big success the company was looking for. Everyone thought: &lt;em&gt;"We did it! Like other big companies, we thought we created our own success story."&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  New opportunities (at least we thought like that): Entering the enterprise market
&lt;/h3&gt;

&lt;p&gt;The company decided to enter the enterprise arena. We were building a new team for the corporate product. The product owner of AntiMalware was leaving the team. Our CTO was taking responsibility and becoming the new owner. (Big mistake. I will explain why).&lt;/p&gt;

&lt;p&gt;Some developers were leaving the company, but it was OK. We were handling everything well and AntiMalware was still the best option in the market.&lt;/p&gt;

&lt;h3&gt;
  
  
  Good days were behind. Let's face reality.
&lt;/h3&gt;

&lt;p&gt;As I told you, our CTO was handling everything about AntiMalware. He was the main developer, constantly releasing new updates and improving the product's capability. However, because of his position, he had to handle other company stuff also.&lt;/p&gt;

&lt;p&gt;Sure, in the beginning, everything was going well. As in every development process, in our case also, we had to keep maintaining and improving our software.&lt;/p&gt;

&lt;p&gt;As we should have expected (clearly we didn't), somehow, the development process started slowing down.&lt;/p&gt;

&lt;p&gt;The days when we were releasing new updates were behind. At that moment we were living the reality of late updates and soon no updates at all. This bugged me a lot and one day I asked our CTO:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;"What is wrong with this product?&lt;br&gt;
Why do updates take too much time and development is slowing down?"&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He took a deep breath and started talking:&lt;/p&gt;

&lt;p&gt;_"The code base is really complicated. It is not structured well and it is not loosely coupled. The architecture was designed in a totally wrong way. The UI and core logic interfere with each other. Whenever I fix a bug or change something, this affects other parts of the software. Even small changes are hard to be done. With every new update, something new comes up.&lt;/p&gt;

&lt;p&gt;There are some methods that take 20 parameters, they are two pages long! Can you imagine? There are many things that were supposed not to be implemented but they were implemented anyway.&lt;/p&gt;

&lt;p&gt;That's why every update takes too long and I cannot implement a new feature. If we release a new update, I am scared that we might introduce new bugs and break the program's core functionality that works well now. That's why it is too risky for us to release a new update. We can lose our users. We can lose our product as well."_&lt;/p&gt;

&lt;p&gt;A burst of reality came out from his end and all of us knew it. Actually, we were expecting this answer from him.&lt;/p&gt;

&lt;p&gt;But there was one more thing to be asked. He was leading the previous main developer who led the product for one year, so how could the code be that messed up?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"I didn't want to break his motivation. We had to enter the anti-malware market as fastest as possible and he was good at this. That's why I didn't want to stop him."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Basically, we sacrificed the code base to enter the market in the fastest way, but this destroyed our product's future.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson learned:&lt;/strong&gt; Don't hesitate to say "this is sh*t" if something is really sh*t. The future of your product is more important than your spaghetti code. Focus on to have a sustainable product.&lt;/p&gt;

&lt;h3&gt;
  
  
  How can we fix this terrible code?
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;"We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by incremental renovation: tinkering, improving, planting flower beds."&lt;br&gt;
 - Joel Spolsky, CEO of Stackoverflow&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Developers always have a tendency to throw away the code and start over. There's a reason for that. The reason is that they think the old code is useless and a mess. But again we just think! However, when we try to find out what is the real reason behind that, we can face the fact:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We are probably wrong!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The reason that the old code might look messy to us and that it has to be rewritten from scratch isn't actually because of the code but rather because of a cardinal, fundamental law of programming:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's harder to read code than to write it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is why it is so hard to reuse code. This is why we think "&lt;em&gt;It's a big hair mess&lt;/em&gt;". This is why our subconscious mind whispers to our ears "&lt;em&gt;Throw it away and start over&lt;/em&gt;" when we read another developer's code.&lt;/p&gt;

&lt;p&gt;Like every developer, we fall into this trap. Just checking our messy code one time was enough to think about rewriting it from scratch.&lt;/p&gt;

&lt;p&gt;After a series of meetings, even though our CTO was resistant to code rewriting (right behavior), he was convinced in the end and we started the rewrite.&lt;/p&gt;

&lt;p&gt;**&lt;em&gt;However, this decision didn't last too long…&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It was a weekend. Sunday. I was drinking my morning coffee and reading some articles. Like my feed knew what to show me, I came across the most known article about rewriting the code. It was &lt;a href="https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/"&gt;Netscape's rewriting story written by Joel Spolsky.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sharing this article with the rest of the AntiMalware team, including our CTO, was my immediate action after I finished reading it.&lt;/p&gt;

&lt;p&gt;Another discussion started.&lt;/p&gt;

&lt;p&gt;It was already hard to convince our CTO to rewrite the code but after reading that article, he changed his mind again. He did not want to execute this decision. Other team members were yelling at me:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Why did you send this article? We already convinced him. This product must be rewritten from scratch. This is the only way."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hereby, our first attempt was finalized and we closed that rewrite topic. Our CTO believed that he could manage this crappy code and that he could release a new update. This topic was closed until harsh reality knocked us down.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One year without any update…&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Really, this is not a joke. This happened!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Why no update?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"It has been months since the last update."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;These negative comments from our users become our reality. As a small company, we had too many products to manage, and on top of it, we entered the enterprise market which caused us to come to that point actually.&lt;/p&gt;

&lt;p&gt;Mix all of that and you get one point: we forgot about our users.&lt;/p&gt;

&lt;p&gt;So, imagine. We didn't want to release a new update because we didn't want to lose our users.&lt;/p&gt;

&lt;p&gt;Actually, it should've been opposite: if we don't release a new update we will definitely lose our users because hey we didn't give them an update for over a year and a half.&lt;/p&gt;

&lt;p&gt;After the reality slapped us in the face, we decided to reach back and for us, rewriting software was the only option so we did it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Today.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Monday, 17 December 2018, 21:40. The email was prepared to be sent to our private beta group."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After 12 exhausting months, we completed our rewriting process. We prepared the first beta release note, just like the first day our product met the market.&lt;/p&gt;

&lt;p&gt;Here we are again…&lt;/p&gt;

&lt;p&gt;The rewritten version of the product is still in Beta. It has been almost one month. We are fixing bugs, listening to our users, reviewing feedbacks… As we did 4 years ago…&lt;/p&gt;

&lt;p&gt;What have we missed during these 12 long months? Who knows what else we could have done instead of rewriting?!&lt;/p&gt;

&lt;p&gt;Many questions can be asked at this point. All I know is that rewriting was the only option for us or we couldn't see any other solution.&lt;/p&gt;

&lt;p&gt;If you fall into this trap too and start thinking "I should rewrite the software from scratch", consider asking these questions that I believe every developer should ask before taking the first step to code rewriting.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Are you ready to throw away all that knowledge?
&lt;/h2&gt;

&lt;p&gt;I am asking seriously! Please be honest with yourself and answer this question: Are you really ready to throw away all that knowledge, all those collected bug fixes, years of programming. This is what you expect when you throw away the code and start from scratch. When you look at code rewriting from this perspective, it's painful, isn't it? All those sleepless nights trying to fix bugs go through your eyes. Believe me, I know.&lt;/p&gt;

&lt;p&gt;You had to talk to a lot of users to find the issue that caused your software not to work properly. Then you had to find this bug in your software. Then you had to reproduce the issue then find the fix, then… and so on and so on.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Can you guarantee that you are going to do a better job than you did the first time?
&lt;/h2&gt;

&lt;p&gt;It's important to keep in mind that when you start from scratch there is no &lt;strong&gt;guarantee&lt;/strong&gt; that you are going to do a better job than you did the first time.&lt;/p&gt;

&lt;p&gt;Since you chose to throw away all that knowledge, collected bug fixes, there is a high possibility that same bugs might again come up.&lt;/p&gt;

&lt;p&gt;Probably, the rewriting team is going to be different than the team worked on the first version. So you don't actually have "more experience". You're just going to make most of the old mistakes again and introduce some new problems that weren't in the original version.&lt;/p&gt;

&lt;p&gt;If you don't plan well the rewriting process, there is a big risk that a new version might be worse than the original version at solving your customer's problem. With this rewriting decision, you're going to take this risk that can cause you to lose your customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Are you ready to give a gift of months/ years to your competitors?
&lt;/h2&gt;

&lt;p&gt;Do you know exactly how much time do you need to rewrite your software?&lt;/p&gt;

&lt;p&gt;It takes a lot of effort, planning, preparations. You will plan each task and sprint one by one and you will exactly know your deadline to finish this painful process. Or you will miss the deadline. Who knows? There is a high possibility that you won't finish this process on time.&lt;/p&gt;

&lt;p&gt;You will be in an extremely dangerous position where you will have to ship an old version of the code for months or years, completely unable to make any strategic changes or react to new features that the market demands because you don't have shippable code.&lt;/p&gt;

&lt;p&gt;Your customers might as well just abandon you because you don't give anything new and you keep shipping your old product without any changes.&lt;/p&gt;

&lt;p&gt;Did you think about this?!&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons learned in rewriting software
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Rewriting a system from the ground up is essentially an admission of failure as a designer. It is making the statement, "We failed to design a maintainable system and so must start over." - Max Kanat-Alexander, Code Simplicity&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So as other designers, we admitted that we failed to design our software and we learned a lot from that exhausting process. Here I am sharing lessons that stuck to me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rewriting code is a developer illusion, not the solution in most cases.
&lt;/h3&gt;

&lt;p&gt;When you are in trouble with your code, it is important to diagnose what is the issue exactly. As every developer will do, your initial thought shouldn't be rewriting. This is just an illusion. It is illusion because you are struggling to read someone else's code and you think you would do a better job if you rewrote it from scratch. In this case, always remember the fundamental law of programming.&lt;/p&gt;

&lt;h3&gt;
  
  
  Consider refactoring before taking a step to code rewriting
&lt;/h3&gt;

&lt;p&gt;Targeted rewrites are useful to deal with the worst offenses in your code base. Don't do a whole rewrite if you can limit the scope and address the majority of your problems. For example, the loading of your software is so slow. But this only affects a small part of the project. These problems can be solved, one at a time, by carefully moving code, refactoring, changing interfaces. You don't have to rewrite the whole thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Beware. This is a longer, harder, more failure-prone path than you expect.
&lt;/h3&gt;

&lt;p&gt;There is a fact that developers usually realize it after they miss the deadline: everything takes longer than you think. Be very pessimistic in your estimates about the cost of a rewrite. It almost always costs more and takes longer than you would think. There will be always a lot of complexity that will make the rewriting process harder and more painful. In the end, the possibility of failure is hard to miss.&lt;/p&gt;

&lt;h3&gt;
  
  
  Make sure the new product is better at solving user's problem (or at least the same). Worse cannot be acceptable.
&lt;/h3&gt;

&lt;p&gt;Rewrites have no direct effects/benefits for the customer. Your users don't care about your code. They just want to solve their own problem. That's all. In their eyes, you are successful if your product fits in solving their problem. Otherwise, they are not using the product. They don't care about your rewriting decision, so the rewritten version must at least work as efficiently as the old one.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep maintaining and supporting the existing product.
&lt;/h3&gt;

&lt;p&gt;In our case, we didn't give any update to users for one year. This is too long in the world we live in today. Our product was still good enough, but users were complaining about no updates. Never stop maintaining a system that is currently in use so that the programmers can rewrite it. During the rewriting process, the old code still needs to be maintained. Small updates and bug fixing should be given to users while you are rewriting the old code. Otherwise, you will face losing your customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Involve users in the design process as soon as possible..
&lt;/h3&gt;

&lt;p&gt;Always show your current progress to your end users at regular intervals so that they can help you catch the worst offenses. It is important to meet your users as soon as possible. Their feedback will help you design a new product based on their needs. Don't implement any unnecessary features. This will save you from having a complicated code base.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep the teams working on the product synced.
&lt;/h3&gt;

&lt;p&gt;The product is not only about the programming team. Marketing, support, programming, design… Many teams work on it. Keep them synced by giving them regular updates about the rewriting process.&lt;/p&gt;

&lt;p&gt;In our case, we have dealt with many problems. For example, the marketing team was preparing our product beta campaign and they had to know exactly what was going on the product side so that they could prepare customers for upcoming product changes. Sometimes we made some changes without informing them. And this caused them to prepare their campaign all over from scratch. Don't spend anyone's time inefficiently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't make dramatic changes to the product.
&lt;/h3&gt;

&lt;p&gt;It is important to know your product's weak and strong sides. Don't change the strong sides, the ones loved by users. If users are satisfied with your UI, don't change it. Do minimal changes and small UX improvements. When you replace your existing software with the new one, your users shouldn't be confused with the new dramatic changes. There are many cases where users abandoned new products because they didn't find the same functionality as the previous product provided. Don't let the same thing happen to you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't make your product depend on only one developer.
&lt;/h3&gt;

&lt;p&gt;In our case, our CTO was the responsible developer for our software. Due to his position, our product development was going slowly. Even small changes were taking several weeks, sometimes months. The point is to always keep moving. Never stop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Migrations should be slow and steady.
&lt;/h3&gt;

&lt;p&gt;Replace your original software with the new one when you are sure that the new one is ready. Do it step by step.&lt;/p&gt;

&lt;p&gt;First, start with a small private beta group and ship your product into that group. Continuously collect feedbacks and crash reports, fix the bugs, iterate new versions and again the same thing. Follow this cycle until you ensure that your product is ready to go public beta.&lt;/p&gt;

&lt;p&gt;When you go public beta, feedbacks are going to be your best friend again. Your first goal here should be to ensure that your product solves the users' problems. When you are sure that you are providing the same or better functionality as old software did, replacement can take place. Release the new software for new users, and migrate your existing users to the new one.&lt;/p&gt;

&lt;p&gt;Those are the key lessons that I learned from our rewriting process. Rewriting is almost never the answer. More often than not, refactoring is a better bet. I strongly advise the slow approach of using refactoring. It's less risky and you keep your customers happy.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to rewrite the code
&lt;/h2&gt;

&lt;p&gt;There are times when it is appropriate to do a rewrite. If I could have made a list about when to rewrite the code, this would be my list:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Switching to another language or platform (as in our case):&lt;/strong&gt;The language is so old. It is hard to find a developer or you have to pay a lot of money to get one. In both cases too much effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The existing codebase is not maintainable anymore (as in our case):&lt;/strong&gt;How do you decide your code is not maintainable? It is hard to determine but if even small changes are hard to be done, if new updates take longer than usual, if any new change affects other parts of the software and introduces new bugs, your software is unmaintainable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You have the resources available to both maintain the existing system and design a new system at the same time:&lt;/strong&gt;Never stop maintaining a system that is currently in use so that the programmers can rewrite it. Systems must always be maintained if they are in use. And remember that your personal attention is also a resource that must be taken into account here - do you have enough time available in each day to be a designer on both the new system and the old system simultaneously, if you are going to work on both?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The developers in the team are a bottleneck for software (as in our case):&lt;/strong&gt;This shouldn't be a reason to rewrite the code from scratch. You can always switch developers within the team or you can hire new developers to eliminate the bottleneck situation.&lt;/p&gt;

&lt;p&gt;However, sometimes, as in our case, there might be times where you have to choose the rewriting option. Our software was written with old technology and our CTO was the only responsible person to develop it. We tried to find a new developer but it was hard because of the age of this coding platform. Even if we could have found a new one, it would be very expensive for us. So together with other conditions, this was in our list to decide to rewrite code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The software is long-lived (I'm talking like 10–20 years or more):&lt;/strong&gt;Maintenance becomes more and more expensive over time. This is due to the fact that the code is becoming more and more spaghetti-ish as the original architecture is sacrificed for quick maintenance patches. Also, developers for older technologies become rarer and more expensive. Finally, hardware begins to age and it gets harder and harder to find new hardware, operating systems, frameworks, etc. to run the old application on top of it. Also, businesses evolve, and most likely an older system will not be meeting the business needs of the organization.&lt;/p&gt;

&lt;p&gt;So you have to weigh all of the ongoing maintenance cost, as well as the potential benefits of a new system, against the cost of rewriting it from scratch.&lt;/p&gt;

&lt;p&gt;If your case fits in one or more of the above points, you may be in a situation where it is acceptable to rewrite. Otherwise, the correct thing to do is to handle the complexity of the existing system without a rewrite, by improving the system's design in a series of simple steps.&lt;/p&gt;

&lt;p&gt;Rewriting your code from scratch could be the single biggest mistake you make, but equally so, not-rewriting your code could lead to the same result. Here is a piece of advice. Refactoring should be the first option.&lt;/p&gt;

&lt;p&gt;Some developers will keep believing that all systems must eventually be rewritten. Always keep in mind that this is not true. It is possible to design a system that never needs to be thrown away. There will be always a software designer around you saying "We'll have to throw the whole thing away someday anyway". But if software is built right to start with and then properly maintained, why would it be thrown away?&lt;/p&gt;

</description>
      <category>programming</category>
      <category>rewriting</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How an entrepreneur’s mindset can help programmers design better software</title>
      <dc:creator>Hüseyin Polat Yürük</dc:creator>
      <pubDate>Wed, 16 Jan 2019 15:35:20 +0000</pubDate>
      <link>https://dev.to/h_polatyuruk/how-an-entrepreneurs-mindset-can-help-programmers-design-better-software-5aa4</link>
      <guid>https://dev.to/h_polatyuruk/how-an-entrepreneurs-mindset-can-help-programmers-design-better-software-5aa4</guid>
      <description>&lt;p&gt;
    &lt;em&gt;Originally published at&lt;/em&gt;
    &lt;a href="http://blog.huseyinpolatyuruk.com/how-an-entrepreneurs-mindset-can-help-programmers-design-better-software"&gt;&lt;em&gt;blog.huseyinpolatyuruk.com.&lt;/em&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Hey there!&lt;/p&gt;

&lt;p&gt;You clicked on this article (which is a big success for me because this is my first story) — but the point here is not about my writing endeavors, but rather about programmers. And, more specifically, how an entrepreneur’s mindset can change their approach to solving problems and focusing on the big picture.&lt;/p&gt;

&lt;p&gt;Since you are reading this article, most probably you are a programmer just like I am. We have probably gone through some similar programming situations and made the same mistakes in our programming life that would make us completely understand each other even though we have never even met.&lt;/p&gt;

&lt;p&gt;How do I know this?&lt;/p&gt;

&lt;p&gt;Let me try something out. I will list some common mistakes that I have made throughout my programming days. While you are reading this list, if you occasionally nod your head or have your mind blown saying: Hell yeah. I have done the same! then we are not strangers but rather two programmers who have gone through the same stuff. Let’s start.&lt;/p&gt;

&lt;p&gt;Have you ever:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Acted before actually thinking and understanding the problem?&lt;/li&gt;
&lt;li&gt;Assumed a feature was needed?&lt;/li&gt;
&lt;li&gt;Thought that this new feature implementation would be a piece of cake?&lt;/li&gt;
&lt;li&gt;Created imaginary problems and tried to solve them?&lt;/li&gt;
&lt;li&gt;Published code without testing?&lt;/li&gt;
&lt;li&gt;Spent too much time on unnecessary things within an overall project?&lt;/li&gt;
&lt;li&gt;Done everything by yourself (hero programmer)?&lt;/li&gt;
&lt;li&gt;Applied the wrong task separation and management?&lt;/li&gt;
&lt;li&gt;Tried to make the first version perfect?&lt;/li&gt;
&lt;li&gt;Underestimated the scope of the project and the amount of time that would be required to complete it (Deadline nightmare)?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Are you still nodding?&lt;/p&gt;

&lt;p&gt;:)&lt;/p&gt;

&lt;p&gt;The point is that it does not matter which programming language you know or use, what kind of programmer you are, and how vast your experience is. The point is that you are a programmer, and like all of us you can be easily trapped in one behavior pattern which looks efficient at the beginning and makes you feel smart but that eventually turns into a mess.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Been there. Done that.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As every programmer has, I made the same mistakes in my early programming life while working on many different software projects with various other programmers.&lt;/p&gt;

&lt;p&gt;Once I reached a certain point where, instead of repeating the same mistakes, I started recognizing behavior patterns, I realized that the majority of programmers were working by the same pattern.&lt;/p&gt;

&lt;p&gt;It was a breakthrough for me.&lt;/p&gt;

&lt;p&gt;Can you imagine? Instead of spending quality time building great software, we are actually trapped in our own behavior patterns that lead us to lose time day by day and code by line of code.&lt;/p&gt;

&lt;p&gt;I decided to try to change this pattern and learn from my mistakes. With the power of will and a bit of luck, I somehow managed to do so.&lt;/p&gt;

&lt;h2&gt;Start small. Think big.&lt;/h2&gt;

&lt;p&gt;What was my first action?&lt;/p&gt;

&lt;p&gt;I started learning from the best.&lt;/p&gt;

&lt;p&gt;I spent every day spending every free minute reading articles, books, watching videos and following best practices on how to improve my coding style and not make the same mistakes again.&lt;/p&gt;

&lt;p&gt;I noticed a pattern: having great programming skills (even though they are super duper important to have) is not enough when it comes to minimizing these mistakes. Rather it’s something outside of the code.&lt;/p&gt;

&lt;p&gt;To avoid the most common programming mistakes that lead to nightmare deadlines, unnecessary code lines and losing time, you need to expand your perspective and point of view. Instead of just thinking about the software you code only from your perspective, as a programmer, you should look at the software you design from a much bigger perspective.&lt;/p&gt;

&lt;p&gt;This bigger perspective means to focus on the main idea, the purpose of the software, and not only on the core functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I realized that we should never forget to ask ourselves: Why are we coding this software in the first place?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What does this mean?&lt;/p&gt;

&lt;p&gt;Programmers tend to lock themselves inside the software they build, which usually leads to shrinking their focus only to the lines of code.&lt;/p&gt;

&lt;p&gt;When this happens, you tend to miss the main point which is the purpose of the software. You are building this software to help your users by solving their problems and making their lives easier. When you keep this purpose in your mind while you are coding, you will be able to reorganize your development process in a more efficient way. Instead of being trapped inside the code, you are now being guided by the main idea of the software which will give you the ability to cut unnecessary things and focus on the core concepts.&lt;/p&gt;

&lt;p&gt;When you put things this way, suddenly coding style isn’t the only important thing.&lt;/p&gt;

&lt;h2&gt;Beyond the code&lt;/h2&gt;

&lt;p&gt;While working in a company and leading a team of developers, I also started building the side project that eventually taught me some major lessons on how to reorganize my development process. I went from a code-only perspective to a software purpose perspective.&lt;/p&gt;

&lt;p&gt;How I started was very simple. It is maybe ironic, but to improve my code, the first thing I did was to escape my code. I had to see beyond the code.&lt;/p&gt;

&lt;p&gt;Maybe it sounds weird but it actually works. While working as a programmer, I also had the tendency to focus on the code functionality until I started building my own project.&lt;/p&gt;

&lt;p&gt;While designing my own software, I started reading many articles about how entrepreneurs should approach problems in order to solve them and how they can grow their business with limited resources and limited time.&lt;/p&gt;

&lt;p&gt;I saw that the strategies entrepreneurs follow can help programmers change their mindset and help them develop better and bug-free software.&lt;/p&gt;

&lt;p&gt;I went and applied the same concept at work and it showed great results.&lt;/p&gt;

&lt;p&gt;Let's take a closer look at each common mistake made by programmers and see how entrepreneur mindset can help us avoid them.&lt;/p&gt;

&lt;h1&gt;1. Acting before thinking about the problem&lt;/h1&gt;

&lt;p&gt;Have you ever jumped straight into coding instead of thinking about the problem you are trying to solve? Without considering all the requirements of the software? Yeah, I have, too. Then we realize in the end that we chose the wrong tools and wrong architecture to code the software.&lt;/p&gt;

&lt;p&gt;As a result, we face even bigger problems than the problem that we tried to fix in the first place. These problems come in the form of complex design, which makes the solution unmanageable and results in hard to maintain program structures.&lt;/p&gt;

&lt;p&gt;So now, let’s try to approach this problem from an entrepreneur’s perspective.&lt;/p&gt;

&lt;p&gt;An entrepreneur would do deep research to understand the market and problems that the customers experience. They would know that without exactly understanding the problem and analyzing it from each perspective, eventually, it would lead to bigger problems like wasting time and resources. After all, with already limited time and resources, wasting time on unnecessary things is definitely not part of their plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main point: Don’t act before understanding the problem.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;2. Assuming a feature is needed&lt;/h2&gt;

&lt;p&gt;If you don’t understand the exact expectations and features that are required by the software you need to build, you might misunderstand the concept and invent an unnecessary feature which is totally irrelevant to the overall software’s purpose. So what happens is that you waste your time on that unnecessary feature while missing the core feature’s implementation.&lt;/p&gt;

&lt;p&gt;From an entrepreneur’s point of view, this is not acceptable.&lt;/p&gt;

&lt;p&gt;While building software you should first focus on the feature that solves the customer’s problems. By listening to the customer’s voice and analyzing their needs, you can then build software from essentially required features while others come later on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Don’t assume. Question everything.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;3. Assuming new features will be easy to implement&lt;/h2&gt;

&lt;p&gt;As programmers, we have a keen ability to underestimate the feature implementation process. Sometimes we believe that we know how to solve the problem without even thinking about it.&lt;/p&gt;

&lt;p&gt;Again — wrong.&lt;/p&gt;

&lt;p&gt;This kind of behavior leads to missing deadlines because nothing is easy and everything has to be planned carefully. An entrepreneur would know that without having a clear implementation plan, invisible problems may appear which can eventually lead to many other troubles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Never underestimate the problem. Think, plan and then act.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;4. Creating imaginary problems and trying to solve them&lt;/h2&gt;

&lt;p&gt;As programmers, we like challenges :) (you know what I mean).&lt;/p&gt;

&lt;p&gt;Sometimes we like to implement code that has no other purpose but to satisfy ourselves and prove to everyone that we could overcome this challenge.&lt;/p&gt;

&lt;p&gt;There are moments when we even try to predict features that will solve imaginary problems that we created.&lt;/p&gt;

&lt;p&gt;Crazy, huh?&lt;/p&gt;

&lt;p&gt;While programmers are inventing imaginary problems, entrepreneurs are avoiding them. Simple enough.&lt;/p&gt;

&lt;p&gt;They would focus on the problems that actually already exist and try to solve them as soon as possible. In that way, they gain the ability to invest their time in things which are essential for their business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Don’t predict future problems. Focus on the ones you already have.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;5. Publishing code without testing&lt;/h2&gt;

&lt;p&gt;Do you remember the last time you pushed some code to production without testing it?&lt;/p&gt;

&lt;p&gt;Sometimes we make this mistake because we are excited about our code. Sometimes even senior programmers can make this mistake. Many programmers see testing as a burden, and after coding, it’s easy to skip it. But what they are not aware of is that skipping this step will create troubles for them in the future: instead of being productive, they will become bug hunters with sleep deprivation.&lt;/p&gt;

&lt;p&gt;When we look at entrepreneurs, they tend to verify and test everything before execution. This is because they don’t want to ship a product that is not wanted or needed by their potential customers. Before shipping, they always test whether the problem they are trying to solve really exists and if there is a market for that product or not. In this way, they will minimize the possibility of failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: All code lines must be executed at least once.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;6. Spending too much time on unnecessary things&lt;/h2&gt;

&lt;p&gt;Generally, this happens when programmers are obsessive about a certain issue. Doesn’t matter if this issue is important or not. They try to overcome this issue again and again because — as mentioned above — they like challenges. In the end, maybe they will succeed, but at what cost?&lt;/p&gt;

&lt;p&gt;The problem? Determining whether the issue really needs to be solved. If they stop to question it and see the big picture, they would never waste their time fixing an issue that is not important.&lt;/p&gt;

&lt;p&gt;On the other hand, entrepreneurs know that they don’t have the luxury to waste their time on unnecessary things. Basically, they question everything and make their priorities straight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Don’t waste your time. Use it wisely.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;7. Doing everything by themselves&lt;/h2&gt;

&lt;p&gt;In this paragraph, I am not talking about programmers who work in well-organized companies. If you have a good team leader who knows how to delegate jobs, it’s not an issue. But in some companies — especially small ones or startups — programmers have a tendency to do every task by themselves. They believe that if they delegate their tasks to other team members they will make mistakes. Basically, they don’t trust them.&lt;/p&gt;

&lt;p&gt;Eventually, they become overloaded with work and the development process starts to become very slow.&lt;/p&gt;

&lt;p&gt;Entrepreneurs are typically well aware that they can’t do everything by themselves. They tend to create an environment based on trust where everyone can ask for help. Task delegation and working in teams can lead to an increase in work efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Trust your team. Don’t forget that everyone needs help.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;8. Wrong task separation and management&lt;/h2&gt;

&lt;p&gt;I believe that the task creation process is one of the most important steps in designing better software. Instead of separating a certain project into smaller tasks, programmers or team leaders sometimes group all tasks into a single project.&lt;/p&gt;

&lt;p&gt;In this way, when they start with task implementation, the task itself can look bigger than it really is and they don’t know how to approach it or where to even start.&lt;/p&gt;

&lt;p&gt;On the other hand, if you separate one big task into smaller tasks, you can always choose to start with small steps. Going step by step and completing each subtask will lead to completing the big picture and solving the task fully in the end.&lt;/p&gt;

&lt;p&gt;Separating a task into subtasks helps in solving complex problems and allows you to manage tasks in a more efficient and simple way.&lt;/p&gt;

&lt;p&gt;I believe that every entrepreneur has a “start small” mindset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Start small than extend.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;9. Trying to make the first version perfect&lt;/h2&gt;

&lt;p&gt;Programmers often try to implement everything in the first software version. They believe that without giving everything to customers in the first version, those customers will be disappointed and they will not like the product.&lt;/p&gt;

&lt;p&gt;This approach leads to a deadline nightmare and delay of the first release.&lt;/p&gt;

&lt;p&gt;However, entrepreneurs tend to strongly believe in the feedback cycle. They follow the principle of “Build it, ship it, iterate it.” They know that they have to ship their product into the market as soon as possible. Once they release the first version, they will listen carefully to their customers and analyze their feedback. In this way, they will make their product better and avoid the implementation of unnecessary features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Build it, ship it, iterate it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;10. Underestimating the scope of the project and time required to complete it (Deadline nightmare)&lt;/h2&gt;

&lt;p&gt;How many times have you felt pressure and stress because of a missed deadline?&lt;/p&gt;

&lt;p&gt;Did you ever ask yourself why you missed this deadline?&lt;/p&gt;

&lt;p&gt;I believe, as a programmer, deadlines have always been a nightmare for us. Generally, we tend to underestimate the scope of the requirements which brings us to a point where we can’t accurately estimate the required amount of time needed to complete the project.&lt;/p&gt;

&lt;p&gt;I believe that 80% of the development process should be dedicated to establishing software requirements and designing a feature list and appropriate architecture to build the project. The other 20% percent should be dedicated to coding.&lt;/p&gt;

&lt;p&gt;However, this is easier said than done. In practice, this is always a challenge for a team of developers.&lt;/p&gt;

&lt;p&gt;To a person with an entrepreneur mindset, time is the most valuable resource. Therefore, they define their business scope carefully and estimate their project time in a more accurate way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main idea: Everything takes longer than you think.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;I’ve seen many programmers who had to rewrite their software from scratch because of mistakes made in the early stages of the development process.&lt;/p&gt;

&lt;p&gt;Re-coding software that was created by bad development processes is a waste of time.&lt;/p&gt;

&lt;p&gt;Imagine a scenario where the development process has been planned and organized in a better way from the start. Now instead of rewriting the software, programmers could dedicate their time to developing new products or improving existing ones.&lt;/p&gt;

&lt;p&gt;I always believe that if we can focus on the purpose of what we are doing and why we are doing it, everything will be much clearer for us. I,f we always keep the big picture in our mind we will develop better and higher quality software that will be designed to fulfill a certain purpose.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don’t waste your time. It’s precious and your most valuable resource.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>coding</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
