检测你处于程序员的哪个层级

检测你处于程序员的哪个层级

2018-02-15 陈皓 程序员干货站

高中时期

view plaincopy to clipboardprint?

  1. 10 PRINT "HELLO WORLD"  

  2. 20 END  

大学新生

view plaincopy to clipboardprint?

  1. program Hello(input, output)  

  2.   begin  

  3.     writeln(\'Hello World\')  

  4.   end.  


高年级大学生

view plaincopy to clipboardprint?

  1. #include <stdio.h>  

  2.    

  3. int main(void)  

  4. {  

  5.    printf("Hello, world!\\n");  

  6.    return 0;  

  7. }  

  8. </stdio.h>  

     

  9.  

职业新手

view plaincopy to clipboardprint?

  1. #include <stdio.h>  

  2. void main(void)  

  3. {  

  4.   char *message[] = {"Hello ", "World"};  

  5.   int i;  

  6.   

  7.   for(i = 0; i < 2; ++i)  

  8.     printf("%s", message[i]);  

  9.   printf("\\n");  

  10. }  

  11. stdio.h>  

职业老手

view plaincopy to clipboardprint?

  1.  #include <iostream>  

  2.  #include <string>  

  3. using namespace std;  

  4.   

  5.  class string  

  6.  {  

  7.  private:  

  8.    int size;  

  9.    char *ptr;  

  10.   

  11.  string() : size(0), ptr(new char[1]) { ptr[0] = 0; }  

  12.   

  13.    string(const string &s) : size(s.size)  

  14.    {  

  15.      ptr = new char[size + 1];  

  16.      strcpy(ptr, s.ptr);  

  17.    }  

  18.   

  19.    ~string()  

  20.    {  

  21.      delete [] ptr;  

  22.    }  

  23.   

  24.    friend ostream &operator <<(ostream &, const string &);  

  25.    string &operator=(const char *);  

  26.  };  

  27.   

  28.  ostream &operator<<(ostream &stream, const string &s)  

  29.  {  

  30.    return(stream << s.ptr);  

  31.  }  

  32.   

  33.  string &string::operator=(const char *chrs)  

  34.  {  

  35.    if (this != &chrs)  

  36.    {  

  37.      delete [] ptr;  

  38.     size = strlen(chrs);  

  39.      ptr = new char[size + 1];  

  40.      strcpy(ptr, chrs);  

  41.    }  

  42.    return(*this);  

  43.  }  

  44.   

  45.  int main()  

  46.  {  

  47.    string str;  

  48.   

  49.    str = "Hello World";  

  50.    cout << str << endl;  

  51.   

  52.    return(0);  

  53.  }  

  54. /string></iostream>  

黑客学徒

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

有经验的黑客

view plaincopy to clipboardprint?

  1. #include <stdio.h>  

  2. #define S "Hello, World\\n"  

  3. main(){exit(printf(S) == strlen(S) ? 0 : 1);}  

  4. stdio.h>  

老练的黑客

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

超级黑客

  % echo "Hello, world."

一线经理

view plaincopy to clipboardprint?

  1. 10 PRINT "HELLO WORLD"  

  2. 20 END  

中层经理

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

高级经理

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

首席执行官

  % letter
  letter: Command not found.
  % mail
  To: ^X ^F ^C
  % help mail
  help: Command not found.
  % damn!
  !: Event unrecognized
  % logou
posted @ 2018-02-15 17:29  南北12345678  阅读(215)  评论(0编辑  收藏  举报