
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Engineering-Practices | karas.codes</title>
        <link>https://karas.codes/tags/engineering-practices/</link>
        <description>Articles tagged Engineering-Practices on karas.codes</description>
        
        <language>en-us</language>
        <copyright>© Andrzej Karaś</copyright>
        <lastBuildDate>Mon, 22 Jan 2024 00:00:00 +0000</lastBuildDate>
        
        <atom:link href="https://karas.codes/tags/engineering-practices/index.xml" rel="self" type="application/rss+xml" />
        
        
        
        <item>
            <title>Telling someone don&#39;t do it - considered harmful</title>
            <link>https://karas.codes/posts/telling-someone-dont-do-it-considered-harmful/</link>
            <pubDate>Mon, 22 Jan 2024 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/telling-someone-dont-do-it-considered-harmful/</guid>
            <description>


                &lt;h2 id=&#34;context&#34;&gt;Context&lt;/h2&gt;
&lt;p&gt;I heard a very interesting thing when being in the middle of yearly review call.&lt;/p&gt;
&lt;p&gt;During a code review some unknown time ago I &lt;strong&gt;unfortunately&lt;/strong&gt; asked someone (don&amp;rsquo;t know who) to not implement something in a specific way. What&amp;rsquo;s worse I did something similar in a code. Regrettably I don&amp;rsquo;t remember that, but probably I forgot explain my point. How dare I? What a hypocrite!&lt;/p&gt;
&lt;h2 id=&#34;my-mistake&#34;&gt;My mistake&lt;/h2&gt;
&lt;p&gt;I think my only mistake was not making 100% sure that the other person understand my point of view. I should state it very clearly, why they should not do a given thing with our codebase even though I did something similar in the past. My only excuse is I have always a lot in my plate (but I still try to help my colleagues), so probably I did not explain my point because I simply did not have enough time to do it properly.&lt;/p&gt;
&lt;h2 id=&#34;the-other-side-of-the-table&#34;&gt;The other side of the table&lt;/h2&gt;
&lt;h3 id=&#34;why-affected-person-did-not-ask-me-for-details&#34;&gt;Why AFFECTED person did not ask me for details?&lt;/h3&gt;
&lt;p&gt;I truly try to understand that. Through my whole career, I have constantly asked questions to people who are more experienced than me because I want to understand things as deeply as possible.&lt;/p&gt;
&lt;p&gt;This situation could have been resolved with one additional question.&lt;/p&gt;
&lt;h3 id=&#34;comments-in-the-code-review-should-not-be-perceived-as-orders&#34;&gt;Comments in the code review should not be perceived as orders&lt;/h3&gt;
&lt;p&gt;I am working at a company that has very flat structure. I feel like everybody in the team is equal.&lt;/p&gt;
&lt;p&gt;Also, based on my experience with code review. My comments are only tips or advice to the person who wrote the code. When I am telling someone that they will shoot in their knee, they still can do it and I am ok with it.&lt;/p&gt;
&lt;h4 id=&#34;but-there-is-one-exception&#34;&gt;But there is one exception&lt;/h4&gt;
&lt;p&gt;If you are changing the code that the other team maintains, you should follow instructions. Because maintainers always have more experience with it and knows what and when could be done or not. In addition, I think this is the case I wrote in the context section.&lt;/p&gt;
&lt;p&gt;In other words, I won&amp;rsquo;t let you shoot in your knee if I will be asked to fix that later on&amp;hellip;&lt;/p&gt;
&lt;h3 id=&#34;maintainers-could-do-more-than-people-that-are-clients-of-the-code&#34;&gt;Maintainers could do more than people that are clients of the code&lt;/h3&gt;
&lt;p&gt;Of course this is my opinion. If you are creator/maintainer of given code, then you could do with it some things that are restricted to the other teams.&lt;/p&gt;
&lt;h4 id=&#34;why&#34;&gt;Why?&lt;/h4&gt;
&lt;p&gt;Because (again) you know all internals of the code, know all edge cases, how this code performs etc.&lt;/p&gt;
&lt;h4 id=&#34;example&#34;&gt;Example&lt;/h4&gt;
&lt;p&gt;Let&amp;rsquo;s consider a feature flag module (it&amp;rsquo;s a very common module in SaaS applications, I think). It&amp;rsquo;s created by one team and exposed to the other teams inside a company. From my perspective feature flags should be used for technical things only - like things that our customers couldn&amp;rsquo;t see or manage. E.g.:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;switching on or off given module in the app&lt;/li&gt;
&lt;li&gt;changing internal configuration of given module&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So if you spot a case, where someone is using this module as normal config of the given module (that could be changed by end users). What would you do? For sure, you will ask this person to not do that, but do in other way - I mean implement normal config managed by customer in this case.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;I know I should explain my point of view more, but as I told sometimes you don&amp;rsquo;t have time for it. When you are maintaining code that is used by other teams.&lt;/p&gt;
&lt;h3 id=&#34;things-that-i-should-improve&#34;&gt;Things that I should improve&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Always write documentation that will describe all use cases in a clear way&lt;/li&gt;
&lt;li&gt;Be more precise during code reviews&lt;/li&gt;
&lt;li&gt;Ask more often if everything is understood&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please let me know if you have any other observations!&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>The Devil&#39;s Advocate Technique</title>
            <link>https://karas.codes/posts/the-devils-advocate-technique/</link>
            <pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/the-devils-advocate-technique/</guid>
            <description>


                &lt;p&gt;This technique would be more useful for teams rather than freelancers. But I think anybody could take something valuable from using this technique.&lt;/p&gt;
