The lost art of the tactical, permissive skive


It's important, every now and again, to treat yourself to a bit of naughtiness. A cheeky little Friday PM skive when you've already finished your todo list and some of next week's, and you've let everyone know you're stepping out. Beautiful, compliant, defiance.

Truant is, coincidentally, one of my favourite words. You've got two vowels there doing the work of two vowels and a consonant. Changing the direction of the word. Two vowels working overtime in a word that literally means to shirk your responsibilities. The only word I can think of where a vowel works harder is "continuum", and I can't offer an ironic contrivance there. I'm just one man.

This week has been mentally draining, and how. I normally don't like to toot my own horn but I played well this week. I've had a lot on my mind. I've been really worried about a thing. I'm still worried really. I don't want to talk about it, and fortunately I get to choose not to here. But I can still passively do it without coming off attention seeking. This is my blog. That's what it's for. I've been doing this a really long time.

I've had a task on my list I really didn't want to do. The worst types of integration are: Inventory, and Payment (except Stripe. Love you, Stripe). Inventory integrations always require your client to understand, and care, and commit to the notion that, SKUs are God. People don't care about that sort of thing. But a shop and an inventory system don't really share any data except does this product exist, and do we have any, so it's not like you can add products to your shop and push to inventory or vice versa. You have to create them on both sides with all their specific data, and join them with that SKU.

Then your boy here is going to come along and pull products from your inventory system, look up the SKU, find nothing because we were blasé about copying them, and reiterate to the wind. Then orders end up in the inventory system missing products because we didn't match SKUs, and guess who gets to figure out why it didn't push all products? (reader; my wife married him)

Anyway so for some reason I've been putting that task off. But it's done now. Each order takes at least ten (10) API calls. We have to check for a customer, and create them if they didn't exist (for some reason this Inventory System can't do that internally. And names are unique. Because there is only one John Smith in the world. Why are you like this?). We then take that customer and create a Sale. But first we check if the sale exists, natch. Then there's a Sale Order which contains all the details of products on this order. Got to check if there's one of those already, then create it. Now it's time to talk about invoicing. Is there an invoice for all these products? No? Better add one. And finally any payments received. Let's create those if they don't already exist. And we're done.

And maybe you're not a programmer, or you don't have two decades' experience pushing data to some other person's system. Well any one of the above steps can fail for a cornucopia of reasons. And if it does, we want to be able to retry it, but only do the stuff that failed. That's what we call "idempotent" - if you run the same thing 1 time, or 400 times, the end result is the same. If there's a network error, or we run out of RAM, or the database crashes, we need to retry and not bug out purely because this is a retry and a bunch of stuff we're trying to do was already done. I think this is what people call "coding defensively". If you're exhausted by now, imagine how I feel. Not only did I write this; I live it.

So anyway, for some reason after all this (not my only task this week. Not even close), I am feeling pretty drained so I played hookey (after making sure Dan knew and didn't object. I'm not a monster) and went to Lewes with my ladies and we walked around and failed to find something fun to eat, and sat on a wall and ate Quorn picnic eggs from Tesco, and got money spiders on our legs, and came home, and went to our fish and chip shop and got various fried (literally every time I type this word I type "friend" then delete and correct) goods and started to eat them, then got attacked by seagulls and went for a walk and guarded our food like Jason Bourne, then it was too hot so we came home and that about brings us up-to-date. I'm listening to Trentemøller and writing in redundant detail about why my week has been a challenge (and I literally skipped 75% of it, but that 75% is at least as fun as it is draining, and the client said I look "sharp". I don't think anyone's ever said that to me).

I hope you've had a nice week.

2 G5 A5407
2 G5 A5414
2 G5 A5422
2 G5 A5424
2 G5 A5429
I made pizza Taking the moral high ground and salting the low ground