15 Terrible Advice for Web Developers

<p>Medium is full of useful articles and great advice to create robust and maintainable applications. But what If you don&#39;t like your colleagues and want to ruin their day? Then worry no more. I&rsquo;m great at giving bad advice and came up with 15 tips to cause frustration and waste everyone&#39;s time.</p> <h1>1. Abstraction Layers</h1> <p>Use as many abstraction layers as possible until:</p> <ul> <li>The code is difficult to understand and debug.</li> <li>It is difficult to make changes to the code.</li> <li>The code is slow or inefficient.</li> <li>The code is not reusable.</li> </ul> <h1>2. Always Request Changes on Pull Requests</h1> <p>You should always block a pull request during the first review to assert dominance.</p> <p>Some ideas for change requests are:</p> <ul> <li>Make a variable name longer</li> <li>Make a variable name shorter</li> <li>Rename a variable name</li> <li>Make code more&nbsp;<em>DRY</em></li> </ul> <h1>3. No Commit Messages</h1> <p><a href="https://cbea.ms/git-commit/" rel="noopener ugc nofollow" target="_blank">Good commit messages</a>&nbsp;take time to write. Instead of spending your valuable time writing something like</p> <p><code>[JIRA-1234] build: replace vue-cli with vite</code></p> <p>you can use the following command to push your code with an empty commit message</p> <p><code>git commit --allow-empty-message -m &quot;&quot; &amp;&amp; git push --force</code></p> <h1>4. Use Magic Numbers</h1> <p>Use magic numbers often to indicate that you know&nbsp;<strong><em>exactly</em></strong>&nbsp;what you are doing</p> <pre> window.scrollTo({ top: 89, left: 12, behavior: &quot;smooth&quot;, });</pre> <h1>5. Mix Return Statements</h1> <p>Never let them know your next move by mixing the return statements of a function</p> <pre> function shouldPayTax(income) { if(income.amount &lt; 20_000) { return false } if(income.amount &gt; 20_000 &amp;&amp; income.country == &#39;USA&#39;) { return true } if(income.country == &#39;Panama&#39;) { return false } if(this.totalWorkingHoursPerWeek &gt; 60) { return true } if(income.amount &gt; 20_000 &amp;&amp; income.isCelebrity == true) { return false } if(income.amount &gt; 20_000) { return true } }</pre> <h1>6. Typescript</h1> <p>If someone had the audacity to add&nbsp;<a href="https://medium.com/javarevisited/7-best-courses-to-learn-typescript-in-depth-58439e1ce729" rel="noopener">TypeScript</a>&nbsp;to the project, you can bypass type checking by using&nbsp;<code>any</code>&nbsp;everywhere.</p> <p><a href="https://fadamakis.com/15-terrible-advice-for-web-developers-e821e95f5d18">Visit Now</a></p>