8, September 2008

The Evolution of a Programmer and How to Order a Software - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  WebDigity Community  >  Forum Lounge
Topic: The Evolution of a Programmer and How to Order a Software
« previous next »
Pages: [1] Print

Author Topic: The Evolution of a Programmer and How to Order a Software  (Read 363 times)
Small Business Internet Marketing
Computer Avant Garde
***
Gender: Male
Posts: 209
146 credits
Members referred : 0


More than just a Webmaster


« on: May 06, 2008, 06:26:02 PM »

Guys; on the entrance of this lounge I've seen a sign that said we could come in here and have some fun and someone would come and serve some fresh Greek Coffee! So here i am, having fun and wait for my coffee. Now while we are all waiting here, for our coffee, i thought we could have a bit more of that fun part they where talking about when i came in here.

So why don't we have some more fun while we are ... stil... waiting for that coffee... 'ftiakse vre stavre ena cafee... I think we should have more fun here anyway since this very nice and very professional forum seems to fall asleep lately. Guys Girls, more fun!!

Ok, I'll make a start, let's have some fun about.... Einstein?... not funny, besides of the hair style, what about... i got it, what about Darwin? Charles Darwin, you all know the guy who insisted that our grand grand fathers where monkeys... Guess he was right after all!

You know what?.. Evolution takes place everywhere and it's going even faster for some cold pizza chewing geeks.
So here are Charles Darwin's Theories translated into Geek Slang!

Let's do some programing; shell we? The outcome of our little software should be well known to anyone here, if not, bludgeons Visit through proxy
are handed out at the exit! - Off we go:

First we look at the High School & Jr.High Student

Code:
  10 PRINT "HELLO WORLD"
  20 END

Than the First Year College Student

 
Code:
program Hello(input, output)
    begin
      writeln('Hello World')
    end.

The Senior College Student

Code:
  (defun hello
    (print
      (cons 'Hello (list 'World))))

The New Professional Programer

