Discussion:
Best practices
(too old to reply)
Gallian
2020-11-18 15:18:04 UTC
Permalink
So I am stuck writing code for an automated deployment system (one of
the popular ones, but not the latest one declared shiny). And during a
refactor I spot 5 different locations using the same value. Obvious
refactor, duh, declare a variable and use that.

Colleague declines my merge request after code review:
- "Just hardcode it".
- "But why? This is cleaner, less error-prone, it's even future-proof at
almost zero complexity overhead"
- "We don't use this kind of code anywhere else. But you can check with
colleague B if you want"

Colleague B: "Well, actually, I'd have done the same; I'll put my
recommendation in the Merge Request".

Aaargh.

1. Since when is "we just don't do this" a decent argument? Even if we'd
had a style guide, that would still have been a stupid argument, but
at least it would have had some organisational backup. But just
expressed as nothing but a personal opinion?

2. How many guesses that Colleague A will complain behind my back that I
"went whining to Colleague B instead of just taking criticism on his
MR"?

Fscking office politics. Fscking Dunning-Kruger cowboys. But I repeat
myself.

Mart
--
Nobody surrenders to the dread pirate Wesley
Stephen Harris
2020-11-18 18:10:22 UTC
Permalink
Post by Gallian
1. Since when is "we just don't do this" a decent argument? Even if we'd
My response to that sort of thing is normally "Just because we've been
stupid in the past doesn't mean we have to be stupid in the future".
--
rgds
Stephen
Gallian
2020-11-18 20:20:24 UTC
Permalink
Post by Stephen Harris
Post by Gallian
1. Since when is "we just don't do this" a decent argument? Even if we'd
My response to that sort of thing is normally "Just because we've been
stupid in the past doesn't mean we have to be stupid in the future".
Unfortunately, I've been at this particular client for about half a
year, and I don't have the political capital to make a big stink;
especially not as this a large government bureaucracy where
institutional knowledge is hard to glean from the mess of systems and
practices around, so I'm at a disadvantage when the other guy is an
actual employee who's been there for some time.

I can respect a modicum of "we're not used to that". I know how
institutional inertia feels. But outright mulish stubborn opposition
against a fairly standard development practice that every junior
developer and admin should know?

Even if said config management system is braindead and 'variables' are
actually constants, magic literals are Just. Plain. Stupid.

Mart
--
Nobody surrenders to the dread pirate Wesley
Loading...