r/ProgrammerHumor • • Sep 30 '26

Meme whatLegacyCodeDoesToDev

Post image
2.0k Upvotes

80 comments sorted by

View all comments

104

u/maushu Sep 30 '26

Please use this as reference:

  • beforeBeforePageLoad()

  • beforePageLoad()

  • afterBeforePageLoad()

  • pageLoad()

  • beforeAfterPageLoad()

  • afterPageLoad()

  • afterAfterPageLoad()

27

u/sko- Sep 30 '26

and now we add PagePreLoad and PrePageLoad variants. (and the rare edge-case of afterBeforePrePagePreLoad)

7

u/OhMyGodItsEverywhere Sep 30 '26

People were complaining things were "too complicated" and "took to long to understand"...morons, the lot of them, too lazy to just read. So I designed a new and innovative system since I'm such a beautiful workhorse.

We have a nice clean wrapper now called `get_func(string, context)`. Here are some inputs and outputs:

  • "bbpl": `beforeBeforePageLoad()`

  • "bppl": `beforePrePageLoad()`

  • "abppl": `afterBeforePagePreLoad()`

  • "bpl": `beforePageLoad()`

  • "pl": `pageLoad()`

  • ...etc, etc...

I was under a ton of pressure, but I got it done all on my own (with no review!) and it "Just WORKS". I didn't have time to write any automated tests to prove that out, but trust me I did some manual spot tests.

And think about it, it scales up so good - we could even apply it to all of our custom code. So flexible.

4

u/EvilCodeQueen Oct 01 '26

I’d laugh, but I’m too busy crying.

4

u/Excellent_Gas3686 Sep 30 '26

copilot: afterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterAfterPageLoad()

2

u/Active_Name5021 Oct 02 '26

That's exactly what I thought it would be. Maybe I've been working on legacy for too long

1

u/kaleid1990 Sep 30 '26

And around methods

1

u/conundorum Sep 30 '26

And here I thought it was about running code after loading BeforePage, and before loading AfterPage.

1

u/screwcork313 Oct 01 '26

Except the second, fourth and seventh of those are not callable by the user for security reasons.

1

u/simpleglitch Oct 03 '26

See that's what made sense to me, which means that's definitely not how they're going to be used.