sometimes the kind of refactoring that clears the way for easier extension, is not a refactoring toward this or that design pattern, but a refactoring to support a deeper conceptual understanding of a functional use case/ user scenario
"refactoring concepts into code" is an ongoing process, it doesnt happen in a day, a week or a month; but to me it's the most enjoyable part of this grind we call coding
if your domain understands "foobar" and not "foo bar",
then the code should probably have one method
foobar(), as opposed to foo() and bar();
even though the latter may be following some legit technical design move like "extract method" or something
decompose your methods, classes, aggregates, etc, not according to teh tech or design patterns primarily, but in close relation to how domain use case concepts are actually understood at the core, in the domain
so teh tech should conform to the concepts (of the domain i.e. business subject matter), not the other way around; flutter or react or spring or kubernetes or whatever tech, should all bow to whatever problem you're solving in the domain
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Domain Driven Design (DDD) made plain broke down to the bone gristle. cus i need that science to level up my code, but miss me with all the stuffy acronyms and jargon. 🧵
domain
- the actual problem
- what we're trying to solve with the code for the user
- the set of problems that the users ask the developers to solve
- the subject matter
domain driven
- problem focused
- to stay focused on the actual problem
For me, when the need for a new language, library, framework, shiny thing, etc pops up - i find that i usually take the same general steps
and the 7-bullet list i jotted down in my notes became this thread:
1. pick a language, any language. or framework, library etc.
no tech is perfect. don't sweat it the choice too much. they all have pros and cons - but do try to pick one that has good community adoption so you can get help when you run into blockers
"Always implement things when you actually need them,
never when you just foresee that you need them." - Ron Jeffries
i feel attacked 🙄
(over-abstraction is one of my guilty pleasures) 😅
like, sometimes i'll take that advice to "code to the interface" to the extreme, just cus i can, and i'll make everything an interface. what you can do with polymorphism and dependency injection is fun ...
but man is it an over-abstraction time suck when trying to just focus on "keeping it simple" KISS minimum viable product. gotta draw the line somewhere and make concrete classes and move forward ...