33

C=consultant
M=Me
D=my Dumb boss

M: so how are you guys planning to implement the block all accounts feature?
C: oh it should be easy! We will just loop over every account and lock it!
M: what about implementing a flag that just blocks anyone from accessing the site till further notice?
C: what? I’m sure it’ll work. Just need a list of all accounts, we don’t need anything fancy!
M: what happens when we want to revert back to the pre-block state?
C: oh, so we will just unblock everybody
M: even people who were previously blocked for good reasons?
C: i guess so, unless you think otherwise
M: we r….
D: listen! We just need to be able to block all accounts, who cares about this details! So long as we block all accounts! We need this nuclear option in case something bad happens…
M: but what about when that bad thing passes and…
D: when it passes it passes who cares!

Arghhh so much rage here… like first at the stupid engineering design of looping over all of the accounts instead of using a simple flag. Like 1 http call (from one microservice to another) is a lot better than O(n)… not to mention, we won’t have to deal with failures and retries.

And second for my boss being a dumbass… ok you deal with being to afraid to unblock people after we used this “genius nuclear option”!

Comments
  • 8
    I second the flag decision. Depending on how big your code base is, and how It's structured it could be a few minutes work up to a day at most probably
  • 4
    @Hazarth second that. Sounds like Mr. C doesn't want to admit your solution is better and more failsafe
  • 1
    Flags only if implemented correctly....

    Though I don't quite grok the reasoning to block everyone.

    Sounds... Weird to me. Like maintenance?!

    Either way, you're right.

    Never mutilate a values reason / context for the sake of simplicity.

    Hence - if the value is locked, and is meant to be set per user, don't overwrite it for the simplicity of locking everything.

    It's a denormalization of a database and all specifications which were written before, why violate them?
  • 1
    @IntrusionCM honestly the rationale to block everyone is also a half hazard requirement put by my boss… they didn’t even give it a second of thought
  • 2
    @jkommeren as a consultant, he should as it's his job to recommend the best practices and he came up with an intern solution lol
  • 1
    Nuclear option: turn off the web services? 🤷‍♂️

    No code changes required.
Add Comment