&lt;h2 id=&#34;context&#34;&gt;Context&lt;/h2&gt;
&lt;p&gt;Imagine that you are working on some new module in your application, e.g. location module - that could be placed on both client or backend side. So we need to find out the best solution. You also have prepared a design for bot approaches - that takes maintainability, security, and performance into consideration.&lt;/p&gt;
&lt;h2 id=&#34;the-devils-advocate-technique&#34;&gt;The devil&amp;rsquo;s advocate technique&lt;/h2&gt;
&lt;p&gt;Once you have all things described above we could start doing a list of questions that you will get from e.g. CTO, Head of IT, team leads, or team members. You should also prepare another list of questions that you potentially receive from managers, marketing, and support teams.&lt;/p&gt;
&lt;p&gt;Then you need to try to answer all of these questions to see your solution from different perspectives or angles.&lt;/p&gt;
&lt;p&gt;You could also do a call with 1-2 team members that are more experienced than you, to receive questions you weren&amp;rsquo;t aware of. But don&amp;rsquo;t do it before preparing your list. Also preparing ADR before doing a call will save your teammates time.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;This technique is very simple, and you don&amp;rsquo;t need to spend much more time implementing it. But you will produce way better solutions when you will be using it. Also, you will save time by spotting some potential problems or improvements even before starting the implementation stage.&lt;/p&gt;
&lt;p&gt;If you will be following this approach for a long time, you will start becoming better and better at finding problems, improvements, or potential bugs that could occur, etc. This technique will also improve your creativity.&lt;/p&gt;
&lt;p&gt;Hope you will find this post useful!&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>How Not to Get Stuck When Solving a Problem</title>
            <link>https://karas.codes/posts/how-not-to-stuck-when-solving-a-problem/</link>
            <pubDate>Thu, 30 Mar 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/how-not-to-stuck-when-solving-a-problem/</guid>
            <description>


                &lt;p&gt;Today I want to show you one approach that will let you spend less time-solving things.&lt;/p&gt;
