Linux.com

Reply by "Garbage" commenter.

Posted by: Anonymous Coward on January 31, 2007 06:58 AM
Don,

I'm the commenter who called the article "garbage". Perhaps I was too harsh in my wording, but I still believe I was correct in everything I said.

If, as you state, your purpose was really to write a tutorial on how to use date, mktime, and PHP arrays, you shouldn't have branded the article as "A DIY calendar control" (see the article title). "Control" strongly implies modularity and reusability. This is anything but.

Even if it was meant to show the uses of date, mktime, and PHP arrays, they're buried inside the calendar code -- any user who really needed to read an article like this to learn about them would probably have gotten confused/bored by the time they got to that part.

It constantly outrages me that programmers who are learning PHP see such articles and write/use code like this instead of learning better techniques. I've seen (and had to fix) enough buggy, limited, and vulnerable PHP to last me a lifetime. I don't want any more programmers learning bad habits. We have enough of those already.

And as other commenters have suggested, use the PEAR calendar code. It's a heck of a lot better than what you have here. I'm surprised an ASP.NET programmer didn't look for a ready-made control before writing his own.

#

Return to A DIY calendar control in PHP