A broken clock fixed by taping a working clock over it is a metaphor for every codebase you’ll encounter in your professional career as a software developer.
@carnage4life all that's missing is the post it note telling you to talk to someone who left 10 years ago about how to change the batteries in the working clock.
@carnage4life Literally laughed out loud to this image. Brilliant.
@carnage4life the difference is that in software the broken clock ships from the factory already broken with the working clock taped to it
@mwyman @carnage4life that is true for compiled software. In e.g. PHP-based Open Source software you simply declare a dependency on the (now broken) clock which is fetched from its own repository.

@carnage4life I have been occasionally scolded for my 'messy' PRs that muck out disfunction, realign ancillary internal methods & data structures and/or otherwise embrace my inner Fowler. The PR diffs are ugly AF but some of them are things I am most proud of.

To the topic: lately I feel sometimes our PR/user story approach encourages the employment of duck tape by encouraging change that fully satisfies stated requirements, makes for easy-to-read PRs, but loses the plot along the way.

@ericg @carnage4life yes! The attitude of “the best PR is the one that changes the fewest lines of code, and note an SCR for any refactoring you think is needed separately” was the predominant attitude on my team when I first joined. One look at the stack of minimum-priority refactoring SCRs going back over a decade tells you everything you need to know about how that was working for them. 🙃
@carnage4life YES! #HardFollow if not already. Also the bar to rebuild from scratch is VERY low. We used to do this all the time, some of us still do!
@carnage4life Not every codebase. In some of them the taped-on clock is also broken and would've run backwards had someone managed to hook it up properly.
@carnage4life only if the second clock breaks within a day
@carnage4life when I was an intern, the codebase I was working on had 4 different memory management systems (not including the malloc/free implementation provided by the OS)
@carnage4life like many code developers. the broken clock is right twice a day, but the taped-on clock is never correct.

@carnage4life

You can't remove the broken one because only that clock has the mounting plate that screws into the ceiling.

If we just delete the broken clock, the working clock falls down.

Also there is a test detects that we have clock support, by detecting the presence of the screws in the ceiling. We can't change it because we have to run in an identical building in which the same clock is still working and doesn't have anything taped to it.

@carnage4life #crowdcaption: a black clock bolted to the roof of a school or office building. The clock has another smaller black clock taped to it with blue masking tape in a grid pattern.
@carnage4life
Vernor Vinge got it right in "Deepness in the SKy", set 5000 years from now, with starship's layers of legacy code requiring "programming archaelogists"...
7/ in
https://mstdn.social/@JohnMashey/109991399173605796
JohnMashey (@[email protected])

Attached: 1 image @[email protected] @[email protected] @[email protected] 7/ And as for the difficulty of understanding legacy software and its persistence, I couldn't resist quoting Vernor when I wrote "Languages, Levels, Libraries, and Longevity" https://queue.acm.org/detail.cfm?id=1039532 The idea that 5000 years from now, a relativistic starship would be running a Unix timer routine was quite amusing.... but then, there was code written at BTL in 1960s that I think is still being used today,

Mastodon 🐘
@carnage4life PR feedback: “I’m not going to hold up merging this right now, but make sure to file a ticket so that we fix this after the current mikestone” (PR was merged 3 years ago)

@carnage4life

NOT true, as in the "every" part.

Just yesterday I "saw" a codebase where the other clock was screwed and hammered on to the extend that both clocks were so obviously broken...

Had no smart ass come along to draw some numbers around it, it wouldn't even be useful. But now, when sun is shining, time is right (ish) 🤡

@carnage4life that's amazing!

Another good metaphor would be a second mechanism rotating the numbers because the hands in the original clock are running too fast or too slow.

@carnage4life Those workarounds are often lasting longer than the initial solution. :D

@carnage4life

Looks to me like the boss or manager went and bought another boat with the discretionary fund again.

@carnage4life And along comes a business administrator and orders you to take the taped clock off. Don't you know the clock underneath goes right twice a day? The taped one only once. Can't have that.
@carnage4life The ceiling clock is very thick so looks as though it is double faced, which I have seen in very large rooms. So this could be a bodge where the original clock works from one viewpoint but requires a hack from another viewpoint.
@carnage4life @tante thankfully this hasn’t been the case in recent years. 🤞
I see this on an enterprise solution level, though: Two systems (that we own and with APIs) need to talk to each other. Solution: let’s build a 3rd system that gets excel files from system one and inserts them in system two via macros. 🤦‍♀️ Unfortunately the energy needed to stop such madness is sometimes just too much. 🤷‍♂️
@carnage4life
Unless I'm much mistaken, I have used software that operated this way.
@carnage4life Pensei: vou mandar pro @rodsilva ! Aí fui ver e vc que tinha dado boost! 😁
@ocarneiro @carnage4life hahahaha! Obrigado pela lembrança 😀
@carnage4life
This is true of most business processes. Also, the clock cannot be moved because a manager who left the company ten years ago told a junior to leave it alone which is why the only way anyone in the office can see what time it's saying is by going into the closet that was built in that corner five years ago and looking up.
@carnage4life Not shown: The new clock is wired to the power source of the old clock.
@carnage4life my favorite thing in coding is refactoring out that broken clock, but you don't get to do that often and that's not unrelated to why I'm not a developer any more.

@ReverendMoose @carnage4life

Junior engineers are excited to be building a new feature.

Senior engineers are excited to be deleting a new feature.

@carnage4life the most permanent fix is a temporary one
@carnage4life I'm working on a broken clock taped over a broken clock, but the time on the top clock matches the only two times a day management looks at the clock.
#software
@carnage4life Not a dev, but an accessibility and usability person, and part of my job involves checking coding for errors that can cause accessibility issues, and …. Yeah. Yeah, this. 😂
@carnage4life If it is stupid but it works it is not stupid, I say as I start taping the third clock on the clock with the depleted batteries.
@carnage4life so is it right four times per day?
@carnage4life Even more so when you find out later on that it's actually a picture of a clock and not a working one at all.
@carnage4life Until someone decides to create a new clock "from the ground up" and removes the entire building
@carnage4life and this is times ten in the era of agile development, kubernetes etc.
@carnage4life What do we say? Not today (on "my" codebase)!
@carnage4life but it works 🤷🏻‍♂️😅

@carnage4life
I've had situations where I was told to build a clock for employees to see and then after some time and effects 'the boss' didn't care for, was told to block its view.

Everything worked as assigned.

@carnage4life It's handy to keep the old clock commented out, in case we realise the rationale behind having a seemingly incorrect time.

@carnage4life I saw this the other day and I said, "The clock is not fixed, but the problem is solved."

Though, that's only one problem. You can't create without destroying, or destroy without creating. That goes for problems and solutions too. You just have to pick the ones you prefer.

@carnage4life And yeah, it really is a perfect metaphor. XD

@carnage4life It's not that bad.

Sometimes you have the privilege to do the big clock.

Sometimes you even get the ticket to break the big clock.

Comes all with the territory.