Write bad code now, improve it later?
Jack Cheng quoted Adam Wiggins’ Order of Operations for writing code:
- Make it work.
- Make it elegant.
- Make it fast.
- Make it secure.
I disagree. The biggest problem is that this ignores reality: once it works, how likely are you to go back and make it elegant, fast, and secure? If it’s for personal use, how likely are you to care? If it’s for work, how likely is your employer to be willing to devote resources to “clean up” something that already works? Even the best developers, and the best employers, are pretty bad at this.
You should be writing elegant code very early in the process. There’s always room for improvement, of course, but there’s never an excuse to write sloppy code, even if it’s only running once and you’re the only person ever seeing it.
“Make it fast” can arguably be a lower priority for simple optimizations and constant-time reductions. But algorithmic complexity needs to be considered from the beginning.
And saving “Make it secure” for last seems like a disaster. Imagine how you’d feel, and how you’d even begin to tackle this problem, if someone handed you a pile of another programmer’s code and said, “Make this secure.”
Write good code the first time.
reblogged from marco
-
shiu liked this
-
owen liked this
-
planetelex liked this
-
notentirely liked this
-
philish liked this
-
iheartmyart reblogged this from jackcheng
-
ruminator liked this
-
eduardoe reblogged this from marco
-
mies liked this
-
gurupanguji reblogged this from marco and added:
Something I’ve always prided myself in doing and evangelizing within SISL, is do it right the first time. I should also...
-
soxiam liked this
-
ninakix liked this
-
ericalba liked this
-
pmcarthur liked this
-
caseypugh liked this
-
jameshull liked this
-
kodewulf reblogged this from marco
-
yesongaymarriage liked this
-
tedroden liked this
-
designage liked this
-
jakeoliver reblogged this from marco and added:
1. Drink some coffee 2. Say you’ve got it working 3. Figure out a way it might work 4. Fail to get that working 5. Say...
-
mcodik reblogged this from caterpillarcowboy and added:
My guess is that Dave and Marco have different ideas of what it means for code to be elegant. To me, elegant code is...
-
nicolasgut liked this
-
andybons liked this
-
morningstar liked this
-
deadlybrad42 liked this
-
helloimchris reblogged this from marco and added:
Good code should be written by default as a standard. There’s always room and time later on for improvements, expansion...
-
marreka reblogged this from marco and added:
I completely agree with Marco.
-
brainofg liked this
-
madamex liked this
-
justinday reblogged this from mikehudack and added:
Charles exalts the merits of Red, Green, Refactor development, which is similar. I think it’s OK to make things work...
-
rebeltechnica reblogged this from marco
-
mojaam liked this
-
templated reblogged this from marco
-
berezina liked this
-
mokoyfman liked this
-
sivadcm reblogged this from mikehudack
-
ragdoll liked this
-
bewuethr liked this
-
guillee reblogged this from marco
-
2arrs2ells liked this
-
reallyreallybig liked this
-
hammocknotes liked this
-
yasmary reblogged this from marco and added:
first time. Marco, thank you. I wish everyone had the same understanding...any code....
-
terryblakey reblogged this from marco and added:
Couldn’t agree more. In the late eighties and early nineties I was producing embedded code for Rolls Royce and Lucas...
-
onigiri liked this
-
joshkinberg liked this
-
mikehudack reblogged this from marco
-
squashed liked this
-
hermzz liked this
-
trey liked this
-
caterpillarcowboy reblogged this from marco and added:
I disagree with Marco, unless the problem and solution are already perfectly defined (which is rare). In a world of fast...
-
caseyliss reblogged this from marco and added:
Agreed. Part of being an engineer (by education and trade) is balancing trade-offs: code elegance vs. code speed vs. my...
-
danriti liked this
-
whileyouwereout reblogged this from marco
-
inky liked this
-
wezzo liked this
-
marco reblogged this from jackcheng and added:
Jack Cheng quoted Adam Wiggins’...for writing code:...I...
-
jratlee liked this
-
rainbowhill reblogged this from benkraal and added:
apologise Ben, you’re putting...first couple of steps into practice.
-
benkraal reblogged this from jackcheng
-
tungjacob reblogged this from jackcheng
-
jackcheng posted this