Shirt Design

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Shirt Design

Post 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?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Code: Select all

$>cd /pub
$>more beer
Theory?
Forum Contributor
Posts: 138
Joined: Wed Apr 11, 2007 10:43 am

Post 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.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

JayBird wrote:

Code: Select all

$>cd /pub
$>more beer
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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You can make rude ones involving commands "finger" and "touch"...
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post 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?
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

I still love my shirt...
rm -rf /bin/laden
AshrakTheWhite
Forum Commoner
Posts: 69
Joined: Thu Feb 02, 2006 6:47 am

Post by AshrakTheWhite »

shiznatix wrote:
JayBird wrote:

Code: Select all

$>cd /pub
$>more beer
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?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

@shiz...maybe use a regular expression and shorten it up a bit.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post 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 8O ... no one will be able to understand it just by looking at it while your friends are walking in the street.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

yes yes too long. I will rework on it and whatnot. give me a minute
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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');

?>
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

ahh regular expressions, I must learn thee
User avatar
TheMoose
Forum Contributor
Posts: 351
Joined: Tue May 23, 2006 10:42 am

Post by TheMoose »

User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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" :twisted:
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply