Agreed; if you're going to post demo code then
(a) it should not use any platform specific extensions;
(b) it should be a lot better commented than the above. The idea of demo code is for people to learn from it, not for you to show off how great you are.