Four Types of Duplication in Source Code
We all know about DRY but time and again we can find duplication in our code. Here we talk about four types of duplication: imposed, inadvertent, impatient and interdeveloper.

-
Imposed duplication: Developer feel they have no choice - the environment seems to require duplication.
-
Inadvertent duplication: Developers don’t realize that they are duplicating information.
-
Impatient duplication: Developer get lazy and duplicate because it seems easier. Every project has time pressures - forces that can drive the best of us to take shortcuts. Need a function similar to one you’ve written? You’ll be tempted to copy the original and make a few changes, who has got a time to refactor and remove duplication? If you feel this temptation, remember the hackneyed aphorism “short cut make for long delays.” You may well save some seconds now, but at the potential loss of hours later.
-
Interdeveloper duplication: Multiple people on a team duplicate a piece of information. This is perhaps the hardest type of duplication to detect and handle that occurs between different developers on a project.
Compiled from the book “The Pragmatic Programmer” by Andrew Hunt and David Thomas. You can find detailed content in chapter 2 under subtopic “The Evils of Duplication”
Keep reading

Fix mise GitHub Rate Limit with a Token
mise makes unauthenticated GitHub API calls by default. When you hit the rate limit installing tools, a personal access token (no scopes required) fixes it permanently.

How to solve Deployment Failure-`assets:precompile`
I was trying to deploy rails 6 app on ec2 server using capistrano when precompile failure lead to whole deploymentt failure. I had to uninstall cmdtest and install yarn

How to Sort an Array of Objects in JavaScript
How to Sort an Array of Objects in JavaScript

What did you take away?
Thoughts, pushback, or a story of your own? Drop a reply below — I read every one.
Comments are powered by Disqus. By posting you agree to theirterms.