×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

@

从写HELLO WORLD看程序员是怎样练成的

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
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}

Experienced Hacker

#include
#define S "Hello, World\n"
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 Officer

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

Report

Replies, comments and Discussions:

  • 工作学习 / 专业知识杂谈 / 从写HELLO WORLD看程序员是怎样练成的
    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
    void main(void)
    {
    char *message[] = {"Hello ", "World"};
    int i;
    for(i = 0; i < 2; ++i)
    printf("%s", message[i]);
    printf("\n");
    }

    Experienced Hacker

    #include
    #define S "Hello, World\n"
    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 Officer

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

    • LOL Good one thanks for sharing
    • 黑客应该这么写
      Mov AX,"Hello"
      Mov BX,"Word"
      Mov CX,"!"
      Int 21h
      • 黑客能把字符串写进寄存器? 牛!
        • lol 还是有人忍不住说出来了哈
      • should be: debug
        A 100
        DEC AX
        DB 65
        DB 6C
        DB 6C
        DB 6F
        AND [BX+6F],DH
        JB 0176
        DB 64
        AND [BP+0100],DI
        MOV AH,0E
        MOV CX,000C
        MOV BX,0007
        LODSB
        INT 10
        LOOP 0117
        • nice! 最后少了g=10c
        • 碰到会汇编的知音啊!最简单的是dos版!
          debug
          a 100
          mov dx,10c
          mov ah,9
          int 21
          mov ax,4c00
          int 21


          e 10c "Hello World$"

          rcx
          1E
          n c:\a.com
          w100
          q

          以上会在c盘生成一个只有30字节的显示hello world的最简单的可执行文件a.com
      • 如果黑客是Kevin Mitnik, 他是这么做的,先打电话到Bell实验室, 找一个程序员,告诉他自己是IT Administrator, 整在调试服务器,要一个用户帐号,得到姓名,用户帐号以后,得到后,再打电话给Admin, 告诉自己是Developer XXX,
        需要source control的user name/password, 然后进入系统,找到login.c,下载,改成HelloWorld.c, Upload, 完毕。
    • Funny!
    • Ah... that good 'n old time of C shell !