A humorous retrospective on a poorly written Laravel function called `multipleUpdate` that somehow survived in production. The author dissects their own junior-era code crime by crime: cryptic variable names, redundant `?? null` assignments, a pointless three-loop round-trip that reconstructs the original array, and N*2 database queries with no transaction safety — all while Laravel's built-in `updateOrCreate()` sat unused. Despite every flaw, the function still works in production, which the author finds both infuriating and oddly comforting.
Sort: