漫畫

在此收集程式語言流行漫畫,略作整理。

GIT THE PRINCESS!

標題本應為GET,而GIT是一個被程式設計人員廣泛使用的版本控制工具。

副標題為:How to save the princess using 8 programming languages?(如何用八種程式語言拯救公主?)

JavaScript

git the princess javascript

  1. You have JavaScript.
  2. You spend hours picking libraries, setting up Node & building a framewrok for the castle.
  3. By the time you’re finished with the framework, the fort has been abandoned and the princess has moved to another castle.
  1. 你擁有Javascript。
  2. 你花費大量時間挑選庫(類似工具箱),安裝Node(非瀏覽器運行環境)以及搭建一個城堡的框架。
  3. 當你搭完框架,這個堡壘已被拋棄而公主已經轉移到另一個城堡。

:諷刺JavaScript層出不窮的流行框架。

C

git the princess c

  1. You have C.
  2. You have a library for a castle & a library for the princess. Charge!
  3. You rescue the princess, her dog, her entire wardrobe & everything she has ever eaten… Fudge! Did I forget a null-terminator?
  1. 你擁有C。
  2. 你分別擁有一個城堡和公主的庫。衝鋒!
  3. 你救出公主,她的狗,她的整個衣櫃以及一切她吃過的東西⋯Fuck(操)是因為我少了一個空字符?

:C靠近底層。

C#

