Don't write clean code, write CRISP code
-
I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?
How do you like your code? Crisp!
That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]
-
I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?
How do you like your code? Crisp!
That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]
The writer needs to apply two of his principles, Readable and Simplicity, to his own writing.
-
I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?
How do you like your code? Crisp!
That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]
This is why programmers should cut their teeth on assembly programming. CRISP is a requirement for assembly language coding, IMO, and creates a good discipline when encountering languages that want to CHAR (no acronym, just a pun) your CRISP practices.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework -
I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?
How do you like your code? Crisp!
That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]
Quote:
An unnecessary function call, added purely to satisfy some rule like "methods should be less than 10 lines"
I had a nice 2 hours long argument with top brass for the company I was working for as a body-rental contractor on the usefulness of these rules in their LINTer (linting is mandatory to be MISRA compliant). The cool fact is that after a week they actually removed them. As for performance being not important, I raise the firmware world as a counter-example. And it explains why I am hounded daily by companies looking for a firmware engineer (now, if they also wanted to pay me more than a janitor it would be just peachy).
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
-
This is why programmers should cut their teeth on assembly programming. CRISP is a requirement for assembly language coding, IMO, and creates a good discipline when encountering languages that want to CHAR (no acronym, just a pun) your CRISP practices.
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkThis, 10 times. Assembler really taught me on how to make the flow of the code easy to determine while reading it and to group subprocedures in functions so that they are easily debuggable and identifiable. It also gave me serious OCD on how to indent and align the code, not helped at all by my discovery of selection by column.
unsigned long int variable_name1 = default_val;
char var_name2 = default_val;
static int var3 = default_val;function_call_long_name(arg1, b, c);
function_short (a , arg2, c);var1 = a + b;
variable_long_name = foo + bar;Code like this may look overly large on the horizontal axis but it is clear and allows changes or copy-paste even with column selection.
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
-
I'm sure we're all in favour of "clean code", but it's one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code?
How do you like your code? Crisp!
That one is probably just for Canadians, sorry. Just in case you can't bear to not know (video, but safe)[^]
> Article about writing code with no code examples Yeah, just do good things and don't do bad things, mkay?