Suffering from Primitive Obsession? Vogen has now cured nearly 4,500,000 poor souls; the inflicted, who used to cling onto their ints and strings everywhere they went and shoehorning them into every situation. Break free-do it today! github.com/SteveDunn/Vo... #primitiveobsession #dotnet #software

🚀 Atenção, devs Python! 🚀

Você já ouviu falar em *Primitive Obsession*? É aquele code smell que vira pesadelo quando usamos só *primitivos* (strings, dicts, listas) para modelar dados complexos num sistema. A boa notícia: existe uma saída poderosa e elegante! 💥

No artigo fresquinho *"Primitive Obsession no Python: Refatorando com Dataclasses para Value Objects Robustos"*, inspirado na incrível Live de Python #150 do Eduardo Mendes, você vai descobrir como as **dataclasses** podem revolucionar seu código!

✨ Imagine ter:
- Abstrações de domínio ricas, tipadas e imutáveis
- Código mais seguro e testável, sem KeyError ou lógica espalhada
- Menos boilerplate e alta legibilidade
- Validações incorporadas e comportamento encapsulado
- Facilidade para escalar e evoluir sistemas com menos bugs

Este é o caminho para sair da armadilha dos primitivos e dominar Value Objects com Python moderno! 🚀👩‍💻👨‍💻

🙌 Não perca tempo! Leia o artigo completo e transforme sua maneira de pensar software:

👉 https://bolha.blog/riverfount/primitive-obsession-no-python-refatorando-com-dataclasses-para-value-objects

#Python #Dev #Dataclasses #CleanCode #TechDebt #DDD #PrimitiveObsession #EduardoMendes #LivePython #SoftwareEngineering

Primitive Obsession no Python: Refatorando com Dataclasses para Value Objects Robustos

Baseado na Live de Python #150 do canal Eduardo Mendes no YouTube, este artigo explora de maneira prática e direta a "primitive obsession...

Riverfount
New version of Vogen with three great contributions from the community! github.com/SteveDunn/Vo... #dotnet #.net #csharp #ddd #primitiveobsession #cavey
Delighted that Vogen has exceeded 2,000,000 downloads! - that's at least 2 million cases of primitive obsession *CURED*! The latest release contains contributions from three great members of the community! github.com/SteveDunn/Vo... #dotnet #ddd #primitiveobsession #bestpractices #csharp #roslyn

Today we fixed a missing abstraction for extracting data from a tab-separated input, based on column name from the header.

We created a new class, ColumnMapper, with an underused refactoring from IntelliJ IDEA: Introduce Parameter Object.

Check it out: https://www.youtube.com/live/CzdfBOKUtw4?t=1248

We extract duplicate code to a method, introduce the Param Object, and prepare to move the method (which now has "Feature Envy") by doing Inline Method (at 40m20). We finish by doing Move Instance Method to move it to ColumnMapper.

This is one of my favorite Composite Refactorings to do!

#Refactoring #PrimitiveObsession

"Song Themes" Episode 24: Spring Boot app creation with Mike Rizzi

YouTube

Friendgineers: George Boole brought us Boolean logic. There's tremendous benefit in using it. But sometimes, it can also blind you to a deeper truth.

#friendgineers #boolean #primitiveobsession

https://friendgineers.rosenshein.org/posts/2024/02/14/

Primitive Obsession and Boolean Blindness

George Boole brought us Boolean logic. There's tremendous benefit in using it. But sometimes, it can also blind you to a deeper truth.

Think I have my next talk subject "Strings - The Post Modern Chameleons of Programming". Need a name, a database connection, a path, a password, a date? Strings can be all of these. In fact, one instance could even be all of these, all at the same time or in quick succession!

Been fighting a bug for a few days that turned out to be a post-modern use of strings. I'm not bitter. At. All. #PrimitiveObsession

Are your classes too big? Hard to understand and test? I talk about a great approach for cutting your classes down to size. Video and slides are now available!

#Refactoring #MoreTestableCode #PrimitiveObsession

https://ted.dev/articles/2023/05/30/your-classes-are-too-big-talk/

Your Classes are Too Big (Talk) | Ted M. Young

Video recording and slides from my presentation to the Seattle Crafters Group: Want your code to be easier to understand and test? Fix Primitive Obsession.

Ted M. Young

Build fails because ReportGenerator "misses a framework" Fine, let's provide it one. Should be simple: ReportGenerator exposes a SetFramework method.

Guess the type parameter it requires.

String.

#primitiveobsession