You can add your own code for sure!
The difficult part is to combine it with the existing code of the template and to avoid that it collides with the code of the template.

It is easier to combine a code with a code that you are familiar with, that's why many programmers tend to rely on their own code only.