by joshAg · 1mo ago · 0 comments
My personal "favorite" was when the lead engineer who onboarded me half a decade prior forgot the written policy he'd put in place of "no raw js dates. use this library for everything date related instead" and sent up an MR that not only used javascript dates, but did complex operations on them (incorrectly at that, because it didn't account for timezones, daylight saving, years that had a leap day, and months that weren't 30 days).
From what I can tell, it's the exact same reason people drive faster than is prudent or use their cellphone while driving. It feels safe and good right up until it isn't and you crash. And because most places don't have anywhere close to adequate specification detail, test coverage, or review coverage, the broken bits aren't even noticed until much later.
But I hope people are gathering metrics. We had an extra meeting the other day because we're seeing an upwards trend in outages, the meeting was mainly about how it affects various departments (like customer support) and potential revenue loss (can't sell a product/service if the signup page is down for three days).
Thing is, there's no one cause for any of those - we have hundreds of engineers, dozens of applications and 3rd party integrations, millions of (potential) customers each running their own set of devices, and it's pretty much impossible to control everything.
But this goes beyond whether or not code was written by an attentive hand working under a strict set of policies or an AI that figures it out on the go, and goes up a level to things like realtime monitoring and incident responses.
The problem comes when no one is actually minding those details anymore. If those details aren't actually minded, then the work at the higher levels will be much less useful and effective, and in the worst cases won't matter at all.
But, especially as code gets flung over the wall faster and with less care, I do think they are getting to be pretty great at reviewing code for specific things that a linter can't easily catch and for looking for security, implementation, and architectural flaws before I have to look for them. A couple examples of what i mean: 'does the code use knex.raw with a template literal?', 'does the code do n+1 db lookups instead of something better?' 'do all the added/modified tests follow the test case template defined here?'