15

trs()

For those of you desiring to post non-rants, I wrote a handy utility function for you:

/*
* Toggles whether this post is
* a rant or not.
*/
function toggleRant()
{
// Check if toggling is safe
for(var i = 0; i < 999999999; i ++)
for(var t = 0; t < 999999999; t ++);
console.log("Crazy security checks came through.")

// Toggle ('isRant' is true by default)
isRant = !isRant
}

From now on, you can easily put 'toggleRant()' on the first line of any rant. As we all know, the 'isRant' on devRant is true by default.

Feel free to play around with it:

toggleRant()
toggleRant()
toggleRant()

This would also indicate that your "rant" is not a rant.

I've also wrapped the 'toggleRant' into another function with a shorter name for you lazy people (which most programmers are):

/*
* Wrapper for 'toggleRant'.
*/
function tr()
{
toggleRant()
trogus() // Just in case
}

Or if you type one additional letter, you also make sure that it's extra safe to call the function:

/*
* Extra safe version of 'tr'.
*/
function trs()
{
for(var i = 0; i < 746985768; i ++);
console.log ("Extra safe")

tr()
}

Comments
Add Comment