程序员的英语——翻译汇总(持续更新)

360 阅读4分钟

说明

本文是笔者在翻译国外技术文章时汇集出的内容,按照主题进行划分,方便查阅和学习。

个人介绍

前端工程师

原文:

Software Engineer who loves building user interfaces. In the quest to learn, unlearn and re-learn things.

词汇:

interfaces:在程序中通常所知道的是“接口”的意思,在这里是“界面”,user interfaces意指用户界面。

quest:英释 v. '~ (for sth) ( formal ) ( literary ) a long search for sth, especially for some quality such as happiness'。中文即探索,寻找,追求(幸福等)。in the quest即是“为探索...”,表示一种动态的过程,在此句中可译为“在...过程中”。

unlearn:英释 v. 1.'try to forget; put out of one's memory or knowledge';2. discard something previously learnt, like an old habit。中文即是“遗忘”,“忘却”。

整句翻译: 喜欢构建用户界面的软件工程师。在学习、遗忘和再学习的过程中。


原文:

JavaScript enthusiast, Full-stack developer and blogger.

词汇:

enthusiast:英译 n. 'a person who is very interested in sth and spends a lot of time doing it'。中文即“爱好者”

Full-stack developer:全栈工程师

blogger:即“写博客的人”

整句翻译: JavaScript爱好者,全栈工程师和博主。

前端书籍译名

JavaScript: The Good Parts,《JavaScript语言精粹》

评价:这个译名很传神,直译的话是“JavaScript好的部分”,将“the good parts”译为“精粹”比英文原书名还好


Secrets of the JavaScript Ninja,《JavaScript忍者秘籍》

词汇:

Secrets:秘密,这里译为“秘籍”

Ninja:忍者


You Don't Know JS,《你不知道的JavaScript》

评价: 原书名简单直白,翻译也是简单明了,见名知义


JavaScript: The Definitive Guide,《JavaScript权威指南》

词汇:

Definitive:英释 n. ' considered to be the best of its kind and almost impossible to improve',中文即“最佳的;最完整可靠的”。

评价: 翻译为“JavaScript最佳指南”或者“JavaScript完全指南”显然不妥,中文里表示这种“可靠”、“完整”的词语用“权威”非常好。


Eloquent JavaScript,《JavaScript编程精解》

词汇:

Eloquent:英释 n. 'able to use language and express your opinions well, especially when you are speaking in public',中文即“流利的”、“有口才的”、“雄辩的”。

评价: Eloquent表达的是一种讲述特别清晰的感觉,“精”代表一种“极致”的感觉,用“精解”一词比较好的符合了作者的原意。


Professional JavaScript for Web Developers,《JavaScript高级程序设计》

词汇:

Professional:英释 n. ' connected with a job that needs special training or skill, especially one that needs a high level of education',中文即“专业的”、“职业的”。

评价:

直译为“为Web开发人员提供的专业JavaScript”显然不合适,显得啰嗦冗长,英汉对译的重点在于“达意”,而非“对应”,译为《JavaScript高级程序设计》好像略有偏离,但却找不到更好的译法。

语句

Debugging is the computer science term for finding potential exceptions or bugs in our code. It comes in extremely handy to know the concept of debugging code to understand the cause of bugs that cause unwanted behaviour in our applications.


Python comes with the tools necessary for debugging code out of the box with its in-built functions


Now in the debugging console, we can type in any variable whose value we want to check in that point of execution such as num in this case


From Python 3.7 onwards, there is a better way to debug with a new method breakpoint which automatically calls the set_trace method under the hood and is the recommended way to debug.


Our IDEs and Editors come equipped with lot of tooling capabilities that assist us in writing better code with less mistakes using a linter such as pylint for example


For programmers, it is far more easy and practical to read small simple unit tests to understand the functionalities rather than go through a long list of documentation


Another approach would be to put the block of code in a try except block and handle all possible exceptions there.


My focus today was to find out basic techniques of processing images and PDF files using Python scripts.


I tried out Pillow which is a forked version of the Python Imaging Library (PIL) which is no longer maintained and does not support the latest versions of Python


Check documentation for specific OS commands


thumbnail maintains aspect ratio


PDFs are one of the most widely used file formats and can store a wide variety of data.


Scraping is a form of scripting that allows us to automate the process of extracting large unstructured data from websites and organize it in a structured way to use it for several purposes such as gathering emails, product price, stock prices, flight data or any other relevant information.


This file is mainly an instruction for various search engine bots like google bot, yahoo bot, bing bot etc which specific pages they should crawl for search engine optimization


However, as per the desired goal, we need to fetch the lists from the top five pages or probably any entered number of pages


Feel free to tweak the script as per your needs and experiment with it or try scraping data from your own favourite website.


Web Scraping is a vast field. Using Beautiful Soup, we probably just scratched the surface. There are a whole lot of possibilities in this domain which I would explore while exploring more on data analysis with Python.


客户端请求和服务端相应以及浏览器渲染

Whenever we enter the URL of any website in the browser, the browser does a request to the server which acknowledges the request and provides the contents of the website (HTML, CSS, JS, images etc) which is then rendered in the browser to display the website


框架介绍

Django - Probably the most famous Python web development framework and provides the widest array of features necessary for building web apps. More can be found in their documentation、

Flask - It is listed as a micro-framework. It is comparatively lean and small but is highly extensible and provides a lot of functionalities necessary for building web apps.

Pyramid is another light-weight web framework for Python.