Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

C Humor

Humor Chronicle Programming Language Humor Top 10 Classic Unix Humor Softpanorama Humor Archive Larry Wall & Perl RMS Linus Torvalds
 C C++ Assembler Perl Shell Java Debugging
Admin Algorithms  Networking Solaris Scripting Linux Editors
skeptical humor OFM Humor   SE   vi Viruses Eric Raymond GPL

Check out this program

It's a small C program. I know, I know, it doesn't look like it's gonna get compiled, but believe me, it does. Try to guess this program's output, then try to run it. You'll be amazed to see what it does!

Here's the program in a normal text file .

#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l \
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# \
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' \
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')# \
}'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
  :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

Geek Rιplique Dennis Ritchie

Dennis Ritchie, renowned author of the C programming language, obligingly responded to our query as follows:
 
I don't usually answer this kind of request; various Who's Who compilers have gone unrequited. Nevertheless,

How to Program in C/The Ten Commandments for C Programmers

  1. Thou shalt run lint frequently and study its pronouncements with care, for verily its perception and judgement oft exceed thine.
  2. Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.
  3. Thou shalt cast all function arguments to the expected type if they are not of that type already, even when thou art convinced that this is unnecessary, lest they take cruel vengeance upon thee when thou least expect it.
  4. If thy header files fail to declare the return types of thy library functions, thou shalt declare them thyself with the most meticulous care, lest grievous harm befall thy program.
  5. Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
  6. If a function be advertised to return an error code in the event of difficulties, thou shalt check for that code, yea, even though the checks triple the size of thy code and produce aches in thy typing fingers, for if thou thinkest ``it cannot happen to me'', the gods shall surely punish thee for thy arrogance.
  7. Thou shalt study thy libraries and strive not to reinvent them without cause, that thy code may be short and readable and thy days pleasant and productive.
  8. Thou shalt make thy program's purpose and structure clear to thy fellow man by using the One True Brace Style, even if thou likest it not, for thy creativity is better used in solving problems than in creating beautiful new impediments to understanding.
  9. Thy external identifiers shall be unique in the first six characters, though this harsh discipline be irksome and the years of its necessity stretch before thee seemingly without end, lest thou tear thy hair out and go mad on that fateful day when thou desirest to make thy program run on an old system.
  10. Thou shalt foreswear, renounce, and abjure the vile heresy which claimeth that ``All the world's a VAX'', and have no commerce with the benighted heathens who cling to this barbarous belief, that the days of thy program may be long even though the days of thy current machine be short.

Addendum - How to write in C


Addendum - How to debug C code

Another version of "Write in C"

 

The Real Programmer Stories

COMPUTERWORLD 1 April

                     CREATORS ADMIT UNIX, C HOAX

    In an announcement that has stunned the computer industry, Ken Thompson,
    Dennis Ritchie and Brian Kernighan admitted that the Unix operating
    system and C programming language created by them is an elaborate April
    Fools prank kept alive for over 20 years.  Speaking at the recent
    UnixWorld Software Development Forum, Thompson revealed the following:

    "In 1969, AT&T had just terminated their work with the GE/Honeywell/AT&T
    Multics project. Brian and I had just started working with an early
    release of Pascal from Professor Nichlaus Wirth's ETH labs in
    Switzerland and we were impressed with its elegant simplicity and
    power. Dennis had just finished reading 'Bored of the Rings', a
    hilarious National Lampoon parody of the great Tolkien 'Lord of the
    Rings' trilogy. As a lark, we decided to do parodies of the Multics
    environment and Pascal. Dennis and I were responsible for the operating
    environment. We looked at Multics and designed the new system to be as
    complex and cryptic as possible to maximize casual users' frustration
    levels, calling it Unix as a parody of Multics, as well as other more
    risque allusions. Then Dennis and Brian worked on a truly warped
    version of Pascal, called 'A'. When we found others were actually
    trying to create real programs with A, we quickly added additional
    cryptic features and evolved into B, BCPL and finally C. We stopped
    when we got a clean compile on the following syntax:

    for(;P("\n"),R-;P("|"))for(e=C;e-;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);

    To think that modern programmers would try to use a language that
    allowed such a statement was beyond our comprehension!  We actually
    thought of selling this to the Soviets to set their computer science
    progress back 20 or more years. Imagine our surprise when AT&T and
    other US corporations actually began trying to use Unix and C!  It has
    taken them 20 years to develop enough expertise to generate even
    marginally useful applications using this 1960's technological parody,
    but we are impressed with the tenacity (if not common sense) of the
    general Unix and C programmer.  In any event, Brian, Dennis and I have
    been working exclusively in Pascal on the Apple Macintosh for the past
    few years and feel really guilty about the chaos, confusion and truly
    bad programming that have resulted from our silly prank so long ago."

    Major Unix and C vendors and customers, including AT&T, Microsoft,
    Hewlett-Packard, GTE, NCR, and DEC have refused comment at this time.
    Borland International, a leading vendor of Pascal and C tools,
    including the popular Turbo Pascal, Turbo C and Turbo C++, stated they
    had suspected this for a number of years and would continue to enhance
    their Pascal products and halt further efforts to develop C.  An IBM
    spokesman broke into uncontrolled laughter and had to postpone a
    hastily convened news conference concerning the fate of the RS-6000,
    merely stating 'VM will be available Real Soon Now'.  In a cryptic
    statement, Professor Wirth of the ETH institute and father of the
    Pascal, Modula 2 and Oberon structured languages, merely stated that P.
    T. Barnum was correct.

    In a related late-breaking story, usually reliable sources are stating
    that a similar confession may be forthcoming from William Gates
    concerning the MS-DOS and Windows operating environments.  And IBM
    spokesman have begun denying that the Virtual Machine (VM) product is
    an internal prank gone awry.
    {COMPUTERWORLD 1 April}
    {contributed by Bernard L. Hayes}

 

Computer songs and poems C Hacker in Paradise

Tried to amend my low-level habits
started learning Ada last fall
Writing tasks with conditional rendez-vous calls
Raising lots'a exceptions and handling them all
But at night I had these wonderful dreams
some kind of sensuous treat
Not of subtypes or generics or packages
but of function pointers and binary trees

( I was a...)
C hacker in paradise
putting my flags in an integer slice
Using K&R to be more precise
I'm just a C hacker in paradise

Heard about some of our managers
they want to do everything with a tool
Classes you browse by clicking with the mouse
Well it reminds me of some stuff I saw in primary school!
But I am not so easy to break;
When I'm at work I keep fighting back
Not with methods, drag-and-drop or a Hypercard stack
But with that miracle language in which I hack!

C hacker in paradise
writing code that's already optimized
putting my flags in an integer slice
I'm just a C hacker in paradise

I write all my functions with recursion
using implicit pointer conversion
Back with a longjmp and then a goto
Oh, good God almighty which way should I go

to be a
C hacker in paradise
Making all operations bitwise
Writing right onto the raw device
Yes, I'm a
C hacker in paradise
I'll be a
C hacker in paradise
I'm just a
C hacker in paradise

I write all ...

C hacker in paradise ....

Computer songs and poems Coding In C

I'd like to be coding in C
In the Sun Computer lab in the shade
Stay up all night, program it right
In a Sun Computer lab in the shade

I'd ask my friends to program C
in the computer lab with me
I'd like to be coding in C
In a Sun Computer lab in the shade.

We've never done using the Sun
In our little hideaway making lots of fun.
banking our head until we're dead.
In a Sun Computer lab in the shade


Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: March 12, 2019