&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;p&gt;For sure, you had a situation where you were stuck on solving some problems like implementing new features or worse trying to find a bug in your system. That happens every time then you&amp;rsquo;re doing interesting things and trying to learn something new. You are on a good path!&lt;/p&gt;
&lt;p&gt;This is not a problem until you react to it in a good (for you) way :)&lt;/p&gt;
&lt;h2 id=&#34;bad-approach---trying-to-solve-a-problem-at-any-cost&#34;&gt;Bad approach - trying to solve a problem at any cost&lt;/h2&gt;
&lt;p&gt;I did that many times, like sitting in front of my desktop until I solve the problem. That approach is not the best because you are wasting your time. I mean, if you are tired, probably you won&amp;rsquo;t find out a brilliant solution. Also, finding, designing, or even implementing the correct solution would take more time. Instead of trying to solve that problem, you could e.g. solve some other task that is well-defined at the same time. That would give you a better outcome in the end.&lt;/p&gt;
&lt;p&gt;But we all know that you must solve some complex problems and fix hard-to-debug issues. So&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;approach-you-should-take&#34;&gt;Approach you should take&lt;/h2&gt;
&lt;p&gt;I will show you a couple of ideas that could improve your efficiency when you will stick to something:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Give yourself X amount of time e.g. 1h and do a short break after that. Making coffee, talking with your friend, or going for a short walk will let you reset your mind and think about other things. However, our subconscious will continue to solve this problem in the background. So when we get back to work, we should have a couple of ideas on how we could solve it. Splitting work into time slots should decrease the time needed on preparing the working solution.&lt;/li&gt;
&lt;li&gt;Do something else to distract your mind - it would also help process your problem on an unconscious level&lt;/li&gt;
&lt;li&gt;Use the rubber duck technique - it&amp;rsquo;s obvious&lt;/li&gt;
&lt;li&gt;Learn how to use a debugger (if you don&amp;rsquo;t know yet) if you have to find a cause of a problem during a runtime&lt;/li&gt;
&lt;li&gt;Gather as much data about the problem as you could. I mean you could get functional and non-functional requirements, some other constraints, and things that are important from a business perspective. All of that (a many more) will help you to design a proper solution.&lt;/li&gt;
&lt;li&gt;Try to talk with a teammate from your project on the company - but prepare questions first in other to not waste your colleague&amp;rsquo;s time&lt;/li&gt;
&lt;li&gt;Write the unit test first - that always works :)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Hope this list would help you solve problems faster. Point number one and two are the most important - do breaks to reset your power.&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>When Is a Feature Really Done?</title>
            <link>https://karas.codes/posts/when-we-could-call-the-new-feature-finished/</link>
            <pubDate>Mon, 27 Mar 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/when-we-could-call-the-new-feature-finished/</guid>
            <description>


                &lt;h2 id=&#34;context&#34;&gt;Context&lt;/h2&gt;
