This is a weird topic, since I’m not sure if it belongs here or at RedAlt, but I think until such time as I do it (since it’s not talking about program planning), it’s here for me to talk about. But if I do create the thing, I’ll put it on RedAlt for other people to use as a resource. Ok, with that out of the way…

I have a problem remembering the codes for the obscure date characters that PHP’s date() function uses. I know, it’s something I should just know, but it’s not. Yes, I have trouble remembering whether “M”, “F”, or “J” outputs the abbreviated form of the month name. I can never remember how to get the number of the day of the year. It’s a real mental block and an impediment to my day-to-day life.

In contrast, I have absolutely no problem remembering how regular expressions work. I know that “\s” is a whitespace, and it’s capital, “\S” is not a whitespace. I know that “{,4}” means up to four times. I even know what the “ism” flags mean on an expression. I surely don’t need to know that a dot matches any character, and that “^” and “$” mark the beginning and ending of a string, depending on the flags provided, of course. Why does this matter at all?

I have very specific needs for a PHP cheat sheet. I need it only for the things that I can’t remember, but need to look up often enough that a sheet of them on my desk would be more useful than going to a web site that had it all. I really want most of the space used for the stuff I need to know rather than the stuff I already know, so 3/4 of a page of basic regular expression stuff (That omits the look-ahead and look-behind assertions? Oh, come on!) is not good for me.

There are only a scattered few things that I need to keep track of. The order of parameters of some PHP functions might be nice, since they change unexpectedly from function to function. Like, whether sort() returns a value. Useful stuff.

Some trickier HTML and CSS might be useful, too. Just the obscure stuff, nothing mundane. Some of the crazier MySQL hints, like how to effectively turn a query with an IN() into a more efficient query that’s JOINed.

For this reason, all of the cheat sheets I’ve found on the web so far are too cluttered. I don’t really want a novel on my desk for reference when a page of specific info will do fine. Yes, I’m just picky.

But I’m envisioning a tool that would let you enable and disable sections, hide and show specific functions, and rearrange topical blocks on the page to produce something useful to whoever had configured it. Such a tool could be of value to the universe. Perhaps I will build this tool. Ironically, it will probably require the use of a cheat sheet.