Well, the example given isn't really programming (or coding) per say, you're simply compiling a template for a simple window (The example folder has some other useful progs in there as well which one could use as a starter).
But no, I don't think that it's necessary for you to be a genius to code, but average intelligence and hard work can only bring you so far. The brighter, math-savvy people are almost always going to become the master programmers if they're so inclined to elevate themselves to that height.
As for myself, like my Old Man use to say, I'm a jack-of-all-trades and a master of none -