1
\$\begingroup\$

I am looking for either suggestions or examples of more famous sayings written in code! If you have a website or database of them, please link that below your favorite one! Examples:

while(!(succeed = try()))


if(lifegivesyou == lemons) {makelemonade();)
\$\endgroup\$
1
  • 1
    \$\begingroup\$ I prefer if(life.gives(you,lemons)) you.throw(lemons,'people you don\'t like') \$\endgroup\$ Commented Mar 4, 2014 at 20:07

4 Answers 4

4
\$\begingroup\$

How about:

~wish&~want;

or

Penny.Earned = Penny.Save();
\$\endgroup\$
2
  • \$\begingroup\$ Nice ones! I wish I could upvote! MOAR PLS \$\endgroup\$
    – DrJonesYu
    Commented Feb 26, 2014 at 5:37
  • \$\begingroup\$ Shouldn't this just be Penny saved = earned; \$\endgroup\$
    – user21375
    Commented May 16, 2014 at 20:46
4
\$\begingroup\$

bash

say "It's going to be legen..."
waitforit
say "dary!"
\$\endgroup\$
3
\$\begingroup\$
if (glass.getLevel() == 0.5)
    throw new ContainerTooLargeException(glass + " is twice as big as it needs to be.");
\$\endgroup\$
2
  • \$\begingroup\$ Wouldn't that be an OptimismException? \$\endgroup\$
    – Comintern
    Commented Feb 26, 2014 at 4:43
  • 1
    \$\begingroup\$ The optimist says the glass is half full. The pessimist says it's half empty. The engineer says the glass is twice as big as it needs to be. \$\endgroup\$
    – TheDoctor
    Commented Feb 26, 2014 at 15:47
2
\$\begingroup\$

C++

Toast toast = New Toast();
toast.fillside("butter", "up");
toast.fall(); //this method swaps sides, now buttered side is down
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.