DEV Community

Ben Halpern
Ben Halpern Subscriber

Posted on

Give me your best programming haiku

Top comments (54)

Collapse
 
lambdude profile image
Ian Johnson • Edited

My code fails.
I do not know why.
My code works.
I do not know why.

😜

Collapse
 
pbouillon profile image
Pierre Bouillon • Edited
>>> import this
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
Enter fullscreen mode Exit fullscreen mode

:)

Collapse
 
alexalb32039053 profile image
Alex Alberto

include

using namespace std;

int main()
{
cout << "Beautiful is better than ugly." << endl;
cout << "Explicit is better than implicit." << endl;
cout << "Simple is better than complex." << endl;
cout << "Complex is better than complicated." << endl;
cout << "Flat is better than nested." << endl;
cout << "Sparse is better than dense." << endl;
cout << "Readability counts." << endl;
cout << "Special cases aren't special enough to break the rules." << endl;
cout << "Although practicality beats purity." << endl;
cout << "Errors should never pass silently." << endl;
cout << "Unless explicitly silenced." << endl;
cout << "In the face of ambiguity, refuse the temptation to guess." << endl;
cout << "There should be one-- and preferably only one --obvious way to do it." << endl;
cout << "Although that way may not be obvious at first unless you're Dutch." << endl;
cout << "Now is better than never." << endl;
cout << "never is often better than right now." << endl;
cout << "If the implementation is hard to explain, it's a bad idea." << endl;
cout << "If the implementation is easy to explain, it may be a good idea" << endl;
cout << "Namespaces are one honking great idea -- let's do more of those" << endl;

return 0;
Enter fullscreen mode Exit fullscreen mode

}
code with C++

Collapse
 
maxwell_dev profile image
Max Antonucci

Think I'm a genius
Bend computers to my will
I just google stuff

Collapse
 
rpalo profile image
Ryan Palo

coding is the best
don’t let it make you feel dumb
keep calm, debug on

Also

we are all friends here
there is room for all people
but... tabs are for chumps

Collapse
 
peiche profile image
Paul

I will fight you man
tabs are better than spaces
refrigerator

Collapse
 
rpalo profile image
Ryan Palo • Edited

Kung Pow face off

I can't tell a lie
your word skills are impressive
now I think we're friends

Collapse
 
rpalo profile image
Ryan Palo

Sorry, I can’t stop!

python: less is more
ruby: devs should be happy
what langs do you love?

Collapse
 
tiagoamaro profile image
Tiago Padrela Amaro • Edited

No code runs faster than no code.
No code has fewer bugs than no code.
No code uses less memory than no code.
No code is easier to understand than no code.

  • Mike Perham
Collapse
 
bhupesh profile image
Bhupesh Varshney 👾

True af

Collapse
 
maxwell_dev profile image
Max Antonucci

I'm a nice guy, but
write CSS in JS?
I'll lose my damn mind.

Collapse
 
peiche profile image
Paul

That second line. Nice!

Collapse
 
jorgerafaelsj profile image
Jorge Suarez

what is with this code?
oh my, looks like I wrote it
what was I thinking?

Collapse
 
michaelgv profile image
Mike

All time favourite:

Cannot be located, but
Countless more exist.

Chaos reigns within.
Reflect, repent, and reboot.
Order shall return.

Program aborting:
Close all that you have worked on.
You ask far too much.

Windows NT crashed.
I am the Blue Screen of Death.
No one hears your screams.

Yesterday it worked.
Today it is not working.
Windows is like that.

Your file was so big.
It might be very useful.
But now it is gone.

Stay the patient course.
Of little worth is your ire.
The network is down.

A crash reduces
Your expensive computer
To a simple stone.

Three things are certain:
Death, taxes and lost data.
Guess which has occurred.

You step in the stream,
But the water has moved on.
This page is not here.

Out of memory.
We wish to hold the whole sky,
But we never will.

Having been erased,
The document you're seeking
Must now be retyped.

Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.

Collapse
 
mamba0076 profile image
mamba0076

All of the above - Has it been that long since I laughed at my computer? ! lmao
Three things are certain:
Death, taxes and lost data.
Guess which has occurred. - defo 1st level engineering

Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
loooooooool

Collapse
 
phlash profile image
Phil Ashby

Ah that reminds me, need to put back my 404 page - thanks :)

Collapse
 
fatherofcurses profile image
Colin Principe

Why doesn't this work?
I've checked syntax ninety times!
Oh, missed bracket.

Collapse
 
lexlohr profile image
Alex Lohr

You find the right names
avoid off-by-one errors
and document well