&lt;p&gt;Have you ever argued with your teammate that some feature is finished and ready for production deployment? I faced it a couple of times from both sides of the roadblocks.&lt;/p&gt;
&lt;p&gt;This situation is caused by a different &lt;code&gt;definition of done&lt;/code&gt; definition. So let&amp;rsquo;s break it down into pieces.&lt;/p&gt;
&lt;h2 id=&#34;when-we-could-say-that-feature-is-finished&#34;&gt;When we could say that feature is finished?&lt;/h2&gt;
&lt;p&gt;There would be as many answers as the developers you asked. So I just want to show the &lt;code&gt;levels&lt;/code&gt; that I spotted during my career. Let me clarify one more thing - we will be talking about production-ready software. So all things I describe do not apply to e.g. prototype of an application.&lt;/p&gt;
&lt;h3 id=&#34;0-its-implemented&#34;&gt;0. It&amp;rsquo;s implemented&lt;/h3&gt;
&lt;p&gt;I hope that this point shocked you. I had the same feeling when I saw that someone is deploying code (that was implemented 10 min ago) which is not been tested at all. Someone could say, that sometimes you need to deploy a hotfix to production. My answer is - something goes wrong in the development and internal tests process when you need to hurry to deploy a hotfix :)&lt;/p&gt;
&lt;h3 id=&#34;1-its-reviewed&#34;&gt;1. It&amp;rsquo;s reviewed&lt;/h3&gt;
&lt;p&gt;I am ashamed that I said something similar one time after some CI/CD change I was doing did not work. I was inexperienced at that time&amp;hellip; but that&amp;rsquo;s not an excuse. Remember, someone&amp;rsquo;s approval of the merge request does not absolve you of responsibility for the code.&lt;/p&gt;
&lt;h3 id=&#34;2-its-tested-locally&#34;&gt;2. It&amp;rsquo;s tested locally&lt;/h3&gt;
&lt;p&gt;For me, it&amp;rsquo;s something obvious, but I still see cases when untested code is deployed to prod. Remember, it&amp;rsquo;s always easier to discover bugs in the code you develop instead of debugging code that is running on prod for a couple of weeks or months.&lt;/p&gt;
&lt;h3 id=&#34;3-its-unit-tested&#34;&gt;3. It&amp;rsquo;s unit tested&lt;/h3&gt;
&lt;p&gt;I know that still people think that implementing unit tests is a waste of time and because of that unit tests are very often postponed or not implemented at all. For me code that does not have unit tests, it&amp;rsquo;s not finished.&lt;/p&gt;
&lt;h3 id=&#34;4-its-tested-internally---by-someone-else-that-author&#34;&gt;4. It&amp;rsquo;s tested internally - by someone else that author&lt;/h3&gt;
&lt;p&gt;When you are reaching this point daily - it&amp;rsquo;s quite good we could say. When you are working on some application for a long time, then you could test &amp;ldquo;happy paths&amp;rdquo; only. Having someone else that could double-check it is a game changer.&lt;/p&gt;
&lt;h2 id=&#34;but-still-there-is-a-couple-of-things-that-could-be-improved&#34;&gt;But still there is a couple of things that could be improved&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s discuss them below.&lt;/p&gt;
&lt;h3 id=&#34;5-you-have-logs-with-correct-levels-and-additional-metrics-prepared&#34;&gt;5. You have logs with correct levels and additional metrics prepared&lt;/h3&gt;
&lt;p&gt;For sure, you would be observing how your new feature behaves on production to revert it when someone bad will start happening. To do it as fast as possible, prepare these logs even before deploying your code. In some complex cases, some additional metrics also would be welcome.&lt;/p&gt;
&lt;h3 id=&#34;6-you-are-having-feature-flag-that-covers-things-you-developed&#34;&gt;6. You are having feature-flag that covers things you developed&lt;/h3&gt;
&lt;p&gt;You will be sleeping well knowing that you could always revert your change without the need for reverting code and redeploying your apps. This approach would let you deploy it gradually e.g. per customer instead of doing &amp;ldquo;big bang&amp;rdquo; deployment.&lt;/p&gt;
&lt;h3 id=&#34;7-inform-all-people-that-could-be-interested-before-deploying-a-change-to-production&#34;&gt;7. Inform all people that could be interested before deploying a change to production&lt;/h3&gt;
&lt;p&gt;By doing this you are giving someone a chance of spotting things that won&amp;rsquo;t work or in the worst case will crash your application. Believe me, it could prevent a lot of problems in your daily work.&lt;/p&gt;
&lt;p&gt;When you work for someone else. You should think about informing people that are making decisions about the app you are developing.&lt;/p&gt;
&lt;h2 id=&#34;some-of-them-could-be-done-even-before-you-will-start-implementing-new-code&#34;&gt;Some of them could be done even before you will start implementing new code&lt;/h2&gt;
&lt;p&gt;Fixing things without touching code will allow you to reduce the time of implementing it. I will present a couple of things below.&lt;/p&gt;
&lt;h3 id=&#34;8-prepare-a-couple-of-designs-for-your-feature&#34;&gt;8. Prepare a couple of designs for your feature&lt;/h3&gt;
&lt;p&gt;Thanks to that you will be able to pick the best approach for a solution taking into consideration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;business requirements&lt;/li&gt;
&lt;li&gt;technical limitations&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;9-try-to-find-a-solution-that-lets-you-save-time-maintaining-it-over-time&#34;&gt;9. Try to find a solution that lets you save time maintaining it over time&lt;/h3&gt;
&lt;p&gt;I saw such a situation very often&amp;hellip; Someone implemented code that was doing what was intended to do. But it wasn&amp;rsquo;t prepared for any change that customers asked for in the future. I think this is one of the most underrated approaches for preparing code that could be easily maintained in the future.&lt;/p&gt;
&lt;p&gt;In other words: if you don&amp;rsquo;t have a solution that considers the maintenance stage - don&amp;rsquo;t implement it. You will lose your time when implementing it and after that when fighting with problems. You should spend more time on a design to decrease the time needed for implementation.&lt;/p&gt;
&lt;h3 id=&#34;10-implement-code-that-could-be-removed-very-easily&#34;&gt;10. &amp;ldquo;Implement code that could be removed very easily&amp;rdquo;&lt;/h3&gt;
&lt;p&gt;I don&amp;rsquo;t remember when I heard that rule, but it helps me implement code that is simple and generic. That gives me a couple of advantages. I can reimplement the entire code by removing it and simply implementing it from the scratch - using interfaces helps you establish contracts between modules. I am not afraid because of implementing something new, because I know it could be easily replaced by the next iteration of an idea - that would be improved thanks to the experience we gather.&lt;/p&gt;
&lt;h3 id=&#34;11-discuss-your-idea-with-more-experienced-developers&#34;&gt;11. Discuss your idea with more experienced developers&lt;/h3&gt;
&lt;p&gt;Before you start implementing new things. You could write it down in the task tracker your team is using. Then you can simply ask your teammates for some advice. When you are having people that are working on that system way longer than you, you will be getting a lot of pro tips about the module/feature you want to work on. Spreading knowledge about the system inside the team is very important.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;In this post, I just gathered a couple of things that could help you build your own feature deployment checklist. Hope you would find something useful :)&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>Don&#39;t Build One-Off Solutions — Build Reusable Patterns</title>
            <link>https://karas.codes/posts/dont-create-dedicated-solutions-create-patterns/</link>
            <pubDate>Thu, 23 Mar 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/dont-create-dedicated-solutions-create-patterns/</guid>
            <description>


                &lt;h2 id=&#34;context&#34;&gt;Context&lt;/h2&gt;
