Tomek SkupińskifortheCodexyzthecode.hashnode.net·Jun 14, 2022Featured10 Best Practices for Refactoring CodeWhat is refactoring? Refactoring is the process of improving the design of existing code without changing its functionality. As software developers, we are constantly faced with the need to improve and optimize our code. Whether it's for performance,...189 likes·18.4K readsProgramming Blogs
Tiger Abroditigerabrodi.hashnode.net·Jun 5, 2021FeaturedLessons and takeaways on RefactoringI finished reading the book "Refactoring: Improving the Design of Existing Code" by Martin Fowler and thought of sharing some of that which I've learned 💙 First, I want to say, this is one of the books I actually classify as a "must-read", it even ...167 likes·1.3K readsGeneral Programming
Chris Bongersdaily-dev-tips.hashnode.net·Jan 14, 2021FeaturedRefactoring old codeAs a developer, you write code (duh), but this code might be outdated in one, three, five years. I think it's our responsibility to maintain this code if the budget allows it. In this case, the code has been written by my colleague pre ES6 times. I'm...120 likes·3.7K readsJavaScript
Zied MELLITIzied-melliti.hashnode.net·Apr 25, 2023Coding Style At Scale: Tackling Inconsistency In Your CodeMaintaining a consistent coding style is important for any software development project, as it makes the codebase easier to read, understand and maintain. In this article, we will explore some useful ways to ensure that your codebase follows a consis...5 likes·55 readsclean code
Maxi Contieri⭐⭐⭐mcsee.hashnode.net·Apr 23, 2023Refactoring 011 - Replace Comments with TestsTL;DR: Take your comment, compact it, and name your functions. Now test it and remove the comments. Problems Addressed Maintainability Readability Related Code Smells https://maximilianocontieri.com/code-smell-183-obsolete-comments https://maxim...1 like·84 readsRefactoringsProgramming Blogs
Maxi Contieri⭐⭐⭐mcsee.hashnode.net·Apr 19, 2023Code Smell 208 - Null IslandTL;DR: Don't use null for real places Problems Coupling Unexpected Results Solutions Model the unknown location with polymorphism Context Null Island is a fictional place, which is located at the coordinates 0°N 0°E, at the intersection of the...64 readsCode SmellsGeneral Programming
Maxi Contieri⭐⭐⭐mcsee.hashnode.net·Apr 11, 2023Code Smell 206 - Long TernariesTL;DR: Don't use ternaries for code execution. You should read them as a math formula. Problems Difficult to read Low Reuse Low Testability Solutions Extract the method guards Refactorings https://maximilianocontieri.com/refactoring-010-extra...11 likes·88 readsCode SmellsGeneral Programming
Maxi Contieri⭐⭐⭐mcsee.hashnode.net·Apr 8, 2023Code Smell 205 - Code in DestructorsTL;DR: Don't use destructors. And don't write functional code there. Problems Coupling Unexpected results Memory leaks Solutions Don't use destructors. Follow the Rule of Zero Let the Garbage Collector work for you Context A class destruc...11 likes·48 readsCode SmellsGeneral Programming
Geni Jahogenijaho.hashnode.net·Apr 8, 2023Doing stricter checks in PHPA nice refactoring I've learned recently is to utilize types in conditionals. For years I’ve been doing if (!empty($posts)), but Rector, a tool to automatically refactor code, changed that to if ($posts === []). The main advantage of using $posts ===...725 readsPHP
Ahmed Nadarahmednadar.hashnode.net·Apr 3, 2023🧹 Tidying Up Your Rails Code: The Art of Refactoring, Marie Kondo Styleoriginally posted on my blog You know that feeling when you're in the mood to crack on some code and do a 'brain dump' of ideas and code it? I'm sure everyone does, and it's perfectly fine. But sometimes, we forget about the initial brain dump and ca...1 like·595 readsrubyonrails
Dominik Szymańskicodesmash.hashnode.net·Apr 2, 2023Why Refactoring Your Codebase Is Like Flossing Your Teeth (And Why You Should Be Doing It More Often)As a team leader with over 10 years of experience in the field, I can tell you that the importance of continuous refactoring of a codebase cannot be overstated. I like to think of code refactoring as akin to flossing your teeth - sure, you could skip...leadership
Shai Almogcodenameone.hashnode.net·Mar 28, 2023Boldness in RefactoringThe old engineering adage: “don’t touch it, it works”. Is terrible. Don’t listen to it. It might be OK at a small scale but as time goes by the bit rot spreads through your code and servers polluting everything. Large swaths of your system become “no...26 likes·105 readsarchitecture
Dukeson Ehigboria O.sampulcodemine.hashnode.net·Mar 27, 2023RSA Factoring (RSA Data Security and Cryptographic Algorithm)RSA (Rivest–Shamir–Adleman) is a Public-Key Cryptosystem/Cryptography algorithm that is widely used for secure data transmission. The name RSA is an acronym from the surnames of the 3 inventors of this wonderful data security algorithm: (Ron Rivest, ...1 like·78 readsRSA