-5
\$\begingroup\$

My reputation is too low to create the tag clean-code. I really miss this tag since clean code is a major aspect of code reviews (just nowadays more than in the past)!

ok let's have a closer look at clean code:

red belt:

  • Don´t Repeat Yourself (DRY)
  • Keep it simple, stupid (KISS)
  • Beware of Optimizations!
  • Favour Composition over Inheritance (FCoI)
  • Integration Operation Segregation Principle (IOSP)

orange belt:

  • Single Level of Abstraction (SLA)
  • Single Responsibility Principle (SRP)
  • Separation of Concerns (SoC)
  • [...]

yellow belt:

  • Interface Segregation Principle (ISP)
  • Dependency Inversion Principle (DIP)
  • Liskov Substitution Principle
  • Principle of Least Astonishment
  • Information Hiding Principle
  • [...]

green belt:

  • Open Closed Principle
  • Tell, don´t ask
  • Law of Demeter
  • [...]
  • Inversion of Control Container

blue belt:

  • [...]
  • You Ain´t Gonna Need It (YAGNI)

if you use the search and look for "clean code" you find many related and high voted items...

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Related meta, which asked if it should be added, but was ignored. \$\endgroup\$
    – Peilonrayz Mod
    May 20, 2019 at 11:06
  • 1
    \$\begingroup\$ @Peilonrayz - where does that meta question you reference ask for clean-code to be added? Additionally, just because there's no answers, does not mean that it has been ignored completely. Have you considered that the meta-question you referenced simply has too many questions/concerns in it and it is impossible to formulate a single answer to it? \$\endgroup\$
    – rolfl
    May 20, 2019 at 11:24
  • \$\begingroup\$ @rolfl Yeah, there was a lot of questions and that one was 'ignored'. What word would you prefer me to use? \$\endgroup\$
    – Peilonrayz Mod
    May 20, 2019 at 11:43
  • 3
    \$\begingroup\$ Can you find a question that could not be tagged with "clean-code"? It's my impression that every single question on the site is looking for clean(-er) code. \$\endgroup\$ May 20, 2019 at 21:51

1 Answer 1

7
\$\begingroup\$

would be a meta-tag - a tag that describes what you want the code to look like, not what the code is, or does. Additionally, all questions should be asking to review for clean code, for readability, and for a number of other things that are common to good, production code.

So, would be a bad tag for Code Review, and we are actively trying to reduce the use of meta-tags.

Note, in 2014 we actively removed that tag: Should we do something about our meta tags?.

\$\endgroup\$
9
  • \$\begingroup\$ Clean code conflicts with performance and memory optimization. We have tags for the latter two, and people come here for them. So no not all Code Reviews ask for 'clean code'. \$\endgroup\$
    – Peilonrayz Mod
    May 20, 2019 at 11:08
  • \$\begingroup\$ maybe in 2014 there was no need for that - but things changed ever since then. \$\endgroup\$ May 20, 2019 at 11:41
  • 5
    \$\begingroup\$ @Peilonrayz WHAT? "Clean code conflicts with performance and memory optimization" No... no it doesn't. Clean Code is a nonfunctional requirement and optimizations usually are functional requirements. That's a difference in kind. While some optimizations make code harder to read or maintain, they are not conflicting goals. For the vast majority of use cases, cleaner code is also more performant code. \$\endgroup\$
    – Vogel612
    May 20, 2019 at 12:57
  • 1
    \$\begingroup\$ @MartinFrank the considerations that went into burninating the tag back then are not really dependent on the time or state of the industry... \$\endgroup\$
    – Vogel612
    May 20, 2019 at 13:00
  • \$\begingroup\$ i'm honest to you guys - most of our company reviews turn around clean code and most of my question on codereview here do the same... and i am activly lookging for question concerning clean code - since i know it and can help with this topic. this tag would greatly improve my posts and help me to find answers... i can understand that you vote against this tag... \$\endgroup\$ May 20, 2019 at 13:19
  • \$\begingroup\$ @Vogel612 We are in agreement in the first half of your second to last sentence. I disagree with your last as better performance, speed or memory, normally incurs a cost to clean code. Whilst sometimes it's small and negligible, it's still a trade-off. \$\endgroup\$
    – Peilonrayz Mod
    May 20, 2019 at 13:20
  • \$\begingroup\$ note: did you ever do a search concerning Separation of Concerns there are very much high ranked question on this topic and some of them have the misleading design-pattern tag on it. that was the very reason to instantiate this question....or look at KISS - tons of entries they all belong to one aspect of code reviews: clean code \$\endgroup\$ May 20, 2019 at 13:22
  • 3
    \$\begingroup\$ @martinfrank dysfunctional tags is one thing, adding more dysfunctional tags doesn't solve the problem. \$\endgroup\$
    – Mast Mod
    May 21, 2019 at 4:08
  • \$\begingroup\$ OK, I'm glad I lead this discussion :-) thanks you all for your input and clearing out the intention of the usage of tags here... \$\endgroup\$ May 21, 2019 at 5:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .