Freewrite - Data sanitization

in Freewriters2 months ago

image.png

Y'know what I love? Getting data from other teams that is actually immediately useful.

Y'know what I didn't get today? Data from another team that was actually immediately useful.

I do a lot of ops work in my day job - something comes in requiring a quick turn-around, and I am typically one of the guys who picks it up. I'm not on a big project or a deadline, so snagging these issues as they come in is usually a nice fun way to bounce around the codebase and just make sure that I'm constantly keeping my skills up across the entire project. I am, after all, only a Software Development Engineer 1 - which means I'm kind of always learning new stuff.

With all that preface done, we get to the meat and potatoes of my day today. I snagged an ops issue which should have taken like... an hour or two. Simple little thing to update a field, dump a comment into some tracking, etc. As part of this I had a list of items to update, and thinking that the team providing it would have double-checked that it was full of unique values, I went ahead and just imported the list of IDs, did the update and... oh, look at that, duplicates!

I generally never trust anything at face value thanks to years of QA prior to my current position... but today I let my usual 'trust but verify' instinct take a back seat and it burned me. Not once, no, that would be too easy. It burned me twice.

Once I finally cleaned up the mess from the first import (thankfully before it ever reached a production environment), I then noticed the second issue: some of the items I was asked to update had already been done a week prior, but the team giving me the list had left them included.

So, I'm right back to cleanup mode, doing a second round of sanity checks and removing things from the script. Fun fun fun.

A simple update that should have taken me all of an hour or two... ended up consuming my whole dang day because I kept having to clean up the data.

Now, I could have avoided all of this if I just had been skeptical of the sender's data, and had done the usual paranoid double-and-triple checking that I'm wont to do... but I didn't and that's on me. At the end of the day, I have only myself to blame for my wasted day.

BUT THAT SAID, man, it'd be nice if the folks sending me ops issues to update data would send correct requests. Still, it's on me as the developer and former QA to not trust anyone on any team, and I guess the universe decided on this glorious Monday to reinforce that for me.

Message received universe. Message received.