Learning English From Android Source Code:1

來源:互聯網
上載者:User

標籤:binder   oid   理解   before   容器   mount   重要   prevent   register   

英語在軟體行業的重要作用不言自明,尤其是做國際項目和寫國際軟體,好的英語表達是項目順利進行的必要條件。縱觀眼下的IT行業。可以流利的與國外客戶英文口語交流的程式猿佔比並非非常高。要想去國際接軌,語言這一關一定要過。

本人做剛入行的時候非常想找一本專門寫給程式猿的英文教材,但並沒有找到特別合適的。通過這幾年的歐美專案經理,我發現與國外同行交流重在表明交流的意圖而輕文法規定。一件事情的表述,僅僅要可以用幾個Key Words來表述清楚。兩方可以理解就可以。並沒有使用我們上學期間艱深晦澀的文法知識。

既然這樣,詞彙量就變得更加重要了。


這幾年一直在做與Android原始碼相關的事,對於開源項目的學習,Linus說的好。我們僅僅有Read The F**king Source Code才可以真正的領悟項目的真諦。

在我閱讀的過程中不斷有些非常好的單詞或表達方式,我們在今後的項目溝通中可以使用它。畢竟這還是比較原汁原味的表達呢。

我準備把這些單詞記錄下來,對照通常的表達形式和在原始碼凝視中的使用來更加深刻的學習它們。我僅僅是隨機的將單詞寫出來,並沒有遵循一定的規則。


以下是今天的5個詞。

1.recipient

詞典中的釋義:

recipient[英][r?‘s?p??nt][美][r??s?pi?nt]
n.接受者; 接收者;容器; 容納者; 
adj.easy接受的; 感受性強的; 
複數:recipients

例句:This site lets you set a date for delivery, making it easier to surprise your recipient.

原始碼中的使用:

在Binder原始碼中意思為接受者。在IBinder.java中有個介面叫作DeathRecipient,用來作為binder死亡通知的接受者。

用linkToDeath方法的凝視來作為例句:

Register the recipient for a notification if this binder goes away.

假設binder退出就通知注冊的接受者(register這裡是動詞注冊的意思。此句這樣翻譯個人認為好理解一些)。

在TelephonyManager.java中也譯作接受者|接收者。比如例如以下:

Each of these URI schema carry the recipient information the same way: the path part of the URI contains the recipient‘s phone number or a comma-separated set of phone numbers if there are multiple recipients.

2.antagonize

詞典中的釋義:

antagonize[英][?n?t?g?na?z][美][?n?t?ɡ??na?z]
vt.使成為敵人; 引起…敵對[對抗]; 對…起反作用; 中和; 

例句:No company can afford to antagonize China.

原始碼中的使用:

抱歉。明明是在原始碼中看見的,如今居然找不到了。

3.sink

詞典中的釋義:

sink[英][s??k][美][s??k]
vi.淹沒; 下落; 退去; 漸漸進入; 
vt.使下沉; 使下垂; 砸入地面; 使敗落; 
n.水池; 洗滌槽; 汙水坑; 
第三人稱單數:sinks;過去分詞:sunk;複數:sinks;如今進行時:sinking;過去式:sank

例句:Wood does not sink in water.

原始碼中使用:

在音視頻相關句子中我認為應該作水池|池講。如子AudioTrack.java中:

It allows streaming of PCM audio buffers to the audio sink for playback.

它同意PCM音頻緩衝區中的流向音頻池中寫入以用來播放。

4.track

詞典中的釋義:

track[英][tr?k][美][tr?k]
n.小路,小道; 痕迹,蹤跡; 軌道。音軌; 方針,路線; 
vt.跟蹤; 監看。監測; 追蹤; 
vi.沿著軌道前進; 沿著一條路走,旅行; 位於一隊列中; 
第三人稱單數:tracks;過去分詞:tracked;複數:tracks;如今進行時:tracking;過去式:tracked

例句:You‘ll find your train at track 8. 你會在8號軌道找到你的列車。

原始碼中使用:

常見在音頻系統中,譯作音軌。如AdudioTrack.java中getLatency的凝視:

Returns this track‘s estimated latency in milliseconds. 以毫秒為單位返回這個音軌估計的延遲。

estimated[英][‘est?met?d][美][‘est?met?d]
adj.估計的; 估計的; 估算的; 

latency[英][‘le?t?ns?][美][?letn:si]
n.潛伏; 潛在因素; 延遲

5.offload

詞典中的釋義:

offload[英][??f‘l??d][美][??f?lod, ?ɑf-]
v.卸下,卸貨; 
第三人稱單數:offloads;過去分詞:offloaded;如今進行時:offloading;過去式:offloaded

原始碼中使用:

AudioFlinger::PlaybackThread::Track::flush() 方法在Tracks.cpp中有以下的凝視,仍作卸載譯。

Prevent flush being lost if the track is flushed and then resumed before mixer thread can run.This is important when offloading because the hardware buffer could hold a large amount of audio.

 751         // Prevent flush being lost if the track is flushed and then resumed 752         // before mixer thread can run. This is important when offloading 753         // because the hardware buffer could hold a large amount of audio 754         playbackThread->flushOutput_l(); 755         playbackThread->broadcast_l();

這句有些難翻譯,我嘗試我的理解(有不同的見解還望指點):

假設音軌已經運行過flush(我認為譯為清除和清空較好)了而且恢複之前混音器(mixer)的線程可以啟動並執行時候可以防止flush丟失(未運行)。

當卸載的時候這非常重要。由於硬體緩衝可以容納大量的音頻。

flush[英][fl??][美][fl??]
vi.臉紅; 呈紅色; 奔流; 沖刷; 
adj.滿面紅光的; 富足的,豐富的; 盈滿的。沒過的; 水平的,同高的; 
n.奔流,湧出; 臉紅或發亮; 發熱; 強烈情感的衝動; 
vt.發紅或發亮; 使興奮或得意; (以水)沖刷,沖洗; 衝掉。除掉; 


Learning English From Android Source Code:1

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.