Page 1 of 3
Shirt Design
Posted: Wed Apr 25, 2007 11:02 am
by shiznatix
Ok so my friends are getting into making their own clothes and whatnot because they are starving artists and can't afford to buy real clothes or something, I don't know.
The point is, I want to make a PHP shirt with some sort of joke. Something that a programmer could look at and understand but a non-programmer would have no clue.
My first idea was to have some sort of scrambled string then run it through a function that would unscramble it to output 'Thug Life' or 'This is how I get the girls' or something like that. Now I think I will do that one but I am looking for more ideas.
So common clever people, what ideas you got?
Posted: Wed Apr 25, 2007 11:04 am
by JayBird
Posted: Wed Apr 25, 2007 11:08 am
by Theory?
Thinkgeek used to have the most brilliant PERL shirts on earth. They had full programs on them that output the shape they were modelled in on the shirt.
As in, the code would be on the shirt, but the paragraph was shaped like a camel (duh). If you actually run the program, it just outputs an ASCII camel. Pretty pointless, but funny nonetheless.
Good parody would be taking an issue that's hot in the PHP developer community. From my exposure, it would seem frameworks are at the heart of lots of heated discussion these days. Try and find a way to make fun of frameworks.
Or better yet, make fun of RoR.
Posted: Wed Apr 25, 2007 11:30 am
by shiznatix
Thats a good one. I will see if I can get that put on the back of the shirt somewhere.
Theory?: Good ideas but I can't be caught making fun of programming through programming, I would lose my credibility as a thug.
As for the first code I came up with, here it is:
Code: Select all
<?php
$str = 'TeHfIiS IlS H_OgW I GuEhT TtH6E G9I6R9L.S';
$decoded = hardcore($str);
if ('female' == $_SERVER['HTTP_USER_AGENT'])
echo $decoded[0];
else
echo $decoded[1];
function hardcore($input_str)
{
$len = strlen($input_str);
$output = array(0 => '', 1 => '');
for ($i = 0; $i < $len; $i++)
{
if (preg_match('#[a-z_]#', $input_str[$i], $matches))
{
$output[0] .= $input_str[$i];
}
else if (preg_match('#[A-Z ]#', $input_str[$i], $matches))
{
$output[1] .= $input_str[$i];
}
}
$output[0] = ucwords(str_replace('_', ' ', strrev($output[0]))).'.';
$output[1] = ucwords(str_replace('_', ' ', strtolower($output[1])));
return $output;
}
?>
but I need a better way of writing the if 'female' part. The girls gotta know that I live a thugs life and the guys gotta know how I get all the girls so I need a different message for each but I don't have any good ideas.
Posted: Wed Apr 25, 2007 11:38 am
by Chris Corbyn
You can make rude ones involving commands "finger" and "touch"...
Posted: Wed Apr 25, 2007 11:39 am
by aaronhall
shiznatix wrote:As for the first code I came up with, here it is:
Code: Select all
<?php
$str = 'TeHfIiS IlS H_OgW I GuEhT TtH6E G9I6R9L.S';
$decoded = hardcore($str);
if ('female' == $_SERVER['HTTP_USER_AGENT'])
echo $decoded[0];
else
echo $decoded[1];
function hardcore($input_str)
{
$len = strlen($input_str);
$output = array(0 => '', 1 => '');
for ($i = 0; $i < $len; $i++)
{
if (preg_match('#[a-z_]#', $input_str[$i], $matches))
{
$output[0] .= $input_str[$i];
}
else if (preg_match('#[A-Z ]#', $input_str[$i], $matches))
{
$output[1] .= $input_str[$i];
}
}
$output[0] = ucwords(str_replace('_', ' ', strrev($output[0]))).'.';
$output[1] = ucwords(str_replace('_', ' ', strtolower($output[1])));
return $output;
}
?>
You're going to put all of that on a t-shirt?
Posted: Wed Apr 25, 2007 11:43 am
by nickvd
I still love my shirt...
rm -rf /bin/laden
Posted: Wed Apr 25, 2007 11:50 am
by AshrakTheWhite
shiznatix wrote:
Thats a good one. I will see if I can get that put on the back of the shirt somewhere.
Theory?: Good ideas but I can't be caught making fun of programming through programming, I would lose my credibility as a thug.
As for the first code I came up with, here it is:
Code: Select all
<?php
$str = 'TeHfIiS IlS H_OgW I GuEhT TtH6E G9I6R9L.S';
$decoded = hardcore($str);
if ('female' == $_SERVER['HTTP_USER_AGENT'])
echo $decoded[0];
else
echo $decoded[1];
function hardcore($input_str)
{
$len = strlen($input_str);
$output = array(0 => '', 1 => '');
for ($i = 0; $i < $len; $i++)
{
if (preg_match('#[a-z_]#', $input_str[$i], $matches))
{
$output[0] .= $input_str[$i];
}
else if (preg_match('#[A-Z ]#', $input_str[$i], $matches))
{
$output[1] .= $input_str[$i];
}
}
$output[0] = ucwords(str_replace('_', ' ', strrev($output[0]))).'.';
$output[1] = ucwords(str_replace('_', ' ', strtolower($output[1])));
return $output;
}
?>
but I need a better way of writing the if 'female' part. The girls gotta know that I live a thugs life and the guys gotta know how I get all the girls so I need a different message for each but I don't have any good ideas.
slight overkill dont ya think?
Posted: Wed Apr 25, 2007 11:51 am
by Burrito
@shiz...maybe use a regular expression and shorten it up a bit.
Posted: Wed Apr 25, 2007 11:52 am
by Oren
shiznatix wrote:Code: Select all
<?php
$str = 'TeHfIiS IlS H_OgW I GuEhT TtH6E G9I6R9L.S';
$decoded = hardcore($str);
if ('female' == $_SERVER['HTTP_USER_AGENT'])
echo $decoded[0];
else
echo $decoded[1];
function hardcore($input_str)
{
$len = strlen($input_str);
$output = array(0 => '', 1 => '');
for ($i = 0; $i < $len; $i++)
{
if (preg_match('#[a-z_]#', $input_str[$i], $matches))
{
$output[0] .= $input_str[$i];
}
else if (preg_match('#[A-Z ]#', $input_str[$i], $matches))
{
$output[1] .= $input_str[$i];
}
}
$output[0] = ucwords(str_replace('_', ' ', strrev($output[0]))).'.';
$output[1] = ucwords(str_replace('_', ' ', strtolower($output[1])));
return $output;
}
?>
It's too long

... no one will be able to understand it just by looking at it while your friends are walking in the street.
Posted: Wed Apr 25, 2007 12:02 pm
by shiznatix
yes yes too long. I will rework on it and whatnot. give me a minute
Posted: Wed Apr 25, 2007 12:08 pm
by Chris Corbyn
Your code would be just as geeky if you wrote:
Code: Select all
<?php
echo preg_replace('/[^A-Z\ ]/', '', 'TeHfIiS IlS H_OgW I GuEhT TtH6E G9I6R9L.S');
?>
Posted: Wed Apr 25, 2007 12:12 pm
by shiznatix
ahh regular expressions, I must learn thee
Posted: Wed Apr 25, 2007 12:23 pm
by TheMoose
Posted: Wed Apr 25, 2007 1:59 pm
by pickle
My two favourtes are:
Funny shirt 1 wrote:?> SELECT * FROM `users` WHERE `clue` > 0;
0 rows returned
and:
Funny shirt 2 wrote:<sarcasm>
That's a great idea!
</sarcasm>
If you want to get crude, "PH" can stand for "Pretty Huge"