&lt;p&gt;I am sure that you are faced with a situation where you found a couple of classes that solve the same problem but in a different way. Also, when you implement or maintain similar modules you could find that entire code or specific classes look analogous. Here is how you could use it as leverage for your productivity.&lt;/p&gt;
&lt;h2 id=&#34;identify&#34;&gt;Identify&lt;/h2&gt;
&lt;p&gt;Identifying such cases is key. Of course, without that, we can&amp;rsquo;t do the next steps for the improvements. Sometimes we have to refactor given code because is implemented in way different way, but after &amp;ldquo;normalization&amp;rdquo; we get the same code. I faced such cases many times, especially when working on legacy code.&lt;/p&gt;
&lt;h2 id=&#34;improve&#34;&gt;Improve&lt;/h2&gt;
&lt;p&gt;We could do the improvement described in the previous sentence - refactor the code, so it could look very similar in every module. But this is only part of the improvement we could do.&lt;/p&gt;
&lt;h2 id=&#34;implement-a-pattern&#34;&gt;Implement a pattern&lt;/h2&gt;
&lt;p&gt;Once we isolate a common class (a subset of methods in other words), then we could: check whether it&amp;rsquo;s doing a single thing and doing it right. Then we could divide the given class into smaller independent parts.&lt;/p&gt;
&lt;p&gt;When we will be in this place we could introduce interfaces for all important classes. The complement step is to make those interfaces and concrete classes generic - a lot of languages are using &amp;ldquo;templates&amp;rdquo; or some corresponding method.&lt;/p&gt;
&lt;h2 id=&#34;replace-old-solution-with-generic-one-step-by-step&#34;&gt;Replace old solution with generic one step by step&lt;/h2&gt;
&lt;p&gt;If you identified such classes in a couple of modules you should avoid replacing them at once. Does it step by step, so you could test everything properly and react to some problems if any would occur? This way you will discover them faster.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;Thanks to the steps described above you will be able to implement something &lt;em&gt;only&lt;/em&gt; once and use it anywhere else you need. Polymorphism is a game-changer here, it&amp;rsquo;s an increasing number of places that we could use our code later on.&lt;/p&gt;
&lt;p&gt;There are a couple of benefits that we get from described approach:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;we have less code to maintain in the long term&lt;/li&gt;
&lt;li&gt;we need to spend less time doing it&lt;/li&gt;
&lt;li&gt;we need to remember less about our codebase&lt;/li&gt;
&lt;li&gt;we have only one file when we want to improve feature X&lt;/li&gt;
&lt;li&gt;what&amp;rsquo;s more important we have one file to take a look at when searching for a bug culprit (we will be able to easily map file/class to a feature)&lt;/li&gt;
&lt;li&gt;we could unit test our code way easier and faster&lt;/li&gt;
&lt;li&gt;we decrease the complexity of the solution&lt;/li&gt;
&lt;li&gt;we decrease the time needed to introduce a new person to our project&lt;/li&gt;
&lt;li&gt;when having interfaces in place (that hides all other details under the hood), we could prepare very tiny documentation that will show connections between modules and interfaces :)&lt;/li&gt;
&lt;li&gt;your team would be spending less time on code review and debugging bugs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You need to remember about couple more things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;it&amp;rsquo;s a process, and you should not try to do the last step in the first place, you need to take time to decouple code correctly (do it only when you know the system is your pocket)&lt;/li&gt;
&lt;li&gt;remember to inform your teammates about changes - they should reuse your code to not waste time and don&amp;rsquo;t spend time on re-inventing the wheel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I know everybody loves spending time coding things. But by saving time you will be having it on doing another great thing with your app like preparing a design, discovering customer needs, helping your teammates, or just implementing another feature/fix way faster than planned.&lt;/p&gt;
&lt;p&gt;Probably there are way more benefits from using the approach I described. You can share them with me of course!&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>Improve Your Workflow with Custom TODO Labels</title>
            <link>https://karas.codes/posts/improve-your-work-by-usage-of-custom-todo-labels/</link>
            <pubDate>Tue, 14 Mar 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/improve-your-work-by-usage-of-custom-todo-labels/</guid>
            <description>


                &lt;p&gt;For sure, you have thousands of TODOs left in your project. Today I will show you how to sort them out a little.&lt;/p&gt;
