I know this is a simple example, but when you mature as a programmer, one of the first things you should do when you sit down to tackle some problem is write something like this pseudo code.
Sony has been in hot water ever since computer programmer Mark Russinovich first found the contentious XCP software on his computer, prompting damaging publicity, suspension of the software, and recalls.