[翻译] 献给编程之神的祷词 (A prayer to the programming god)

A prayer to the programming god

噢! 软件开发与运营之神,我犯了罪。

祢的怒气落在我身上,我觉察到了祢的愤怒。

我所继承的网站没有单元测试,
它也没有部署脚本,没有 README,
     甚至没有数据库迁移工具。
它完全没有用到 virtualenv、requirements.txt、buildout 等工具,
     甚至连依赖关系都没有写。
它大多数的版本信息已经丢失。
     源代码的依赖随机地分散在不同的文件夹里,
它们显然是从私有或开源项目的 SVN 中检出的,
     不过不知在哪天丢失了版本历史。

我哭喊道:“为什么是我啊?”

我不是在开始我的项目时用了 fabfile 了吗?
我不是在我的开源项目中放了一个 setup.py 了吗?
我不是写了有用的文档(至少有个 README.rst 文件)了吗?
我不是准确而细心地写上了没有混淆特性和修复的补丁提交信息了吗?
我经手的项目——至少在最核心的功能上——难道还有没被自动测试覆盖的吗?

但是我想到了我年轻时所犯的罪,
我承认我的过犯:祢是公正的。

祢本可以把我18岁时写的 VBA 程序或者我后来写的 web 程序赐给我。
那本可以是成千上万行我当时用两年时间码出来的 ASP.NET 程序,
     就像谚语中尝试变成莎士比亚的猴子一样。
那本可以是前端代码中原始的 SQL 语句、混合着业务逻辑的 HTML 代码。
祢本可以给我一个 PHP 工程,但是祢没有那样做。

但幸好有 Python 和 Django 在,这使问题迎刃而解。
祢的责罚真是轻的。


========

Source: A prayer to the programming gods, Copyright – Luke Plant

O gods of software development and operations, I have sinned.

Your anger falls on me, and I feel your wrath.

The web site I have inherited has no unit tests.
It has no deployment script, and no README.
Or database migration tool.
It makes no use of virtualenv or requirements.txt or buildout,
     nor has any description of dependencies.
It has most of the VCS history missing.
Source dependencies are in random folders,
     clearly checked out from private SVN clones of
          proprietary and open source projects,
          but forked at unknown date with no history.

And I cry, “Why me?”

Have I not used a fabfile for projects I have started?
Have I not included a setup.py for my open source apps?
Have I not written helpful docs, or at least a README.rst?
Have I not written correct commit messages, with carefully
     constructed patches that didn’t mix features and fixes?
Are the projects I hand on not covered by automated tests,
     at least for the critical functions?

But then I consider the sins of my youth,
     and I confess: You are just.

You could have given me the VBA project I wrote when I was 18.
     or some of the web apps I have written since.
It could have been the thousands of ASP.NET lines
     I cranked out in two short years,
          like the proverbial monkeys trying to produce Shakespeare.
It could be raw SQL in the frontend code,
     and HTML mixed with business logic.
You could have given me a PHP project.

But it is Python, and Django at that, and it is easily fixed.
Your chastisement is light indeed.

========

Translated by @oppih28, reviewed by @nanshizi615, my sisiter:)

-EOF-

Advertisements

2 thoughts on “[翻译] 献给编程之神的祷词 (A prayer to the programming god)

  1. By @Hanliinter :
    我一直以为向编程之神的祷告是“hello world”,每个新人虔诚的写下这一行代码,祈求编程之神在未来的路上照亮bug,点燃feature ——举双手赞成~

  2. 同 @nanshizi615 一起修改完后,一致觉得这文章内容其实还不够丰富一些。

    谁的兴趣可以另外单写一个 :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s