DEV Community

How to write Unmaintainable Code

flavio ⚡️🔥 on September 07, 2019

In this tutorial I want to illustrate how to write unmaintainable code. By writing unmaintainable code you can make sure you will never get fired ...
Collapse
 
paulasantamaria profile image
Paula Santamaría • Edited

26 Getting an unhandled exception? Just wrap that troublesome code with try and an empty catch, that'd do the trick.

Collapse
 
ghost profile image
Ghost

about 20, if you ask me, if you use tabs, you already are mixing tabs and spaces. 2 and 3 with coution, don't give a long name to a to variable for a 3-line for loop, i and j are just fine; we don't like 30-long variable names either, just adding two of them takes the whole line, and average_of_anual_income_after_taxes is way too much, good judgement is always required.

Collapse
 
stereobooster profile image
stereobooster

21 - 23 perfecto 👌

I saw research which showed there is no significant difference in speed of bug-fixing for abbreviated and full names. The difference was in the approach.

The point about English - I get it, but the other point of view is that we losing the diversity of languages.

Collapse
 
vlasales profile image
Vlastimil Pospichal

Names i and j are good for local integer indexes. I use short variable names, no acronyms. When you want join more than two words for make a variable name, you need shorter method body. When you have long method name, you need split the class to more pieces. One verb is enought for method name.

Collapse
 
cecilelebleu profile image
Cécile Lebleu

I suggest adding the tag jokes. It was really funny 😂

Collapse
 
vlasales profile image
Vlastimil Pospichal

What is a comment?

Collapse
 
integerman profile image
Matt Eland

Having different files for different pieces of code is inefficient and causes artificial delays for navigating to a different file.

Collapse
 
alinp25 profile image
Alin Pisica
Collapse
 
fanchgadjo profile image
Francois K

My former lead-dev cowoker checks too many boxes !