C code (violence) | The only good system is a sound system

https://ftrv.se/3#toc_0

Σ 📰 ○ ⑨ 📷 🖼 📹 🍺 C code (violence) The shorter the code, the better. Code is read more often than is written. If you can avoid writing code, avoid it. Keep it as simple as possible, but not too much. Again, read vs write. Read the code. In case of a retch, take a few deep breaths. Continue. If there are no comments, it either means the code IS simple, or the code is impossible to understand unless you read a spec. See the top of a file to check if that’s the case. Do not put a copy of your license on top of every file. This is awkward. Use /* */ -style comments instead of C++ style. Use // to comment out parts of code for a quick test. Put a link to a spec on top if the code implements it. For god’s sake, compiler can’t read and doesn’t care about your spec copy-pasted into the source code. If your code really needs a copy-pasted spec, it sucks. Prefer “magic” numbers with in-plac...

Linked on 2021-06-06 07:00:52 | Similar Links