yea the bug shows up in the code, but many times the root cause of the bug is not the code, not even the design or the requirements, but the model i.e. your conceptualization of the domain
consider that you could be burning all that time on fixing that bug, when the root problem's not the bug, but a misunderstanding of the subject matter being coded to
the real bug could be in how you understand or how you look at the subject matter; could be a misaligned point of view or a missing concept that's unknown or not brought out explicitly in conversations with the subject matter experts and in turn, overlooked by devs
have you ever ?
- tolerated/created "non-domain-named" vars, methods, classes
- not asked that clarifying question in the design review; or overlooked that awkward desc in the spec
- hear one thing from the SME, see a different thing in the code and shrugged it off
it's me. i have 👋🏾
but all those things are opportunities for refactoring your understanding of the subject matter which in turn brings clearer direction for code refactorings.
and ideally less bugs. less tech debt. less maintenance costs
the misunderstanding is the bug; unclear understanding of the subject matter or one that is misaligned with that of subject matter experts is the bug
approach conversing with smes to resolve misunderstood concepts and their relationships, as you would approach pair programming to refactor some code
grab two like-minded devs, a sme, some coffee and a room; and get to brainstorming; dont work too many "model smells" at a time; give your minds time and space to process new info; always speaking in the ubiquitous language
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 ...