git the princess c sharp

  1. You have C#.
  2. You spend hours tring to express the entire rescue in a single LINQ query.
  3. You give up and go to Stack Overflow to have Jon Skeet rescue the princess for you.
  1. 你擁有C#。
  2. 你花費大量時間用於試圖使用簡單的LINQ(語言整合查詢)查詢方法去解釋整個營救方案。
  3. 你放棄了,去Stack Overflow(程式交流問答網站)讓Jon Skeet(擅長回答有關C#問題)替你營救公主。

:複雜。

Java

git the princess java

  1. You have Java.
  2. You quickly deploy the rescue to production.
  3. You discover you’ve loaded two versions of the castle, but no princess.
  1. 你擁有Java。
  2. 你迅速將營救部署到生產環節。(意將營救方案付諸實施)
  3. 你發現你載入了兩個版本的城堡,但公主不在裏面。

:過時。

Lisp

git the princess lisp

  1. You have Lisp.
  1. 你擁有Lisp。

:Lisp是第二古老的語言,也是這裏面唯一的函數式語言,以其怪異的邏輯與眾多的括號為大眾所熟知。圖中諷刺的正是這兩點。但需要注意的是在這個系列中成功解救出公主的只有C與Lisp,而後者常被神話。一個蘇聯笑話:特工從美國人工智能實驗室偷來最後幾頁程式碼,帶回蘇聯,打開全是括號。

Go

git the princess go

  1. You have Go.
  2. We don’t support freeing captured princess, we already have these free princesses in the standard library… Wait, is this the princess from the Java panel?
  1. 你擁有Go。
  2. 我們不支持拯救被困的公主,我們在標準庫中已經有這些自由的公主們。等等,這個公主是來自Java面板?

:難取代Java。

Pascal

git the princess pascal

  1. You have Pascal.
  2. You declare your princess, castle & rescue plan.
  3. Then you go for a drink & forget about the implementation.
  1. 你擁有Pascal。
  2. 你宣布你的公主、城堡和營救方案。
  3. 然後你出去喝了一杯,忘掉了付諸實施的事。

:龍鍾老態。

PHP

git the princess php

  1. You have PHP.
  2. You have to rescue the princess… in PHP…
  1. 你擁有PHP。
  2. 你得去營救公主,且使用PHP

:PHP為眾所週知設計糟糕的語言,這與其文檔中自稱「最好的語言」產生反差。

GIT THE DRAGON!

姊妹篇,副編題為:How to kill the dragon using 9 programming languages?(如何用九種程式語言屠龍?)

Python

git the dragon python

  1. You have Python.
  2. Everybody marvels at your awesome dragon slaying tools.
  3. You discover your tools are only for slaying a snake.
  1. 你擁有Python。
  2. 所有人都在為你可畏的屠龍工具而感到震驚。
  3. 你發現你的工具只能屠蛇。

:精緻的玩具。

Swift

git the dragon swift

  1. You have Swift.
  2. You’ve got an NSDragon class, but you need to write an 500 loc extension to implement slaybility.
  3. Just as you’re almost done, Apple releases another dragon.
  1. 你擁有Swift。
  2. 你得到一個NS(前綴,來自NeXTSTEP庫)龍類,但你需要寫一個500行的本地擴展去實現屠殺。
  3. 就在你幾乎完工之際,蘋果放出一條新龍。

:蘋果的風格。

CSS/HTML

git the dragon html

  1. You have CSS/HTML.
  2. You try to cover the dragon with a highly frammable blanket.
  3. Now everything’s on fire (also, the vertical center has failed).
  1. 你擁有CSS/HTML。
  2. 你試圖用一條極易燃的毯子蓋住龍。
  3. 現在一切都著火(包括垂直居中也失效)。

:垂直居中失效,意味著無法蓋住龍,即屠龍無效。

Scala

git the dragon scala

  1. You have Scala.
  2. Your horse has crashed.
  1. 你擁有Scala。
  2. 你的馬已經垮了。

:馬身上字為:「You horse has stopped working: Send & Don’t send.」(你的馬已經不再工作:發送/不發送)。

C#

git the dragon c sharp

  1. You have C#.
  2. You set all references to the dragon to null. The dragon seems gone.
  3. But with non-deterministic garbage collection, can you ever be sure the dragon is really gone?
  1. 你擁有C#。
  2. 你把所有關於龍的參考資料設置成空。龍看起來不復存在。
  3. 但在非確定性垃圾回收中,你真的曾經確定龍已經不復存在?

:掩耳盜鈴。

Cobol

git the dragon cobol

  1. You have Cobol.
  2. You go from village to village fighting the same dragon over and over.
  3. You make a fortune in the process.
  1. 你擁有Cobol。
  2. 你從一個村莊到另一個村莊,和同一條龍打架,一遍又一遍。
  3. 在這個過程中你掙了一大筆錢。

:Cobol現僅存於商業領域。

Lua

git the dragon lua

  1. You have Lua.
  2. It’s an incredibly fast and effective weapon… But you’re out of ammo.
  3. Mike Pall has the last bullets, but he’s gone & you don’t know his real name or even what he looks like.
  1. 你擁有Lua。
  2. 這是一個難以置信地迅捷且高效的武器⋯但你已經用光了彈藥。
  3. MIke Pall(Lua社區的傳奇人物)擁有最後的彈藥,但他已經離開而你不知道他的真實名字,甚至長相。

:小眾。

Haskell

git the dragon haskell

  1. You have Haskell (and a monad).
  2. You implement a monad to encapsulate the dragon killing side-effect. The villages are concerned and urge you to stop, but you say it’s OK cause a monad is just a monoid in the category of endofunctors, so you don’t see what the problem is.
  3. You need help.
  1. 你擁有Haskell(和一個單子)。
  2. 你用一個單子去概況屠龍副作用。村民們非常擔憂並讓你停下,但你說沒有關係因為一個單子只是一個自函子目錄中的單子,所以你們不會發現問題。
  3. 你需要幫助。

:和Lisp類似,Haskell是函數式語言,以其來自數學抽象的概念與晦澀的邏輯為公眾所知悉。函數式語言致力於消除副作用,常基於美學需求而非現實考量,圖中諷刺的正是這點。

CoffeeScript

git the dragon coffeescript

  1. You have CoffeeScript.
  2. You don’t have dragon slaying powers so you drink it to get good.
  3. You died.
  1. 你擁有CoffeeScript。
  2. 你沒有屠龍的能力,所以你喝下去希望變好。
  3. 你死了。

:CoffeeScript是JavaScript的拙劣模仿者。

HOW TO BUILD A HORSE WITH PROGRAMMING

如何使用程式語言造出一匹馬。

C++

build a horse cpp

  1. You build a horse.
  2. It’s ugly as hell and has lots of dangling parts, but it gets the job done.
  1. 你造出一匹馬。
  2. 牠奇醜無比並且有一堆懸掛的零件,但好歹完成了工作。

:確實能用。

Java

build a horse java

  1. You really want to build a horse.
  2. But first you need to build a horse factory.
  1. 你真的想造出一匹馬。
  2. 但你先得造出一個生產馬的工廠。

:解決一類問題。

JavaScript

build a horse javascript

  1. Your horse arrived in different packages.
  2. You built the horse, but the backbone came out angular, so the horse is paralyzed.
  1. 你收到馬的各個部件。
  2. 你造出馬,但馬的脊椎骨反了,所以這匹馬得了麻痺症。

:庫良莠不齊。

NoSQL

build a horse nosql

  1. You had a fast beautiful horse.
  2. But you have no idea here it is.
  1. 你有一匹漂亮的快馬。
  2. 但你不知道牠在哪。

:索引。

Cobol

build a horse cobol

  1. You build the horse in 1962.
  2. It can only be tamed by the original creator, For all other purposes it’s a dragon.
  1. 你在1962年造出這匹馬。
  2. 牠只馴服於最初的創造者,其他的企圖會讓牠變成一條惡龍。

:沒聽說過。

Lisp

build a horse lisp

  1. You built a (((…)))
  1. 你造出一匹(無數括號中的馬)

:括號。

C#

build a horse c_sharp

  1. The horse works best when dressed in a camel costume.
  2. When you try to use it as anything else than a camel, it gets a bit fussy.
  1. 這匹馬只能在駱駝套裝中才能發揮最佳功效。
  2. 當你試圖去讓牠做駱駝以外的事情,牠會有點困惑。

:語法糖。

Assembly

build a horse assembly

  1. The horse turns out a little basic.
  2. But boy can it run.
  1. 這匹馬看上去有點原始。
  2. 但男孩子能讓牠跑起來。

:彙編語言最靠近底層。

PHP

build a horse php

  1. You built a Trojan horse.
  2. It releases hundreds of tiny horses to punish you every day, forever.
  1. 你造出一匹特洛伊木馬。
  2. 牠放出成百上千的小馬每天痛擊你,直到永遠。

:糟糕的設計。

IT JOBS EXPLAINED WITH A BROKEN LIGHTBULB

用一個不亮的燈泡來解釋IT工作。

IT Support

IT支持

it jobs it support

  1. The lightbulb is broken.
  2. Tries turning it off & on again.
  3. Room is still dark, orders new room from stock.
  1. 燈泡不亮。
  2. 再一次試著關上並打開開關。
  3. 房間依舊漆黑,從庫存中預定一個新房間。

:技術人員。

Front-End Developer

前端開發者

it jobs front end developer

  1. The lightbulb is broken.
  2. Covers lightbulb with yellow paint.
  3. Tells backend that lightbulb works, but only during the day.
  1. 燈泡不亮。
  2. 給燈泡塗上黃漆。
  3. 告訴後端這個燈泡正常,不過只能在白天工作。

:即設計網頁、提供交互的開發者。以其遠離核心業務,地位較低。

Project Manager

項目經理

it jobs project manager

  1. The lightbulb is not broken.
  2. Fixes lightbulb with baseball bat.
  3. Lightbulb is now broken, frontend gets ticket.
  1. 燈泡沒壞。(被前端塗漆)
  2. 用球棒修理它。(徹底打碎)
  3. 燈泡現在徹底壞了,前端得償所願。

:皆大歡喜。

Marketing

營銷

it jobs marketing

  1. The lightbulb is broken.
  2. Convinces you that dark is the new light.
  3. Leaves you to read blog posts, goes back to playing candy crush.
  1. 燈泡不亮。
  2. (營銷人員)說服你黑暗是一種新光。
  3. 讓你去讀部落格上的文章,回去玩糖果傳奇遊戲。

:銷售人員。

Lead Generation

用戶開發

it jobs lead generation

  1. The lightbulb is broken.
  2. Bring in more lightbulbs.
  3. And more.
  1. 燈泡不亮。
  2. 帶回來更多的燈泡。
  3. 還有更多。

:引導性銷售。

Content Marketing

內容銷售

it jobs content marketing

  1. The lightbulb is broken.
  2. Has no idea how to fix it.
  3. Writes a 2,000 word expert’s guide to changeing a lightbulb.
  1. 燈泡不亮。
  2. 不知道如何修理。
  3. 寫一篇兩千字的專家文章教你如何更換燈泡。

:流量轉化利潤。

Operations

運營

it jobs operations

  1. Gets paged to fix lightbulb at 2 A.M.
  2. Hands out flashlights.
  3. Goes back to sleep.
  1. 凌晨兩點被傳呼修理燈泡。
  2. 交接手電筒。
  3. 回去睡覺。

Backend Developer

後端開發者

it jobs backend developer

  1. Wonders why everybody’s having problems with lightbulbs.
  2. Realizes he forgot to deploy light to database.
  3. Keep calm & blame frontend.
  1. 奇怪為什麼所有人都有燈泡問題。
  2. 發現是他自己忘記將燈泡部署到數據庫。
  3. 保持冷靜,把責任推給前端。

:後端開發者,以其接觸核心業務,地位較高。

IF THE WORLD WAS CREATED BY A PROGRAMMER

程式設計師之創世紀。

創世之初

programmer 1

  1. In the beginning, there was the Heven and the Earth.
  2. But the earth was formless and buggy, & without documentation.
  3. And the programmer saw that it was not good.
  1. 最開始,有天國和地球。
  2. 但是地球尚未成型而且充滿錯誤,以及沒有參考文檔。
  3. 程式設計師知道這一切不好。

:創世紀。

要有光

programmer 2

  1. Then you said, “Let there be light!” But the light did not compile.
  2. You create a hack so that light is part of the land.
  3. To create darkness, you need to hide the land, but that’s OK cause creatures won’t be added until later. And Stack Overflow said it’s find.
  1. 然後你說:「要有光。」但光不能編譯。
  2. 你破解了這個問題,於是光成了大地的一部分。
  3. 要製造黑夜,你需要隱藏大地,這沒有太大問題畢竟所有生物要到後期才會添加進來。而且Stack Overflow說這樣沒事。

洪水

programmer 3

  1. On the second day, you merge water.
  2. But because of the dependency, light breaks as land is accidentally flooded. You check Stack Overflow (in the darkness).
  1. 第二天,你合成水。
  2. 但由於依賴性,大地遭遇洪水時,光也隨之消失。你在Stack Overflow上尋找解決辦法(黑暗中)。

造物

programmer 4

  1. It’s the third day, turns out the creatures needed to be added sooner, but the client forgot to mention that.
  2. You try to add creatures in the darkness, but there’s no land without light, and you can’t have light because of the water.
  3. You add them in the browser using cookies, which unfortunately makes them mortal.
  1. 第三天,看起來要儘快添加生物,但客戶端忘記說這件事。
  2. 你試圖在黑暗中添加生物,但沒有光就沒有陸地,而且因為洪水你不能有光。
  3. 你用Cookies(小型文字檔案)將生物添加在瀏覽器中,這意味著牠們最終會死。

:Cookies是瀏覽器記錄用戶身分信息的文字檔案,隨著瀏覽器關閉而消失,其存在週期是短暫的,圖中用以類比生命。

地球

programmer 5

  1. It’s the forth day, turns out the issues were caused by the flat earth design.
  2. You decide to use C++ to create a balloon that inflates the Earth.
  3. You also use STL for abstractions, and it works out great with no complications whatsoever!
  1. 第四天,看樣子問題是由扁平地球的設計所導致的。
  2. 你決定用C++製造一個氣球來撐起地球。
  3. 你也用STL(標準模板庫)來構造抽象,它出色完成任務且無論任何事都不再有困難。

第五天

programmer 6

  1. It’s the fifth day, you start adding people to help you.
  2. You decide to create them in your likeness, which is a mistake. They immediately populate the Earth with hacks, fads and unnecessary JavaScript Libraries.
  1. 第五天,你決定創造人類來幫助你。
  2. 你決定用你的樣子來創造他們,這顯然是一個錯誤的決定。他們迅速佔據地球,充斥大量的破解、流行以及不必要的JavaScript庫。

:海豚身上jQuery是一個函數庫,React等是新興的JavaScript函數庫,諷刺前端過剩的創造能力。

第六天

programmer 7

  1. On the sixth day you look at the chaos you created.
  2. You attempt to lead people back to sensible programming, but it is too late. Everything runs on dependencies.
  1. 第六天你審視著你製造的混亂。
  2. 你試圖讓人們回歸到理性編程上去,但已經太遲。一切事物的運行均存在依賴。

:圖中庫並不存在,只為調侃。作者在所有正常名稱後面都加上js後綴(表示其為JavaScript函數庫)。

第七天

programmer 8

  1. On the seventh day you really want to rest, but you need to organise all you’ve created.
  2. MongoDB
  1. 第七天你真的想要休息,但你需要組織好你創造的一切。
  2. MongoDB(数据库管理系统)。

後記

任何高階程式語言都是對最底層都是對最底層機器指令(0與1)的抽象和封裝,從這個角度,沒有什麼是最基本的,只有什麼是最適合的,這正是世上流行著名目繁多而又大同小異的程式語言的原因。語言本身沒有任何神奇之處,它能實現複雜的功能,歸因於背後的數理基礎,遺憾的是這正是所有黑客所缺少的。不明就裡,而產生工具崇拜,以上漫畫莫不如此。這些論戰會持續下去,在我看來,無異於中世紀的鐵匠在領主面前炫耀自己的銼刀,我想我沒有時間或意願參與這種遊戲。

這個世界上或許有千萬種知識,唯獨沒有程式語言知識,以其廉價;同理或有千萬種技術,唯獨沒有互聯網技術,以其短促。這是互文見義的,兩者共同具有主觀任意性,為左派文化的延伸:他們本身不創造價值,只增加一些流通環節;提供一點可有可無的便利,卻在侵噬公眾的自由——這是比浮士德更愚蠢的交易。