<?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: Milos Zivkovic</title>
    <description>The latest articles on DEV Community by Milos Zivkovic (@zivce).</description>
    <link>https://dev.to/zivce</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%2F31293%2F3e506667-362d-42f7-93b0-233d887b98f4.jpeg</url>
      <title>DEV Community: Milos Zivkovic</title>
      <link>https://dev.to/zivce</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zivce"/>
    <language>en</language>
    <item>
      <title>How to Become Better Software Estimator?</title>
      <dc:creator>Milos Zivkovic</dc:creator>
      <pubDate>Tue, 30 Mar 2021 09:19:08 +0000</pubDate>
      <link>https://dev.to/zivce/how-to-become-better-software-estimator-2c0</link>
      <guid>https://dev.to/zivce/how-to-become-better-software-estimator-2c0</guid>
      <description>&lt;p&gt;Estimating is difficult. Estimating software development is even harder.&lt;/p&gt;

&lt;p&gt;We all miss estimation targets. We miss at estimation, but also when delivering on time.&lt;/p&gt;

&lt;p&gt;Here’s what you can do to improve the software estimates.&lt;/p&gt;

&lt;h1&gt;
  
  
  Look at previous tickets
&lt;/h1&gt;

&lt;p&gt;Track time. Track time on previous tickets. Use this as a reference point.&lt;/p&gt;

&lt;p&gt;Make a map of tickets. Map of story points to tickets. Here’s an example. Refer to this when making estimates.&lt;/p&gt;

&lt;h1&gt;
  
  
  Take time to process tickets
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Estimates given at the coffee machine will (like the coffee) come back to haunt you. — The Pragmatic Programmer: From Journeyman to Master 1st Edition&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Estimate with different precision. Days are not enough? Give estimates in weeks and months.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Give rough estimates. Missing the mark then doesn’t look so bad with rough estimates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l4rWABWC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/666/0%2AbFEzOKTtr-Blh3Wr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l4rWABWC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/666/0%2AbFEzOKTtr-Blh3Wr.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.agilenutshell.com/cone_of_uncertainty"&gt;http://www.agilenutshell.com/cone_of_uncertainty&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Determine the scope. Understand the domain first. Know exactly what needs to be done. Do proper research.&lt;/p&gt;

&lt;p&gt;Break the task down. Tasks exceeding one sprint can be decomposed. Build estimates on decomposed tasks.&lt;/p&gt;

&lt;p&gt;Add contingency points, to cover the errors and unknowns. You’re not sure about an estimate?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Create a spike.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Investigate. Build proof of concept, if possible. Estimate after PoC.&lt;/p&gt;

&lt;p&gt;More people working on tasks causes more friction. More communication, synchronization, and work are needed.&lt;/p&gt;

&lt;p&gt;You never have two same tasks. If they were the same, nothing to work on. Tasks differ. Differ in the personnel, requirements, and priority.&lt;/p&gt;

&lt;p&gt;Key points to include when estimating:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Days off&lt;/li&gt;
&lt;li&gt;Communication between teams&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;li&gt;Design updates&lt;/li&gt;
&lt;li&gt;Changelog updates&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Rely on team knowledge
&lt;/h1&gt;

&lt;p&gt;Use planning poker. Consensus-based estimation. Everyone gives high-level estimates, and everyone should agree.&lt;/p&gt;

&lt;p&gt;Fibonacci sequence is used for estimations. There’s no way of doubling the estimates. There’s no way of cheating the system.&lt;/p&gt;

&lt;p&gt;After voting, estimators explain their votes. The highest and lowest estimates go first.&lt;/p&gt;

&lt;p&gt;Planning poker improves team coordination. The discussion takes place, and everyone participates. With this technique, the focus comes on code quality.&lt;/p&gt;

&lt;p&gt;This technique is lightweight. There’s no anonymity, but interaction improves. The only overhead is meetings, refinements, and grooming sessions.&lt;/p&gt;

&lt;p&gt;Scrum poker combines knowledge. Combines knowledge both from juniors and seniors. Whole team knowledge is there when estimation takes place.&lt;/p&gt;

&lt;h1&gt;
  
  
  What to avoid?
&lt;/h1&gt;

&lt;p&gt;Don’t estimate under pressure. There can be pressure from peers, businesses, or other factors.&lt;/p&gt;

&lt;p&gt;You’ll never give a good estimate under pressure.&lt;/p&gt;

&lt;p&gt;You’re either going to give a low estimate, to satisfy the pressure. You won’t go for the higher one, since you’ll feel embarrassed.&lt;/p&gt;

&lt;p&gt;Don’t look into tickets with dependencies. Estimate tickets from the bottom up. Contingency always fails to compensate for the unknowns.&lt;/p&gt;

&lt;p&gt;Don’t estimate ambiguous tasks.&lt;/p&gt;

&lt;p&gt;Don’t give estimates before talking with a domain expert. This can be senior in your team, or business analyst.&lt;/p&gt;

&lt;p&gt;Don’t estimate every ticket. There’s no need to estimate bugs. Sometimes they take too little, sometimes a lot. Effort spent on estimating bugs is useless.&lt;/p&gt;

