580 likes | 766 Views
☣ ppencode ♨. 竹迫 良範. TAKESAKO Yoshinori. ☣ ppencode ♨. 唐鳳. Otori-tan. Where is the Next Conference?. 下次 OSDC 要開在哪裡 ?. 這裡是哪裡 ?. “waterfall” 瀑布. 瀑布. 喜歡瀑布的人很多 不止觀光客而已 程式人也免不了 (Hacker 屬於例外 ). 落水. Waterfall. 模型. 天雨路滑 小心失足 …. 不斷重寫 = 生理災害. Escape.
E N D
☣ ppencode ♨ 竹迫 良範 TAKESAKO Yoshinori
☣ ppencode ♨ 唐鳳 Otori-tan
Where is the Next Conference? 下次 OSDC 要開在哪裡?
這裡是哪裡? “waterfall” 瀑布
瀑布 • 喜歡瀑布的人很多 • 不止觀光客而已 • 程式人也免不了 • (Hacker 屬於例外) 落水
Waterfall 模型 天雨路滑 小心失足…
Escape a watery grave 海底大逃難
Ruby On Snails • 最新的開發工具 • 讓您事倍功半! • by Dave Thomas and Mike Clark
2007年瀑布大會 • 地點 • Niagara Falls, NY • 尼加拉瓜大瀑布 • 日期 • April 1st, 2007 • 二零零七年四月一日 http://www.waterfall2007.com/
Pair Managing • 不是 Pair Programming • 最新的開發方式 • 1Programmer • 2 Managers • by Jim Highsmith ☻ ☻ ☹
Unfactoring • 反構 • 讓程式愈來愈難懂 • by Joshua Kerievsky • 複製 • 貼上 • 貼上 • 貼上 • 釋出!
難懂? Perl5?
難懂的 Perl5程式?
戒煙 讓 Perl 程式的體質更健康
語言 補完計劃
難懂的 Perl5→
Perl5的印記問題 純量 陣列雜湊 ------- ------ ------- $s @a %h $$s $a[0] $h{'?'} $s->foo ☹☹
Perl6的印記解決法 純量 陣列雜湊 ------- ------ ------- $s @a %h $$s @a[0] %h<?> $s.foo @a.foo %h.foo ☺
易學易用的 Perl6!
一團混亂的 JAPH!
JAPH • print”just another perl hacker”; ● 史上第一個 JAPH @a=split(/(\d)/, "4Hacker,2another3Perl1Just"); shift(@a);%a=@a; print "@a{1..4}"; Randal Schwartz 1 Feb 1990 22:28:58 GMT 税別¥1,500- 水野 貴明 (著)
但是 沒關係…
Job Security through Unreadability 程式沒人懂, 飯碗跑不掉
幹得好! ∩( ⌒) ∩_ _グッジョブ !!/,. ノ i.,,E).//"/ /"_n グッジョブ!!.//_、_ / ノ' ( l_、 _ // ,_ノ` )/ / _、 _ グッジョブ!! \ \ ( <_,` )( /( ,_ノ` ) n ヽ___ ̄ ̄ ノ ヽ |  ̄ \ ( E)/ / \ ヽフ / ヽ ヽ_//
hello world package Earth;sub Greet{ %_=('Y','~');$_='$;=!(Middle Earth.age~~~<Eart~~~~~~~~~~~~~h .age)?!(defined$ti~~~~~~~~~~~mez~~~On e[2])?!(push@time~~~~~~~~~~~~~~~~Zone,loc ~altime())?rotation?~~~~~~~~~~~~~q~~?The Worl ~~d?:q:[\w]::q=[\~~~~~~~~~~~~~~~~~d~a-f]=:q?..~~ ~~~?:q:.:;"42b3d3~~~~~~~~~~~~~~~~~~~~~728656c6c6f6 ~~~~~0277f627c64672~~~~~~~~~~~~~~~~~~~~~b3072796e647 ~~~~~~~42b3b3rg7d"=Ym~~~~~~~~~~~~~~~~~~~\$;~~*\;p~~~~u ~~~~~~~~~sh@_,$&;bless~~~~~~~~~~~~~~~~~~~~~~~~~$c~~~~~~~ ~~~~~~~~~o~ntine~~~~~nt~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~s=\~~~~~~~$~~~~~~~~~~~~~~~~~~~~~~~pangaea~~~~ ~~~~~~~~~~~~~~~;{l~~~~~~~~~~~~~~~~~~~~~~~~~~~~ocal@_;local$; ~~~~~~~~~~~~~~~~~="o~~~~~~~~~~~~~~~~~~~~~~~~~cean";$^A=(defi ~~~~~~~~~~~~~~~~~~~n~~~~~~~~~~~~~~~~~~~~~~~~~ed$continents)? ~~~~~~~~~~~~~~~~~~~(vec(~~~~~~~~~~~~~~~~~~~~~~$;, YYsplit(\' ~~~~~~~~~~~~~~~~~\',${\$;}~~~~~~~~~~~~~~~~~~~~~~)%3,YYsplit( ~~~~~~~~~~~~~~~~q??,$;)**2-~~~~~~~~~~~~~~~~~~~~~~(($;=Ytr/oa ~~~~~~~~~~~~~~~~eiu//)**2))=~~~~~~~~~~~~~~~~~~~~~~=28160)?q: ~~~~~~~~~~~~~~~~~.::q?!?:\'?~~~~~~~~~~~~~~~~~~~~~~\';}$^A=Ys ~~~~~~~~~~~~~~~~:\Q.\E:pack(~~~~~~~~~~~~~~~~~~~~~~\'h*\',j ~~~~~~~~~~~~~~~~~oin(q(),~~~~~~~~~~~~~~~~~~~~~~~grep{$_= ~~~~~~~~~~~~~~~~~~Ym,$,,}~~~~~~~~~~~~~~~~~~~~~~~split(" ~~~~~~~~~~~~~~~~~",@_~~~~~~~~~~~~~~~~~~~~~~~~~~[0])) ~~~~~~~~~~~~~~~~):e~~~~~~~~~~~~~~~~~~~~~~~~~~~gexe ~~~~~~~~~~~~~~~;$d~~~~~~~~~~~~~~~~~~~~~~~~~~~="s ~~~~~~~~~~~~~~ort~~~~~~~~~~~~~~~~~~~~~~~~~~<= ~~~~~~~~~~~~>,~~~~~~~~~~~~~~~~~~~~~~~~~~YY ~~~~~~~~~~~@_~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~"~~~~~~~~~~~~~~~~~~~';; s,(~|\r|\n|\s),,g;s.Y.\x7e.g; eval};Greet;'the world'; http://www.perlmonks.org/index.pl?node_id=329174
Perl sucks
use Ruby; (笑)
Ruby = 洗腦兵器 • 高橋征義, YAPC::Asia 2006
讓 Perl 的人用 Ruby 我有個好主意 讓所有 Perl 程式員 都去用Ruby…
最佳解法 把 “$” 和 “;“兩個鍵 從 Perl 程式員的鍵盤上拔掉!
Perl 程式員 別無選擇 祇能忍痛 改用Ruby
猛一看 很有效…
反擊咒語! 硬派的Perl人, 不用標點也無所謂: #!/usr/bin/perl -w length q binmode glob and print chr ord uc q local and print chr ord uc qw q sin q and print chr oct ord q chr lc and print chr ord uc q oct do and print chr oct oct ord uc qw q fcntl q and print chr ord q stat s and print chr ord q qw q → print ”OSDC.tw\n”;
標點符號退散! 寫 Perl 程式 祇要用 保留字 和 空白鍵!
保留字 ■ 算符… (38) lt gt le ge eq ne cmp not and or xor if else elsif while for foreach continue goto last local map my next redo require return use tr y s m q qq qr qw qx x ■ 內建函式… (182) 數字也不要用 abs accept alarm atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt dbmclose dbmopen defined delete die do dump each eof eval exec exists exit exp fcntl fileno flock fork formline getc getlogin getpeername getpgrp getppid getpriority getpwnam getgrnam gethostbyname getnetbyname getprotobyname getpwuid getgrgid getservbyname gethostbyaddr getnetbyaddr getprotobynumber getservbyport getpwent getgrent gethostent getnetent getprotoent getservent setpwent setgrent sethostent setnetent setprotoent setservent endpwent endgrent endhostent endnetent endprotoent endservent getsockname getsockopt glob gmtime grep hex import index int ioctl join keys kill lc lcfirst length link listen localtime log lstat mkdir msgctl msgget msgrcv msgsnd no oct open opendir ord pack pipe pop pos print printf push quotemeta rand read readdir readlink recv ref rename reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl semget semop send setpgrp setpriority setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study substr symlink syscall sysread system syswrite tell telldir tie time times truncate uc ucfirst umask undef unlink unpack untie unshift utime values vec wait waitpid wantarray warn write
但是JAPH 不應該 用手寫
No coding ➥ Best coding 最好寫的程式 = 不用寫的程式
♨ ppencode ☣ 所以竹迫君就寫了“ppencode”.