Maxi Contierimaximilianocontieri.com·15 hours agoCode Smell 249 - Constants as NumbersTL;DR: Use real-world constants as constants Problems Bijection Violation Debugging Premature Optimization Maintainability Type Safety Limited Extensibility Solutions Use descriptive string constants Use Enums Create A Polymorphic Hierar...DiscussCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Apr 20, 2024Code Smell 248 - Unreliable CopyTL;DR: Don't rely on external solutions without good handlers Problems Silent Modifications Least Surprise Principle violation Fail Fast Principle Violation Solutions Ensure you meet your function's postconditions Use mature languages Conte...Discuss·28 readsCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Apr 9, 2024Code Smell 246 - Expiration DateTL;DR: Model real word expiration dates with... expiration dates (I will use expiry date and expiration date interchangeably) Problems Bijection Violation Unexpected Behavior Small Objects Missing Primitive Obsession Solutions Honor the bijec...Discuss·51 readsCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Apr 3, 2024Code Smell 245 - exec() and eval()TL;DR: Don't use metaprogramming. It is not that cool Problems Security Limited Control Solutions Use direct calls Wrap the execution in a primitive and controlled command Sanitize it Context Developers employ the eval() and exec() funct...Discuss·39 readsCode Smellsclean code
Maxi Contierimaximilianocontieri.com·Mar 31, 2024Code Smell 244 - Incomplete Error informationTL;DR: Help yourself and others with correction information Problems Debugging and maintenance challenge. Fail Fast Principle violation Debugging complex situations. Solutions Add all the relevant information to solve the solution Context Whe...Discuss·31 readsCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Mar 15, 2024Code Smell 243 - Concatenated PropertiesYou join independent information TL;DR: Don't mix ortoghonal behavior Problems Maintainability Error Prone Performance Penalties Premature optimization The principle of least astonishment principle violation Bijection Violation Duplication o...Discuss·1 like·56 readsCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Feb 16, 2024Code Smell 241- Referential Transparency ViolationTL;DR: Your functions should be replaceable by the computation result. Problems Readability Principle of least astonishment violation Testability Coupling Solutions Avoid side effects and erratic behavior Context Breaking referential transpa...Discuss·61 readsCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Feb 4, 2024Code Smell 240 - Dead StoreTL;DR: Don't Assign and overwrite values Problems Readability Dead Code Inefficiency Solutions Remove the sentences that have no effect. Context The "dead store" code smell refers to a situation in programming where a variable is assigned a v...Discuss·2 likes·72 readsCode SmellsGeneral Programming
Maxi Contierimaximilianocontieri.com·Jan 28, 2024Code Smell 239 - Big Pull RequestTL;DR: Always stick to baby steps Problems Readability Code Review time and complexity Merge Conflicts Testing Challenges Solutions Break the change in atomic parts Context When pull requests become very large, they can pose several challeng...Discuss·45 readsCode SmellsGeneral Programming
Astronutsastronuts.hashnode.dev·Jan 15, 2024Introducing Astronuts: Your Ultimate Software Engineering Co-Pilot for Faster, High-Quality Code DeploymentWe are thrilled to announce the launch of Astronuts.io, a groundbreaking software engineering AI co-pilot that's set to revolutionize the way developers approach code quality and speed of deployment. Astronuts.io is not just another tool; it's your a...Discussdevelopers