&lt;p&gt;Don’t estimate non-essential tasks. Estimate critical ones.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Estimates are just a way to communicate — Deadlines And Estimates In Startups&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don’t be certain about estimation. There’s no way to forecast software estimations. Don’t give percentages of confidence when estimating.&lt;/p&gt;

&lt;p&gt;Sometimes you don’t meet the estimate. Inform your scrum master about it. Inform on time. Not before the sprint ends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CpXAqF7W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://miro.medium.com/max/700/0%2A9FXt6sJ3q8c65uMz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CpXAqF7W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://miro.medium.com/max/700/0%2A9FXt6sJ3q8c65uMz.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;What can you do to improve estimation?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take note of previous work&lt;/li&gt;
&lt;li&gt;Operate on team knowledge to tackle estimation&lt;/li&gt;
&lt;li&gt;Use contingency to make better estimates&lt;/li&gt;
&lt;li&gt;Prefer face-to-face conversations when estimating&lt;/li&gt;
&lt;li&gt;Over-estimate&lt;/li&gt;
&lt;li&gt;Don’t under-estimate, leave your ego at home&lt;/li&gt;
&lt;li&gt;Don’t be certain, it’s an estimate&lt;/li&gt;
&lt;li&gt;Avoid estimating non-granular tasks&lt;/li&gt;
&lt;li&gt;Avoid estimating tickets with dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;&lt;a href="http://www-public.imtbs-tsp.eu/~gibson/Teaching/Teaching-ReadingMaterial/BoehmAbtsChulani00.pdf"&gt;Software development cost estimation approaches&lt;/a&gt; — A survey Barry Boehm, Chris Abts, and Sunita Chulani&lt;/p&gt;

&lt;p&gt;&lt;a href="https://softwareengineering.stackexchange.com/questions/648/how-to-respond-when-you-are-asked-for-an-estimate"&gt;How to respond when you are asked for an estimate?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rclayton.silvrback.com/software-estimation-is-a-losing-game"&gt;Richard Clayton - Software Estimation is a Losing Game&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://marcgg.com/blog/2015/08/27/deadlines-estimates-software-startup/"&gt;Deadlines And Estimates In Startups&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href="https://www.pexels.com/@fauxels?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;fauxels&lt;/a&gt; from &lt;a href="https://www.pexels.com/photo/photo-of-three-people-smiling-while-having-a-meeting-3184338/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

</description>
      <category>estimation</category>
      <category>software</category>
      <category>programming</category>
      <category>development</category>
    </item>
    <item>
      <title>Features Java 16 Brings to Developers</title>
      <dc:creator>Milos Zivkovic</dc:creator>
      <pubDate>Sun, 28 Mar 2021 20:33:02 +0000</pubDate>
      <link>https://dev.to/zivce/features-java-16-brings-to-developers-2ge2</link>
      <guid>https://dev.to/zivce/features-java-16-brings-to-developers-2ge2</guid>
      <description>&lt;p&gt;&lt;a href="https://zivce.medium.com"&gt;Živković Miloš&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn about pattern matching, sealed classes, and more new Java features.
&lt;/h2&gt;

&lt;p&gt;Java needs no introduction. It’s a programming language with many years under its belt. Recent updates brought several new features to the language: Sealed classes, pattern matching, and additional safety measures.&lt;/p&gt;

&lt;h1&gt;
  
  
  Sealed classes
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://openjdk.java.net/jeps/397"&gt;JEP-397&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The motivation behind &lt;code&gt;sealed&lt;/code&gt; is to restrict concrete classes. Restricting concrete classes, will control implementation, and provide support for pattern matching.&lt;/p&gt;

&lt;p&gt;// keyword here is sealed which enables permits&lt;br&gt;&lt;br&gt;
// permits lists classes that can extend sealed class public abstract sealed class Shape&lt;br&gt;&lt;br&gt;
permits Circle, Rectangle, Square { ... }&lt;/p&gt;

&lt;p&gt;With basic interfacing, you don’t get reflectiveness. You don’t know about a finite set of concrete implementations.&lt;/p&gt;

&lt;p&gt;With sealed classes, you get this reflective behavior. You know about the &lt;em&gt;kind&lt;/em&gt; of types, you can have in your domain.&lt;/p&gt;

&lt;p&gt;Enums tell about a finite set of values. Sealed classes tell about a finite amount of kind of values.&lt;/p&gt;

&lt;p&gt;sealed interface Celestial&lt;br&gt;&lt;br&gt;
permits Planet, Star, Comet { ... }  &lt;/p&gt;

&lt;p&gt;final class Planet implements Celestial { ... }&lt;br&gt;&lt;br&gt;
final class Star   implements Celestial { ... }&lt;br&gt;&lt;br&gt;
final class Comet  implements Celestial { ... }&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This hierarchy does not, however, reflect the important domain knowledge that there are only three kinds of celestial objects in our model. In these situations, restricting the set of subclasses or subinterfaces can streamline the modeling. — JEP-397&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Warnings for value-based classes
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://openjdk.java.net/jeps/390"&gt;JEP-390&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Primitive wrapper classes are value-based classes. Examples of value-based classes are:&lt;code&gt;Byte&lt;/code&gt;,&lt;code&gt;Short&lt;/code&gt;,&lt;code&gt;Integer&lt;/code&gt;,&lt;code&gt;Long&lt;/code&gt;,&lt;code&gt;Float&lt;/code&gt;,&lt;code&gt;Double&lt;/code&gt;,&lt;code&gt;Boolean&lt;/code&gt;, and&lt;code&gt;Character&lt;/code&gt;). More on value-based classes can be found &lt;a href="https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lang/doc-files/ValueBased.html"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As they are immutable objects, it is pointless to use constructors.&lt;/p&gt;

