If you want to learn how to code hacks, don't start with how to learn how to code hacks.
Learn a programming language like Python and learn the basics of programming. Move onto something like Java, and then C++. Once you know the basics of those languages and you have a good knowledge base for programming, then go ahead and learn how to make hacks.
Also, this isn't the best place to ask. If you want to ask questions related to programming in the future, you might want to visit the programming section instead.