Code:
  #include <stdio.h>
  void main(void)
  {
    char *message[] = {"Hello ", "World"};
    int i;

    for(i = 0; i < 2; ++i)
      printf("%s", message[i]);
    printf("\n");

The Seasoned Professional Expert

Code:
  #include <iostream.h>
  #include <string.h>

  class string
  {
  private:
    int size;
    char *ptr;

  string() : size(0), ptr(new char[1]) { ptr[0] = 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);
  }

And here Comes the Master Skilled Programmer


Code:
[
  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(<windows.h>);
      importheader(<ole2.h>);
      importheader(<except.hxx>);
      importheader("pshlo.h");
      importheader("shlo.hxx");
      importheader("mycls.hxx");

      // needed typelibs
      importlib("actimp.tlb");
      importlib("actexp.tlb");
      importlib("thlo.tlb");

      [
      uuid(2573F891-CFEE-101A-9A9F-00AA00342820),
      aggregatable
      ]
      coclass CHello
   {
   cotype THello;
   };
  };


  #include "ipfix.hxx"

  extern HANDLE hEvent;

  class CHello : public CHelloBase
  {
  public:
      IPFIX(CLSID_CHello);

      CHello(IUnknown *pUnk);
      ~CHello();

      HRESULT  __stdcall PrintSz(LPWSTR pwszString);

  private:
      static int cObjRef;
  };


  #include <windows.h>
  #include <ole2.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include "thlo.h"
  #include "pshlo.h"
  #include "shlo.hxx"
  #include "mycls.hxx"

  int CHello::cObjRef = 0;

  CHello::CHello(IUnknown *pUnk) : CHelloBase(pUnk)
  {
      cObjRef++;
      return;
  }

  HRESULT  __stdcall  CHello::PrintSz(LPWSTR pwszString)
  {
      printf("%ws
", pwszString);
      return(ResultFromScode(S_OK));
  }


  CHello::~CHello(void)
  {

  // when the object count goes to zero, stop the server
  cObjRef--;
  if( cObjRef == 0 )
      PulseEvent(hEvent);

  return;
  }

  #include <windows.h>
  #include <ole2.h>
  #include "pshlo.h"
  #include "shlo.hxx"
  #include "mycls.hxx"

  HANDLE hEvent;

   int _cdecl main(
  int argc,
  char * argv[]
  ) {
  ULONG ulRef;
  DWORD dwRegistration;
  CHelloCF *pCF = new CHelloCF();

  hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);

  // Initialize the OLE libraries
  CoInitializeEx(NULL, COINIT_MULTITHREADED);

  CoRegisterClassObject(CLSID_CHello, pCF, CLSCTX_LOCAL_SERVER,
      REGCLS_MULTIPLEUSE, &dwRegistration);

  // wait on an event to stop
  WaitForSingleObject(hEvent, INFINITE);

  // revoke and release the class object
  CoRevokeClassObject(dwRegistration);
  ulRef = pCF->Release();

  // Tell OLE we are going away.
  CoUninitialize();

  return(0); }

  extern CLSID CLSID_CHello;
  extern UUID LIBID_CHelloLib;

  CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
      0x2573F891,
      0xCFEE,
      0x101A,
      { 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
  };

  UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
      0x2573F890,
      0xCFEE,
      0x101A,
      { 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
  };

  #include <windows.h>
  #include <ole2.h>
  #include <stdlib.h>
  #include <string.h>
  #include <stdio.h>
  #include "pshlo.h"
  #include "shlo.hxx"
  #include "clsid.h"

  int _cdecl main(
  int argc,
  char * argv[]
  ) {
  HRESULT  hRslt;
  IHello        *pHello;
  ULONG  ulCnt;
  IMoniker * pmk;
  WCHAR  wcsT[_MAX_PATH];
  WCHAR  wcsPath[2 * _MAX_PATH];

  // get object path
  wcsPath[0] = '\0';
  wcsT[0] = '\0';
  if( argc > 1) {
      mbstowcs(wcsPath, argv[1], strlen(argv[1]) + 1);
      wcsupr(wcsPath);
      }
  else {
      fprintf(stderr, "Object path must be specified\n");
      return(1);
      }

  // get print string
  if(argc > 2)
      mbstowcs(wcsT, argv[2], strlen(argv[2]) + 1);
  else
      wcscpy(wcsT, L"Hello World");

  printf("Linking to object %ws\n", wcsPath);
  printf("Text String %ws\n", wcsT);

  // Initialize the OLE libraries
  hRslt = CoInitializeEx(NULL, COINIT_MULTITHREADED);

  if(SUCCEEDED(hRslt)) {


      hRslt = CreateFileMoniker(wcsPath, &pmk);
      if(SUCCEEDED(hRslt))
   hRslt = BindMoniker(pmk, 0, IID_IHello, (void **)&pHello);

      if(SUCCEEDED(hRslt)) {

   // print a string out
   pHello->PrintSz(wcsT);

   Sleep(2000);
   ulCnt = pHello->Release();
   }
      else
   printf("Failure to connect, status: %lx", hRslt);

      // Tell OLE we are going away.
      CoUninitialize();
      }

  return(0);
  }

ARE WE Having Fun Yet???
I admit that last one was a bit too long, we all know better than that.
 - Ok, Let's make a different approaxch:

Let's give a Hobby Hacker a Chance

Code:
  #!/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;

Still quite long, let an Experienced Hacker try

Code:
  #include <stdio.h>
  #define S "Hello, World\n"
  main(){exit(printf(S) == strlen(S) ? 0 : 1);}

Or a Hacker with even more Skills

Code:
  % cc -o a.out ~/src/misc/hw/hw.c
  % a.out

Here comes the Guru Hacker!

Code:
% echo "Hello, world."

And now i tell you how our little program got ordered:

First the New Manager

Code:
  10 PRINT "HELLO WORLD"
  20 END

The Mid-Section Manager

Code:
  mail -s "Hello, world." bob@b12
  Bob, could you please write me a program that prints "Hello, world."?
  I need it by tomorrow.
  ^D

The Senior Manager

Code:
  % zmail jim
  I need a "Hello, world." program by this afternoon.

And Finally the Chief Executive

Code:
  % letter
  letter: Command not found.
  % mail
  To: ^X ^F ^C
  % help mail
  help: Command not found.
  % damn!
  !: Event unrecognized
  % logout

See what I mean? That's having Fun! Real Fun!
Just that coffee.... I'm afraid i gotta make that myself. And it didn't say 'self service' anywhere when i came in...
Nighty , and don't forget to have some fun then and when.


Last blog : How to Setup Wordpress - A 50 Step Guide
Bill Gates is my home boy
*****
Gender: Female
Posts: 606
3773 credits
Members referred : 2



« Reply #1 on: May 07, 2008, 12:43:32 AM »

Can't help but wonder if you haven't had more than enough coffee already.  Kiss

www.yourmessageconsultant.com Visit through proxy, providing online content and printed marketing materials.
www.helpforwebbeginners.com Visit through proxy, Tutorials and how to's for new  webmasters.
www.CraftyTips.com Visit through proxy, a unique Arts & Crafts Directory
www.nocans.com Visit through proxy - Pet Food Recipe Site
www.petsiteguides.com Visit through proxy - A New Pet Directory

Last blog : Cheap Jewelry Displays
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8037
41179 credits
Members referred : 3



« Reply #2 on: May 07, 2008, 12:48:01 AM »

Let me make you one. Greek coffee is not my best but I will give it a shot Smiley

BTW I didn't know that you can write a so big listing just to say "Hello world"

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Small Business Internet Marketing
Computer Avant Garde
***
Gender: Male
Posts: 209
146 credits
Members referred : 0


More than just a Webmaster


« Reply #3 on: May 07, 2008, 06:39:30 AM »

Everybody has his own way of expressing himself... And if it's only to say hello Smiley
- YMC - there is never enough coffee... I love Greek coffee - they just could use bigger cups
- Niko, yummie, I'm invited to the kite boarding world cup in Paros in June.
  Don't know yet if i can get away that long, but maybe I'll take you up on the offer soon. Smiley


Last blog : How to Setup Wordpress - A 50 Step Guide
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8037
41179 credits
Members referred : 3



« Reply #4 on: May 07, 2008, 12:57:25 PM »

Paros is great. I have a friend there, hope I can visit him soon Smiley

BTW greek coffee is also served in big cups (you order it as "diplo" or "kupato")

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
OMG!I am geek
**
Gender: Male
Posts: 57
370 credits
Members referred : 0



« Reply #5 on: May 08, 2008, 10:52:36 PM »

haven't heard such a great story about echo 'hello world'
I like that Cheesy
« Last Edit: May 09, 2008, 01:49:13 AM by droom »
OMG!I am geek
**
Gender: Male
Posts: 57
370 credits
Members referred : 0



« Reply #6 on: May 09, 2008, 01:46:23 AM »

Is there a bit coffee for me as well? I spoke with my friend about flash and news from Adobe about OpenSource, also he showed me M$ Silverlight vs. Flash. heh and there I found this nice one more 'hello world' by M$

http://en.wikipedia.org/wiki/Image:SilverLightMS.PNG Visit through proxy

I just thought its good enough for collection Cheesy
Small Business Internet Marketing
Computer Avant Garde
***
Gender: Male
Posts: 209
146 credits
Members referred : 0


More than just a Webmaster


« Reply #7 on: May 09, 2008, 06:49:19 AM »

Webdigity is founding the" Hello World Collection"


Last blog : How to Setup Wordpress - A 50 Step Guide
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7729
Tags : fun Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  WebDigity Community  >  Forum Lounge
Topic: The Evolution of a Programmer and How to Order a Software
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Sep 08, 2008, 09:00:07 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 36.302
Total Topics: 7.479
Total Members: 3.908
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: top10php

13 Guests, 5 Users online :

5 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.