PHP Code Written in Despair
<?php header("Content-type: text/html; charset=utf-8"); /* * This is a warning to any poor soul who may have to deal with this code. * * I took over this criminal piece of chaos from a monkey named Joel who I * assumed had been given a typewriter by Mephistopheles himself. For reasons * I have yet been unable to fathom, he decided to patch together this thing * using a BaseX setup hardwired into an unfixably broken Mango VM, queried * by a handwritten plate of uncommented PHP spaghetti fit to feed an army * of people with a serious death wish, without any framework or CMS. * The very long BaseX script, very long PHP presenter and very long XSLT * stylesheet mostly perform the same heuristic document structuring for * different components and are supposed to produce compatible results, but I * bet they have mismatches somewhere. * Since Prof. T just wanted a few small functional enhancements, I decided * to just patch it and keep the general setup. Unless you were hired to * correct some spelling mistakes, DO NOT FOLLOW IN MY STEPS. Putting up with * this simulation of how a goldfish would design a system has literally * given me CLINICAL DEPRESSION. This is not an exaggeration, I am writing * this after a prolonged medical therapy - mostly successful, thanks for * asking, but not fun. I wouldn't wish this code on anybody who isn't a * manager at Oracle or Facebook, and therefore give you this sincere advice: * * Nuke this. Take the XSLT if you must, and then nuke the app and recreate it * in Django or whatever works for you. I would do it myself, but I risked a * relapse simply by opening this file again to write this comment. * Dear brother or sister, I wish you all the luck and strength in the world * and hope it will be enough. * Farewell. */ error_reporting(E_ALL); ini_set("display_errors", true); print('<?xml version="1.0" encoding="UTF-8" ?>\n');?>
A PHP source file contains a long comment warning the next developer about an impossibly chaotic legacy system. The author compares the code to work by a monkey, describes clinical depression from maintaining it, and advises nuking the application and rebuilding it in Django. It is shared as a reaction to cursed code, technical debt, and unbearable maintenance work.
computer screen / экран компьютераPHP source code / исходный код PHPcode editor / редактор кодаmultiline comment / многострочный комментарийwarning message / предупреждающее сообщениеprogramming syntax / синтаксис программированияtext cursor / текстовый курсорXML declaration / объявление XMLerror reporting call / вызов обработки ошибокBaseX setup / конфигурация BaseXMango VM / виртуальная машина MangoXSLT stylesheet / таблица стилей XSLTDjango framework / фреймворк DjangoPHP spaghetti code / спагетти-код PHPmonkey / обезьянаtypewriter / пишущая машинкаmedical therapy / медицинская терапияclinical depression / клиническая депрессия
#php#пхп#programming#программирование#legacy code#легаси-код#technical debt#технический долг#cursed code#проклятый код#code review#ревью кода#developer#разработчик#software engineer#программист#debugging#отладка#dystopian#дистопия#sarcasm#сарказм#depression#депрессия#reaction#реакция#screenshot#скриншот#computer#компьютер
- @dev_meme / 541 2019-08-09
- Type
- image
- Size
- 735×627 · 147.1 KiB
- Mood
- саркастичный, отчаянный
- Language
- en
- Added