Skip to content
loading...

re: How to Write Software: 5 Lessons Learned from Running Businesses VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hi Eric, Thanks for your post! It's interesting because it seems to go against the grain in a lot of ways. All your points got a response out of...
 

I think your team will be more productive if there's a certain standard maintained.

Very true! I know exactly the kind of code you mean: Copy-pasting is everywhere (down to the typo in the comments); subroutines are named "oldMethod", "newMethod" and "reallyNewMethod", the most recent of which is 14 years old. Someone has, effectively, handed in their first-draft. Working in that kind of codebase is like wading through treacle. Nothing happens quickly.

That said, I have questions about the Make it right part of Kent Beck's quote. It needs a proviso: (until wrong). I tend to reach a point during refactoring where I think "Does this code actually need to be any Righter?" That's usually my sign to stop -- I'm no longer adding value. I've crept into ego-project territory, exactly as Erik describes in his post. Sure I can keep tidying, but doing so would be wrong.

Ultimately, I guess the people who have this kind of debate don't tend to be the problem. At the very least, their crappy code will be considered crappy code. They will be able to justify their decisions with something more than a shrug and a yawn. And hopefully, someday, they'll go back and make it right (until wrong).

 

You would have to define what "Right" means to you.
Overly academic and difficult to follow is not what I would strive towards.
Code, like all communication, needs to be simple in order to be effective.

Totally agree.

Learning to simplify is probably the most valuable skill I've picked up over the years. The question "How can this be made simpler?" has served me extremely well. Particularly, as you say, when communicating -- be it in code or even just an email. I often think of the Blaise Pascal quote: I'm sorry I wrote you such a long letter; I didn't have time to write a short one.

"I'm sorry I wrote you such a long letter; I didn't have time to write a short one." - Classic XD

I love Mark Twain wisdom, regardless how how deep it's threaded in any comments section ❤️ (It's also the story of my life)

Kudos for digging this far into the comments, Erik! It's a fantastic quote ... even if I'm never sure who it's attributed to. (I'm sure at least one source will say it came from Albert Einstein.)

code of conduct - report abuse