I know that generally native speakers say it usually like this (without the to):
These exercises will help you get better at math.
Can you help me move these boxes outside?
But sometimes, though very rarely, I see it used with the to. Like in this example:
This is just so that you won’t forget that you shouldn’t change these values after you first create them. It’s purely optional, but in the pages ahead you’ll see how useful all-capped constants can be to help you to better read and understand your programs.
I still don't really understand the deference between the two usages and don't know when we should use one over the other. Could you please help me get this straight once and for all?