&lt;h2 id=&#34;todos-and-why-we-need-them&#34;&gt;TODOs and why we need them?&lt;/h2&gt;
&lt;p&gt;Every popular IDE as e.g. IntelliJ or Eclipse allows us to create comments containing magic &lt;code&gt;TODO&lt;/code&gt; or &lt;code&gt;FIXME&lt;/code&gt; labels. All comments marked like this could be found in a special section in our IDE.&lt;/p&gt;
&lt;p&gt;Of course, they are used for marking some parts of code for the future when we want to: add some features, do some improvements, or fix some small bug that could wait for now.&lt;/p&gt;
&lt;p&gt;This small feature helps us save time when working on something important - we don&amp;rsquo;t have to open our task management tools to note it :)&lt;/p&gt;
&lt;h2 id=&#34;custom-labels&#34;&gt;Custom labels&lt;/h2&gt;
&lt;p&gt;I know those two labels could be enough, but as always we could distinguish a couple more of them. But &amp;hellip;&lt;/p&gt;
&lt;h3 id=&#34;how-we-could-create-a-custom-label&#34;&gt;How we could create a custom label?&lt;/h3&gt;
&lt;p&gt;To prepare an example I will use IntelliJ IDE but, you could apply the same patterns to other IDEs.&lt;/p&gt;
&lt;p&gt;You need to visit &lt;code&gt;Setting -&amp;gt; Editor -&amp;gt; TODO&lt;/code&gt; and just add a custom pattern e.g. &lt;code&gt;\bimprove\b.*&lt;/code&gt;.  After that, your IDE would be highlighting your custom labels as default ones.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://karas.codes/custom_todo_labels.png&#34; alt=&#34;IDE settings, Editor → TODO, with custom patterns for todo, fixme, improve and question&#34; width=&#34;980&#34; height=&#34;516&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;why-should-i-create-a-custom-todo-label&#34;&gt;Why should I create a custom TODO label?&lt;/h3&gt;
&lt;p&gt;I will give you a couple of ideas on how to use custom labels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;IMPROVE&lt;/code&gt; - To distinguish things that must be fixed or just should be done later.By using a such label we could mark some nice-to-have changes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;QUESTION&lt;/code&gt; - We could use them to give some open questions about the code before pushing it to code review. I know we could use e.g. Gitlab UI to do it. But doing it in the code will help us save time and will leave some notes way closer to the code - for sure not all team members will look at the issue you create.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OPTIMIZE&lt;/code&gt; - Special label for those who love doing performance optimizations in the code&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SECURITY&lt;/code&gt; - Found some security flaw, but don&amp;rsquo;t know how to fix it properly? You could mark that part of the code and share it with team members.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let me know what other labels you will create in your project!&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>How to Choose Better Class Names</title>
            <link>https://karas.codes/posts/how-to-pick-proper-name-of-classes/</link>
            <pubDate>Sat, 25 Feb 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/how-to-pick-proper-name-of-classes/</guid>
            <description>


                &lt;p&gt;Did you ever ask yourself how you could save time on development stage? It would be very nice when you could implement some part of code way faster than now. Especially when you develop a lot of new features or extending existing ones. In this post I will show you very simple trick to achieve it!&lt;/p&gt;
