The Evolution of a Programmer
High School/Jr.High
10 PRINT "HELLO WORLD"
20 END
First year in College
program Hello(input, output)
begin
writeln('Hello World')
end.
Senior year in College
(defun hello
(print
(cons 'Hello (list 'World))))
New professional
#include <stdio.h>
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}
Seasoned professional
#include <iostream.h>
#include <string.h>
class string
{
private:
int size;
char *ptr;
public:
string() : size(0), ptr(new char('\0')) {}
string(const string &s) : size(s.size)
{
ptr = new char[size + 1];
strcpy(ptr, s.ptr);
}
~string()
{
delete [] ptr;
}
friend ostream &operator <<(ostream &, const string &);
string &operator=(const char *);
};
ostream &operator<<(ostream &stream, const string &s)
{
return(stream << s.ptr);
}
string &string::operator=(const char *chrs)
{
if (this != &chrs)
{
delete [] ptr;
size = strlen(chrs);
ptr = new char[size + 1];
strcpy(ptr, chrs);
}
return(*this);
}
int main()
{
string str;
str = "Hello World";
cout << str << endl;
return(0);
}
System Administrator
main()
{
char *tmp;
int i=0;
/* on y va bourin */
tmp=(char *)malloc(1024*sizeof(char));
while (tmp[i]="Hello Wolrd"[i++]);
/* Ooopps y'a une infusion ! */
i=(int)tmp[8];
tmp[8]=tmp[9];
tmp[9]=(char)i;
printf("%s\n",tmp);
}
Apprentice Hacker
$msg="Hello, world.\n";
if ($#ARGV >= 0) {
while(defined($arg=shift(@ARGV))) {
$outfilename = $arg;
open(FILE, ">" . $outfilename) || die "Can't write $arg: $!\n";
print (FILE $msg);
close(FILE) || die "Can't close $arg: $!\n";
}
} else {
print ($msg);
}
1;
Experienced Hacker
main(){exit(printf(S) == strlen(S) ? 0 : 1);}
Seasoned Hacker
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
Guru Hacker
% cat
Hello, world.
^D
New Manager
10 PRINT "HELLO WORLD"
20 END
Middle Manager
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello,
world."?
I need it by tomorrow.
^D
Senior Manager
% zmail jim
I need a "Hello, world." program by this afternoon.
Chief Executive
% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout
And now what is a real programmer ???
Real Programmers don't write specs -- users should consider themselves
lucky to get any programs at all and take what they get.
Real Programmers don't comment their code. If it was hard to write, it
should be hard to understand.
Real Programmers don't write application programs; they write right down
on the bare metal. Application programming is for feebs who can't do
systems programming.
Real Programmers don't eat quiche. If fact, real programmers don't know
how to SPELL quiche. They eat Twinkies, and szechuan food.
Real Programmers don't write in COBOL. COBOL is for wimpy applications
programmers.
Real Programmers's programs never work right the first time. But if you
throw them on the machine they can be patched into working in "only a few"
30 hour debugging sessions.
Real Programmers don't write in FORTRAN. FORTRAN is for pipe stress freaks
and crystallography weenies.
Real Programmers never work 9 to 5. If any programmers are around at 9
AM, it's because they were up all night.
Real Programmers don't write in BASIC. Actually, no programmers write in
BASIC after the age of 12.
Real Programmers don't write in PL/I. PL/I id for programmers who can't
decide whether to write in COBOL or FORTRAN.
Real Programmers don't play tennis, or any other sport that requires you
to change clothes. Moutain climbing is OK, and real programmers wear their
climbing boots to work in case a mountain should suddenly spring up in the
middle of the machine room.
Real Programmers don't document. Documentation is for simps who can't read
the listing or the object deck.
Real Programmers don't write in PASCAL, or ADA, or any of those pinko
computer science languages. Strong typing is for people with weak
memories.
|