&lt;p&gt;To prevent misuse, new annotation is around. This will put warnings each time, the compiler finds a value-based class constructor.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@jdk.internal.ValueBased&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Encapsulation of JDK internals removed by default
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://openjdk.java.net/jeps/396"&gt;JEP-396&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is to encourage users to use standard Java API. Still, you could choose relaxed encapsulation. If needed, but try to avoid it.&lt;/p&gt;

&lt;p&gt;You’ll need to add props to the launcher of JVM. Below you can see the possible args, you can pass in. More on the arguments can be found &lt;a href="https://openjdk.java.net/jeps/396#Description"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;--illegal-access= permit | deny | debug | warn&lt;/p&gt;

&lt;p&gt;Although this is embraced in JDK 16, you can face problems with earlier &lt;a href="https://stackoverflow.com/questions/53790182/get-the-current-value-of-illegal-access-setting-in-java"&gt;versions&lt;/a&gt;. This change was proposed after the JDK 9 &lt;a href="https://jaxenter.com/jdk-9-replace-permit-illegal-access-134180.html"&gt;was released&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Even today, with e.g. Java &amp;gt;=9, certain build tools print out &lt;a href="https://issues.apache.org/jira/browse/GROOVY-8339"&gt;“reflective access”-warnings&lt;/a&gt;when building Java projects, which simply “feels not ready”, even though the builds are fine. — &lt;a href="https://www.marcobehler.com/guides/a-guide-to-java-versions-and-features"&gt;source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Pattern matching
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://openjdk.java.net/jeps/394"&gt;JEP-394&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pattern matching exists a long time. You can find it for example in Elixir.&lt;/p&gt;

&lt;p&gt;In Java, there’s a lot of&lt;code&gt;instanceof&lt;/code&gt;conditions. Motivation to reduce operations leads to pattern matching.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Pattern matching allows the desired “shape” of an object to be expressed concisely (the_pattern_), and for various statements and expressions to test that “shape” against their input (the_matching_). — JEP-394&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;// a lot of boiler plate codeif (obj instanceof String) {&lt;br&gt;&lt;br&gt;
String s = (String) obj;    // grr...&lt;br&gt;&lt;br&gt;
...&lt;br&gt;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;With pattern matching, we could get this code. Reduces boilerplate, does the casting, and declares the variable.&lt;/p&gt;

