It's a neat idea though, it almost has a "mind" to where it knows when to change action.
Better watch out. One of these days your codes will start modifying themselves to the point where your DS comes self-aware. The world is in danger when your DS suddenly flares to life and declares it supreme to mankind. Resistance is futile.