Warning signs in a software project rarely are found in code first. Just about the time you unpack your cubicle and get your development environment up and running, you will already have received warning signs about the application. Here's what to listen for:

 

  • "The code is very complex."
  • "Be careful when you make this change, it's going to affect X."
  • "No, we don't have unit tests. Our code is too complex for that."
  • "We have a global cache that takes care of all of that."
  • "We don't fully understand what that affects, so be careful."

 

These phrases center around a theme: The code is really hard to grok and it's chock full of dependencies.

Uh oh.

If you've worked in with enough legacy codebases, you've probably gotten used to that.  Get un-used to it. It's wrong.  Code is only as complex as you make it. As Ernest Hemingway has taught us, you don't need to use big words to tell a story.

Your code is not an exception to this rule.

Before you cast aside what I'm saying, think about it this way: If a human can communicate using nothing but the most basic language, and communicate effectively, then why can't the same thing be done in code? Why is that the exception?


View Comments: Comments (1) |

Comments


May 21. 2010 00:18
Phileosophos
I have an easy answer for you: because human language does not lend itself well to the sort of precision required for advanced mathematics, engineering, and various other highly technical disciplines. I do not believe it's possible for all code to be simple and easily self-explanatory because there are plenty of things that need doing that aren't simple or self-explanatory.

I agree that much (if not most) of the time it's possible to write simple code that is easily unit tested, is highly local, and so forth. But sometimes you'll find yourself doing things that are extremely tricky. My general rule is that if I can't find a way to explain what has to be done in simple English, then it might well be something that can't be coded in a friendly way.

http://phileosophos.com/http://phileosophos.com/

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



Recent Comments

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.