Let me give you an advice. If you want to know more about what you called "dark side of programming", maybe start be searching about buffer overflow or something like that. It may be a little advance for a beginner but it's a basic topic for exploitation.
If you program with C or C++ in a Linux environment, learn how to use gdb. If you don't already use a Linux environment then start by that. I am not saying you should use Linux for every think, but it's a very important tool!