When Refactoring Makes Code Worse
return LastOrderInfoBuilder() .withCreationDate(creationDate) .withRegion(region) .withPaymentType(paymentType) .withDeliveryType(deliveryType) .withAddress(address) .withOutletId(id) .build() return [[[[[[[[[lastOrderInfoBuilder new] withCreationDate:creationDate] withRegion:region] withPaymentType:paymentType] withDeliveryType:deliveryType] withDeliveryDate:deliveryDate] withTimeInterval:deliveryInterval] withAddress:address] withOutletId:outletId] withBuyerInfo:buyerInfo] build];
A clean, readable builder-style code snippet is shown on the left, while an absurdly nested and difficult-to-read version appears on the right. The joke is that an attempt to improve or transform the code has made it dramatically worse, like an unflattering FaceApp transformation. It is shared as a reaction to overengineering, bad refactoring, or ugly generated code.
code editor screenshot / скриншот редактора кодаprogramming code / программный кодbuilder pattern / паттерн строительnested brackets / вложенные скобкиmethod calls / вызовы методовdark background / тёмный фонgreen syntax highlighting / зелёная подсветка синтаксисаwhite text / белый текстtwo code examples / два примера кодаFaceApp watermark / водяной знак FaceApp
#refactoring#рефакторинг#programming#программирование#code#код#software development#разработка по#bad code#плохой код#overengineering#переусложнение#ugly code#некрасивый код#builder pattern#паттерн строитель#nested brackets#вложенные скобки#developer meme#мем программиста#reaction#реакция#screenshot#скриншот
- @profunctor_io / 2671 2019-07-19
- Type
- image
- Size
- 800×273 · 36.1 KiB
- Mood
- саркастичный, абсурдный
- Language
- en
- Added