Learning 中文版 from Android Source code:1

Source: Internet
Author: User

The important role of English in the software industry is self-evident, especially to do international projects and write international software, good English expression is the necessary condition for the smooth progress of the project. Throughout the current IT industry, the proportion of programmers who are fluent in spoken English with foreign clients is not very high. To go to international standards, the language of this must pass.

I was just in the beginning when I was looking for a specially written English textbook for programmers, but did not find a particularly suitable. Through these years of project managers in Europe and the United States, I found that exchanges with foreign counterparts on the intention to communicate with the light grammar rules. The expression of one thing, as long as it can be expressed clearly with a few key words, can be understood by both sides, and does not use the grammar knowledge that we obscures during school. In that case, the vocabulary becomes more important.


These years have been doing with the Android source code related things, for open source project learning, Linus said well, we only read the F**king source code to truly understand the true meaning of the project. In the course of my reading there are a lot of good words or expressions, we can use it in future project communication, after all, this is still more original expression. I'm going to record these words, compare the usual expressions and use them in the source notes to learn them more profoundly. I just randomly wrote out the words and didn't follow certain rules.


Here are 5 words for today.

1.recipient

Explanation in the dictionary:

recipient[English][r? ' S?p?? nt][Mei][r?? S?PI?NT]
N. Recipients; A receiver; a container; The accommodating person;
Adj. easy to accept; A strong sense of sensitivity;
Plural: Recipients

Example: This site lets is set a date for delivery, making it easier to surprise your recipient.

Use in the source code:

In binder source The meaning is the recipient. There is an interface in Ibinder.java called Deathrecipient, which is used as the recipient of binder death notifications.

Use the annotations of the Linktodeath method as examples:

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

If Binder quits, notify the registered recipient (Register here is the meaning of the verb registration, this sentence such as the translation of the individual think good understanding some).

In Telephonymanager.java, the recipient is also translated as follows:

Each of the these URI schemas carry the recipient information the same way:the path part of the URI contains the recipient ' s p Hone number or a comma-separated set of phone numbers if there is multiple recipients.

2.antagonize

Explanation in the dictionary:

antagonize[English][?n?t?g?na?z][beauty][?n?t?ɡ?? NA?Z]
Vt. Make an enemy; Cause... hostility [confrontation]; Right... counterproductive; Neutralization

Example: No company can afford to antagonize.

Use in the source code:

Sorry, obviously in the source code to see, and now can not find.

3.sink

Explanation in the dictionary:

sink[English][s?? k][Mei][s?? K
VI. Drowning; Whereabouts to retreat; gradually enter;
Vt. Make sinking; to cause to sag; smashed into the ground; To make a downfall;
N. Pool; Washing trough; Sump
Third person singular: sinks; past participle: sunk; plural: sinks; now on: sinking; past tense: sank

Example: Wood does not sink in water.

Using the source code:

In the audio and video related sentences I think I should make a pool. As in sub-Audiotrack.java:

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

It allows the PCM audio buffer to be written to the flow in the audio pool for playback.

4.track

Explanation in the dictionary:

track[English][tr?k][Beauty][tr?k]
N. path, Trail; A trace, a trail; Tracks, tracks; Policy, Route;
VT. Tracking; Watch, monitor; Tracking
VI. Move along the track; Go along a road, travel; is located in a queue;
Third person singular: tracks; past participle: tracked; plural: tracks; now on: tracking; past tense: tracked

Example: You'll find your train at track 8. You'll find your train on track 8th.

Using the source code:

Common in audio systems, translated audio tracks, such as Getlatency notes in Adudiotrack.java:

Returns This track's estimated latency in milliseconds. Returns the expected delay for this track in milliseconds.

estimated[English] [' est?met?d][beauty] [' est?met?d]
Adj. an estimate; expected; Estimated;

latency[English] [' Le?t?ns?] Beauty [? Letn:si]
N. Latent; potential factors; Delay

5.offload

Explanation in the dictionary:

offload[English] [?? F ' l?? D][beauty [??] F?lod, ɑf-]
V. Unloading and discharging;
Third person singular: offloads; past participle: offloaded; now on: offloading; past tense: offloaded

Using the source code:

Audioflinger: The:P Laybackthread::track::flush () method has the following comment in Tracks.cpp, which is still used for unloading translation.

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

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

This sentence is somewhat difficult to translate, I try my understanding (there are different views also look at the point):

If the audio track has been flushed (I think it's better to clear and empty) and the mixer thread can execute before resuming it, you can prevent flush loss (not executed).

This is important when uninstalling, because the hardware buffers can accommodate a large amount of audio.

flush[English][FL??] Beauty [FL??]
VI. Blush; appear red; Riverrun Scour
Adj. manmianhongguang; Rich in abundance; filled with or without; Having a high level of quality;
N. Rushing and gushing; to blush or shine; Fever The impulse of a strong emotion;
Vt. redness or shine; To cause to be excited or complacent; (with water) washed and rinsed; To wash away and get rid of;


Learning 中文版 from Android Source code:1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.