<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anashev Artem on Medium]]></title>
        <description><![CDATA[Stories by Anashev Artem on Medium]]></description>
        <link>https://medium.com/@madmed677?source=rss-8a49ed801eed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*F287fYEEaM-g36_WthV6MA.jpeg</url>
            <title>Stories by Anashev Artem on Medium</title>
            <link>https://medium.com/@madmed677?source=rss-8a49ed801eed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:25:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@madmed677/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to write todos in your code]]></title>
            <link>https://medium.com/@madmed677/how-to-write-todos-in-your-code-b8aee55fdef3?source=rss-8a49ed801eed------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8aee55fdef3</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[code-review]]></category>
            <dc:creator><![CDATA[Anashev Artem]]></dc:creator>
            <pubDate>Mon, 15 Jul 2019 09:12:25 GMT</pubDate>
            <atom:updated>2019-07-15T09:12:25.388Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUvjrgENibP7aUks-OSWqQ.jpeg" /><figcaption>How to make your todos useful?</figcaption></figure><p>How often do you see “todos” in your code? I see a lot of them.<br>When you try to understand a legacy code, you read it line by line. If you found some strange logic, you would try to find some explanation to it in todos. However, you can’t in most cases.</p><p>Why does it happen?</p><p>I think we write todos so incomprehensibly. In general, the “todos” can help you and your colleagues in the future to find these cases.<br>But have you thought about how to write them?</p><p>In general cases, it looks just like this:</p><pre>/**<br> * todo: Remove next line<br> */<br>const uselessVariable = ‘useless’;</pre><p>Aaand... Does it look helpful?</p><p>I think it does not.</p><p>This “todo” is useless because it has no context.</p><ol><li>Who created it?</li><li>Why has it been written?</li><li>When can you remove it?</li></ol><p>For this “todo” to be useful, I would suggest this option.</p><pre>/**<br> * @todo: madmed677<br> *<br> * We should increase value by one because module &quot;my-module&quot;<br> *  was imperative and it tries to read variable &quot;count&quot;<br> *  and if it undefined module throws an exception<br> *<br> * The task to change this imperative module to declarative - {link}<br> */</pre><p>Yes, it looks much bigger than the previous comment. But it can help you and your colleges. Now we understand, who created it (even if somebody made changes in git), why it was created and in which task it will be fixed.</p><p>And the reason <em>“Why has it been written?”</em> is so important. If a developer could not explain “why” or give a convincing reason, you could respond to the code review immediately and prevent this todo. However, you should ask a developer to solve the problem instantly.</p><p>If you have another opinion, leave your comments, we will discuss.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8aee55fdef3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>