Code won’t tell you everything

This thought crossed my mind the other day: in order to understand what is happening with a particular program, looking at the code won’t always tell you everything you need to know.  It’s a good start, but without examining the environment that the code is running in, you may be missing some critical details.

When I say the environment the code is running in, I mean things like:

  • External library version numbers
  • Environment variables
  • The current system time (and time zone)
  • Network conditions (latency, packet loss, bandwidth)
  • Existing data

In my software development experience, there’s been multiple occasions when the code has looked correct, but things were still running incorrectly as a result of something other than the code.

Remember: if the code looks correct, but results aren’t: check your environment.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s