&lt;p&gt;if (obj instanceof String s) {&lt;br&gt;&lt;br&gt;
// Let pattern matching do the work!&lt;br&gt;&lt;br&gt;
...&lt;br&gt;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Pattern variable is in the scope where it matches. Thus code like this is valid.&lt;/p&gt;

&lt;p&gt;if (a instanceof Point p) {&lt;br&gt;&lt;br&gt;
// p is in scope&lt;br&gt;&lt;br&gt;
...&lt;br&gt;&lt;br&gt;
}&lt;br&gt;&lt;br&gt;
// p not in scope here&lt;br&gt;&lt;br&gt;
if (b instanceof Point p) {     // Sure!&lt;br&gt;&lt;br&gt;
...&lt;br&gt;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;You never have to worry about names now. Reusing existing names is possible if scopes are different.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What does pattern matching improve?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Reduces explicit casts. Which gives more readable code, in equality methods.&lt;/p&gt;

&lt;p&gt;return (o instanceof CaseInsensitiveString) &amp;amp;&amp;amp;&lt;br&gt;&lt;br&gt;
((CaseInsensitiveString) o).s.equalsIgnoreCase(s);// to thisreturn (o instanceof CaseInsensitiveString cis) &amp;amp;&amp;amp;&lt;br&gt;&lt;br&gt;
cis.s.equalsIgnoreCase(s);&lt;/p&gt;

&lt;p&gt;Look at the next example. If this condition&lt;code&gt;o instanceof String s&lt;/code&gt;, evaluates to true,&lt;code&gt;s&lt;/code&gt;gets assigned a value. On the contrary,&lt;code&gt;s&lt;/code&gt;has no value if pattern matching fails.&lt;/p&gt;

&lt;p&gt;Thus this code can complete normally. You don’t have &lt;a href="https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-14.22"&gt;an unreachable code&lt;/a&gt;.&lt;code&gt;s&lt;/code&gt;gets value assigned if conditional passes, if not&lt;code&gt;s&lt;/code&gt;is safely discarded.&lt;/p&gt;

&lt;p&gt;public void onlyForStrings(Object o) throws MyException {&lt;br&gt;&lt;br&gt;
if (!(o instanceof String s))&lt;br&gt;&lt;br&gt;
throw new MyException();// s has value at this point&lt;br&gt;&lt;br&gt;
System.out.println(s);&lt;br&gt;&lt;br&gt;
...&lt;br&gt;&lt;br&gt;
}&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Java is evolving. Causes a lot of breaking changes. Causes a lot of &lt;a href="https://medium.com/dev-genius/8-problems-every-java-developer-knows-4f65339e0c00"&gt;problems&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H4AIzG0G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/700/0%2AMzIcNjgSR9uVS3yb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H4AIzG0G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/700/0%2AMzIcNjgSR9uVS3yb.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://miro.medium.com/max/700/0*MzIcNjgSR9uVS3yb.png"&gt;Constant Java updates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even so, we do need to adjust. Use new features so we create better software.&lt;/p&gt;

&lt;p&gt;These are few features, I would take away. You can read more, in the section below.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://openjdk.java.net/jeps/8213076"&gt;JEP draft: Pattern Matching for the switch (Preview)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.infoworld.com/article/3569150/jdk-16-the-new-features-in-java-16.html"&gt;JDK 16: The new features in Java 16&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href="https://www.pexels.com/@divinetechygirl?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Christina Morillo&lt;/a&gt;from&lt;a href="https://www.pexels.com/photo/person-using-macbook-pro-on-person-s-lap-1181298/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>java16</category>
      <category>java8</category>
    </item>
    <item>
      <title>3 Code Metrics Every Developer Should Know</title>
      <dc:creator>Milos Zivkovic</dc:creator>
      <pubDate>Sun, 28 Mar 2021 16:44:51 +0000</pubDate>
      <link>https://dev.to/zivce/3-code-metrics-every-developer-should-know-4abo</link>
      <guid>https://dev.to/zivce/3-code-metrics-every-developer-should-know-4abo</guid>
      <description>&lt;h2&gt;
  
  
  Here are 3 high-quality code metrics.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://zivce.medium.com/"&gt;Živković Miloš&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need code metrics, to pinpoint smelly code. We all know bad code when we see one. Even so, sometimes it slips through.&lt;/p&gt;

&lt;p&gt;Bad code resides in big codebases where developers come and go.&lt;/p&gt;

&lt;p&gt;The leaving developer doesn’t care, does a bad job, and leaves. You join the team and encounter a code mess.&lt;/p&gt;

&lt;p&gt;You need valuable code metrics to combat bad code.&lt;/p&gt;

&lt;p&gt;Even when you see team members writing bad code, you need to point it out. It will, sooner or later, end up on your plate.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. What is code churning?
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Churn is a measure of how often a file changes. Files that change more have higher churn. — Sandi Metz&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Complex code with most changes lives in the top right corner. This is your&lt;code&gt;Util&lt;/code&gt;class. This is your&lt;code&gt;Manager&lt;/code&gt;class. This is where your core logic resides, so no one wants to touch it.&lt;/p&gt;

&lt;p&gt;Either way, you make changes, causing bugs and tech debt along the way.&lt;/p&gt;

&lt;p&gt;Michael Feathers &lt;a href="https://www.stickyminds.com/article/getting-empirical-about-refactoring"&gt;talks about this code metric&lt;/a&gt;. He even developed &lt;a href="http://www.campwoodsw.com/sourcemonitor.html"&gt;software&lt;/a&gt;to find these churned files. These are the best candidates for refactoring.&lt;/p&gt;

&lt;p&gt;When can we use this metric? Use it in your technical grooming sessions. Pinpoint which most churned class, evaluate tech debt, and start refactoring.&lt;/p&gt;

&lt;p&gt;Most software quality measuring is static. Sonarqube, lines of code, and other code quality metrics. Code churn metric adds another dimension with version control.&lt;/p&gt;

&lt;p&gt;Code churning is done in big classes. We get pulled into it, as Sandi says, it has its own gravitational force.&lt;/p&gt;

&lt;p&gt;Why add a small helper class, when you add logic in a 500 line class? We are all guilty of this behavior. The need to iterate faster leads to more code churn.&lt;/p&gt;

&lt;p&gt;More on code churning implementation in the article below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://betterprogramming.pub/why-i-made-my-own-code-quality-tool-c44b40ceaafd"&gt;Why I Made My Own Code Quality Tool, Attractor&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. What is the ABC metric?
&lt;/h1&gt;

&lt;p&gt;The first mention of this metric was in &lt;a href="https://www.softwarerenovation.com/ABCMetric.pdf"&gt;an article&lt;/a&gt;by Jerry Fitzpatrick. This is an extension of cyclomatic complexity.&lt;/p&gt;

&lt;p&gt;Not only Conditions make up this metric, but also Assignments and Branches. Hence the name Assignments, Branches, Conditions metric.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ABC is a measure of complexity. — Sandi Metz&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ABC metric tells more about the code complexity. If the score is high, your code is complex.&lt;/p&gt;

&lt;p&gt;For the sake of this article, I’ll post the formula. For those math nerds, reading this here is the formula. There are few tools that calculate this metric, and you can find them in the wilderness.&lt;/p&gt;

&lt;p&gt;|ABC| = sqrt((A*A)+(B*B)+(C*C)) - calculating ABC score&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I am a Java developer. How can I count the As, Bs, and Cs in Java?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--epSiLfsR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/419/1%2AhXSpK6RCiqm8bOCAA59F7A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--epSiLfsR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/419/1%2AhXSpK6RCiqm8bOCAA59F7A.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.win.tue.nl/~wstomv/edu/2ip30/references/ABCmetric.pdf"&gt;https://www.win.tue.nl/~wstomv/edu/2ip30/references/ABCmetric.pdf&lt;/a&gt;—&lt;a href="https://www.win.tue.nl/~wstomv/edu/2ip30/references/ABCmetric.pdf"&gt;Pg. 8 in PDF&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why should we care about this metric? What are the benefits of it?&lt;/p&gt;

&lt;p&gt;Humans make mistakes, metrics don’t._You can’t manage what you can’t measure._Use metrics to improve. Metrics won’t lie.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. What is cyclomatic complexity
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;An algorithm that counts the number of unique execution paths through a body of source code. — &lt;a href="http://www.literateprogramming.com/mccabe.pdf"&gt;Thomas J. McCabe&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You’ve seen code with a lot of if-else blocks. Example of bad cyclomatic complexity, or high score of cyclomatic complexity.&lt;/p&gt;

&lt;p&gt;Writing OO programs leads to reduced cyclomatic complexity. Extract conditional logic into separate classes. Then inject it into your class.&lt;/p&gt;

&lt;p&gt;I wrote more on how to reduce this metric &lt;a href="https://levelup.gitconnected.com/3-object-oriented-tips-sandi-metz-uses-for-better-software-design-1c5393c7698d"&gt;here&lt;/a&gt;. Adhering to OO principles vastly reduces this metric.&lt;/p&gt;

&lt;p&gt;When you face code with a cyclomatic complexity score of 10, you should refactor.&lt;/p&gt;

&lt;p&gt;McCabe states developers who knew structured programming, wrote optimal code. Even before he invented the metric. I wrote about developing structured programs &lt;a href="https://levelup.gitconnected.com/how-to-develop-better-program-structure-3a57f48bf971"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Code with high cyclomatic complexity is hard to test. By definition, tests should cover all execution paths. Think of code with a cyclomatic complexity of 50, you’d need 50 test cases.&lt;/p&gt;

&lt;p&gt;Sandi Metz points the reverse way of using this metric. Use it to know if you’ve written enough tests. For example, you have a code with a complexity score of 40 but only 20 tests. You need more tests to cover all paths.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Code metrics are used to navigate us through the project. They tell us where the stinky code part is living. Where we need to clean up.&lt;/p&gt;

&lt;p&gt;No one says you need them. For your hobby project, local gym, or MVP they might not be of benefit.&lt;/p&gt;

&lt;p&gt;Things get interesting if the project succeeds. Codebase grows bigger, and then they are essential for the life of your project.&lt;/p&gt;

&lt;p&gt;I use metrics, at least the cyclomatic complexity, to break up my code. This leads to testable code and reasonable code chunks.&lt;/p&gt;

&lt;p&gt;You should take away at least one metric, and implement it today.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://sandimetz.com/99bottles-sample-php"&gt;99 Bottles Sample PHP - Sandi Metz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.stickyminds.com/article/getting-empirical-about-refactoring"&gt;Getting Empirical about Refactoring&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sandimetz.com/blog/2017/9/13/breaking-up-the-behemoth"&gt;Breaking Up the Behemoth - Sandi Metz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dzone.com/articles/code-churn-a-magical-metric-for-software-quality"&gt;Code Churn — A Magical Metric for Software Quality — DZone Performance&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://www.pexels.com/@thisisengineering?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;ThisIsEngineering&lt;/a&gt;from&lt;a href="https://www.pexels.com/photo/female-engineer-with-equipment-3862631/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

</description>
      <category>refactoring</category>
    </item>
    <item>
      <title>How to Have a Better Stack Overflow Experience</title>
      <dc:creator>Milos Zivkovic</dc:creator>
      <pubDate>Sun, 28 Mar 2021 08:29:03 +0000</pubDate>
      <link>https://dev.to/zivce/how-to-have-a-better-stack-overflow-experience-3k3k</link>
      <guid>https://dev.to/zivce/how-to-have-a-better-stack-overflow-experience-3k3k</guid>
      <description>&lt;h2&gt;
  
  
  3. Look at the comments first
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://medium.com/geekculture/how-to-have-a-better-stack-overflow-experience-3683d892cbec"&gt;Original on Živković Miloš&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Developers search Stack Overflow daily. In multiple tabs, of course.&lt;/p&gt;

&lt;p&gt;When we encounter related answers, we get hyped. Click the relevant links to find out more. The link is dead. Time wasted.&lt;/p&gt;

&lt;p&gt;We try answer’s code snippet. Only to find out it is deprecated, or non-working.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What can we do to prevent these situations?&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Lookout for obsolete answers
&lt;/h1&gt;

&lt;p&gt;I recently did an upgrade of Hybris and stumbled into an issue. Started looking at our closed source, answers.sap.com. Found myself looking into obsolete documentation and obsolete answer.&lt;/p&gt;

&lt;p&gt;The problem of this kind reproduces on StackOverflow. Looking into ever-changing frameworks for answers is hard.&lt;/p&gt;

&lt;p&gt;Look at comments, comments describe the answer better.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;75% of comments, can reveal if the answer is obsolete².&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most obsolete answers are around NodeJS, AJAX, Android, and ObjectiveC². I would argue a lot of answers, for new frameworks are obsolete.&lt;/p&gt;

&lt;p&gt;Look if the answer applies to your environment. “Works for Angular 6”, and you’re face problems in higher versions.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. What can you ask on StackOverflow?
&lt;/h1&gt;

&lt;p&gt;Most of the questions live in a few categories³.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-working code&lt;/li&gt;
&lt;li&gt;Unknown implementation&lt;/li&gt;
&lt;li&gt;How to implement algorithm (not related to the domain)&lt;/li&gt;
&lt;li&gt;Suggestions for new technology&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t ask domain-specific questions. You will rarely get an answer. Nobody will go in-depth for nothing.&lt;/p&gt;

&lt;p&gt;Use Q&amp;amp;A sites, to find answers for task-specific issues.&lt;/p&gt;

&lt;p&gt;You have problems &lt;a href="https://stackoverflow.com/questions/156503/how-do-you-assert-that-a-certain-exception-is-thrown-in-junit-4-tests"&gt;asserting exceptions in the JUnit test&lt;/a&gt;. You’ll get a valid answer since the question is task-specific.&lt;/p&gt;

&lt;p&gt;Ask about the core issues, issue with JDK, what is supported in the new version of NodeJS. These &lt;a href="https://stackoverflow.com/questions/4382178/android-sdk-installation-doesnt-find-jdk"&gt;environmental questions&lt;/a&gt;often get valuable answers.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Look at the comments first
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;75.6% of tagged comments are informative¹.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most users write comments in &lt;a href="https://stackoverflow.com/questions/37578876/how-to-feed-cifar10-trained-model-with-my-own-image-and-get-label-as-output/37579847#comment72132287_37579847"&gt;addition&lt;/a&gt;. I’ve recently added my way of solving the issue, as an addition.&lt;/p&gt;

&lt;p&gt;We like confirmation comments. You see a lot of them.&lt;em&gt;“It works”&lt;/em&gt;, or_“working for me on x.x version”_. You could use those as a confirmation of a possible fix.&lt;/p&gt;

&lt;p&gt;There’s the other way, with rejecting comments. This doesn’t work or doesn’t suit the question well. You can use those to avoid the answer.&lt;/p&gt;

&lt;p&gt;You could see comments in the form of &lt;a href="https://stackoverflow.com/questions/38309165/how-to-consume-a-asp-net-core-webapi-in-a-c-sharp-uwp-application/38327653#comment65851467_38327653"&gt;updates&lt;/a&gt;. The solution changes because of new software versions. You shouldn’t miss those. They make or break the actual answer.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;What should you take away from this article?&lt;/p&gt;

&lt;p&gt;Look at obsolete answers. Read more comments.&lt;/p&gt;

&lt;p&gt;Learn what you can ask, and then ask. Don’t ask domain-specific questions. Ask in a more generic way if possible.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;[1] Zhang, Haoxiang &amp;amp; Wang, Shaowei &amp;amp; Chen, Tse-Hsun Peter &amp;amp; Hassan, Ahmed E.. (2019). Reading Answers on Stack Overflow: Not Enough!. IEEE Transactions on Software Engineering. PP. 1–1. 10.1109/TSE.2019.2954319.&lt;/p&gt;

&lt;p&gt;[2] Zhang, Haoxiang. (2020). On the Maintenance of Crowdsourced Knowledge on Stack Overflow.&lt;/p&gt;

&lt;p&gt;[3] M. Allamanis and C. Sutton, “Why, when, and what: Analyzing Stack Overflow questions by topic, type, and code,” 2013 10th Working Conference on Mining Software Repositories (MSR), San Francisco, CA, USA, 2013, pp. 53–56, doi: 10.1109/MSR.2013.6624004.&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://www.pexels.com/@wildlittlethingsphoto?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Helena Lopes&lt;/a&gt;from&lt;a href="https://www.pexels.com/photo/photograph-of-men-having-conversation-seating-on-chair-1015568/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How Good Developers Fix Vulnerable Apps?</title>
      <dc:creator>Milos Zivkovic</dc:creator>
      <pubDate>Sun, 28 Mar 2021 08:15:38 +0000</pubDate>
      <link>https://dev.to/zivce/how-good-developers-fix-vulnerable-apps-1o53</link>
      <guid>https://dev.to/zivce/how-good-developers-fix-vulnerable-apps-1o53</guid>
      <description>&lt;h2&gt;
  
  
  How to separate insecure from critical logic?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://medium.com/m/signin?actionUrl=https%3A%2F%2Fmedium.com%2F_%2Fsubscribe%2Fuser%2F3ee57b082bb&amp;amp;operation=register&amp;amp;redirect=https%3A%2F%2Flevelup.gitconnected.com%2Fhow-good-developers-fix-insecure-apps-44372b6eac07&amp;amp;source=post_page-3ee57b082bb----44372b6eac07---------------------follow_byline-----------"&gt;Follow me on Medium&lt;/a&gt;&lt;br&gt;
&lt;a href="https://levelup.gitconnected.com/how-good-developers-fix-insecure-apps-44372b6eac07"&gt;Original article&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Where does business and UI logic live?
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;These are the business rules, validations, and calculations that operate on the data as it is brought into an information system or displayed by it. — Martin Fowler&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your services are in the business layer. Business rules that you apply to data, and create conclusions on the data.&lt;/p&gt;

&lt;p&gt;Your controllers are in the UI layer, responsible for UI, pages, and simple logic around them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uKjWm-le--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/559/0%2A4RZOMzo1nu-49GsU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uKjWm-le--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/559/0%2A4RZOMzo1nu-49GsU.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dzone.com/articles/layered-architecture-is-good"&gt;Layered Architecture&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Why is the business layer critical?
&lt;/h1&gt;

&lt;p&gt;Let’s explain in layman’s terms.&lt;a href="https://stackoverflow.com/users/2187273/laurent-s"&gt;Laurent S.&lt;/a&gt;has a great explanation for this topic. I’ll try to deliver his words, with my own opinion attached.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TwShoeqQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/700/1%2ASlF9FL95J407dN5M2cYf3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TwShoeqQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/700/1%2ASlF9FL95J407dN5M2cYf3g.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://undraw.co/search"&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s look at the truck loading process. There are two workers.&lt;/p&gt;

&lt;p&gt;One loads the truck, the worker, one is supervising, the supervisor. Worker represents presentational logic. Supervisor — business rules.&lt;/p&gt;

&lt;p&gt;The supervisor cares about the truck weight.&lt;em&gt;How much the truck can carry?&lt;/em&gt;— business rule.&lt;/p&gt;

&lt;p&gt;The worker puts the boxes in the truck. The worker decides_where to put the box_— presentation logic.&lt;/p&gt;

&lt;p&gt;When you don’t have a supervisor, you need to teach the worker the rules. Let’s say it is a simple rule, 1 tone is the weight limit.&lt;/p&gt;

&lt;p&gt;Your business expands, you hire more workers (mobile, desktop, other devices). You teach them this rule.&lt;/p&gt;

&lt;p&gt;New rules come. Now you need to adhere to the laws of the country. Laws change too often.&lt;/p&gt;

&lt;p&gt;You have two options here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hire lawyers to fill the truck.&lt;/li&gt;
&lt;li&gt;Workers call the lawyer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s say you pick lawyers to fill your truck. They know the laws and can figure out the weight limit.&lt;/p&gt;

&lt;p&gt;In software terms, you put more logic in your presentational layer.&lt;/p&gt;

&lt;p&gt;The other option is more beneficial. Workers call the lawyer, get an answer if they continue loading or stop.&lt;/p&gt;

&lt;p&gt;In software terms, add business rules to the business layer, which UI can call for information.&lt;/p&gt;

&lt;h1&gt;
  
  
  What‘s wrong to do in the UI?
&lt;/h1&gt;

&lt;p&gt;Don’t deceive your customers. Look at this article below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/dev-genius/are-14-people-currently-looking-at-this-product-e7fe8412f16b"&gt;## Blatant lies revealed in the source code for an online shop### Are 14 people really looking at this product?medium.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t lie about active customers. Any developer will see through this lie.&lt;/p&gt;

&lt;p&gt;Solve this on the backend. Look at active sessions, and extra info to identify the product. A product which the customer is looking at.&lt;/p&gt;

&lt;p&gt;Query the backend for data. Calculate active customers, and respond to the UI layer.&lt;/p&gt;

&lt;p&gt;Don’t do your business logic on the frontend. Don’t calculate promotions on the frontend, for example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://javascript.plainenglish.io/this-website-accidentally-left-promo-codes-in-their-public-source-code-176c52fbfdc3"&gt;## This Website Accidentally Left Promo Codes in Their Source Code### Finding interesting things by inspecting websitesjavascript.plainenglish.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Act on the data on the back-end. Hide sensitive info from the front-end.&lt;/p&gt;

&lt;p&gt;Keep your promo rules in the backend. Promotions are conditions and actions. You do need some rule engine to decide if the promotion is valid.&lt;/p&gt;

&lt;p&gt;After the decision is made, apply promotion, and return the page. In a headless approach, you call the promo API to get the information.&lt;/p&gt;

&lt;p&gt;Seems logical, yet we have bad examples.&lt;/p&gt;

&lt;h1&gt;
  
  
  What’s appropriate in the UI layer?
&lt;/h1&gt;

&lt;p&gt;Access the backend logic. Send promo codes. Get back the response. Or embed in the page applied promotion.&lt;/p&gt;

&lt;p&gt;Call the backend, get relevant active users to count, and present it on the UI. The backend should calculate this count. Not jQuery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pxwMQyw1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93p184cn9a82lffrq314.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pxwMQyw1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93p184cn9a82lffrq314.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don’t do this —&lt;a href="https://medium.com/dev-genius/are-14-people-currently-looking-at-this-product-e7fe8412f16b"&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;These are few examples of how to combat unwanted behavior.&lt;/p&gt;

&lt;p&gt;Do your critical rules on the backend. Check promotions, develop algorithms, on the backend. Less critical ones can go on the frontend. Develop conditional styling in this layer.&lt;/p&gt;

&lt;p&gt;With this, you can rest assured, your app is protected. Protected from unwanted behavior.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://martinfowler.com/articles/enterprisePatterns.html"&gt;Enterprise Patterns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of this topic was derived from this&lt;a href="https://softwareengineering.stackexchange.com/questions/423680/is-it-really-possible-to-decouple-the-ui-from-the-business-logic"&gt;question&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://www.pexels.com/@gabby-k?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Gabby K&lt;/a&gt;from&lt;a href="https://www.pexels.com/photo/concentrated-diverse-colleagues-brainstorming-together-in-office-6238174/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What Kills Developer’s Willpower?</title>
      <dc:creator>Milos Zivkovic</dc:creator>
      <pubDate>Sat, 27 Mar 2021 22:22:39 +0000</pubDate>
      <link>https://dev.to/zivce/what-kills-developer-s-willpower-5a9</link>
      <guid>https://dev.to/zivce/what-kills-developer-s-willpower-5a9</guid>
      <description>&lt;h2&gt;
  
  
  Best ways to kill the software engineer willpower
&lt;/h2&gt;

&lt;p&gt;Developers are under constant fire. Bugs, deadlines, and a lot of abstractions. Really easy to lose the willpower to code.&lt;/p&gt;

&lt;p&gt;Why developers don’t like coding? Paychecks are good. You sit all day. You don’t do any physical labor.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What aggravates developers the most?&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Meaningless coding jobs
&lt;/h1&gt;

&lt;p&gt;For any software engineer, this is by far, the best way to lose interest. Lose interest in coding. You become a drag-n-drop developer.&lt;/p&gt;

&lt;p&gt;Drop-in a plugin, add a few adjustments, job well done. It is easy money, but no valuable progress.&lt;/p&gt;

&lt;p&gt;Freelance developers can’t pick work. They work on adult sites, scams, and Ponzi schemes.&lt;/p&gt;

&lt;p&gt;Imagine your friends asking about work. You would feel upset about this, and leave programming for good.&lt;/p&gt;

&lt;h1&gt;
  
  
  Micromanagement
&lt;/h1&gt;

&lt;p&gt;Ask developers every day for status reports. Even better, ask them every hour.&lt;/p&gt;

&lt;p&gt;Push them to finish that feature. Ask them constantly about the progress.&lt;/p&gt;

&lt;p&gt;Change scope. Change it mid-sprint. To agitate on the developer’s pain.&lt;/p&gt;

&lt;h1&gt;
  
  
  Impossible schedule
&lt;/h1&gt;

&lt;p&gt;Notify them about the critical bug on friday. Expect, the fix in few hours.&lt;/p&gt;

&lt;p&gt;Don’t think about their well-being. Ask them to deliver. Deliver instantly.&lt;/p&gt;

&lt;h1&gt;
  
  
  Don’t provide the best tools
&lt;/h1&gt;

&lt;p&gt;Blame everything on them. Build failed? It’s your fault. Not that we don’t have CI in place. Your fault.&lt;/p&gt;

&lt;p&gt;Work with legacy systems. Then question why developers are not happy. The answer presents itself.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dysfunctional team composition
&lt;/h1&gt;

&lt;p&gt;Testers don’t match the developers. You’re pulling your hair to explain basic features. You’re drained from all that explaining.&lt;/p&gt;

&lt;p&gt;Even after you explain. Testers don’t test properly. Bugs occur. You lose your motivation to work.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tech debt
&lt;/h1&gt;

&lt;p&gt;Code is locked down. No changes. It works. Don’t touch it.&lt;/p&gt;

&lt;p&gt;And tech debt takes its toll. Developers get to a breaking point.&lt;/p&gt;

&lt;p&gt;The point at which one can’t add code. Changes on feature X break feature Y, or even worse problems occur.&lt;/p&gt;

&lt;h1&gt;
  
  
  Unclear software requirements
&lt;/h1&gt;

&lt;p&gt;Business giving requirements directly to developers. Never works well. Without a good business analyst, it is impossible to do work.&lt;/p&gt;

&lt;p&gt;You’re constantly bombarded with dumb requests.&lt;em&gt;“Margins are bad”&lt;/em&gt;,_“why is this not brown?”._While performance issues are causing more and more customers to click away.&lt;/p&gt;

&lt;h1&gt;
  
  
  Disruption of flow
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--STw1mLLu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/97l40pmxzn3ihahc7fet.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--STw1mLLu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/97l40pmxzn3ihahc7fet.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://undraw.co/search"&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Constant meetings. You drop from one to join another one. Talks about mundane things.&lt;/p&gt;

&lt;p&gt;Disrupting your code flow. Directly impacting your will to code.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Times are hard. Your mental health is important.&lt;/p&gt;

&lt;p&gt;Leave bad businesses. New opportunities do come up. Don’t stay and feel upset, leave and find a better workplace.&lt;/p&gt;

&lt;p&gt;Photo by&lt;a href="https://www.pexels.com/@olly?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Andrea Piacquadio&lt;/a&gt;from&lt;a href="https://www.pexels.com/photo/photo-of-man-holding-black-eyeglasses-3760137/?utm_content=attributionCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=pexels"&gt;Pexels&lt;/a&gt;&lt;/p&gt;

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