I'm currently in the process of porting api code from .net 3.2 soap where the code is a mixture of string based SQL queries and stored procedures to a .net core 3.1 webapi mvc + ef.
Let me tell you... readability and type saftey are a boons. Not a curse.
Things still get convoluted but boy the errors that can sneak into a complex sql statement are painful to debug.
As always the pendulum in this "article/rant" is swinging in the other direction ("everything was better in the past"). Also it's fricking (almost) 7 years old. That's a lifetime in software development.
> [7 years] is a lifetime in software development.
If we were talking about something like Kubernetes best practices, I'd definitely agree with this point. In this case, though, I don't see what substantially changed about ORMs or SQL in the last 7 years.
The two are not mutually exclusive. Dapper provides types safety cleanly and imo is more readable than ef. Ef is heavy, requires trading to understand and is a giant pain if you need to implement performant sql.
I believe that the current trend to decouple everything is one way to make something a maintenance nightmare. Using reflection or micro services to tie everything back together. Data shouldn't flow between components without some black magic fuckery ever or you could have hard dependencies that can't be decoupled easily and split into more testable functions and seperate files.
For good measure do it in TDD. That just creates the cherry on top for maintainability in high pressure scenarios where features have to be generated quickly ... and possibly not by the same dev doing previous work and is used to this high powered mode of existence.
Whatever happend to finding balance between coupling and cohesion?
I don't understand why we celebrate that. Shouldn't it be the other way around? I thought there was a consensus that loc are a bad metric at the best of times.
Edit: It's commits, not lines of code. Now I feel dumb.
Very hard. I tried and failed for the good part of the last 15 years despite mounting evidence (and resurfacing burried one). Dr. Lustig has some good talks online that were revelatory for me at the time of "my transition".
It's kind of with everything else... people are addicted (I certainly still am, after decades of sugar abuse). Then there's a whole culture around that addiction and our natural craving for easy calories (fuck evolution, really).
As with all of those issues (religion, ideology, conspiracy theories) you need to "nudge" people in the right direction so they can "discover" the issues themselves. Facts don't help nearly as much as one might hope and a lot of it is correlation obfuscated by wishful thinking and genetic variability ("but my cousin Joe always drinks a coke a day and still isn't fat!").
Ever tried to convice a smoker of non-smoking? An anti-vaxxer of his narccisistic ignorance? It's always the same pattern.
stop it with the feminisation of every damn sector of life already.