In addition to what bill001g was saying, you have to know the program inside out. Having a high knowledge in programming helps but you would need to be great at finding and using exploits to your advantage, it's all in the mind. A few examples of hacks related to programming/scripting would be code injections such as SQL Injections, HTML Injections, Object Injections, and scripts (bash/shell).