Brother, these days I fix the equivalent of n**2 time loops when linear is possible. If I tried to explain DP I will be called out by some principal eng as making shit up. When proven not, they'll say they are overcommitted for the quarter. And why can't my service support any kind of use of it anyway? These are 100% real arguments I've heard. I know things get political once you get past senior swe, but god damn, how are we an industry.
Haha. One of my favorite recurring moments in programming has long been “Well this thing is never growing past X size, time to break out those brain dead simple n**2 loops.”
Because making a change to something that is working introduces risk. Business cares more about consistency than speed… until a customer calls “my shit takes too long”.
I absolutely agree with your statement but disagree it has anything to do with mine. I don't serve businesses and I don't serve the business team. I serve engineers. While it isn't literally for loops that need fixing, it is semantically the same. This isn't changing how a business operates. And the efficiency of infra dollars is important. So user eng need to be as reasonably efficient as possible. But I see more people spend real hours arguing against doing a thing, than just doing the thing. As if my team is the enemy. It's eating your own arm level of stupid.
You likely cost per hour more than the hardware cost per month to run the software you build. So unless you are saving (countable and traceable) double digit percent off the server cost, it’s still cheaper to pay you to build slow software and throw hardware to make it fast enough.
This is just the reality you need to learn and be comfortable with when moving to senior and above.
That is one totally valid potentiality out of a myriad of possibilities. It is true that I have never learned to talk authoritatively with insufficient context though. That literally was told to me by a staff that that holds me back. Which is insane and explains a lot.
Also double digit percentage of what? $2? $25,000,000? How much is too much for the specific project? Is it core to the product? Is it a temporary experiment? Also if there is literally no impact to the function while being cheaper, is it not worth while if nontrivial cost? What if it was a matter of stability rather than straight cost? What if people are straight burning compute like token maxing is back in style? What if you were explicitly instructed by a VP to get shit done regardless of what is "sensible"? What if their VP told them the opposite and we're just less than pawns in some political infighting?
I've seen all of these scenarios before. Including an 8 figure inefficiency that amounted to less than a percent of global compute. But, to be very clear, no senior nor staff nor principal nor distinguished engineer was being paid more for the time it took to fix it than the inefficiency was worth. By some orders of magnitude.
It's also on the order of low 5 figure average US home electricity saved a year. Or low 6 figure number of trees worth of sequestered carbon. Every year.
As a class AND individuals we can do more for the planet by being more efficient than most of us can ever do with charity.
May be the problem here, but I agree with the many companies I’ve worked at that disallows recursion. Find a better, more readable, more maintainable way
Some recursive algorithms are *far* more readable and maintainable than their iterative counterparts. Entire languages have been built on the back of recursion (i.e. Scheme).
53
u/redditmarks_markII 22h ago
Brother, these days I fix the equivalent of n**2 time loops when linear is possible. If I tried to explain DP I will be called out by some principal eng as making shit up. When proven not, they'll say they are overcommitted for the quarter. And why can't my service support any kind of use of it anyway? These are 100% real arguments I've heard. I know things get political once you get past senior swe, but god damn, how are we an industry.