when you first look at the model, it's a fluffy brown pillow
through the process of modeling you find out it's a hibernating grizzly
this is the importance of modeling i.e. constant refactoring of the comprehension of the domain via knowledge crunching #madquestionasking
you save yourself from building a solution based on the understanding of a pillow, when what the customer really needed was ... whatever you safely handle hibernating bears with?
a good understanding of what youre supposed to code for i.e. the model
1) captures core concepts of the subject matter
2) discards the irrelevant fluff
we achieve it thru asking a lot of questions, having many convos with subject matter experts
why? to produce better code
so if a business rule is called out by the SMEs, then it needs to be called out in the code; not as a few lines or a block within a block of another first class language mechanism, but within its own dedicated mechanism i.e. a method or class
concepts, words, terms, phrases that are called out by the business need to be coded in the relevant class and *called out* by using variables/methods/classes of the same names, words, terms, phrases
sometimes even a block of logic that is simple to understand, is better expressed in the code when factored out into a separate method with a name that expresses the intent of the logic in terms of the domain
e.g.
return a + b; // good
------------------------
int addition(int a, int b) {
return a + b;
}
return addition(a, b); // better
the goal is to bring out the soul of the code
look for the the meaning; the names and terms of concepts and ideas that keep recurring in conversations among the users and SMEs, and make sure that they are expressed in variables, methods, classes, aggregates, patterns, etc
what? you aint know code had soul? 🙃🤖🙏🏾🧞
just make small doable refactorings to the model, design, and or code each iteration
key words small doable
bit by bit 😋; dad-jokey pun intended
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