&lt;h2 id=&#34;dont-you-try-to-find-name-before-you-implement-a-class&#34;&gt;Don&amp;rsquo;t you try to find name before you implement a class&lt;/h2&gt;
&lt;p&gt;The trick applies to structural programming too, but we are mostly using OOP on our daily basis. So I will use class as an example.&lt;/p&gt;
&lt;p&gt;Imagine that we want to implement a class that would be doing some complex operations for us. Let&amp;rsquo;s say we gathered some requirements at the first step (I will give couple examples):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;we want to take a photo from a webcam by using our browser extension&lt;/li&gt;
&lt;li&gt;we want to process data in a way that output would be ready to show to our client&lt;/li&gt;
&lt;li&gt;we want to validate URL based on rule configured by our client&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In all those cases we will be able to divide code into a couple of classes. If we don&amp;rsquo;t want to use meaningless names like: controller, manager, service - then we could use that simple trick&lt;/p&gt;
&lt;h2 id=&#34;use-some-temp-name&#34;&gt;Use some temp name&lt;/h2&gt;
&lt;p&gt;Yes, that is so simple. Use &amp;lsquo;Foo&amp;rsquo; or &amp;lsquo;Bar&amp;rsquo; for your class, implement whole logic encapsulated by this class. Of course, you need to remember that single class should do single thing, without any side effects. Also, remember about implementing unit-tests. Implementing both of them and sticking with very small class that have single purpose of use will let you create a name very quickly - once you finish implementing it or even in the middle of the process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt; change the temp name to the correct one, before merging your code into the main branch.&lt;/p&gt;
&lt;p&gt;Hope that you found it useful!&lt;/p&gt;

            </description>
        </item>
        
        
        
        <item>
            <title>Understanding Common Software Development Errors</title>
            <link>https://karas.codes/posts/understanding-common-software-development-errors/</link>
            <pubDate>Wed, 18 Jan 2023 00:00:00 +0000</pubDate>
            <guid>https://karas.codes/posts/understanding-common-software-development-errors/</guid>
            <description>


                &lt;p&gt;A programmer&amp;rsquo;s primary task is to automate the business processes of a given enterprise so that it ends up with a profit for the entity. Simple, right?&lt;/p&gt;
