Open in app

Sign in

Write

Sign in

Maximiliano Contieri
Maximiliano Contieri

1.7K Followers

Home

Lists

About

Published in

Dev Genius

·Pinned

How to Develop a Wordle Game using TDD in 25 Minutes

Developing a complete Wordle Game is very easy with TDD — Everybody is playing Wordle these days… And I love TDD. TDD Conference 2021 — All Talks First International Test Driven Development took place on July 10th.blog.devgenius.io So, let’s get moving… TL;DR: With just a few steps we can build a robust Wordle. Defining a word The minimum information amount in Wordle is a word. We can argue that letter is smaller, but we think all needed letter protocol is…

Test Driven Development

6 min read

How to Develop a Wordle Game using TDD in 25 Minutes
How to Develop a Wordle Game using TDD in 25 Minutes
Test Driven Development

6 min read


Published in

Dev Genius

·Pinned

How to Get Rid of Annoying IFs Forever

Why the first instruction we learn to program should be the last to use. Nobody uses GOTO instruction anymore and few programming languages still support it. We have matured and confirmed spaghetti code is unmaintainable and error prone. Structured Programming solved that problem years ago. We got rid of the…

If

6 min read

How to Get Rid of Annoying IFs Forever
How to Get Rid of Annoying IFs Forever
If

6 min read


Published in

Dev Genius

·Pinned

Code Smell 13 — Empty Constructors

Incomplete objects cause lots of issues. Problems Mutability Incomplete objects Concurrency inconsistencies between creation and essence setting. Setters Nude Models — Part I : Setters Ye olde Reliable Data Structures and Their Controversial (Write) Access.medium.com Solutions Pass the object’s essence on creation The evil powers of mutants To mutate is to evolve. It was proposed by Sir Charles Darwin and we use it in the software industry. But something is…codeburst.io

Code Smells

2 min read

Code Smell 13 — Empty Constructors
Code Smell 13 — Empty Constructors
Code Smells

2 min read


Published in

Dev Genius

·Pinned

How to Find the Stinky Parts of Your Code

The code smells bad. Let’s see how to change the aromas. — TL;DR: A Compilation of bad smells in code. In this series, we will see several symptoms and situations that make us doubt the quality of our developments. We will present possible solutions. Most of these smells are just clues of something that might be wrong. They are not rigid rules. Code Smells Code Smell 01 — Anemic Models Your objects are a bunch of public attributes without behavior.medium.com

Code Smells

16 min read

How to Find the Stinky parts of your Code
How to Find the Stinky parts of your Code
Code Smells

16 min read


Published in

Dev Genius

·Pinned

Code Smell 01 — Anemic Models

Your objects are a bunch of public attributes without behavior. — Protocol is empty (with setters/getters). If we ask a domain expert to describe an entity he/she would hardly tell it is ‘a bunch of attributes’. Problems No Encapsulation. No mapping to real world entities. Duplicate Code Coupling Solutions 1) Find Responsibilities. 2) Protect your attributes. 3) Hide implementations. 4) Delegate Examples

Code Smells

1 min read

Code Smell 01 — Anemic Models
Code Smell 01 — Anemic Models
Code Smells

1 min read


Published in

Level Up Coding

·6 days ago

Code Smell 232 - Reusable Code

Don't Repeat Yourself. Don't Repeat Yourself — TL;DR: You can find missing abstractions by looking at repeated code Problems DRY principle violation Maintainability Ripple Effect Solutions Create the repeated code Introduce an abstraction Replace the references and point to the new abstraction Remove the duplication Context Repeated code is a symptom of missing abstractions. This is natural in the learning…

2 min read

Code Smell 232 - Reusable Code
Code Smell 232 - Reusable Code

2 min read


Published in

Level Up Coding

·Nov 20

Refactoring 012 - Reify Associative Arrays

Converting your anemic dictionaries is easy — TL;DR: Convert your key/value into full behavioral objects Problems Addressed Associative arrays Fail Fast principle violation Bijection Fault Hard to find method references Related Code Smells Code Smell 27 — Associative Arrays [Key, values], magic, fast, malleable and error prune.blog.devgenius.io Context You have anemic associative arrays that hold unstructured data and you want to have richer objects with stricter controls (possibly including type checking in static typed languages)

3 min read

Refactoring 012 - Reify Associative Arrays
Refactoring 012 - Reify Associative Arrays

3 min read


Published in

Level Up Coding

·Nov 5

Code Smell 230 - Schrödinger Code

Your code is dead and alive — TL;DR: Look carefully for race conditions Problems Principle of Least Surprise violation Race Conditions Solutions Avoid race conditions Avoid global variables Use proper synchronization Context Schrödinger code is code that can be in two different states at the same time, but the state of the code is not determined until it is executed. …

2 min read

Code Smell 230 - Schrödinger Code
Code Smell 230 - Schrödinger Code

2 min read


Published in

Level Up Coding

·Oct 29

Code Smell 229 - Red Tape

You overcomplicate your code — TL;DR: Avoid Accidental complexity and bureaucracy Problems Accidental Complexity Readability Bijection Fault Solutions Asign the responsibilities to real-world objects using the MAPPER Context A "red tape" code smell could relate to unnecessary complexity, bureaucracy, or excessive configuration that makes the codebase harder to understand or maintain. Sample Code Wrong

2 min read

Code Smell 229 - Red Tape
Code Smell 229 - Red Tape

2 min read


Published in

Level Up Coding

·Oct 22

Code Smell 228 - Multiple Classes per File

More than one class is a mess — TL;DR: Follow the separation of concerns principle and file organization Problems Code Organization Coupling Autoloading problems Debugging Version control and merge conflicts Solutions Declare a single class per file Use name scoping Context In languages that declare classes using a file system, having one class per file is generally considered a best practice. …

2 min read

Code Smell 228 - Multiple Classes per File
Code Smell 228 - Multiple Classes per File

2 min read

Maximiliano Contieri

Maximiliano Contieri

1.7K Followers

I’m a senior software engineer specialized in declarative designs. S.O.L.I.D. and agile methodologies fan. Maximilianocontieri.com

Following
  • Sasha Mathews

    Sasha Mathews

  • Citizen Upgrade

    Citizen Upgrade

  • Josef Cruz

    Josef Cruz

  • John Au-Yeung

    John Au-Yeung

  • Vincent Tsen

    Vincent Tsen

See all (461)

Help

Status

About

Careers

Blog

Privacy

Terms

Text to speech

Teams