Saving the incompetent from themselves
I know it's wrong to gloat, and no-one likes a showoff; but sometimes you just can't help it....
First 6 months into a web-dev position within an agency I was given the task of building up a CMS back end for a new website whereas my colleague had been building the front for quite some time. For some reason best known to themselves the client had insisted that the website be AJAX driven in it's entirety (this was around 2007/8 iirc when asynchronous loading of content was still relatively new for small companies in the UK).
After many, many weeks of trying to build the AJAX front end my colleague was "spoken to" and resigned his position. I was handed the task and despite having had 0 experience of AJAX at that time*, the front end was completed in 2 weeks (including registering each 'page change' with the browser history, one of the main stumbling blocks).
In addition my colleague had decided to build the website's database in such a way that each 'page' had a row in a table, and each page's visible contents were contained within 1 cell per row. The content formatting wasn't encoded using HTML in the cell, oh no..... each content "element" (title, sub-title, paragraph, block etc) was divided by special characters " | " and the meta information (html tag, classes, etc) contained elsewhere (IIRC in a different cell, also sub-divided by pipes), the two bits had to be tied together in the code before display, and each string of content/data concatenated by the code within the CMS before entry into the DB. Talk about a headfuck. (I think he'd heard of JSON and was trying to be clever)
The biggest joke though was that the client went bust about a week before the site was due to go live.
* Well - apart from the entire CMS system which had also been built to operate via AJAX. The Front End became a stripped down version of the CMS.