Pull to refresh

Dark code-style academy: spoil if statement

Reading time 3 min
Views 2K
Abnormal programming *Programming *Perfect code *

image


Do you want to raise your salary? Do you want always to be in demand? Do you want to have your job as long as you want? It is absolutely real! You just need to change the way you write your code. Basically, you need to increase your job security. You have to write code which will be almost impossible to maintain for everyone except you. And in these series of articles, I will tell you how to achieve it. Welcome under the cut.

Read more →
Total votes 3: ↑3 and ↓0 +3
Comments 0

Dark code-style academy: line breaks, spacing, and indentation

Reading time 4 min
Views 2.2K
Abnormal programming *Programming *Perfect code *

Hey guys! Let me walk you through the next part of our dark-style code academy. In this post, we will discover some other ways how to slow down the reading speed of your code. The next approaches will help you to decrease maintenance and increase a chance to get a bug in your code. Ready? Let's get started.

Read more
Total votes 1: ↑1 and ↓0 +1
Comments 1

Академия плохого кода: переводы строк, пробелы и отступы

Reading time 5 min
Views 12K
Abnormal programming *Programming *Perfect code *
Sandbox
Привет, Хабр! Представляю вашему вниманию перевод статьи «Dark code-style academy: line breaks, spacing, and indentation» автора zhikin2207

image

Привет, народ! Позвольте мне продолжить рассказ про нашу академию плохого кода. В этом посте мы раскроем другой путь замедления чтения вашего кода. Следующие приёмы помогут вам уменьшить понимание вашего кода и увеличить шансы на появление в нём багов. Готовы? Давайте начнём.

Переводы строк, пробелы и отступы могут убивать.


Как люди читают книги? Сверху вниз, слева направо (по крайней мере — большинство). Это же происходит, когда разработчики читают код. Одна строка кода должна содержать одну мысль, следовательно, каждая строка должна содержать только одну команду. Если вы хотите смутить других разработчиков, вам лучше нарушить эти принципы. И давайте я покажу вам как это сделать.
Читать дальше →
Total votes 29: ↑24 and ↓5 +19
Comments 55