• Bob Bobbins (unregistered)

    Would that be replacing “== 27” with “in (27, 31)”?

  • 516052 (unregistered)

    It's times like these that you need to start looking for a new job.

  • boss nass (unregistered)

    yeah - push it off to the business in the middle of a divestiture...let me know how that sell goes over...

    #MOC

  • TruePony (unregistered)

    Should have just added the database field anyways and defaulted it to false. Then additional factories could be handled via a single update query, and the field would be safe from tampering by users

  • Burner (unregistered)

    The boss's HPC said it would be the best way, so now they'll do it the way it should have been the first time. And, the way they just did it will have to be changed to the 'new' way.

  • Sole Purpose Of Visit (unregistered)

    Actually I'd have just implemented it as a list rather than a single factory. But that's just me being paranoid.

  • ThatGuy (unregistered)

    These are the stories I love because I can relate to them so well.

  • Industrial Automation Engineer (unregistered)

    Yes, let's add another wheel to the R. Goldberg machine

  • 516052 (unregistered) in reply to Industrial Automation Engineer

    I see you have discovered the "maintenance" side of our business.

  • Mr Bits (unregistered)

    Harlan knows how to make himself indispensable.

  • Jay (unregistered)

    We're missing how this alt-process was implemented, but my guess is that it was just adding a condition on the factoryID and a condition for the "stop" dates. For a few one-off cases, you could just search for the factoryID of the first sold factory and modifiy the condition and then do the same for the "stop" date conditions. Unless they're creating a new path for each new sold factory, the update process would be a little tedious but not monumental, but that depends on the size of the code-base.

    My first thought when he mentioned re-coding everything to add a new field is that they are using "Select *" queries to populate their objects or their objects are not strictly typed but bound to the table structure behind them. Otherwise, you could add the field to the tables behind the scenes and create objects to access the new fields only at the points you need it at

  • Naomi (unregistered)

    They probably did and got shot down. Sometimes someone just gets an idea in their head - it must be done this way! - and comes up with rationalizations after the fact.

    Actually I'd have just implemented it as a list rather than a single factory. But that's just me being paranoid.

    In at least Python and Javascript, [27] is a singleton list containing 27.

  • I dunno LOL ¯\(°_o)/¯ (unregistered)

    No matter what you do, the Right Way to do it is to only have "27" in one place in all the code. Also you should not expect only one factory to be closed, so none of that "THE_CLOSED_FACTORY=27" crap either. Then run everything through a function like "bool IsFactoryClosed() { return factory==27; }", and not only do you only have one place to change, you can actually read what the fuck the code is trying to do.

  • ooOOooGa (unregistered) in reply to Bob Bobbins

    Nah, just go into the database and change the primary key of the newly closed factory to 27.

  • Scott (unregistered)

    Reminds me of the IPCs (Inexplicably paid consultants) at my last job. Magic numbers everywhere, couldn't design their way out of a wet paper bag, massive incompetence, the usual.

  • (nodebb)

    It doesn't seem like a WTF to me. Harlan is thinking "hmm, the company is clearly downsizing. What's a way I can make sure my job survives?"

  • Loren Pechtel (unregistered) in reply to I dunno LOL ¯\(°_o)/¯

    |No matter what you do, the Right Way to do it is to only have "27" in one place in all the |code. Also you should not expect only one factory to be closed, so none of that |"THE_CLOSED_FACTORY=27" crap either. Then run everything through a function like |"bool IsFactoryClosed() { return factory==27; }", and not only do you only have one place |to change, you can actually read what the fuck the code is trying to do.

    This. Why don't we have a like button?

  • (nodebb)

    From the article, it sounds like each factory will have different "closed" states. One indicating that new claims aren't allowed, and one indicating it is completely closed (viewable content only for queries on what claims there were, who worked there, etc.), and of course "not sold". So just an "IsFactoryClosed() method probably isn't enough.

  • Abigail (unregistered) in reply to Auction_God

    From the article, it sounds like each factory will have different "closed" states. One indicating that new claims aren't allowed, and one indicating it is completely closed (viewable content only for queries on what claims there were, who worked there, etc.), and of course "not sold". So just an "IsFactoryClosed() method probably isn't enough.

    So you make a single "FactoryClosedStatus()" returning the appropriate closed status.

  • Uh.... what?? (unregistered) in reply to Abigail

    Why is everyone calling it "factory closed"? It's "factory sold."

  • Zygo (unregistered)

    I'm impressed that this company somehow managed to sell two factories with identical contract terms (or at least close enough that a big sprawling corporate IS system can handle them with identical code). Like they'd at least need different closing dates if the employees had all the same unions and the factories were under the same regulatory regimes, and differences in either of those could trigger special cases everywhere. There's no description of how they've handled even one closing date (other than rolling out ad-hoc production code updates after the fact to each individual software system).

  • Brian Boorman (google) in reply to Loren Pechtel

    Why don't you know how to bbcode quote?

  • Uh.... what?? (unregistered) in reply to Zygo

    This is the correct usage of the word "close" in this context - the closing date of the contract. The factory is sold on the closing date of the contract.

    If this company ever actually closed a factory, instead of selling it, I imagine the rules would be different.

  • Tech and Technology (unregistered)

    I'm impressed by the fact that this company was able to sell two factories that had identical contract conditions (or at the very least, close enough so that a large vast corporate IS system could manage the two factories with identical codes).

Leave a comment on “The Boulder Factory”

Log In or post as a guest

Replying to comment #533447:

« Return to Article