Open in app

Sign In

Write

Sign In

Maximiliano Contieri
Maximiliano Contieri

1.7K Followers

Home

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

15 min read

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

15 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

·3 days ago

Code Smell 216 - Fat Interface

You should not define too much behavior together — TL;DR: Split your interfaces Problems Interface Segregation Principle Violation Coupling Solutions Split the interface Context The term "Fat Interface" emphasizes that the interface is overloaded with methods, including those that may not be necessary or used by all clients. The interface violates the principle of segregating interfaces into smaller, more focused contracts.

2 min read

Code Smell 216 - Fat Interface
Code Smell 216 - Fat Interface

2 min read


Published in

Level Up Coding

·6 days ago

Code Smell 215 - Deserializing Object Vulnerability

Metaprogramming is always a problem — TL;DR: Don't allow remote code execution Problems Security Solutions Validate and sanitize input Avoid executing code. Input only data Apply sandboxing or isolation Context Deserializing objects from an untrusted source is indeed a security-sensitive operation. Suppose you have a web application that accepts serialized objects as input from user-submitted data, such as in…

2 min read

Code Smell 215 - Deserializing Object Vulnerability
Code Smell 215 - Deserializing Object Vulnerability

2 min read


Published in

Level Up Coding

·May 28

Code Smell 214 — Duplicate Parameter Names

Two arguments of the same type. Two equal names — TL;DR: Turn on Strict Checks Problems Unexpected errors Ambiguity The Least Surprise Principle violation Portability Solutions Enable strict mode Use role-naming arguments Context Most compilers forbid duplicate parameters since they are a common mistake in a large parameters list Sample Code Wrong function addNumbers(a, b, a) { console.log(a …

2 min read

Code Smell 214 — Duplicate Parameter Names
Code Smell 214 — Duplicate Parameter Names

2 min read


Published in

Level Up Coding

·May 19

Code Smell 213 — Hoisting

You can prevent undefined — TL;DR: Declare your variables and watch the scope Problems Readability Least Surprise Principle violation Variable Shadowing Solutions Be explicit on declarations Use ‘const’ declaration when possible. Declare variables at the beginning of the scope. Use strict mode Context Hoisting allows variable declarations to be moved to the top of their containing scope during…

Clean Code

2 min read

Code Smell 213 — Hoisting
Code Smell 213 — Hoisting
Clean Code

2 min read


Published in

Level Up Coding

·May 14

Code Smell 212 - Elvis Operator

Your code is not safer using this operator — TL;DR: Don't propagate nulls. Problems NULL propagation Harder to read code Hacky code Solutions Remove the nulls. If you can't remove it, deal explicitly with them. Context The Elvis operator is also known as the null-coalescing operator or the null-safe operator. It is a shorthand operator used in some programming languages to simplify…

Programming

3 min read

Code Smell 212 - Elvis Operator
Code Smell 212 - Elvis Operator
Programming

3 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
  • Jonathan Locke

    Jonathan Locke

  • ReadWrite

    ReadWrite

  • Trey Huffine

    Trey Huffine

  • Karishma Agrawal

    Karishma Agrawal

  • Jero

    Jero

See all (462)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams