trekhleb / state-of-the-art-shitcode Goto Github PK
View Code? Open in Web Editor NEW💩State-of-the-art shitcode principles your project should follow to call it a proper shitcode
License: MIT License
💩State-of-the-art shitcode principles your project should follow to call it a proper shitcode
License: MIT License
Good
String 你好 = "你好";
System.out.println(你好);
Bad
String hello = "你好";
System.out.println(hello);
Am I just blind, or is there no combined shitcode all in one file? I need this as an example.
Looking at this README.zh-CN.md is like eating shit
Nowadays many things support complex variable names. So why not name them in your native language? That saves your time thinking of a name, and time is important.
Good 👍
记录=提取记录(结果)
Bad 👎
processRecord = getRecord(Result)
Use iteration. not Loop. The best way use goto.
Must contain assembler,And comments say: It more fast. don't change!
So is the auther Chinese?
是故意的还是不小心的?
I know that in some big company, dependencies don't be locked by lock file, because they need to apply hot-fix of upstream dependencies without having to update package.json manually.
Make your colleagues confused by your code!
Good:
a++ += ++a+a++;
Bad:
a++;
a += 2;
I know it's a ironical project, but I have question whether to write comments in native language.
Using Chinese will has trouble shifting input method, and it would lead to many problems between win and linux.
But using English will avoid these questions as well as practice Computer English, and it wouldn't cause any problems reading it.
Just a thought, what will happen when shitcode meets EE.
There's FizzBuzzEnterpriseEdition showing us how over-engineering and cargo cult would devastate your codebase in a hurmorous way.
It comes to me that shitcode is not only about how you write the code, but also how you choose the abstraction and implement it.
More "enterprise level shitcode" examples?
JavaScript allows for UTF8 variable names which allows use of some emoticons and some people even use emoji as identifiers in languages like C++ #39
Good : -
var ಠ_ಠ = 2022
Bad : -
var year = 2022
chinese...
加个星,虽然我现在是个学生,但是以后可能会用到。
Python and JavaScript allows it, so i think using English and changing layout hundreds of times is nonsense
Also some weird characters need struggling, so replace them via #define in c and do neater functions.
Since there shouldn't be a README file, how can I use the badge?
Don't indent, makes complex code take up more space in the editor.
There should be an item regarding secrets in code:
Good practice :
Bad practice:
chinese...
I followed all the principles of this repository, and yet my game is very laggy and uses a lot of CPU and RAM. I don't think I can optimize my code further, but maybe one of you guys can help?
The most important thing is that version control is not needed. Version control is time-consuming and unnecessary. It is recommended to delete the entire repository. 🤪
chinese...
This project definitely violates the rule of not creating a README file.
Based on WTF-PL. See
Always write comments in languages that are rarely used among team members. So that members can identify who wrote the code easily.
For example:
他们说 代码写的跟shi一样 我特意来康康
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.