GithubHelp home page GithubHelp logo

seanpm2001 / bad-code-collection Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 391 KB

A collection of notable bad code made by @seanpm2001 I am still learning what classifies as bad code, and this archive will serve that purpose.

Home Page: https://github.com/seanpm2001/Bad-Code-Collection/tree/Seanpm2001_Bad_Code_Collection/By-Language/

License: GNU General Public License v3.0

Python 97.65% C 0.12% HTML 1.01% JSON 1.23%
bad-code bad-code-collection seanpm2001-bad-code gpl3 gplv3 txt md collection badcode seanpm2001

bad-code-collection's Introduction

All Contributors


Bad code collection

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.

What is bad code?

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)

Search project

Section C

[Bad code written in C]

Section P

[Bad code written in Python]

Questions

For I: iterate

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?

See also:

[Stop calling it bad code] - Blog.pragmaticengineer

[Shotgun surgery] - en.wikipedia


File info

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


Contributors โœจ

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!

bad-code-collection's People

Contributors

allcontributors[bot] avatar seanpm2001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bad-code-collection's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.