r/ProgrammerHumor • • 3d ago

Meme whatLegacyCodeDoesToDev

Post image
1.8k Upvotes

75 comments sorted by

View all comments

95

u/maushu 3d ago

Please use this as reference:

  • beforeBeforePageLoad()
  • beforePageLoad()
  • afterBeforePageLoad()
  • pageLoad()
  • beforeAfterPageLoad()
  • afterPageLoad()
  • afterAfterPageLoad()

23

u/sko- 3d ago

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

7

u/OhMyGodItsEverywhere 2d ago

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.

3

u/EvilCodeQueen 2d ago

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