-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.xml
239 lines (239 loc) · 114 KB
/
search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title><![CDATA[Stay-hungry,Stay-foolish]]></title>
<url>%2F2019%2F04%2F03%2FStay-hungry-Stay-foolish%2F</url>
<content type="text"><![CDATA[长远的规划总是重要的。回顾过去三年,大二时候定下的计划确实已经实现了。但是这远远不够,如果在大三的时候还是保持一样有明确的前进方向并且持之以恒地实践,结果不应该如此这般。 这两年来最大的失误: 盲从,放弃思考,放弃自己选择道路的权利。 如果,有太多的如果可以说,但是已经没有多少意义了,过去的如果对未来唯一的价值在于从失败中汲取教训。无论做什么事情,总都会有一个试错的过程。认知、实践、反馈认知再实践,这是浅显的一个周期过程,但是太多时候我们没有将这一过程循环起来。 当结果已经在现实中赤裸裸地展露狰狞面目时候,那种无助感你需切记: 想想他们一个个保研、留学时候而你在教室冷板凳上躺着的时候吧; 想想他们一个个拿着工作offer秀薪资的时候你刷题刷得想吐的时候; 想想你自觉复试无望在一月北京寒风中到处找工作无门可入的经历. 不是别人抛弃了你,是你放弃了原本属于你的那份荣耀。想想你在游戏上拿个”王者”称号的时候却被告知你因成绩不够而取消了奖学金的时候吧!想想你在大三时候突然觉得活得太累不如尽早享受的那个时刻,你认为的应当享受当下并没有错,但是你不该拿着自己的未来消费。 知错能改善莫大焉。 你想好了自己想要什么了,去争取,去践行,在一过程中你仍旧不该放弃思索。 We shall not cease from explorationAnd the end of our exploringWill be to arrive where we startAnd know the place for the first time. Stay Hungry, Stay Foolish.]]></content>
<categories>
<category>自我提升</category>
</categories>
<tags>
<tag>鸡汤</tag>
<tag>原创</tag>
</tags>
</entry>
<entry>
<title><![CDATA[生活中的控制]]></title>
<url>%2F2019%2F03%2F21%2F%E7%94%9F%E6%B4%BB%E4%B8%AD%E7%9A%84%E6%8E%A7%E5%88%B6%2F</url>
<content type="text"><![CDATA[大学是新的起点。在大学里我希望得到的不仅仅是知识的积累,我更希望能在大学这四年的时间里培养出独立思考、分析解决问题的能力。而这两年以来,我也一直在不断地探寻着出路。“生活中的控制” 这门课,我认为它就是这样的一堂课,注重培养学生思考,并且对于学生生活的规划给以启发和指导,是非常有意义和价值的课程。 图片来源: 9-steps-to-taking-control-of-your-life ⚠️ 本文写于 2017 年 5 月 31 日,该文作为存本未对原文进行任何修改。 前言这份报告应老师的要求,主要以两个方面的内容为主,一是十二何方法的分析以及使用情况,二是人生的目标与计划安排,结合自己近一年多以来的一些思考和想法,不仅作为这门课程学习成果的一份答卷,也是作为自己理清思路,记录心得的一个笔头落实。 介绍十二何方法是什么?这是一套用以剖析事件、分析问题,最后得到一个做事思路的方法。它以事件作为基本的单元,通过对事件属性和人物行为的分析,从而加深我们对事件本质的理解。为什么我们需要这样的一套方法论?因为大部分人不擅长思考。一套规范化、体系化的理论方法能够帮助我们更好的思考。从小学到中学,我们所学的东西,除了语言工具,大多数是信息性质的知识。如今,我们不应该再仅仅只是着眼于已有的知识积累,而更应看重意识、方法和工具的打磨。这套方法、工具是否朴拙不是问题,我们应该关注的是它本质上规范性、批判性和逻辑自洽与否。十二何方法就是这样的一套分析、解决问题的工具。十二何方法注重事件的要素,一个事件离不开人物,时间,地点,过程和结果,而人物这一要素又具有目的,利害,原因,选择,行为,方法。上述的十一种要素,再加上事件的本身,就有十二个属性,这就是十二何所要分析的内容。每个人,特别是比较有决断力的人,多多少少都使用着类似这样的分析问题的方法。尽管可能各自的方法都不成体系,但大体,都没有脱离开对事和人这两个主要要素的分析。十二何最精妙的地方在于它的正、反序两种使用方式上。正序和倒序,其区别在于使用者的选择上,成人者用正序来实现自我,成他者倒序耳而行成就大我。这就是我所理解的十二何。十二何如何在生活中应用? 背景先说说我的故事。我是从农村里走出来的,小学在农村里读书,初中跳到了城乡结合区的学校里接受教育,到了高中,我转到了市中心的一所较好的中学就读。我的家境比较贫困,在同样的环境下,我的其他同学在学业这方面走得比我远的寥寥无几。能有这样的结果,离不开我父亲替我做的选择。我就读的每一所学校,几乎都是由他决定的。可以说在高考之前,我几乎没有做过什么对自己影响深远的重大决定。一直以来,我都是一个只知低头走路的人。我做过的第一个影响较大的决定是高考志愿的填报。我那一届的福建考生,填的是平行志愿,高考结束出分后才开始填报志愿。当时我的分数比较尴尬,高不成低不仅,985 院校基本无望,211 又稍微可惜。家里人一致希望我填报本省的医科大学。对于我的父母而言,他们的出发点就是希望我以后的日子过得安稳。以他们的见闻,或者说是出于经验直觉,他们认为学医是一个非常好的选择,这个行业收入稳定,潜在的社会福利高,出于这样的考虑,他们强烈的要求我选择这个职业。以上是事件的背景。 选择我并不想学医学。从我的角度出发,我不愿意学医原因有三,一是医学这路苦、累并且熬,二是投资的回报周期有点长,三则是中国的大环境对医生这个行业不友好。当然这些都是我自己的推测,自己的想法,每个理由甚至都经不起推敲。但就这件事而言,最大的意义于我终于把自己的想法提出来,拒绝了父母为我选择的路,由自己选择自己的道路。我开始思考自己喜欢什么、适合做什么,我应该怎么安排自己下一步路。但是在尝试之前,是无法得知自己喜欢和适合干的事情的。既然无法在短时间里确定好自己要的未来,那么只能使自己当下的决定尽可能的让将来可以有的更多的路。通过咨询已经大学毕业并参加工作的一些学长、以及我敬重的师长,最后得出志愿填报的时候,考虑的三要素优先级大致应该是,城市>专业>学校。在这个基础上,再考虑个人的因素。通过一步一步的筛选、舍取,最终做出了选择。北京,IT 行业,211 高校。当我心底对志愿的选报有了大体的方向之后,就尝试着去说服我的父母。而在交涉的过程中,通过他们的言行,抓住其目标,向他们说明为什么我的决定是符合他们所期望的。这过程不外乎就是表示自己的态度,抛出观点,分析利害,提出一套可行的方案。以上就是我之前对十二何方法的使用,尽管当时并不懂十二何这套方法体系,但是在分析志愿填报的时候,使用了类似十二何正序分析方法,从个人利益出发,发掘自己所想要的目标结果,使用恰当的手段方法,得到解决方案;而说服父母最终让他们转变态度这件事情上,和十二何倒序分析方法不谋而合,在这个事情上,先观察父母的言行,以认知其目的、态度和观点,从他们的目标出发,根据自己的实际情况、自己的意志意愿做出相应选择。 何何十二何方法只是一套方法论,回归到个人的发展上,它作为一个工具提供一个思路,让你去分析问题背后的真意。无论正序倒序,最终落实到的还是目标的实现。而这门课最重要的就是让我们理解思考的重要性,开动大家脑筋,让同学思考。思考什么?幼年时期,我们热衷于发问,见闻新鲜事物便不止地提出问题。这个时期儿童对于任何事物保持着好奇求知的心。为什么人要吃饭,吃的东西去哪了?我是怎么控制自己行动和思考的?这是对自身存在的提问。不仅如此,人对外界的存在也十分的好奇,我仍旧记得小时候在看过新闻联播后,向我的父亲提出了如下的问题:为什么会有中国共产党?他们是什么?为什么要听他们的?为什么有人当官有人当农民?当然除此之外,我对电视里为什么有人在动也很好奇。只有发问,质疑才能引发思考。但是渐渐的随着知识的积累,人不再发问了,已有的信息似乎可以解释任何常见的问题,我们称之为常识。当遇到新事物的时候,人总是首先尝试着用已有的知识储备来解释和理解。大多数的人开始构建自己的舒适圈,在这样的圈子里,停止思考,自我的发展进入了滞留区。应该重新学会思考,去思考哪些问题是人一生中最基本、最根本的问题。最基本的一个问题是,你选择怎么样度过你的一生? 思考我比较赞同《教父》中的人生观,第一步努力实现自我的价值,第二步全力照顾好家人,第三尽可能的帮助善良的人,第四位族群发声,第五为国家争取荣誉。作为男人,实现前两步可以说人生圆满,做到后三步堪称伟大。在大学的四年时间里,我力求能够够着前两点。我希望能够找到我的人生目标所在。但事实上,一个正处青年的人是很难真正认清自己人生最终目标。换句话来说,所谓的“最终目标”可能本身就不存在。人会因为环境的影响、心智的成长、阅历的丰富渐而对自己的目标做出相对应的调整。在一个人的青年时期,它的心智尚未成熟,对个体的价值、社群的意义以及个人和社群之间的关系等概念和利害关系是模糊不清的,在这样的状态下,这个群体很难产生相对独立的自我意识和社会责任感。不只是一味的追求享乐的青年人是少有的,有明确的目标并且为之奋斗的青年人更是可贵。但是人的心智发展轨迹也差不多如此。先认识自己,实现自我,有余力,有觉悟后,推己及人,这时候不再仅仅局限于自我的利益之中了。对于现在的我而言,境界也仅仅如此。太长太远太高的长期目标在此便不多加探讨,只简单的谈谈我的短期目标。 共勉我从大一开始就没有停止过探寻目标的脚步。在经历上,大一参与学生会、科技俱乐部,大二带项目、参加创业团队。而学业方面,除了对专业知识的汲取,也开始培养和锻炼软技能。实干,读书,交友,只有多多经历,才能逐步的确立自己究竟喜欢什么,想要什么以及适合什么。经过大学这两年以来的探寻,我确立了自己的三年目标。三年的目标只从我个人的发展为出发点,结合自己的实际情况分析。我作为一个京外学生,在这里我举目无亲,属于外来者,京居不易,有几个问题不得不面对。如果我一毕业,马上面临的是就业问题,此外一个比较令人头疼的便是住房、生活成本问题,一言蔽之,就是何去何从。当然这两个问题都是可以解决的。我之前提到过我加入了一个创业团队,并成为主力技术人员。大二这一年里,我取得的最大成果便是学得了一门可以糊口的生计。当然还有一个解决这两个问题的好办法,那便是读研。继续接受教育的话,便可以暂时规避掉上述的两个问题。我的专业是软件工程,这一方向的研究生学位在我们学校最大的价值就是一纸文凭。所以我目标之一就是考研,考一个相对较好、对自我能力提升较大的研究生学位。另一方面,我继续提高自己的技术水平,另一个三年目标是在毕业时候,我的专业能力可以达到合格的技术人员,能够直接进企业工作。我正在向着这两个目标前进着,也已经取得了一些成绩,仍然在探索着。当然,我也未放弃过更深远、更有意义的目标的追寻。 总之,不要停止质疑发问,保持好奇求知的心,大胆假设,求真务实。]]></content>
<categories>
<category>自我提升</category>
</categories>
<tags>
<tag>鸡汤</tag>
<tag>原创</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Gentle-Introduction-to-Predictive-Modeling]]></title>
<url>%2F2019%2F03%2F21%2FGentle-Introduction-to-Predictive-Modeling%2F</url>
<content type="text"><![CDATA[When you’re an absolute beginner it can be very confusing. Frustratingly so.Even ideas that seem so simple in retrospect are alien when you first encounter them. There’s a whole new language to learn. frustratingly: 令人沮丧的retrospect: 事后看来 I recently received this question: So using the iris exercise as an example if I were to pluck a flower from my garden how would I use the algorithm to predict what it is? It’s a great question. In this post I want to give a gentle introduction to predictive modeling. 原文地址:Gentle-introduction-to-predictive-modeling 1. Sample DataData is information about the problem that you are working on. Imagine we want to identify the species of flower from the measurements of a flower. The data is comprised of four flower measurements in centimeters, these are the columns of the data. Each row of data is one example of a flower that has been measured and it’s known species. The problem we are solving is to create a model from the sample data that can tell us which species a flower belongs to from its measurements alone. 我们要解决的问题是从样本数据中创建一个模型,该模型可以告诉我们花朵属于哪个物种。 2. Learn a ModelThis problem described above is called supervised learning. The goal of a supervised learning algorithm is to take some data with a known relationship (actual flower measurements and the species of the flower) and to create a model of those relationships. In this case the output is a category (flower species) and we call this type of problem a classification problem. If the output was a numerical value, we would call it a regression problem. The algorithm does the learning. The model contains the learned relationships. The model itself may be a handful of numbers and way of using those numbers to relate input (flower measurements in centimeters) to an output (the species of flower). 模型本身可能是少数数字以及使用这些数字将输入(以厘米为单位的花测量)与输出(花的种类)相关联的方式。 We want to keep the model after we have learned it from our sample data. Create a predictive model from training data and an algorithm. 3. Make PredictionsWe don’t need to keen the training data as the model has summarized the relationships contained within it. 我们不需要热衷于训练数据,因为模型已经总结了包含在其中的关系。 The reason we keep the model learned from data is because we want to use it to make predictions. In this example, we use the model by taking measurements of specific flowers of which don’t know the species. Our model will read the input (new measurements), perform a calculation of some kind with it’s internal numbers and make a prediction about which species of flower it happens to be. The prediction may not be perfect, but if you have good sample data and a robust model learned from that data, it will be quite accurate. Use the model to make predictions on new data. SummaryIn this post we have taken a very gentle introduction to predictive modeling. The three aspects of predictive modeling we looked at were: Sample Data: the data that we collect that describes our problem with known relationships between inputs and outputs. Learn a Model: the algorithm that we use on the sample data to create a model that we can later use over and over again. Making Predictions: the use of our learned model on new data for which we don’t know the output. We used the example of classifying plant species based on flower measurements. This is in fact a famous example in machine learning because it’s a good clean dataset and the problem is easy to understand. Action StepTake a moment and really understand these concepts. They are the foundation of any thinking or work that you might do in machine learning. Your action step is to think through the three aspects (data, model, predictions) and relate them to a problem that you would like to work on.]]></content>
<categories>
<category>机器学习</category>
</categories>
<tags>
<tag>机器学习</tag>
<tag>教程</tag>
<tag>翻译</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Machine-Learning-Matters]]></title>
<url>%2F2019%2F03%2F18%2FMachine-Learning-Matters%2F</url>
<content type="text"><![CDATA[It is important to know why machine learning matters so that you know the intrinsic value of the field and of methods and open questions in the field. Like knowing your why, knowing the value of the field can be used as a powerful filter of information and help you focus on those methods that actually deliver on the promise that the field makes. intrinsic: 本质的;固有的;本身的 就像知道你的原因一样,了解该领域的价值可以作为一个强大的信息过滤器,并帮助你专注于那些真正实现该领域承诺的方法。 如果你知其根本,了解该领域的价值可以作为一个强大的信息过滤器,并帮助你专注于那些真正兑现该领域所(承诺)致力的方法。 deliver on: 兑现 In this post you will learn that machine learning matters because it provides methods that can create solutions to complex problems. You will discover that there are problems for which it is not feasible to manually specify how a program solves a problem. The promise that machine learning makes is that it provides tools to generate a solution to complex problems, faster, more accurately and more scalable than we could program a solution manually. 前言知道机器学习的重要性以及原因,有助于你在后续学习过程中专注于该领域真正所关心的、要去实现的目标。作者一开始给出其与传统程序的主要区别,以此引出机器学习重要的原因。 Complex ProblemsWriting programs in a computer can be summarized as automating procedures on input data to create output artifacts. Almost always, they are linear, procedural and logical. A traditional program is written in a programming language to some specification, and it has properties like: You know or can control the inputs to the program You can specify how the program will achieve its goal You can map out what decisions the program will make and under what conditions it makes them You can test your program and be confident that because the inputs and outputs are known and all conditions have been exercised the program will achieve its goal There are some problems that you can represent in a computer that you cannot write a traditional program to solve. They resist a procedural and logical solution. They have properties such as: The scope of all possible inputs is not known beforehand You cannot specify how to achieve the goal of the program, only what that goal is You cannot map out all the decisions the program will need to make to achieve its goal You can collect sample input data for the program Problems like this resist traditional programmed solutions because manually specifying a solution would require a disproportionate amount of resources. artifact: 手工艺品;人工制品 specification: 规格说明 disproportionate: 不成比例;与之不匹配 You are probably a programmer, and you might be an experienced programmer. This might sound very odd, even unbelievable. As programmers, we believe as long as we can define what a program needs to do, we are confident we can define how a program can achieve that goal. This is not always the case. Spam Filter ExampleAn example of an every-day decision problem that resists a manually defined solution is the discrimination of spam email from non-spam email. How would you write a program to filter emails as they come into your email account and decide whether to put them in the spam folder or the inbox folder? Some of my thoughts on how to do this are: I’d collect examples of emails I knew to be spam or not-spam I’d read the emails I had collected and write down any patterns I saw in either group I’d think about abstracting those patterns into more general rules I could program I’d look for emails that I could safely and quickly categorize as either spam or non-spam I’d write tests for my program to ensure it was making accurate decisions I’d monitor the deployed system and keep an eye on the decisions it was making I could write a program to do this, and so could you. It would take a lot of time. A lot of emails would have to be read. The problem would need to be thought about very deeply. It would take a lot of development and testing time before the system could be trusted enough to be put into operations. Once in operations, there would be so many hard coded rules that were specific to the email I had read that it would be a maintenance nightmare. The process above also describes a machine learning solution to the problem of discriminating spam email from non-spam email. The punch line is that machine learning methods can automate the process for you. 用一句话说就是,机器学习方法可以为你你自动化流程。 Pro Tip: Approaching complex problems in this way is an incredibly valuable skill that will serve you well later on in preparing data and selecting the right machine learning method. Thinking through the process of “how would I manually write a program to solve this” is a master skill that is often overlooked and forgotten by professionals. 专业提示:以这种方式处理复杂问题是一项非常有价值的技能,可以在以后为您准备数据和选择正确的机器学习方法。通过 “如何手动编写程序来解决这个问题” 的过程进行思考是一项经常被专业人士忽视和遗忘的掌握技巧。 Machine Learning MattersThe field of machine learning provides tools to automatically make decisions from data in order to achieve some goal or requirement. The research questions focus on how to do this better and what the results mean. Let us focus on the practical problem-solving capabilities of the tools and practices of machine learning. These tools and practices of machine learning matter to the world. Four reasons that they matter are: Automatically: Machine learning methods are automated processes (algorithms) that create algorithms. The methods run on data and produce a model that specifies how to achieve the program’s goal. Fast: Machine learning methods save you time. The methods can analyze sample input data and deliver a program faster than you could manually write one. Accurate: Machine learning methods can do a better job than you. As automated methods, they can run longer on more data than you in order to make more accurate decisions. Scale: Machine learning methods can provide solutions to problems that you cannot solve. The methods can scale and be interconnected to achieve solutions to problems that previously could not be considered or even conceived. 自动:机器学习方法是创建算法的自动化过程(算法)。这些方法在数据上运行并生成一个模型,指定如何实现程序的目标。 快速:机器学习方法可以节省您的时间。这些方法可以分析样本输入数据并提供比手动编写程序更快的程序。 准确:机器学习方法可以比你做得更好。作为自动化方法,他们可以在比您更多的数据上运行更长时间,以便做出更准确的决策。 规模:机器学习方法可以为您无法解决的问题提供解决方案。这些方法可以扩展和互连,以实现以前无法考虑或甚至构思的问题的解决方案。 In this post you learned that machine learning matters because it provides methods that can create solutions to complex problems. Specifically, these are problems that resist a manually specified solution. You learned that the promise of machine learning is that it can solve these types of problems automatically, faster and more accurately than a manually specified solution and at a larger scale.]]></content>
<categories>
<category>机器学习</category>
</categories>
<tags>
<tag>机器学习</tag>
<tag>教程</tag>
<tag>翻译</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Practical-machine-learning-problems]]></title>
<url>%2F2019%2F03%2F17%2FPractical-machine-learning-problems%2F</url>
<content type="text"><![CDATA[What is Machine Learning? We can read authoritative definitions of machine learning, but really, machine learning is defined by the problem being solved. Therefore the best way to understand machine learning is to look at some example problems. 前言本文先介绍了几种常见的机器学习的实际应用,然后给出机器学习问题的分类方法(命名系统),最后提及一些对于更进一步了解机器学习有用的资源。 In this post we will first look at some well known and understood examples of machine learning problems in the real world. We will then look at a taxonomy (naming system) for standard machine learning problems and learn how to identify a problem as one of these standard cases. This is valuable, because knowing the type of problem we are facing allows us to think about the data we need and the types of algorithms to try. taxonomy: 分类学;分类 … 然后,我们将查看标准机器学习问题的分类法(命名系统),并学习如何将问题识别为这些标准案例之一。这很有价值,因为了解我们面临的问题类型可以让我们考虑我们需要的数据以及要尝试的算法类型。… 10 Examples of Machine Learning ProblemsMachine Learning problems are abound. They make up core or difficult parts of the software you use on the web or on your desktop everyday. Think of the “do you want to follow” suggestions on twitter and the speech understanding in Apple’s Siri. Below are 10 examples of machine learning that really ground what machine learning is all about. Spam Detection: Given email in an inbox, identify those email messages that are spam and those that are not. Having a model of this problem would allow a program to leave non-spam emails in the inbox and move spam emails to a spam folder. We should all be familiar with this example. Credit Card Fraud Detection: Given credit card transactions for a customer in a month, identify those transactions that were made by the customer and those that were not. A program with a model of this decision could refund those transactions that were fraudulent. fraud: 欺诈,诈骗 Digit Recognition: Given a zip codes hand written on envelops, identify the digit for each hand written character. A model of this problem would allow a computer program to read and understand handwritten zip codes and sort envelops by geographic region. Speech Understanding: Given an utterance from a user, identify the specific request made by the user. A model of this problem would allow a program to understand and make an attempt to fulfil that request. The iPhone with Siri has this capability. utterance: 言论 Face Detection: Given a digital photo album of many hundreds of digital photographs, identify those photos that include a given person. A model of this decision process would allow a program to organize photos by person. Some cameras and software like iPhoto has this capability. Product Recommendation: Given a purchase history for a customer and a large inventory of products, identify those products in which that customer will be interested and likely to purchase. A model of this decision process would allow a program to make recommendations to a customer and motivate product purchases. Amazon has this capability. Also think of Facebook, GooglePlus and LinkedIn that recommend users to connect with you after you sign-up. Medical Diagnosis: Given the symptoms exhibited in a patient and a database of anonymized patient records, predict whether the patient is likely to have an illness. A model of this decision problem could be used by a program to provide decision support to medical professionals. Stock Trading: Given the current and past price movements for a stock, determine whether the stock should be bought, held or sold. A model of this decision problem could provide decision support to financial analysts. Customer Segmentation: Given the pattern of behaviour by a user during a trial period and the past behaviours of all users, identify those users that will convert to the paid version of the product and those that will not. A model of this decision problem would allow a program to trigger customer interventions to persuade the customer to covert early or better engage in the trial. Shape Detection: Given a user hand drawing a shape on a touch screen and a database of known shapes, determine which shape the user was trying to draw. A model of this decision would allow a program to show the platonic version of that shape the user drew to make crisp diagrams. The Instaviz iPhone app does this. These 10 examples give a good sense of what a machine learning problem looks like. There is a corpus of historic examples, there is a decision that needs to be modelled and a business or domain benefit to having that decision modelled and efficaciously made automatically. corpus: 文集;合集 Some of these problems are some of the hardest problems in Artificial Intelligence, such as Natural Language Processing and Machine Vision (doing things that humans do easily). Others are still difficult, but are classic examples of machine learning such as spam detection and credit card fraud detection. Think about some of your interactions with online and offline software in the last week. I’m sure you could easily guess at another ten or twenty examples of machine learning you have directly or indirectly used. Types of Machine Learning ProblemsReading through the list of example machine learning problems above, I’m sure you can start to see similarities. This is a valuable skill, because being good at extracting the essence of a problem will allow you to think effectively about what data you need and what types of algorithms you should try. There are common classes of problem in Machine Learning. The problem classes below are archetypes for most of the problems we refer to when we are doing Machine Learning. archetype: 原型 Classification: Data is labelled meaning it is assigned a class, for example spam/non-spam or fraud/non-fraud. The decision being modelled is to assign labels to new unlabelled pieces of data. This can be thought of as a discrimination problem, modelling the differences or similarities between groups. Regression: Data is labelled with a real value (think floating point) rather then a label. Examples that are easy to understand are time series data like the price of a stock over time, The decision being modelled is what value to predict for new unpredicted data. 回归:数据标有实际值(想想浮点数),而不是标签。易于理解的示例是时间序列数据,如股票价格随时间的变化,建模的决策是预测新的不可预测数据的值。 Clustering: Data is not labelled, but can be divided into groups based on similarity and other measures of natural structure in the data. An example from the above list would be organising pictures by faces without names, where the human user has to assign names to groups, like iPhoto on the Mac. Rule Extraction: Data is used as the basis for the extraction of propositional rules (antecedent/consequent aka if-then). Such rules may, but are typically not directed, meaning that the methods discover statistically supportable relationships between attributes in the data, not necessarily involving something that is being predicted. An example is the discovery of the relationship between the purchase of beer and diapers (this is data mining folk-law, true or not, it’s illustrative of the desire and opportunity). When you think a problem is a machine learning problem (a decision problem that needs to be modelled from data), think next of what type of problem you could phrase it as easily or what type of outcome the client or requirement is asking for and work backwards. phrase: 措辞;表达 ResourcesThere are few resources that provide lists of real-world machine learning problems. They may be out there, but I can’t find them. I still found some cool resources for you though: The Annual “Humies” Awards: These are a list of prizes awarded to results achieved by algorithms that are competitive with those results come up with by humans. It’s exciting because the algorithms are working only from data or cost functions and are able to be creative and inventive enough to infringe on patents. Amazing! The AI Effect: The notion where as soon as an Artificial Intelligence program achieves a good enough result it is no longer regarded as Artificial Intelligence, instead it is just technology and gets used in every day things. Applies just as equally to Machine Learning. AI-Complete: refers to very difficult problems in Artificial Intelligence that if solved would be an example of Strong AI (AI as envisioned in science fiction, true AI). The problems of Computer Vision and Natural Language Processing are both examples of AI-Complete problems and may also be considered domain-specific categories of machine learning problems. What are the Top 10 problems in Machine Learning for 2013? This Quora question has some excellent answers, and one that lists some broad categories of practical machine learning problems. We have reviewed some common examples of real-world machine learning problems and a taxonomy of classes of machine learning problems. We now have some confidence to comment on whether a problem is a machine learning problem or not and to pick out the elements from a problem description and determine whether it is a classification, regression, clustering or rule extraction type of problem. 后续 Machine-Learning-Matters]]></content>
<categories>
<category>机器学习</category>
</categories>
<tags>
<tag>机器学习</tag>
<tag>教程</tag>
<tag>翻译</tag>
</tags>
</entry>
<entry>
<title><![CDATA[What-is-Machine-Learning?]]></title>
<url>%2F2019%2F03%2F15%2FWhat-is-Machine-Learning%2F</url>
<content type="text"><![CDATA[You’re interested in Machine Learning and maybe you dabble in it a little.If you talk about Machine Learning with a friend or colleague one day, you run the risk of someone actually asking you: “So, what is machine learning?” The goal of this post is to give you a few definitions to think about and a handy one-liner definition that is easy to remember. 前言学习一项新的技术、涉入一个新的领域,第一步需要对其概念有个清晰明确的定义,在这个基础上再深入挖掘。在这篇文章中作者尝试给定几种机器学习的定义。理解这些定义,从不同领域专家的视角来看待机器学习,对接下来的学习大有裨益。 We will start out by getting a feeling for the standard definitions of Machine Learning taken from authoritative textbooks in the field. We’ll finish up by working out a developers definition of machine learning and a handy one-liner that we can use anytime we’re asked: What is Machine Learning? dabble: 涉猎;涉足;玩水 Authoritative DefinitionsLet’s start out by looking at four textbooks on Machine Learning that are commonly used in university-level courses. These are our authoritative definitions and lay our foundation for deeper thought on the subject. I chose these four definitions to highlight some useful and varied perspectives on the field. Through experience, we’ll learn that the field really is a mess of methods and choosing a perspective is key to making progress. varied: 多变的;各式各样的;杂色的 Mitchell’s Machine LearningTom Mitchell in his book Machine Learning provides a definition in the opening line of the preface: The field of machine learning is concerned with the question of how to construct computer programs that automatically improve with experience. 机器学习领域涉及如何构建自动改进经验的计算机程序的问题。 I like this short and sweet definition and it is the basis for the developers definition we come up with at the end of the post. Note the mention of “computer programs” and the reference to “automated improvement“. Write programs that improve themselves, it’s provocative! In his introduction he provides a short formalism that you’ll see much repeated: A computer program is said to learn from experience _E_ with respect to some class of tasks _T_ and performance measure _P_, if its performance at tasks in _T_, as measured by _P_, improves with experience _E_. 机器学习是一个计算机程序,它从经验 E 中学习关于某类任务 T 和性能测量 P,能够在 T 中的任务中的性能(由 P 测量)随经验 E 而改善。 Don’t let the definition of terms scare you off, this is a very useful formalism. We can use this formalism as a template and put E, T, and P at the top of columns in a table and list out complex problems with less ambiguity. It could be used as a design tool to help us think clearly about what data to collect (E), what decisions the software needs to make (T) and how we will evaluate its results (P). This power is why it is oft repeated as a standard definition. Keep it in your back pocket. formalism: 形式 ambiguity: 模棱两可,歧义性 oft: 经常 Elements of Statistical LearningThe Elements of Statistical Learning: Data Mining, Inference, and Prediction was written by three Stanford statisticians and self-described as a statistical framework to organize their field of inquiry. inquiry: 调查;询问;询价 In the preface is written: Vast amounts of data are being generated in many fields, and the statisticians’s job is to make sense of it all: to extract important patterns and trends, and to understand “what the data says”. We call this learning from data. 许多领域正在生成大量数据,统计人员的工作就是理解这一切:提取重要的模式和趋势,并理解 “数据所说的内容”。 我们称之为 从数据中学习。 I understand the job of a statistician is to use the tools of statistics to interpret data in the context of the domain. The authors seem to include all of the field of Machine Learning as aids in that pursuit. Interestingly, they chose to include “Data Mining” in the subtitle of the book. Statisticians learn from data, but software does too and we learn from the things that the software learns. From the decisions made and the results achieved by various machine learning methods. Pattern RecognitionBishop in the preface of his book Pattern Recognition and Machine Learning comments: Pattern recognition has its origins in engineering, whereas machine learning grew out of computer science. However, these activities can be viewed as two facets of the same field… 模式识别起源于工程,而机器学习则源于计算机科学。 但是,这些活动可视为同一领域的两个方面…… Reading this, you get the impression that Bishop came at the field from an engineering perspective and later learned and leveraged the Computer Science take on the same methods. Pattern recognition is an engineering or signal processing term. leveraged: 杠杆 This is a mature approach and one we should emulate. More broadly, regardless of the field that lays claim to a method, if it suits our needs by getting us closer to an insight or a result by “learning from data”, then we can decide to call it machine learning. emulate: 模仿 An Algorithmic PerspectiveMarsland provides adopts the Mitchell definition of Machine Learning in his book Machine Learning: An Algorithmic Perspective. He provides a cogent note in his prologue that motivates his writing the book: One of the most interesting features of machine learning is that it lies on the boundary of several different academic disciplines, principally computer science, statistics, mathematics, and engineering. …machine learning is usually studied as part of artificial intelligence, which puts it firmly into computer science …understanding why these algorithms work requires a certain amount of statistical and mathematical sophistication that is often missing from computer science undergraduates. ….. 机器学习通常作为人工智能的一部分进行研究,将其牢牢地植入计算机科学…… 理解为什么这些算法的工作需要一定程度的统计和数学复杂性,而这些都是计算机科学本科生经常缺失的。 This is insightful and instructive. Firstly, he underscores the multidisciplinary nature of the field. We were getting a feeling for that from the above definition, but he draws a big red underline for us. Machine Learning draws from all manner of information sciences. Secondly, he underscores the danger of sticking to a given perspective too tightly. Specifically, the case of a the algorithmist who shies away from the mathematical inner workings of a method. No doubt, the counter case of the statistician that shies away from the practical concerns of implementation and deployment is just as limiting. cogent: 中肯的 prologue: 序言 underscore: 在下面画线;强调 Venn DiagramDrew Conway created a nice Venn Diagram in September 2010 that might help. In his explanation, he comments: Machine Learning = Hacking + Math & Statistics Data Science Venn Diagram. Credited to Drew Conway, Creative Commons licensed as Attribution-NonCommercial. He also describes the Danger Zone as Hacking Skills + Expertise. Here, he is referring to those people that know enough to be dangerous. They can access and structure data, they know the domain and they can run a method and present results, but don’t understand what the results mean. I think this is what Marsland may have been hinting at. 在这里,他指的是那些“危险”的人。这类研究者可以获取和构建数据,他们对这个领域有一定的了解,他们可以构建运行方法并显示结果,但不了解结果的含义。我认为这是 Marsland 可能暗示的。注: 具备编程能力和实践经验,但是缺乏数学和统计学方法理论,这类研究者在学习机器学习的时候容易陷入误区。如果研究脱离了理论基础,只懂得如何实现,那么就不是在学习机器学习,而仅仅是对现有的机器学习工具的一种应用。 Developers Definition of Machine LearningWe now turn to the need to break all of this down to nuts and bolts for us developers. nuts: 怪人;疯狂的,执着于某事的bolt: 逃离;匆匆咽下;突然地;猛冲 We first look at complex problems that resist our decomposition and procedural solutions. This frames the power of machine learning. We then work out a definition that sits well with us developers that we can use whenever we’re asked, “So, What is Machine Learning?” by other developers. Complex ProblemsAs a developer, you will eventually encounter classes of problems that stubbornly resist a logical and procedural solution. stubbornly: 顽固地 What I mean is, there are classes of problems where it is not feasible or cost-effective to sit down and write out all the if statements needed to solve the problem. “Sacrilege!” I hear your developer’s brain shout. It’s true. Take the every-day case of the decision problem of discriminating spam email from non-spam email. This is an example used all the time when introducing machine learning. How would you write a program to filter emails as they come into your email account and decide to put them in the spam folder or the inbox folder? spam email: 垃圾邮件 You’d probably start out by collecting some examples and having a look at them and a deep think about them. You’d look for patterns in the emails that are spam and those that are not. You’d think about abstracting those patterns so that your heuristics would work with new cases in the future. You’d ignore odd emails that will never be seen again. You’d go for easy wins to get your accuracy up and craft special things for the edge cases. You’d review the email frequently over time and think about abstracting new patterns to improve the decision making. heuristics: 启发 There’s a machine learning algorithm in there, amongst all that, except it was executed by you the programmer rather than the computer. This manually derived hardcoded system would only be as good as the programmer’s ability to extract rules from the data and implement them in the program. amongst: 在…其中 It could be done, but it would take a lot of resources and be a maintenance nightmare. nightmare: 噩梦 Machine LearningIn the example above, I’m sure your developer brain, that part of your brain that ruthlessly seeks to automate, could see the opportunity for automating and optimizing the meta-process of extracting patterns from examples. ruthlessly: 无情地 Machine learning methods are this automated process. In our spam/non-spam example, the examples (E) are emails we have collected. The task (T) was a decision problem (called classification) of marking each email as spam or not, and putting it in the correct folder. Our performance measure (P) would be something like accuracy as a percentage (correct decisions divided by total decisions made multiplied by 100) between 0% (worst) and 100% (best). Preparing a decision making program like this is typically called training, where collected examples are called the training set and the program is referred to as a model, as in a model of the problem of classifying spam from non-spam. As developers, we like this terminology, a model has state and needs to be persisted, training is a process that is performed once and is maybe rerun as needed, classification is the task performed. It all makes sense to us. terminology: 专业用语;术语 We can see that some of the terminology used in the above definitions does not sit well for programmers. Technically, all the programs we write are automations, commenting that machine learning automatically learns is not meaningful. Handy One-linerSo, let’s see if we can use these pieces and construct a developers definition of machine learning. How about: Machine Learning is the training of a model from data that generalizes a decision against a performance measure. Training a model suggests training examples. A model suggests state acquired through experience. Generalizes a decision suggests the capability to make a decision based on inputs and anticipating unseen inputs in the future for which a decision will be required. Finally, against a performance measure suggests a targeted need and directed quality to the model being prepared. I’m no poet, can you come up with a more accurate or more succinct developers definition of Machine Learning?Share your definition in the comments below. Further ReadingI’ve linked to resources throughout this post, but I have listed some useful resources below if you thirst for more reading. BooksThe following are the four textbooks from which definitions were drawn. Machine Learning by Mitchell The Elements of Statistical Learning: Data Mining, Inference, and Prediction by Hastie, Tibshirani and Friedman Pattern Recognition and Machine Learning by Bishop Machine Learning: An Algorithmic Perspective by Marsland. Also, Drew Conway has a book in collaboration with John Myles White that is practical and fun to read titled Machine Learning for Hackers 后续 Practical-machine-learning-problems]]></content>
<categories>
<category>机器学习</category>
</categories>
<tags>
<tag>机器学习</tag>
<tag>教程</tag>
<tag>英语</tag>
</tags>
</entry>
<entry>
<title><![CDATA[The_Machine_Learning_Mastery_Method]]></title>
<url>%2F2019%2F03%2F06%2FThe-Machine-Learning-Mastery-Method%2F</url>
<content type="text"><![CDATA[前言The traditional way to teach machine learning is bottom-up. Start with the theory and math, then algorithm implementations, then send you off to figure out how to start solving real-world problems. 图片来源: What is The Easiest Way To Learn Machine Learning The Machine Learning Mastery approach flips this and starts with the outcome that is most valuable. ⚠️ 这篇介绍了一种产出驱动、面向企业生产的学习机器学习的方式。这里仅仅摘取部分有用的说明性文段,原文中每个文段中作者都给出了相关链接。详细内容请访问原文:The Machine Learning Mastery Method Start with the theory and math, then algorithm implementations, then send you off to figure out how to start solving real-world problems. The Machine Learning Mastery approach flips this and starts with the outcome that is most valuable. implementation: 实现,实施flip: 翻转 It targets the outcome that business wants to pay for:how to deliver a result. A result in the form of a set of predictions or model that can reliably make predictions. This is a top-down and results-first approach. Starting with the goal of achieving the result that is most desirable in the marketplace, what is the shortest path to take you, the practitioner, to that result? practitioner: 从业人员 We can summarize this path in 5-steps as follows: Step 1: Adjust Mindset (believe!). Step 2: Pick a Process (how to get results). Step 3: Pick a Tool (implementation). Step 4: Practice on Datasets (put in the work). Step 5: Build a Portfolio (show your skills). 第 1 步:调整心态(相信自己!)第 2 步:选择一个流程(如何获得结果)第 3 步:选择一个工具(实现)第 4 步:练习数据集(投入工作)第 5 步:构建投资组合(展示您的技能) Let’s take a closer look at each step. Step 0: LandmarksBefore we begin, you must know the landmarks of machine learning. I often just assume this, but you cannot proceed unless you know some true basics. For example: What machine learning is and be able to explain it to a colleague.What is Machine Learning? Know some examples of machine learning problems off the top of your headPractical Machine Learning Problems Machine learning is the only way to solve some complex problems.Machine Learning Matters Predictive modeling is the most useful part of applied machine learning.Gentle Introduction to Predictive Modeling Where machine learning fits with regard to AI and Data ScienceWhere Does Machine Learning Fit In? Types of machine learning algorithms available.A Tour of Machine Learning Algorithms Some basic machine learning termsHow To Talk About Data in Machine Learning Step 1: MindsetMachine learning is not just for the professors. It is not just for the gifted or the academics. You Must BelieveYou can learn the topic and apply it to solve problems. And just do itThere are a lot of speed bumps you can hit.Identify them, address them, and keep moving. Step 2: Pick a ProcessDo you want to reliably get above average results on problem after problem? You need to follow a systematic process. A process allows you to harness and reuse best practices. It means you don’t have to rely on memory or intuition. It guides you through a project end-to-end. It means that you always know what to do next. It can be tailored to your specific problem types and tools. A systematic process is the difference between a roller coaster of good and bad results on the one hand and above average and forever improving results on the other. 流程允许您利用和重用最佳实践。这意味着你不必依赖记忆或直觉。它引导您完成项目的端到端。这意味着你总是知道下一步该做什么。它可以根据您的特定问题类型和工具进行定制。一个系统的过程就是过山车的好坏结果与高于平均水平的差异,另一方面是永远改善的结果。 I would choose above average and forever improving results every time. A process template that I recommend is as follows: Step 1: Define your problem. Step 2: Prepare your data. Step 3: Spot-check algorithms. Step 4: Improve results. Step 5: Present results. Below is a nice cartoon to summarize this systematic process: You can learn more about this process in the post: Applied Machine Learning Process You do not have to use this process, but you do need a systematic process for working through predictive modeling problems. Step 3: Pick a ToolPick a best-of-breed tool that you can use to deliver machine learning results. breed: 品种;种类,类型;繁衍 Map your process onto the tool and learn how to use it most effectively. What Programming Language?The programming language does not matter. Even the tool you use does not matter. The skills you learn working through problems will transfer from platform to platform easily. Nevertheless, here are some survey results on the most popular languages in machine learning: Best Programming Language for Machine Learning Step 4: Practice on DatasetsOnce you have a process and a tool, you need to practice. You need to practice a lot. Practice on standard machine learning datasets. Use real-world datasets, collected from an actual problem domain (rather than contrived). Use small datasets that fit into memory or an excel spreadsheet. Use well-understood datasets so you know what kind of results to expect. Practice on different types of datasets. Practice on problems that make you uncomfortable as you will have to push your skills to get a solution. Step 5: Build a PortfolioYou will build up a collection of completed projects. Put them to good use. As you work through datasets and get better, create semi-formal outputs that summarize your findings. semi-formal: 半正式化 Maybe upload your code and summarize it in a readme. Maybe you write up your results in a blog post. Maybe you make a slide deck. Maybe you create a little video on youtube.Each one of these completed projects represents one piece of your growing portfolio. Just like a painter, you can build a portfolio of completed work to demonstrate your growing skills in delivering results with machine learning. You can learn more about this approach in the post: Build a Machine Learning Portfolio You can use this portfolio yourself, leveraging code and knowledge in your prior results in larger and more ambitious projects. Once your portfolio is mature, you may even choose to leverage it into more responsibility at work or into a new machine learning focused role. leverage: 利用;手段;杠杆作用;影响力 Tips And TricksBelow are some practical tips and tricks you may consider when using this process. Start with a simple process (like above) and a simple tool (like Weka), then advance once you have confidence. Begin with the simplest and most used datasets (iris flowers and Pima diabetes). Each time you apply the process, look for ways to improve it and your usage of it. If you discover new methods, figure out the best way to integrate them into your process. Study algorithms, but only as much and in ways that help you achieve better results with your process. Study and learn from experts and see what methods you can steal and add to your process. Study your tool like you do predictive modeling problems and get the most out of it. Tackle harder and harder problems, leave the easy ones as you won’t learn much from them. Focus on clearly presenting results, the better you do this, the greater the impact of your portfolio.portfolio: 投资组合;公文包 Engage in the community on forums and Q&A sites, both ask and answer questions. SummaryIn this post, you discovered a simple 5-step process that you can use to get started and make progress in applied machine learning. Although simple to layout, the approach does take hard work, but it does payoff. Many of my students worked through this process and got work as machine learning engineers and data scientists. If you are in a deeper treatment of this process and related ideas, see the post: Machine Learning for Programmers 后续 What is Machine Learning]]></content>
<categories>
<category>机器学习</category>
</categories>
<tags>
<tag>机器学习</tag>
<tag>教程</tag>
<tag>翻译</tag>
</tags>
</entry>
<entry>
<title><![CDATA[从BIOS谈起]]></title>
<url>%2F2019%2F03%2F06%2F%E4%BB%8EBIOS%E8%B0%88%E8%B5%B7%2F</url>
<content type="text"><![CDATA[图片来源: Computer Architecture vs Computer Organization 看操作系统的知识点总结的时候,复习到BIOS相关内容,突然想到一个问题:BIOS是OS相关的吗?换句话说,同个BIOS程序可以引导不同的操作系统吗?于是就有了这篇文章。 目录编排 先导知识 体系一瞥 从历史说起 先导知识一开始你需要对计算机是如何启动的?这个问题有个大致的了解。阅读完这篇文章之后能回答: BIOS做了什么? 但是,为什么需要有BIOS?这一个引导过程为什么不直接由操作系统实现?这里,请先参考一下为什么要有 BIOS?。这篇文章说到: 在某种程度上来讲,BIOS 是将操作系统 BSP 部分单独封装后下放到主板或者 BIOS 提供商来完成。这在过去带来了巨大的好处,WinXP、Win7 现在还可以运行在更新的电脑硬件上,新的硬件只要自己更改一下就行了。 从历史谈起参考资料 计算机是如何启动的? 为什么要有 BIOS?]]></content>
<categories>
<category>硬件</category>
</categories>
<tags>
<tag>计算机组成</tag>
<tag>OS</tag>
</tags>
</entry>
<entry>
<title><![CDATA[《编程珠玑》读书笔记]]></title>
<url>%2F2019%2F03%2F05%2F%E3%80%8A%E7%BC%96%E7%A8%8B%E7%8F%A0%E7%8E%91%E3%80%8B%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0%2F</url>
<content type="text"><![CDATA[编程珠玑各章节简述第一章 问题本身准确的问题描述 特点 条件 目的 关键目标定位 要认识到“概念壁垒” 善用“奥卡姆剃刀”原则 第二章 问题的分治分治法不仅仅是对问题规模上的进行划分的工具,更是对一个大的问题分解为若干子问题的方法。 第三章 问题的数据结构 使用组的思想,封装复杂结构,尽可能采用更高阶的工具从不同维度处理问题 更具一般性的问题更容易解决 —— 把 i 的问题推广至 n 的问题 第四章 子过程状态保持初始条件、状态保持、终止条件。问题的子过程应该保持一致性,确保在每一个子流程中数据流和控制分支都在掌控之中。 至此,通过深入挖掘定义了正确的问题,通过分治的方法确定了子问题和子过程,通过仔细选择算法和数据结构平衡了真正的需求,通过程序验证写出了优雅的伪代码,并且对其正确性有相当的把握。 第五章 编程这件小事关键词: 脚手架,编码,测试,调试,算法性能评估 第六章 性能分析多个层面的优化: 数据结构 数据的类型: 如二叉树替代线性表 数据的表示: 如单精度替代多精度(但是有的情况下多精度浮点型运算速度快于单精度浮点数) 数据的组织: 产生适合树算法的簇 算法(数学意义上的) 近似简化 等价问题(如极坐标转换成笛卡尔坐标) 硬件上的考虑 考虑汇编来编写核心函数 考虑计算机硬件(如内存分页、Cache 机制、流水线的分支控制) 第七章 粗略估计 快速检验 乘除法 量纲分析 经验原则 安全系数: 如果一个可能影响系统安全的因素无法准确掌控,那么就使用一个足够大的安全系数进行预防 little 定律: 一个稳定的系统,出度速度乘以物质平均停留时间即为容量 第八章 算法设计技术 未完待续…]]></content>
<categories>
<category>笔记</category>
</categories>
<tags>
<tag>读书笔记</tag>
<tag>编程思维</tag>
<tag>更新中</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Responsive_Comping:Obtaining_Signoff_without_Mockups]]></title>
<url>%2F2019%2F03%2F03%2FResponsive-Comping-Obtaining-Signoff-without-Mockups%2F</url>
<content type="text"><![CDATA[If you’re making websites, chances are you’ve given some thought to what constitutes a responsive-friendly design process—and you’ve probably found that adding a mockup for every breakpoint isn’t a sustainable approach. How to obtaining signoff without mockups? Responsive Comping: Obtaining Signoff without Mockups 原文地址 这篇文章主要的落脚点在于如何在脱离设计稿的情况下给出一个逐层递增的响应式设计以满足客户需求。毫无疑问,在网页设计工作中,视觉稿是至关重要的一个环节,起着一个承前启后的转折点。在视觉稿定稿之前有个非常重要的环节就是原型设计,原型设计可以采用草图的展示形式加上用户故事来对客户的需求进行确定和完善,这里牵涉到需求工程就不赘述。但是有一点,目前主流的网站开发偏向于响应式设计,在甲方资金不足以给出多端用户界面设计与实现的情况下,响应式设计确实是一个节省成本的好方法,但是这也增加了开发的难度。这样的难度增加不仅仅是体现设计稿上的(你的设计稿不是按照多端来设计的,那么必须考虑一种设计在不同屏幕上展现形式自适应的可能性),更直接地反映在代码的实施难度上。本文探讨了一种面向响应式的网站设计新流程,在对页面基本信息把控的基础上,从移动端构建开始考虑,一步一步向大屏的展示调整,完成响应式设计的框架设计,最后再形成一个视觉定稿。 If you’re making websites, chances are you’ve given some thought to what constitutes a responsive-friendly design process—and you’ve probably found that adding a mockup for every breakpoint isn’t a sustainable approach. At least, that’s what happened at my company, Bearded, where we had spent years creating websites in Photoshop or Illustrator, having those mockups approved by our clients, then recreating those designs with CSS. signoff: 签收,验收mockup: mock 模拟;实物模型,视觉稿illustrator: 插画家,设计软件 Until now. A few months ago, we stopped making static image-based mockups in favor of designing with code. This is not a new idea—heck, Andy Clarke was arguing for in-browser design in 2008. But new or not, you may still be mystified at where to begin—or feel unmoored and disoriented at the prospect of giving up the approach you’ve long relied on. mystified: 迷惑,困惑unmoored: 无药可救;解缆,拔锚disoriented: 迷失方向的;无力分辨的 But fear not, gentle reader. Let’s take a look at our new mockup-less web design process and see just how easy it can be to get that Photoshop monkey off your back, and have a fresh new beginning with your old friend the web browser. Let’s talk processBefore we begin designing, we work with our clients to clearly define and prioritize the information that will go on the site. My first question is simple: Why do you need a website? Then I ask, what do you hope to accomplish as an organization, and what is your audience looking for? The answers to questions like these will help us define the functionality and information hierarchy of the site. hierarchy: 层次结构;等级制度 HIERARCHY, HIERARCHY, HIERARCHYOnce we understand the purpose of the website as a whole, we’ll apply that goal to something finite and designable, like the homepage. Before we even get to wireframing, we can express our site’s information hierarchy in the simplest possible way: as a numbered list. For a recent client, the American Association for Homecare, we ended up with a homepage list that looks like this: finite: 有限的;限定的wireframe: 线框,示意图 Branding statement: The primary emotionally communicative element of the design. It does not convey detailed information so much as give users an impression about what AAHomecare represents and help them identify with the organization. Variable featured content: Selected by site administrators, this area will include highlighted items from across the website such as events, pages, etc. featured: 特色的,特定的;被选作主打特色 Site navigation: This allows users to find the content they’re looking for. Membership: A brief list of the benefits of AAHomecare membership, followed by an invitation to apply.Events: A feed of upcoming events that contains vital information and links to the event calendar and event detail pages. vital: 重要的,至关重要 Communications: Feeds of recent items from sources such as the blog, Twitter, or newsletters, with links to the source articles where applicable. Footer content: Includes links for some site navigation, legal pages, corporate sponsors, and social networking pages, as well as location and copyright information. Without committing to any visual decisions about how to express it, we have created an accurate top-level informational hierarchy for the site’s homepage. We now know that—no matter what the homepage looks like—if it can correctly present this information, it will be a victory for the organization and the site’s users. MY OTHER WIREFRAME IS AN HTMLOnce we understand the site’s content and priorities, our first visual step is to create wireframes. But as you may have already noticed, shuffling text around a Photoshop file can be time-consuming and frustrating. shuffling: 洗牌;支吾的,磨磨蹭蹭;混编frustrating: 令人沮丧的;挫败的 But you know what’s really great for laying out content in a way that accurately expresses its hierarchy? You guessed it: HTML and CSS! So we give Photoshop a well-deserved break, fire up our favorite text editor and WebKit browser, and start wrapping our content in semantic tags using a mobile-first approach. When you only have a few hundred pixels of width to work with, priorities become even clearer, and hard decisions even more necessary. You may often find yourself asking, “Does this really need to be here?” By focusing on mobile first, we can have these discussions with clients earlier and more effectively. And the more informational load we can jettison now, the more our users will thank us later. jettison: 抛弃 Once our mobile hierarchy is clear, it’s time to progressively widen the browser and consider more complex layout decisions. Each time we encounter a width where things begin to fall apart, we can add a new media query to adjust the layout. To help us with in-browser layout development at Bearded, we developed a responsive grid system that allows us to quickly apply nestable column properties with CSS (or, more accurately, SASS and Compass). With these handy mix-ins at our disposal, we can quickly experiment with different responsive layout approaches without a lot of cognitive overhead. nestable: 可嵌套的;可连接的箱disposal: 处理,支配;清理cognitive overhead: 认知负荷 At this point, our HTML/CSS wireframes are looking pretty good. And since we’re working with the same medium (code and the browser) throughout the process, we can naturally evolve our wireframes into the final designs. WHEN MY WIREFRAME GROWS UP, IT WANTS TO BE A SITE DESIGNIt’s right around this time that we’ll take a brief diversion from our HTML to define some sensible style elements (similar to Samantha Warren’s style tiles or Sparkbox’s style prototypes). This is usually a small Photoshop canvas where we bring in the typography we’ve been working with in the wireframes and start experimenting with color, texture, and imagery. Once defined, we can use these basic visual building blocks to nudge our wireframes toward website-ness. nudge: 推动,推进 As we layer in more visual elements, we tend to bounce back and forth between our text editors and Photoshop. But Photoshop is no longer the primary design canvas; it’s now more of a sketchpad. Do we need to tweak our typography to perfection? Nope. Can we just throw a browser screenshot into Photoshop to mock up a new background graphic on the site? Sure! Don’t want to show this sketchy, half-baked PSD to a client? Not a problem—you never will. tweak: 调整;拧,扭 Not only does this method reinforce a content-driven approach to design, but it’s also crafting something that’s useful to the final product. The HTML you created for your design comp will also let developers know what kind of markup you’re looking for from the CMS. And if you’re both doing your jobs well, it means the CSS you’re about to write can be dropped into the final site with minimal adjustment. No longer will you waste away your afternoons pushing pixels in Photoshop, only to perfect a thing you’ll ultimately throw away and rebuild in CSS anyway. Some things are accomplished more efficiently in CSS, while others render more quickly in Photoshop—so we pick the tools that feel natural in the moment. But ultimately, everything ends up in the browser. That’s how we design it, and that’s how our clients view it. Fear is the mind-killer“Oh yes,” you might be saying, “clients! How does this new mockup-less world fit into our design approval process?” Glad you asked. design approval process: 设计审核流程 SIGN ON THE LINE WHICH IS DOTTEDSending clients in-browser comps is remarkably easy, as it turns out. We just e-mail them a URL. Clients can look at the designs in various browsers and on various devices, resize them, click links and navigation, and check out hover states. Instead of asking our clients to pretend that an image is a website, we show them… a website. We always provide a permanent project URL with /v1 appended to it, such as aafh-css.heroku.com/v1. From that point on, version one never changes, and subsequent revisions are posted at their own URLs, like aafh-css.heroku.com/v2. This continues until we reach an approved version. subsequent: 随后的revision: 修订版 Because each version has a distinct permanent URL (we use Heroku’s free hosting for non-production environments like this), we can still have an agreed-upon number of revisions in our contract, just like we did with static comps. If the project requires more tweaking than we envisioned, it may be time to discuss allocating additional hours to the budget. distinct: 明显的,显著的contract: 合同;定约 This also allows everyone to easily go back and review each comp whenever they want. When we’re done with revisions, clients get the same signoff form as usual. But in place of a file name, the final designs are specified by that version’s permanent URL. Now, you may be wondering if your clients will accept this newfangled process. At Bearded we’ve had nothing but positive reactions so far. Our contact at AAHomecare even tweeted about it. I don’t know about you, but that’s the first time I’ve had a client tweet about liking the design approval process. newfangle: 新奇的东西 So that’s it. Signoff without a static mockup. Terrifying, right? SEND THIS PART TO YOUR PROJECT MANAGER“But wait!” you say, “what about the budget? Won’t revisions take longer? What if the client hates it and we have to start all over?” That could happen. But couldn’t it happen with a Photoshop mockup, too? And even if we have to start all over with look and feel, it’s likely that at least the HTML and wireframe layouts are good. And really with CSS (and especially with SASS) there are lots of situations where editing in code is significantly faster than editing a Photoshop file. Take, for instance, changing the link colors or font selections site-wide. Faster in CSS or Photoshop? Yep. High-five, CSS! Luckily my early hunch has thus far proven true. With AAHomecare, our design process took longer than estimated—by about 35 percent. Not bad, in my opinion, for a brand-new way of working. Meanwhile, our CSS hours were less than half what we estimated. So at the end of the day, our project was actually more efficient and more profitable without mockups. I know your PM will be excited about that. hunch: 预感 Designing is coding is designingAll of these changes to our process are also making our roles more fluid. With our designers writing CSS, where does design end and front-end development begin? Overlap or not, there’s still something to be said for expertise. Front-end developers can collaborate with designers throughout the process. They review everything, refactoring redundant or overly complex code and removing vestigial styling. As they find problems, our developers keep a log of best practices for designers to review later, so they can improve their coding skills and avoid repeating the same mistakes in the future. overlap: 重叠vestigial: 残留的,退化的,发育不全的 Our initial designs will also have features and views that we still need to elaborate on, as well as interaction enhancements that we’ve left for later. So not only is our design process more development-y, but our development process is becoming more design-y. As we all work together more, we’re also teaching each other about our respective specialties and becoming a more cohesive team. In my experience, that means building better internet. elaborate: 精心制作的cohesive: 有凝聚力的 This level of collaboration can lead to toe-stepping, so we use Git for version control. Git allows multiple people to work on a central repository of code at the same time, with methods to resolve conflicts and roll back changes when necessary. Technology aside, though, a simple “Hey, I’m working on the calendar CSS” often goes a long way—especially in an environment where collaboration and fluidity are the norms. Ready, set, implement!How do we waste less time on throwaway products? How do we make the hours we spend in front of a computer more meaningful, and the end results more effective? These are all part of the same problem. Responsive design gives us the opportunity to rethink our whole approach to designing for the web. We can stop designing “websites” and “mobile sites.” We can create flexible content delivery systems: sets of rules that define how our content will be presented as its context shifts. Rethinking our process is hard work, and it may strike you as challenging—even daunting. But ultimately any of the hurdles we’ll encounter are just that. They can be overcome. The internet will change, whether we like it or not—and we must adapt with it. daunting: 令人生畏的 And really, weren’t you getting bored anyway? Let’s do something better—for our workflows, our users, and our clients. Starting right now. 参考 不知道网站设计开发的 6 个流程 百度百科-网站设计]]></content>
<categories>
<category>设计原则</category>
</categories>
<tags>
<tag>原创</tag>
<tag>前端</tag>
<tag>设计</tag>
<tag>项目管理</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Atomic_design]]></title>
<url>%2F2019%2F03%2F02%2FAtomic-design%2F</url>
<content type="text"><![CDATA[atomic designWe’re not designing pages, we’re designing systems of components.—Stephen Hay As the craft of Web design continues to evolve, we’re recognizing the need to develop thoughtful design systems, rather than creating simple collections of web pages. 本文翻译自: Atomic Web Design Hey there! I wrote a book called Atomic Design that dives into this topic in more detail, which you can buy in paperback and/or ebook formats. dives into: 投入,冲进,钻研 As the craft of Web design continues to evolve, we’re recognizing the need to develop thoughtful design systems, rather than creating simple collections of web pages. craft: 工艺,技巧;精美的制作 A lot has been said about creating design systems, and much of it focuses on establishing foundations for color, typography, grids, texture and the like. This type of thinking is certainly important, but I’m slightly less interested in these aspects of design because ultimately they are and will always be subjective. Lately I’ve been more interested in what our interfaces are comprised of and how we can construct design systems in a more methodical way. subjective: 主观的;自觉的interface: 接口,界面(交界面);连接,交流comprise: 组成;包含;构成 In searching for inspiration and parallels, I kept coming back to chemistry. The thought is that all matter (whether solid, liquid, gas, simple, complex, etc) is comprised of atoms. Those atomic units bond together to form molecules, which in turn combine into more complex organisms to ultimately create all matter in our universe. parallel: 相近之处;平行,平行线;相似chemistry: 化学;化学过程molecule: 分子,微小颗粒 Similarly, interfaces are made up of smaller components. This means we can break entire interfaces down into fundamental building blocks and work up from there. That’s the basic gist of atomic design. work up: 逐步建立、发展,组成gist: 要点;主旨依据 Josh Duck’s HTML Periodic Table gives a great breakdown of web designers’ atomic elements. what is atomic designAtomic design is methodology for creating design systems. There are five distinct levels in atomic design: methodology: 方法论 Atoms Molecules Organisms Templates Pages Let’s explore each stage in more detail. stage: 阶段 atomsAtoms are the basic building blocks of matter. Applied to web interfaces, atoms are our HTML tags, such as a form label, an input or a button. Atoms can also include more abstract elements like color palettes, fonts and even more invisible aspects of an interface like animations. palette: 通道 Like atoms in nature they’re fairly abstract and often not terribly useful on their own. However, they’re good as a reference in the context of a pattern library as you can see all your global styles laid out at a glance. terribly: 非常地;极度地;可怕的 moleculesThings start getting more interesting and tangible when we start combining atoms together. Molecules are groups of atoms bonded together and are the smallest fundamental units of a compound. These molecules take on their own properties and serve as the backbone of our design systems. molecule: 分子;微小颗粒tangible: 有形的;确切的;可触摸的compound: 复合物;合成的,混合;恶化,加重 For example, a form label, input or button aren’t too useful by themselves, but combine them together as a form and now they can actually do something together. Building up to molecules from atoms encourages a “do one thing and do it well” mentality. While molecules can be complex, as a rule of thumb they are relatively simple combinations of atoms built for reuse. thumb: 翻阅;以拇指拨弄 organismsMolecules give us some building blocks to work with, and we can now combine them together to form organisms. Organisms are groups of molecules joined together to form a relatively complex, distinct section of an interface. We’re starting to get increasingly concrete. A client might not be terribly interested in the molecules of a design system, but with organisms we can see the final interface beginning to take shape. Dan Mall (who I’m working with on several projects) uses element collages, which articulate ideas for a few key organisms to facilitate client conversations and shape the visual direction (all without having to construct full comps). concrete: 混凝土;具体的,实在的,有形的articulate: 发音;清晰地表达;用关节连接facilitate: 促进,帮助,使便利 Organisms can consist of similar and/or different molecule types. For example, a masthead organism might consist of diverse components like a logo, primary navigation, search form, and list of social media channels. But a “product grid” organism might consist of the same molecule (possibly containing a product image, product title and price) repeated over and over again. masthead: 报头,顶栏 Building up from molecules to organisms encourages creating standalone, portable, reusable components. templatesAt the template stage, we break our chemistry analogy to get into language that makes more sense to our clients and our final output. Templates consist mostly of groups of organisms stitched together to form pages. It’s here where we start to see the design coming together and start seeing things like layout in action. analogy: 相似;类比stitch: 针脚;缝合 Templates are very concrete and provide context to all these relatively abstract molecules and organisms. Templates are also where clients start seeing the final design in place. In my experience working with this methodology, templates begin their life as HTML wireframes, but over time increase fidelity to ultimately become the final deliverable. Bearded Studio in Pittsburgh follow a similar process, where designs start grayscale and layout-less but slowly increase fidelity until the final design is in place. wireframe: 框架法fidelity: 保真度;精确;尽职;忠诚 pagesPages are specific instances of templates. Here, placeholder content is replaced with real representative content to give an accurate depiction of what a user will ultimately see. Pages are the highest level of fidelity and because they’re the most tangible, it’s typically where most people in the process spend most of their time and what most reviews revolve around. The page stage is essential as it’s where we test the effectiveness of the design system. Viewing everything in context allows us to loop back to modify our molecules, organisms, and templates to better address the real context of the design. Pages are also the place to test variations in templates. For example, you might want to articulate what a headline containing 40 characters looks like, but also demonstrate what 340 characters looks like. What does it look like when a user has one item in their shopping cart versus 10 items with a discount code applied? Again, these specific instances influence how we loop back through and construct our system. why atomic designIn a lot of ways, this is how we’ve been doing things all along, even if we haven’t been consciously thinking about it in this specific way. Atomic design provides a clear methodology for crafting design systems. Clients and team members are able to better appreciate the concept of design systems by actually seeing the steps laid out in front of them. Atomic design gives us the ability to traverse from abstract to concrete. Because of this, we can create systems that promote consistency and scalability while simultaneously showing things in their final context. And by assembling rather than deconstructing, we’re crafting a system right out of the gate instead of cherry picking patterns after the fact. simultaneously: 同时地;并发地right out: 彻底地;坦率的;出来]]></content>
<categories>
<category>设计原则</category>
</categories>
<tags>
<tag>翻译</tag>
<tag>英语</tag>
</tags>
</entry>
<entry>
<title><![CDATA[重新认识Nginx]]></title>
<url>%2F2019%2F02%2F26%2F%E9%87%8D%E6%96%B0%E8%AE%A4%E8%AF%86Nginx%2F</url>
<content type="text"><![CDATA[对于接触过后端开发的程序员而言,Nginx不是陌生的。之前在公司中使用lnmp的后台开发环境,虽说是接触过Nginx的,但是委实了解不多。考研期间将操作系统、计算机网络等课程重拾之后,再回来看后台开发这件事,温故知新,快哉! 粗浅地重新回顾一下后台开发的一些相关技术,想来从Nginx开始下手,这文章既作总结,又当给他人参考。 目录规划 先导知识 网络体系结构 从历史谈起 Nginx的高级应用 参考资料 先导知识 web 服务器,应用程序服务器,http 服务器的区别 网络体系结构先来回顾一下计算机网络体系结构,这个图很重要。 图片来源:腾讯云社区 [1] 对于后端的应用开发,通常主要涉及TCP/IP中的网际层、传输层和应用层,对于这三层的每一层服务内容、相关协议和实现应该有所了解。我们需要知道,一个请求从客户端开始,送达服务器端这个过程中都经过哪些阶段? 这里可以参考一下《图解TCP/IP》读书笔记。 了解了整个通讯流程后,现在的有几个问题需要先弄清楚: Nginx是什么? Nginx 是一款免费的、开源的、高性能的 HTTP 服务器和反向代理服务器;同时也是一个 IMAP、POP3、SMTP 代理服务器;Nginx 可以作为一个 HTTP 服务器进行网站的发布处理,另外 Nginx 也可以作为反向代理进行负载均衡的实现 [2]。 Nginx提供了哪一层的服务? 在OSI的体系结构中,各层定义了各自的服务,那么,Nginx实现的是哪一个层的服务?显而易见,按照TCP/IP的四层协议来分,Nginx处于应用层;按照OSI的七层协议来分,Nginx提供的是会话层以及表现层的服务,并且也涉及应用层。根据不同的需求,可以配置Nginx使之提供上述部分或者全部层次的功能。 谁负责给nginx提供服务?nginx又如何给出自己的服务? 这个问题先留着。 从历史谈起要解释清楚Nginx到底都提供了什么服务,一两句话很难说清楚。让我们先回顾一下互联网技术的发展历程,这里可以参考Web 开发的发展史,Web 开发技术发展历史。在了解了web技术是如何一步一步地发展、互联网的技术体系怎么逐渐壮大的之后,Nginx不再仅仅是作为http服务器 这里延伸一下,既然应用层的大部分服务由Nginx提供,那么我们写的后端服务在应用层上是如何配合Nginx的?从上面的文章中我们可以知道,这主要有几种方式: 静态资源访问 图片来源: 《Web 开发技术发展历史》[9] 动态资源cgiCGI 定义了 Web 服务器与外部应用程序之间的通信接口标准,因此 Web 服务器可以通过 CGI 执行外部程序,让外部程序根据 Web 请求内容生成动态的内容。这里可以参考一下,Web 是如何运行的: HTTP 和 CGI。 图片来源: 《Web 开发技术发展历史》[9]网关协议(cgi , fastcgi 等),的作用,就是把 web 服务器抽出来,分离 “应用”。因为在各个语言上,实现 cgi 或 fastcgi ,要比实现一套完整的 http 要容易得多(最重要的一点是不用关心访问的 “调度” 了)。进一步说, Python 中的 Tornado 虽然自己有实现 http ,正式环境部署的时候,也会在前端部署 nginx ,从这里也可以看到, nginx 这类 web 服务器,除了实现 http 协议,还有其它相关的功能(反向代理,负载均衡,fastcgi 支持,uwsgi 支持等)。而通过通用的网关协议,把这些层分开,各自就可以更关注自己的领域,实现更稳定,强大的服务质量 [5]。 脚本语言支持 图片来源: 《Web 开发技术发展历史》[9] 反向代理服务器\API网关作为领先的高性能、轻量级反向代理和负载均衡器解决方案,NGINX Plus 具有处理 API 流量所需的高级 HTTP 处理能力。这使得 NGINX Plus 成为构建 API 网关的理想平台。这里可以参考,八步部署 NGINX Plus API 网关 [10]。 Nginx的高级应用这部分内容我还不是很熟悉,后面有机会实践之后再做整理。以下是部分参考资料: 反向代理 一分钟了解四层 / 七层反向代理 参考资料 [1] 网络体系结构 [2] Nginx 相关介绍 (Nginx 是什么?能干嘛?) [3] 理解 Linux 网络栈(1):Linux 网络协议栈简单总结 [4] Web 是如何运行的: HTTP 和 CGI [5] 在 Web 服务区和 PHP 代码之间, mod_php5 模块和 php-cgi 的作用和位置定义是什么? [6] Linux 网络 - 数据包的接收过程 [7]《图解HTTP》读书笔记 [8] Web 开发的发展史 [9] Web 开发技术发展历史 [10] 八步部署 NGINX Plus API 网关 web 服务器,应用程序服务器,http 服务器的区别]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>服务器</tag>
<tag>更新中</tag>
<tag>后端</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Getting_up,moving_forward,and_moving_on.]]></title>
<url>%2F2019%2F02%2F25%2FGetting-up-moving-forward-and-moving-on%2F</url>
<content type="text"><![CDATA[We’re all gonna get lumps.We’re all gonna get bumps. Nobody can predict the future but we do know one thing about it: It ain’t gonna go according to plan. ain't => am not Yes, we’ll all have massive highs, big days, and proud moments. Color faded, postcard-streaked blurs will float and flash through our brains on our deathbeds, of wide eyes on graduation stages, father-daughter dances at weddings, and healthy baby screeches in the delivery room. And dotting those big moments will be smaller ones too: fragile hugs with Grandma on Christmas morning, two-year-olds handing you a bouquet of dandelions and saying ‘I love you’, or your boyfriend staring into your eyes and smiling while lazing in bed on Sunday morning. postcard-streaked 模糊的明信片streak 条纹,光带,性格;一阵子,时期;留下条痕;飞奔screech 尖叫bouquet 芳香;花束dandelion 蒲公英 But like I said.We’re all gonna get lumps.We’re all gonna get bumps. lumps 肿块,苦头;把什么合在一块bumps 撞上,碰上 It’s sad but things could happen or hurt you that you just can’t predict. Your husband might leave you, your girlfriend may cheat, your headaches might be serious, your dog could get smacked in the street. Yes, your kids might get mixed up with tough gangs or bad scenes. It’s sad but your mom could get cancer… or your dad could get mean. There will be times in your life you’re tossed down the well, too. There will be times you’ll cry yourself to sleep, with twists in your stomach, with holes in your heart. You may wonder if it’s all worth it and you may think that it ain’t. You may wonder if you can handle it or you may beg for restraint. toss down 随意扔下,一饮而尽beg 乞求 But when bad news washes over you and when the pain sponges and soaks in, I really hope you feel like you’ve always got two big choices: You can swish and swirl in gloomy darkness forever, or You can grieve and face the future with newly sober eyes sponge 海绵soak in 沉浸于swish 嗖嗖作响,鞭打gloomy 悲观的,黑暗的,沮丧的grieve 悲伤的,使苦恼 Sure, life has dealt me some blows in the couple years I’ve been writing this site and this book. There was the mind-numbing loneliness of moving to a brand new nowhere town, the broken heart of a major breakup, the searing waves of regret when a friend disappeared, and the general life pressures of starting a new job, living on my own, and trying to make new friends in a big city. dealt 处理 But I’m lucky because I’ve had a way out for the past two years. I’ve had a secret pill to swallow, a magic potion to swirl, and a bubbly cauldron to sip from every time I felt down or felt black or felt blue. And I hope you know that remedy and I hope you feel it, too. swallow 吞下,咽下potion 药水,服剂 After all, you’re reading it right now. Yes, awesome things make my life better, people. And I hope they do the same for you. I honestly can’t go a day anymore without smiling at a couple tiny awesome things in my world. Whether it’s fixing electronics by smacking them, waking up and realizing it’s Saturday, or moving all my wet clothes from the washer to the dryer without dropping anything, these tiny things make a great big difference. smacking 拍打 So come on. Come on! Are you with me? Who’s with me? I say if you’ve got a couple fist-pumps in you, if you’ve got a sneaky twinkle in your eye, if you’ve got an itchy old soul that loves smiling at strangers, dancing at weddings, and popping the hell out of bubble wrap, then come on in and join The AWESOME Movement. sneaky 鬼鬼祟祟的,暗中的twinkle 闪烁itchy 发痒bubble 泡沫,起泡 Yes, it’s my sincere hope that The Book of Awesome helps those who need it to grieve, move on, and remind them the best things in life are free. For those folks, maybe it’s a ladder out of the well or a dusty flashlight beam in the darkness. For others, perhaps it’s just a little laugh on the back of the toilet, a bit of peace before bed, or a spark for debates about gasoline fumes, alarm clock strategy, or what matters most to you, you, or you. For me, I know I’ll have more dark days, and I know my friends will too, but I like thinking that snow days, steamy buffets, and the cool side of the pillow will always cheer me through to the other side. While polar ice caps melt, while health care debates rage on, while buzz saws chop down forests, while wars go on and on, I hope there’s always a special place we can click online in the darkness or flip open for a few minutes to turn off that bright light, snuggle right on up, and get comfy to chat about the sweetest parts of life. Thank you for letting me take a break to share personal stories about myself and behind The Book of Awesome this week. The comments and emails have been achingly beautiful and wet my eyes many times. I am so incredibly thankful, lucky, honored, and excited to keep going down this road with you.]]></content>
<categories>
<category>翻译</category>
</categories>
<tags>
<tag>鸡汤</tag>
<tag>英语</tag>
</tags>
</entry>
<entry>
<title><![CDATA[常用英语单词总结]]></title>
<url>%2F2019%2F02%2F25%2F%E5%B8%B8%E7%94%A8%E8%8B%B1%E8%AF%AD%E5%8D%95%E8%AF%8D%E6%80%BB%E7%BB%93%2F</url>
<content type="text"><![CDATA[参考 英语十二月份的由来 月份 January 一月 来源: 罗马神话中的双面门神(Janus),一面回顾过往,一面展望未来。 February 二月 来源: 来自拉丁文 februarius mensis “净化月”,februare “净化”。 March 三月 来源: 战争之神 Mars(马尔斯,对应希腊神话中的 Ares 阿瑞斯)。 April 四月 来源: 本为第二个月,古罗马人便根据拉丁词ap (e) rilis “the following, the next”,创造了 April 一词,自凯撒大帝后每年开头添加两个月,四月就是这么来的。 May 五月 来源: 来源于罗马神话中的土地女神 Maia,美丽又羞涩的少女,掌管着春天和生命,她为人间带来繁花的春天。 June 六月 来源: Juno 是婚姻女神,四月正值春季,莺飞草长、百花盛开,是婚嫁的绝好时机,罗马人常常选择在此月结婚,于是便将此月冠以婚姻女神Juno之名,称为Junius mensis(Juno’s month) July 七月 来源: 七月(实为五月),在罗马历法中原本并不是这么拼的,其拉丁语拼作Quintilis,全称为mensis Quintilis,即“第五个月”。公元前49年,Julius Caesar(儒略•凯撤,也可译为“朱里斯•凯撒”)打败了庞培,夺取了政权,鉴于凯撒的历史影响深远,人们便在凯撒死后将其出生的五月份,用其名字重新命名为Julius,到英语中被拼为July。 August 八月 来源: 单词构成由词根-aug-(to increase增大)+ -ust(后缀:最……,同-est)=august:字面义为“增加到最大”。原本只有十个月,八月(原十月)即为最大的一个月。 September 九月 来源: 实为七月,词干为septem-源自原始印欧语根 septm “seven七”,与基础词汇seven同源。 October 十月 来源: 源于拉丁语October (mensis)“第八个月”,词干源于拉丁语octo“eight八”,最初来源于原始印欧语根 octo(u)- “eight”,与英语基础词汇eight同源。 November 十一月 来源: 源于拉丁语Novembris (mensis)“第九个月”,词干源于拉丁语novem “nine九”,最初来源于原始印欧语根 newn “nine”,与英语基础词汇nine同出一源。 December 十二月 来源: 源于拉丁语December,其词干来源于拉丁语decem “ten十”,该拉丁语产生了英语中常见的词根-dec-“ten十”,如:decade十年,decimal十进制的等。 后四个月的名字在拼写上都出现了相同的后缀-ber?前面八个月除了两个与罗马皇帝有关,其余六个都与罗马神话或农业周期有关;后面四个则纯粹是序数叠加,也就是被人为的编了号的。而数字、号码恰是单词number 未完待续]]></content>
<categories>
<category>英语</category>
</categories>
<tags>
<tag>英语</tag>
</tags>
</entry>
<entry>
<title><![CDATA[six-tips-to-improve-your-work-life-balance]]></title>
<url>%2F2019%2F02%2F24%2Fsix-tips-to-improve-your-work-life-balance%2F</url>
<content type="text"><![CDATA[Well monk mode is where we go somewhere that is silent, there’s no interruptions, we maybe get a block of ninety minutes work done, maybe twice a week, then we go to the office as normal, added advantages we’ve missed the commute, and got our emails and our meetings done. take the number off your email app take a lunch break try a monk mode morning encouraging people to have more chats give yourself permission to have a digital Sabbath maybe 40 hours of work a week is the right amount. Hi, I’m Bruce Daisley.I work at Twitter but in my spare time, I’ve been studying work culture and how we can be happier at work.Work has become this sort of colossal巨大的,异常的 game of Jenga积木 where we’re trying to add things on top or still keep everything standing up and stable.I’ve put together some thoughts on ways that we can make our lives a lot less stressful.Half of all people who check their emails outside of work hours show signs of high levels of stress.The very easiest thing you can do to reduce your stress levels from work is take the number off your email app; that single act is the simplest thing we can do to reduce our stress levels.The second best change that anyone can make is to take a lunch break.The habit of eating ‘al desco’ has become so common now it’s contributing to an increase in our stress levels and I understand when you’re sitting at your desk you’re thinking you’ve got a hundred emails left walking away and taking a break can feel really counter-intuitive but scientists have found the best way to ensure that you feel energized is to take that pause.You might want to try a monk mode morning.More and more of us are finding it get hard to get things done because of all the interruptions.A guy called Cal Newport who’s a professor at Georgetown University in Washington, he wrote a book called Deep Work and one of the ideas he gave was that we should think about having a monk mode morning.Well monk mode is where we go somewhere that is silent, there’s no interruptions, we maybe get a block of ninety minutes work done, maybe twice a week, then we go to the office as normal, added advantages we’ve missed the commute, and got our emails and our meetings done.Some interesting research from the Massachusetts Institute of Technology shows that one of the best ways to increase workplace creativity is to increase the amount of chat and actually that can be chat about last night’s TV, that can be chat about what’s happening in sports games because normally those conversations then lead to work discussions.It’s a strange thing that by encouraging people to have more chats we’re actually going to be achieving more at work.But the research seems to suggest that the most creative offices are the ones that chat the most.Ben Waber, one of the researchers, said that one of the best ways to increase creativity in your office is to move the location of the coffee machine.By having the coffee machine, the kettle, the water cooler, in a different place you’ll actually lead to more people having discussions, conversations.Scientists have found that one of the biggest barriers to being creative in our jobs is stress, and all of us with our phones feel more stressed than ever before.You need to give yourself permission to have a digital Sabbath, to take time away from your work at the weekend, for a bit of refreshment, a bit of renewal.Discourage your boss from emailing at the weekend because it leads to people feeling anxious when they come back to work on Monday.Anxious people can’t be creative.I think in the current world we often celebrate overwork and people working long hours.The magazine profiles we read, the TV profiles we see are about people who work these enormous long working weeks.And in fact all of the evidence is starting to point to the fact that maybe that’s not the best idea.Maybe 40 hours of work a week is the right amount.Use our breaks and our evenings as times to re-energize ourselves so when we come back to our desks we’re full of life.Doing 40 hours of work is probably enough.]]></content>
<categories>
<category>翻译</category>
</categories>
</entry>
<entry>
<title><![CDATA[将Hexo同时部署至github和私人服务器上]]></title>
<url>%2F2019%2F02%2F24%2F%E5%B0%86Hexo%E5%90%8C%E6%97%B6%E9%83%A8%E7%BD%B2%E8%87%B3github%E5%92%8C%E7%A7%81%E4%BA%BA%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%2F</url>
<content type="text"><![CDATA[Github page虽好,但是国内访问速度属实是慢,正好手头有台腾讯云服务器,折腾一下将博客部署上去后访问速度略有提升。 新建用户登陆云服务器,创建一个新用户: useradd hexogitpasswd hexogit 切换至该用户:1su git // 这步很重要,不切换用户后面会很麻烦 项目规划创建以下目录: 用于接收代码推送的git裸库 /home/hexogit/repos/blog.git/ 真正的站点目录 /home/hexogit/projects/blog/ 服务器端git仓库创建裸库12cd /home/hexogit/reposgit init --bare blog.git // 创建一个裸露的仓库 设置hooks12cd blog.git/hooksvi post-receive // 创建hook钩子函数,输入了内容如下(原理可以参考上面的链接) 往该文件中写入:12# /home/hexogit/repos/blog.git/hooks/post-receivegit --work-tree=/home/hexogit/projects/blog --git-dir=/home/hexogit/repos/blog.git checkout -f 修改权限1chown -R hexogit:hexogit /home/hexogit/repos/blog.git 使用ssh登陆服务器git登陆服务器1234$ su git $ cd ~ $ mkdir .ssh && chmod 700 .ssh $ touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys 回到本地12$ cd ~/.ssh $ ssh-keygen -t RSA -b 2048 -C "Local Developer" 上传公钥我们需要把公钥中的内容添加到服务器上 hexogit 用户的 ~/.ssh/authorized_keys 中。 测试登陆1ssh -i ~/.ssh/hexogit hexogit@server_ip 通常是没问题的,有问题自寻解决,不赘述。 本地hexo设置同时使用多个 deploy,type 需要在前面加”-“ 1234567deploy: - type: git repo: https://github.com/ChenHanZhang/ChenHanZhang.github.io.git branch: master - type: git repo: [email protected]:/home/hexogit/repos/blog.git branch: master 这样每次执行hexo d后,将会同时向两个git仓库推送。 其它设置前面介绍了如何自己架设一个 git 服务器并建立一个名为 git 的用户来进行所有的 git 操作:但是我们会发现,git 用户是可以通过 ssh 进行远程连接我们的服务器的,这将有一定的安全隐患。下面的文章介绍如何限制 git 用户,禁止其使用 ssh 登陆进行操作。 Git Server - 限制 Git 用户使用 SSH 登陆操作 参考文档 hexo 配置使用多个 deploy Linux 环境下如何搭建 Git 服务器(Git Server)]]></content>
</entry>
<entry>
<title><![CDATA[HTTPS没有那么简单]]></title>
<url>%2F2019%2F02%2F24%2FHTTPS%E6%B2%A1%E6%9C%89%E9%82%A3%E4%B9%88%E7%AE%80%E5%8D%95%2F</url>
<content type="text"><![CDATA[什么,你的站点还不支持HTTPS? 安装Nginx CentOS 7 yum 安装 Nginx 这里补充两点: 查看是否已编译过SSL模块 要想让 Web 服务器支持 HTTPS ,首先你的服务器肯定要支持 SSL ,所以我们先检查 Nginx 是否支持 SSL : 1nginx -V 通过命令显示信息,我们看 configure arguments 中是否有 -with-http_ssl_module 字样,如果像我这样没有的话,你就需要重新编译 Nginx 以支持 SSL 了。 开启Nginx开机自启 1sudo systemctl enable nginx.service 相关目录请记住这些目录,如不存在则建立,可根据自己需要调整。 Nginx的主配置文件 /etc/nginx/nginx.conf Nginx多站点配置文件目录 /etc/nginx/conf.d/ 证书文件存放点 /etc/nginx/snippets/1_www.mybjut.cn_bundle.crt/etc/nginx/snippets/2_www.mybjut.cn.key 站点根目录 /var/www/www.mybjut.cn/ 腾讯云申请SSL证书 域名型证书申请流程 申请好后将证书文下载,打开后应该包含两个文件: 将这两个文件放置至/etc/nginx/snippets/目录下。 二级域名配置https进入Nginx多站点配置文件目录/etc/nginx/conf.d/,新建一个子域名的配置文件,具体内容如下: 12345678910111213141516171819202122server { listen 443 ssl; #填写绑定证书的域名 server_name www.mybjut.cn; #更换为你的站点根目录 root /var/www/www.mybjut.cn; #证书名称,需要跟证书文件名一致 ssl_certificate /etc/nginx/snippets/1_www.mybjut.cn_bundle.crt; ssl_certificate_key /etc/nginx/snippets/2_www.mybjut.cn.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; location / { }} 之后重启Nginx: systemctl restart nginx 完毕,收工。 参考博文 Nginx 实现 ssl 一级、二级域名证书部署并用 https 访问代理转发服务器 全站 HTTPS 没你想象的那么简单]]></content>
<categories>
<category>后端</category>
</categories>
<tags>
<tag>服务器</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Yarn+webpack构建项目(二)]]></title>
<url>%2F2019%2F02%2F23%2FYarn-webpack%E6%9E%84%E5%BB%BA%E9%A1%B9%E7%9B%AE%EF%BC%88%E4%BA%8C%EF%BC%89%2F</url>
<content type="text"><![CDATA[上篇文章Yarn+webpack构建项目(一)已经交代清楚webpack和react如何集成进项目。这篇文章将接着完善我们的项目,主要目的是打造一个舒适的开发环境。 配置环境1. 使用服务器为了能直接访问项目打包后的页面,可以配置一下服务器 yarn add webpack-dev-server --dev : 安装依赖 新建dev环境下的配置文件webpack.config.dev.js: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657const path = require("path");const base = path.join(__dirname, "..");const HtmlWebPackPlugin = require("html-webpack-plugin");module.exports = { mode: 'development', devtool: 'cheap-module-source-map', // devtool: 'eval-source-map' resolve: { extensions: ['.js', '.jsx'], }, devServer: { /** 1. contentBase 指定项目根目录 2. historyApiFallback 主要应用在单页应用的开发场景,它依赖于 HTML5 history API,如果设置为 true,所有的跳转将指向 index.html 3. inline 主要是解决了自动浏览器自动刷新问题 4. lazy 默认为 false,若开启后,则 webpack-dev-server 不再监测文件变化自动编译,只有等到我们手动刷新浏览器的时候才会编译文件 5. proxy 可以有效的解决开发阶段的跨域问题,毕竟不是所有的前端项目,都有独立的 nodejs 作为中间件去请求服务,更多的还是把前端项目编译后与后端服务部署在一起。而开发阶段又相对独立,这时候就可以利用 proxy 将前端请求转发到后端测试服务器,不影响开发 **/ contentBase: path.resolve(base, 'dist'), host: '127.0.0.1', port: 3000, historyApiFallback: true, inline: true, proxy: { "/api": "http://localhost:8000" }, stats: { colors: true, }, }, module: { rules: [ { test: /\.jsx?$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { // babel 转义的配置选项 babelrc: false, presets: [ require.resolve('@babel/preset-react'), [require.resolve('@babel/preset-env'), { modules: false }], ], cacheDirectory: true, }, }, }, ], }, plugins: [ new HtmlWebPackPlugin({ template: 'src/index.html', filename: 'index.html', inject: true, }) ]}; 配置到这里,执行yarn run dev就可以编译打包项目,并且通过浏览器访问localhost:3000就能看到结果。 待更新2. 其它配置2.1 热更新配置2.2 支持 Source Maps2.3 ES6语法降级(Bebel )2.4 CSS文件相关]]></content>
<categories>
<category>前端</category>
</categories>
<tags>
<tag>JavaScript</tag>
<tag>webpack</tag>
</tags>
</entry>
<entry>
<title><![CDATA[Yarn+webpack构建项目(一)]]></title>
<url>%2F2019%2F02%2F23%2FYarn-webpack%E6%9E%84%E5%BB%BA%E9%A1%B9%E7%9B%AE%EF%BC%88%E4%B8%80%EF%BC%89%2F</url>
<content type="text"><![CDATA[必要背景知识 yarn 解决了什么? webpack 的意义? 参考博文 吃透 webpack,也许这一篇就够了 Webpack 4 实战 React 和 Vue 项目 构建流程1. 创建项目1.1 项目初始化 yarn init : 填写必要的项目信息 vim .gitignore : 按照网上提供的模板填写gitignore文件 规划项目目录: 12345678|--- |--dist //存放webpack打包后相关文件 |--src //存放项目源码 |--index.js |--config //项目相关的配置文件 |--webpack.config.js //webpack默认读取项目根目录下的webpack.config.js文件作为配置信息,为了规范化移入到config目录下 |--package.json |--.gitignore 1.2 安装配置webpack yarn add webpack : 安装webpack,如果询问是否安装 webpack-cli,确认安装即可 编辑webpack.config.js文件(webpack的配置文件),更多配置项参考官方文档: 123456789101112131415161718192021const path = require("path");const base = path.join(__dirname, "..");module.exports = { mode: "production", entry: path.resolve(base, "src", "index.js"), output: { filename: "bundle.js", path: path.resolve(base, "dist") }, resolve: { extensions: [".js", ".jsx"] }, module: { rules: [ ] }, plugins: [ ]}; 配置打包命令: 为了能快速地启动项目,可以配置一下 package.json文件1234567//package.json{ "scripts": { "build": "webpack --config config/webpack.config.js", "dev": "webpack-dev-server --config config/webpack.config.dev.js" }} 配置完成后就可以在命令行下直接使用yarn run build命令了。 2. 集成React2.1 安装React组件12345678## 安装 reactyarn add react react-dom## 安装 babelyarn add @babel/core @babel/preset-env --dev## 安装 babel-reactyarn add @babel/preset-react "babel-loader@^8.0.0-beta" --dev## 安装 webpack html工具yarn add html-webpack-plugin 注意:这里使用 babel 转义,此处既可以在项目根目录下创建 .babelrc 文件,也可以稍后在 webpack.config.js 中配置,这里我们选择在后者统一配置。 2.2 更新webpack配置12345678910111213141516171819202122232425262728 /// webpack.config.jsconst HtmlWebPackPlugin = require("html-webpack-plugin"); module: { rules: [ { test: /\.jsx?$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { // babel 转义的配置选项 babelrc: false, presets: [ require.resolve('@babel/preset-react'), [require.resolve('@babel/preset-env'), { modules: false }], ], cacheDirectory: true, }, }, }, ], }, plugins: [ new HtmlWebPackPlugin({ template: "src/index.html", filename: "index.html" }) ] 2.3 创建基础文件 在 src 目录下创建 App.jsx : 1234567891011import React from "react";import ReactDOM from "react-dom";const App = () => { return ( <div> <p>Hello React and Webpack</p> </div> );};export default App;ReactDOM.render(<App />, document.getElementById("app")); 在 src 下新建 index.jsx 内容如下: 1import App from './App'; 接着创建 html 文件,在src下创建 index.html : 1234567891011<!DOCTYPE HTML><html lang="zh-CN"> <head> <meta charset="UTF-8"> <title>Hello React Webpack</title> </head> <body> <div id="app"> </div> </body></html> 完成这些之后,项目就可以运行了,使用yarn build之后,webpack会将项目打包到dist文件夹下,你可以在dist下使用python -m SimpleHTTPServer 3003开启一个简单的web服务器进行访问测试。]]></content>
<categories>
<category>前端</category>
</categories>
<tags>
<tag>JavaScript</tag>
<tag>webpack</tag>
</tags>
</entry>
<entry>
<title><![CDATA[开启Hexo写作]]></title>
<url>%2F2019%2F02%2F23%2F%E5%BC%80%E5%90%AFHexo%E5%86%99%E4%BD%9C%2F</url>
<content type="text"><![CDATA[Hexo 安装与使用 安装和部署方法其它地方都可以找得到,这里不再赘述。 Next 主题的一些配置这些设置可能由于 Hexo 或者 Next 的更新而略有不同,这里列出几项比较推荐的设置项,自寻搜索设置。 设置 Next 主题的显示样式 开启 分类、标签功能页 添加头像 设置浏览进度可见 配置图片资源Hexo 上传的图片在网页上无法显示的解决办法 搭配 HexoEditor 编辑器 开启图片预览插件功能(fancybox) 123# 在 next主题目录下执行:git clone https://github.com/theme-next/theme-next-fancybox3 source/lib/fancyboxrm -rf themes/next6/source/lib/fancybox/.git 添加网易云音乐插件 添加图片懒加载功能 启用 CDN 服务(图片以及 js 文件) 腾讯 404 公益页面 开启本地搜索功能(local_search) 页面嵌入音乐 1{% iframe //music.163.com/outchain/player?type=0&id=827122421&auto=0&height=430 330 330 %} 修复 ios 下菜单栏选项需要点击两次才能跳转问题12345678910111213141516 /// 在 `themes\next\layout\_layout.swig`下添加代码 ... {% include '_third-party/copy-code.swig' %} {# Fixed menu touch event on iOS #} <script> document.body.addEventListener('touchstart', function(){ }); $('nav a').on('click touchend', function(e) { var el = $(this); var link = el.attr('href'); window.location = link; }); </script> </body></html> 待添加的功能 设置版权声明 评论功能接入]]></content>
<categories>
<category>自我提升</category>
</categories>
<tags>
<tag>Hexo</tag>
<tag>博客</tag>
</tags>
</entry>
</search>