栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

英文技术文档阅读指北系列34(看懂句子)4. 技能熟练后的应用

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

英文技术文档阅读指北系列34(看懂句子)4. 技能熟练后的应用

关注本博客,后台自动发送Java英语高频词800、

Python英语高频词700(PDF链接)。查看消息。

(按照总目录阅读更系统↓↓)

返回专栏总目录">=>返回专栏总目录​​​​​​​

4.1 更容易看懂文档中的句子

搞定句子的主要目的

能够流畅看文档,是我们费这么多劲搞定句子的主要目的。文档主要包括:

(1)官网上关于某种技或语言的doc, guide, tutorial, reference等。此类文档容易出现复杂的句子

(2)API文档。大段的文字少,通常就几句话或一个小段落且复杂度更低。通常省略主语。

相信到现在,你看这些文档的功力上升了不少。

小练

YY2.1.1

快速阅读且理解以下句子。

  1. This dataset is not loaded in memory or otherwise acted on: lines is merely a pointer to the file. The second line defines lineLengths as the result of a map transformation.
  2. These variables are copied to each machine, and no updates to the variables on the remote machine are propagated back to the driver program. Supporting general, read-write shared variables across tasks would be inefficient.

YY2.1.2

快速阅读且理解以下API文档中的句子。

  1. This interface is designed to act in a similar way to ServletContainerInitializer, but have a lifecycle that's managed by Spring and not the Servlet container.
  2. Can be used to register instances that may be expensive to create, or need to be shared before the ApplicationContext is available.

The registry uses Class as a key, meaning that only a single instance of a given type can be stored.

4.2 畅游英文技术类网站、博客、社区

常见的技术网站/博客/社区

能秒懂句子之后,还能更顺畅地浏览一些英文技术类网站、博客、社区等等。这里列举一些:

1. 技术网站/博客

(1)个人技术博客

Eli Bendersky's website, Flavio Copes, Julia Evans

(2)公司技术博客

Reddit, Yelp, Amazon, Linkedin等公司的技术博客。

(3)资讯类

Hacker News

2. 技术社区

GitHub, Stackoverflow, CodeProject, Reddit的programming频道。

技术网站/博客/社区的语言特点

这些技术类网站的文章,在语言特点方面,与技术文档有一些差异:

  1. 技术文档通常“一事一议”,主题聚焦;句子力求精炼、清晰;语言风格偏正式,有一些官方的腔调;
  2. 技术网站、博客等,多以第一个视角叙述,语言亲切,有更多的口语化表达,但它们可能会有更多的时态、更复杂的用法,并且题材广泛,涉及的技术多,或者更有深度,有些句子的难度反而会大于技术文档。

不过也不用虚,打好基本功、技术熟练之后,增加相关技术的背景知识,我们能以不变应万变,照样拿下它们。

小练

YY2.2.1

快速阅读且理解以下句子。

  1. I do think that in a slate of 4-5 interviews it's important for one of them to be more personal where the interviewer gets to know the candidate and tries to assess if they are pleasant to work with.
  2. We found that this signal helps us keep per-worker load in a healthier, more accurately provisioned state than basic container CPU usage scaling does, ensuring that all requests are served in a reasonable amount of time without overloading workers or overscaling the service.

YY2.2.2

快速阅读且理解以下句子。

  1. To get the response eventually, you provide a function to be called once the response was received, a callback (notice something? call back ?).
  2. In coding for a simple physics simulation or writing some tutorial for a graphics-related problem, developers may require a collision-detection algorithm but many include a whole fully-fledged game-engine (as large as 100s of megabytes) only to use it as a collision detector and go through long installation & dependency compilation phases.

4.3 畅读源码的英文注释

有不少程序员喜欢去撸源码,像JVM, Spring, MyBatis, Android的源码,其动力一方面是面试官喜欢问源码相关的问题,另一方面是程序员自己想深入了解底层原理。如果我们能够顺畅阅读英文注释,那么撸源码的过程会更加丝滑。

源码英文注释的语言特点

我们看一段代码的英文注释:

// The parallel work done by all worker threads.
void G1ParallelCleaningTask::work(uint worker_id) {
	// Clean JVMCI metadata handles.
	// Execute this task first because it is serial task.
	JVMCI_ONLY(_jvmci_cleaning_task.work(_unloading_occurred);)

	// Do first pass of code cache cleaning.
	_code_cache_task.work(worker_id);

	// Clean all klasses that were not unloaded.
	// The weak metadata in klass doesn't need to be
	// processed if there was no unloading.
	if (_unloading_occurred) {
		_klass_cleaning_task.work();
	}
}

​​​​​​

从上面可以看出,源码中的英文注释有以下两个特点:

(1)句子结构相对简单,表达精炼、聚焦。

注释的作用是让看代码的人更好地理解代码,一般不会出现复杂的句子,否则会造成阅读者的负担。不过句子简单不等同于内容少,像Spring源码的有些注释,篇幅是非常长的。

(2)句子通常省略开头。

例如:

(1)

// The parallel work done by all worker threads.

这里省略了主谓,完整的句子可以是:

This is the parallel work done by all worker threads.

(2)

// Clean JVMCI metadata handles.

省略了主语,完整版是:

It cleans JVMCI metadata handles.

(3)

// Execute this task first because it is serial task.

省略了主语,完整版是:

It executes this task first because it is serial task.

说明:补全句子开头的方式有多种。

小练

YY2.3.1

快速阅读并理解以下代码中的英文注释。

(1)

if (requested_node_index != G1NUMA::AnyNodeIndex && numa->is_enabled()) {
	// Try to allocate with requested node index.
	hr = _free_list.remove_region_with_node_index(from_head, requested_node_index);
}

if (hr == NULL) {
	// If there's a single active node or we did not get a region from our requested node,
	// try without requested node index.
	hr = _free_list.remove_region(from_head);
}
 

(2)

public interface Controller {
 
	
	@Nullable
	ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception;
 
}
 

YY2.3.2

快速阅读并理解以下代码中的英文注释。

(1)

  
  public interface Test {
 
    
    boolean matches(Class type);
  }
 

(2)

    
    public LruCache(int maxSize) {
        if (maxSize <= 0) {
            throw new IllegalArgumentException("maxSize <= 0");
        }
        this.maxSize = maxSize;
        this.map = new LinkedHashMap(0, 0.75f, true);
    }

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/941112.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号