&lt;p&gt;It is worth considering the amount of time spent fixing errors in code during daily work. Business owners invest in new functionality or modules, thus spending a significant amount of time correcting the same issues repeatedly, which may not align with the intended tasks or schedule.&lt;/p&gt;
&lt;p&gt;Each programmer will probably answer that he would build new systems, modules, and functionalities rather than maintain the old system (which is not quite sure how it works and why).&lt;/p&gt;
&lt;p&gt;Following this line of thought, the question we should answer is why bugs are introduced into software that is working on the production? What measures can we take to minimize such situations?&lt;/p&gt;
&lt;h3 id=&#34;ignorance-of-business-and-functional-requirements&#34;&gt;Ignorance of business and functional requirements&lt;/h3&gt;
&lt;p&gt;It&amp;rsquo;s fair to say that working on a project at a consulting company or a SaaS application should differ significantly. In addition to differences in working style. Identifying business requirements from conversations with the ordering party, end customers, or application owners is very similar in both cases.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s generally known that catching errors in assumptions at the requirements-gathering stage allows for the fastest and cheapest corrections. Hence the importance of properly taking the time to talk to customers/businesses to identify as many assumptions as possible.&lt;/p&gt;
&lt;p&gt;A common mistake is starting development work without gathering requirements or before completing this stage. Another mistake is to rush through development, resulting in an ill-conceived code structure. Those causes could impact development velocity in the future. In other words, single feature development time for the same application would be longer and longer. Also, the number of errors introduced could increase because of it.&lt;/p&gt;
&lt;h3 id=&#34;misunderstanding-of-business-and-functional-requirements&#34;&gt;Misunderstanding of business and functional requirements&lt;/h3&gt;
&lt;p&gt;To avoid the above problem, work as closely as possible with the business to develop a common language and build a mutual understanding of what the application is supposed to do.&lt;/p&gt;
&lt;p&gt;It is also good practice to indicate what the application will not do. That approach will help potential customers fully understand how the application would work.&lt;/p&gt;
&lt;p&gt;At the stage of gathering and specifying requirements, the development team should cooperate with the business. The more mediators in communication, the worse (unfortunately).&lt;/p&gt;
&lt;h3 id=&#34;ignoring-non-functional-requirements&#34;&gt;Ignoring non-functional requirements&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Premature optimization&lt;/strong&gt; is a well-established antipattern. We use that term as an excuse for not preparing the technical requirements. Of course, emphasis on these requirements depends on the scale of the project.&lt;/p&gt;
&lt;p&gt;For example, we could cause a negative evaluation of the project by not defining adequate response time for a module critical to the customer.&lt;/p&gt;
&lt;h3 id=&#34;insufficient-shared-knowledge-of-application-modules&#34;&gt;Insufficient shared knowledge of application modules&lt;/h3&gt;
&lt;p&gt;Nowadays, separate teams are working on a single application or system. In such a situation, teams must focus on sharing knowledge about every detail related to the developed app.&lt;/p&gt;
&lt;p&gt;The matter worsens when working on a legacy project. Working in multiple teams that do not have the same knowledge about the product and the wrong dependencies between modules can only lead to one thing.&lt;/p&gt;
&lt;h3 id=&#34;misunderstanding-of-technology&#34;&gt;Misunderstanding of technology&lt;/h3&gt;
&lt;p&gt;It is common in legacy projects to encounter the use of a particular tool that contradicts the assumptions described in the documentation.&lt;/p&gt;
&lt;p&gt;Introducing a new tool into our project connected with inadequate knowledge about that tool could lead to creating mistaken assumptions based on a couple of sentences from tool docs.&lt;/p&gt;
&lt;p&gt;Unfortunately, both cases could end badly for our project.&lt;/p&gt;
&lt;h3 id=&#34;ydd---yolo-driven-development&#34;&gt;YDD - Yolo-Driven Development&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;YDD&lt;/strong&gt; is the opposite of the approach where we test changes before deploying them into production. &amp;ldquo;Let&amp;rsquo;s release to production, and then we&amp;rsquo;ll see&amp;rdquo;. Unconsidered changes can cause a lot of damage (not only to the code):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;customers may quite often encounter an inadequately working application&lt;/li&gt;
&lt;li&gt;changes made on the spur of the moment increase the likelihood of increasing links between modules of the application&lt;/li&gt;
&lt;li&gt;such an approach to development is also very irresponsible (and so, at the end of the day, it is WE who will maintain the code)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;working-without-a-plan&#34;&gt;Working without a plan&lt;/h3&gt;
&lt;p&gt;When there are hundreds of tasks in the backlog, and we don&amp;rsquo;t quite know which task is the most important from a business or technical perspective. The manufacturing team may have trouble planning their work. Not to mention identifying major changes that can solve several problems at once.&lt;/p&gt;
&lt;h3 id=&#34;work-without-metrics&#34;&gt;Work without metrics&lt;/h3&gt;
&lt;p&gt;Working with legacy code without a proper approach to testing changes. Combined with rushing changes into production. Without proper discussion of how a solution should work. Does this tell you anything? I hope that as few people as possible have encountered this approach to software development.&lt;/p&gt;
&lt;p&gt;When the manufacturing team doesn&amp;rsquo;t have the time or doesn&amp;rsquo;t want to spend time on requirements identification and testing. There is nothing to dream about metrics that de facto save each developer&amp;rsquo;s time.&lt;/p&gt;
&lt;p&gt;Properly built metrics allow for faster detection of bugs introduced into the software. In addition, we should create metrics that would describe our application (number of requests, latencies, etc.) and the business that we have (number of customers, number of errors reports, number of feature X usages).&lt;/p&gt;
&lt;h3 id=&#34;lack-of-sense-of-responsibility&#34;&gt;Lack of sense of responsibility&lt;/h3&gt;
&lt;p&gt;In my opinion, the worst thing that can happen to a team is the approach we somehow instead of quality.&lt;/p&gt;
&lt;h3 id=&#34;making-changes-without-thinking-about-architecture-and-infrastructure&#34;&gt;Making changes without thinking about architecture and infrastructure&lt;/h3&gt;
&lt;p&gt;When modules of the application are not well encapsulated then any changes in the code may cause a lot of problems. Performance problems or introduce a bug in a module we didn&amp;rsquo;t expect.&lt;/p&gt;
&lt;p&gt;I can see from my observation that people start thinking about such things when their application is &amp;ldquo;burning&amp;rdquo;.&lt;/p&gt;
&lt;h3 id=&#34;human-error&#34;&gt;Human error&lt;/h3&gt;
&lt;p&gt;Of course, everybody could make some mistakes. But at least introduce the techniques described above: collection of requirements and introduction of tests or metrics. It will significantly reduce the effects of human error.&lt;/p&gt;
&lt;h4 id=&#34;summary&#34;&gt;Summary&lt;/h4&gt;
&lt;p&gt;Hope that list will help you spot such things in your project. That would be a good start to improving it!&lt;/p&gt;

            </description>
        </item>
        
        
    </channel>
</rss>