|
|
|
|
|
by bhuber
1606 days ago
|
|
I'm not sure I agree with the premise. Most of the time I see someone not following best practices it's because they're unaware of them and just do the simple/most obvious thing, which just so happens to be bad for not-so-obvious reasons. Or they are aware of the best practice, but decide not to follow it because of reasons x, y, and z. It's very rare, however, that I see someone do the wrong thing because someone told them it was the right thing (at least in the programming field). Perhaps this is just an artifact of my own personal experience though, all my professional experience has been at dedicated software shops with highly competent engineering teams. I realize that's not the case everywhere. Does anyone have any specific examples of worst practices explicitly being disseminated under the guise of best practices? Is this something that you tend to see happen only within organizations, or across the internet as a whole? |
|
The requirement was to ingest a CSV, transform it, and put it in a database somewhere. The solution was three microservices.
The first read the data piece by piece (unit of work) and passed it to the second via HTTP. This was slow so it was threaded.
The second provided an abstract class which was extended to facilitate string transformations. Each was accompanied by a unit test. Similarly, the result was passed along to the third service via HTTP. This was also threaded.
The third put the data into a third-party queue which wrote into a database.
It took nearly a half of a day for the process to complete. I rewrote it as an SQL script which read the CSV into the database directly, used SQL functions for the transformations and then stored its result. It took a few minutes to complete. But, this wasn't a best practice or popular, and what would the team work on?