Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

The evolution of the famous HELLO WORLD in the programer's life

Options
  • 06-03-2001 2:58pm
    #1
    Registered Users Posts: 2,494 ✭✭✭


    Secondary School
    10 PRINT "HELLO WORLD"
    20 END


    First year in the university
    program Hello(input, output)
    begin
    writeln('Hello World')
    end.


    Last year in the university
    (defun hello
    (print
    (cons 'Hello (list 'World))))


    Beginner professional programer
    #include <stdio.h>
    void main(void)
    { char *message[] = {"Hello ", "World"};
    int i;
    for(i = 0; i< 2; ++i)
    printf("%s", message);
    printf("\n");
    }


    Professional programer
    #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: redface.gifperator=(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);
    }

    Very very professional programer

    [
    uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
    ]
    library LHello
    {
    // bring in the master library
    importlib("actimp.tlb");
    importlib("actexp.tlb");

    // bring in my interfaces
    #include "pshlo.idl"

    [
    uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
    ]
    cotype THello
    {
    interface IHello;
    interface IPersistFile;
    };
    };

    [
    exe,
    uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
    ]
    module CHelloLib
    {

    // some code related header files
    importheader(


    Beginner hacker
    #!/usr/local/bin/perl
    $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
    #include


    More experienced hacker
    % cc -o a.out ~/src/misc/hw/hw.c
    % a.out


    Profession hacker
    % cat
    Hello, world.
    ^D


    Newly appointed manager
    10 PRINT "HELLO WORLD"
    20 END


    Middle-level manager
    mail -s "Hello, world." bob@b12
    Bob, can you write a program for me until tomorrow,
    that display "Hello word" on the screen?
    Thanks!
    ^D


    Director
    % zmail jim
    I need a "Hello Word" program today afternoon.

    CEO

    % letter
    letter: Command not found.

    % mail To: ^X
    ^F ^C

    % help mail
    help: Command not found.

    % ****!
    !: Event unrecognized

    % logout


Comments

  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    haha excellent.. especially professioinal hacker smile.gif
    ive no idea what that last year in universtity one is tho.. quite worrying.. although that said nobody does pascal (the first year one) anymore either... its probably cobol or something?

    ever see the hundred green bottles program collection?


    [This message has been edited by Kali (edited 06-03-2001).]


  • Moderators, Social & Fun Moderators Posts: 28,633 Mod ✭✭✭✭Shiminay


    The last year of Uni one is LISP (an AI language).

    I forgot Pascal for a while there and couldn't figure out what the hell the first year one was.



    All the best,

    Dav
    @B^)
    <font face="Verdana, Arial" size="2">Prepare yourself - The Beefy King stirs from his slumber...</font>


  • Closed Accounts Posts: 557 ✭✭✭Snaggle


    Surely you have the good courtesy to share with us what particular dialect of Lisp it is


  • Moderators, Music Moderators Posts: 1,481 Mod ✭✭✭✭satchmo


    Looks pretty much like bog-standard Lisp to me. Dialect? Buh?


  • Closed Accounts Posts: 557 ✭✭✭Snaggle


    There's no such thing as bog standard Lisp, the varieties of Lisps go into double digits, there's Common Lisp (which used to be the common standard), there's Scheme which a lot of free programs use as a scripting language, there'e elisp used by emacs, rep used by sawfish, there's the autolisps used by autocad, euro lisp developed by europeans (big surprise), I think Intercal had a dialect of lisp, I can go on but basically they're all different dialects of Lisp with different semantics but only slightly different syntax


  • Advertisement
  • Moderators, Social & Fun Moderators Posts: 28,633 Mod ✭✭✭✭Shiminay


    I'd take a guess at common Lisp - there's nothing major in that "hello world" anyway.

    All those brackets used to wreck my head - I nearly always left one or 2 ou at the wrong place frown.gif



    All the best,

    Dav
    @B^)
    <font face="Verdana, Arial" size="2">Prepare yourself - The Beefy King stirs from his slumber...</font>


  • Moderators, Social & Fun Moderators Posts: 28,633 Mod ✭✭✭✭Shiminay


    heh - I guess I'm just weird that way tongue.gif

    I used to play Blood in the class actually - I never worried too much about the specifics smile.gif



    All the best,

    Dav
    @B^)
    <font face="Verdana, Arial" size="2">Prepare yourself - The Beefy King stirs from his slumber...</font>

    [honey i] violated [the kids]


  • Moderators, Music Moderators Posts: 1,481 Mod ✭✭✭✭satchmo


    yeah Common Lisp that's what I meant. I'd say you're about the only one who likes those brackets, they drive me nuts!


  • Closed Accounts Posts: 98 ✭✭gimp, apparently


    what happened to simple ole,
    #include <iostream.h>
    int main()
    {
    cout <<"Hello world\n";
    return 0;
    }
    ya wouldnt make much of a very, very professional programmer if ya had to do all that krap

    ps. is that Last year in university one functional programming? i didnt think they'd ever tell us what the point in functional programming was.


    [This message has been edited by gimp, apparently (edited 07-03-2001).]


  • Closed Accounts Posts: 557 ✭✭✭Snaggle


    <font face="Verdana, Arial" size="2">Originally posted by gimp, apparently:

    ps. is that Last year in university one functional programming?
    </font>

    No, we never did a functional programming class, although there was this one called Languages, Computability and Complexity in which they made us do a lot of waffly theory on proving programs and so on (and snuck in a functional language, ML). I picked a Scheme Interpretter for my final year project, cus it was an easy project to do and I could spend more time waffling to lecturers about it (and it paid off too)
    <font face="Verdana, Arial" size="2">
    i didnt think they'd ever tell us what the point in functional programming was.
    </font>

    Every functional language course I've seen has been very simplistic, make a function recurse, some trivial list manipulation, leaves everybody walking out wondering what's the point


  • Advertisement
  • Closed Accounts Posts: 557 ✭✭✭Snaggle


    Strange (BTW yeah you're right on the Common Lisp), I used to love those brackets, so much so that I wrote a Lisp (Scheme dialect) interpretter for my final year project in college. The trick to not missing brackets is to use an editor that highlights unmatched brackets, also helps if you use standard indenting


  • Closed Accounts Posts: 218 ✭✭Void


    Couldn't resist!
    http://hosted.quake.ie/void/pics/helloworld.jpg
    Unfortunately, my ingame scripting language can't do Hello World yet.


Advertisement