Re:Repeating Yourself Thrice Doesn’t Turn You into a 3x Deve...
by CuriouslyC on Monday July 31, 2023 @08:14AM
(#36941464)
If the functions are all clearly named and reasonably small-ish DSLs can be mostly self-documenting. Plus you can always ctrl click in your IDE of choice to view function source. I'm talking something like this:
f(base data) .validate() .domainAction1() .domainAction2() .log() .describe() .sendHtmlResponse()
I mean yeah, I'm a big fan of DSLs. The problem occurs when someone writes the DSL, doesn't document it and leaves. Then it becomes super, super painful to maintain and extend.
Basically I'm coming round to the conclusion that (assuming reasonably competent colleagues), the least experienced person should be able to maintain and extend the code if it's to have any hope of remaining useful over time.
And good tests, for gods sake test the crap out of anything complicated with well-chosen names so that people can read the tests and understand how the code should be used.