The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Useless code snippets

During the time we spend in front of the keyboard, whacking away like lunatics we tend to work hours on end on some of the most useless code snippets.

Anyways, just to display what we all mostly just waste our time with why don't we throw in a bit of useless code for everybody to see.

Doesn't have to have any particular pretty effect - just as long as it does something. Doesn't have to be long codes or terribly complicated codes, just as long as we know that it's a one time use only. Some client who's been asking for something totally nutty and un-explainable.

Well, here's my bid on it, lets see how much time we can wrestle down and claim to have wasted. Ok and before i forget - it doesn't have to be the absolute best way of doing things, just as long as we don't go out of our way to actually create mumbo jumbo.

Part of a large script of course, but this particular little snippet was to insert the past weekend's sunday/saturday date regardless of when the script was run.

I'll probably never have any use for it in my entire life so i'd dare say this is my most (to date) useless code snippet.

Well, who knows, there might be somebody out there that's looking for just exactly something like this but since you mostly find instructions/tutorials/articles on the most common things when searching online for help, it might even prove that we get some info collected here which will (when all added together) prove to be less than useless.