Basic tech stuff

Programming and Linux administration

Basic’s programming laws

Posted by Daniel Brahneborg on 2007 August 1

I’ve come to realize that the following laws apply when debugging a program.

  1. A program that runs on several platforms will fail on the one with the worst tools for debugging.
    1. Having gdb installed on one machine while being absent on another, makes the bug appear on the second machine.
    2. Having Purify or Valgrind installed on a subset of the platforms, guarantees that the bugs will occur only on the ones without these tools.
  2. With identical toolsets, the bugs will occur on the machine that is hardest to access.
    1. With ssh access to two machines, the bug will occur on the one to which you can’t use keybased login.
    2. If one machine requires Cisco VPN login, which never seems to work correctly, that’s the machine which will fail.
  3. If the program is multithreaded, the bug will only appear when running outside of the debugger, since these tools always affect the relative timing of the threads.

On the other hand, the reason I’m a programmer is not because it’s easy, but because it’s hard.

Andra bloggar om: .

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

 
%d bloggers like this: