3 ms·
I don't mean to advocate against YAGNI or writing simple code. I can't authoritatively to your specific example, but what I am suggesting is that you default yo
by swanson 11y ago
I don't mean to advocate against YAGNI or writing simple code. I can't authoritatively to your specific example, but what I am suggesting is that you default your assumptions to a view that this developer had some reason for the choices that were made.
Maybe this client was notorious for asking for CSV export but really meant CSV, XLS, XLSX, PDF? Maybe the build and release infrastructure is so slow that any change - no matter how small - needs 3 days to be built, tested, and deployed? Maybe the complexity makes sense in other areas of the system and they decided to adopt patterns across the codebase to aid in teaching/onboarding new developers?
Just to be clear, maybe you will find that the reasons are totally invalid and this is gold-plated-abstracted-to-hell code. (It sounds like you probably will)
But if you assume from the start that everything is an over-complicated pile of junk and you could rewrite it in a day, I think you will find yourself jaded and unhappy with your environment.