This is my collection for bad code. Code I classify as bad code will be added here when I have time. If there is an example that needs to go here, please raise an issue.
I am currently unsure whether markup languages (such as HTML or Markdown) should count.
Bad code is source code that works poorly, uses lots of unnecessary space, or [other reason(s)]. Please note that just because source code may be hard to read/unclean does NOT mean it is bad code. If you are using a thousand lines of code to calculate 2+2, that is DEFINITELY bad code, and you should actually reconsider your career (unless this was done as a joke)
I have been trying to figure something out for a while now, I finally have a place to talk about it:
The following source code example is functional, and works across various programming languages, including C, C++, C#, Java, Go, etc. (it works under most imperative programming languages that use curly brackets and semicolons)
for (i = 1;
i < 10;
i++;
)
However, the programming community seems to loathe this, and I can't figure out why. Is this really bad code?
[Stop calling it bad code] - Blog.pragmaticengineer
[Shotgun surgery] - en.wikipedia
Click/tap here to expand/collapse this section
File type: Markdown (*.md *.mkd *.mdown *.markdown)
File version: 2 (Monday, 2022 March 14th at 2:52 pm)
Line count (including blank lines and compiler line): 72
Current article language: English (EN_US)
/ Markdown (CommonMark)
/ HTML5 (HyperText Markup Language 5.3)
Encoding: UTF-8 (Emoji 12.0 or higher recommended)
All times are UTC-7 (PDT/Pacific Time) (Please also account for DST (Daylight Savings Time) for older/newer entries up until it is abolished/no longer followed)
Note that on 2022, Sunday, March 13th at 2:00 am PST, the time jumped ahead 1 hour to 3:00 am.
You may need special rendering support for the <details>
HTML tag being used in this document
Thanks goes to these wonderful people (emoji key):
Sean P. Myrick V19.1.7.2 π» π π π‘οΈ π£ π π¨ π§ π€ |
All Contributors π |
This project follows the all-contributors specification. Contributions of any kind welcome!