Total Pageviews

Monday, 1 October 2018

如何教你女朋友编程


Ever since I was a little software developer not so many years ago, I’ve dreamed of having a girl who I could talk to about the things I like. I wanted to talk to her about what I do. Not in a sense of yeah I do computer stuff, but in a real and deep way. The kind of conversation you would have with a coworker. I wanted my girl to be the person I go to whenever I find something new that excites me, and I wanted her to understand it.
几年前,我还是个小小的软件工程师的时候,我梦到我有女朋友,并且能和她聊我喜欢的东西。我想和她聊我所做的事情。当然不是“噢,我是干计算机的”,而是更真实、更深层次的交流。就是那种存在于你和同事之间的交流。我希望在我找到令我兴奋的事物的时候,我都可以找我的女朋友倾诉,并且我希望她能理解这东西。
Back when I was still in school days, university to be specific, I used to talk about this with my friends. I expected everyone to want the same as I did, but to my surprise I was the only crazy person in a group of already crazy geeks. Every one of them told me they don’t want a programmer girl, they said they would go crazy. But I call that bullshit.
当我还在学校的日子(准确的说是大学),我常常和我的朋友谈论这一点。我以为每个人的看法都和我的一样,但是出乎意料的是,在这一群已经很疯狂的极客中,我是唯一一个这样想的。他们告诉我说不想要个程序媛做女朋友,他们说如果女朋友是个程序员,他们会疯掉。但是我觉得这种说法是在扯蛋。
It was just their fear talking. What’s really everyone thinking is that it is impossible to find a girl who would be good looking, intelligent, interested in programming, and above all else, interested in you, the socially awkward geek. What are the odds of getting all of that?
其实只是他们害怕找不到女朋友才这么说。大家真正想的是,找到一个漂亮、聪明、对编程感兴趣,最重要的是,对你(不善社交的极客)感兴趣的女孩,是不可能的。找到一个满足上面所有条件的女朋友,这种事情发生的概率能有多大呢?
But let me tell you a secret brother, she doesn’t need to know all of this stuff. Everything in life can be learned. Some people might have predispositions for certain things, but that doesn’t mean other people can’t learn and understand them. We carry a great pride in what we do, because it took us many years to master the profession. But truth to be told, many of the things that took you a year to understand can be explained in 5 minutes if you know how.
但是兄弟,让我告诉你个秘密,她并不需要知道所有关于编程的事情。生活中的每件事都能学习。某些人可能对特定的事物有种天生的喜好,但是这不意味着其他人不能学习或理解这些事物。我们对我们所做的事情感到很自豪,是因为我们在职业上花了很多年来达到精通的程度。但是说实话,如果你知道怎么去讲解,那么许多你需要花一年时间去理解的事情,能够在5分钟内说明白。
Is pointer arithmetic really difficult, or are we just telling that to ourselves to boost our ego, because we finally understand how it works? Is understanding polymorphism difficult? Are monads really that hard to understand, or are we just looking at it from the wrong point of view?
A perspective is worth 80 IQ points.
You can explain pointers, manual memory management, stack & heap allocation, garbage collection and much more in just a couple of hours if you chose the right metaphors.
是指针真的很难懂,还是因为我们最终搞懂了指针是怎么回事,所以这样暗示自己,从而显得更牛逼?理解多态很难吗?monads 3 真的那么难懂吗?还是说我们理解它们的角度不对?
好的观点顶得上80点智力。
如果选择正确的隐喻,你能在一两小时内就解释清楚指针、手动管理内存、栈 & 堆分配、垃圾回收和其他更多的东西。
Or maybe algorithms are difficult? I bet you wouldn’t want someone to wake you up in the middle of the night and have you write a quicksort. But what if you had knives and wanted to teach your girl how to sort them (obviously by size)? You might have to do it two or three times for her to really believe you that it works, but the algorithm itself is stupidly simple.
或者说算法很难?我打赌你肯定不愿意有谁半夜叫醒你,并且让你写个快排。但如果你有一堆刀具,并且想教你女朋友怎么对它们进行排序(显然是按尺寸排序)。你可能不得不给她演示两三次,让她相信快排确实管用,但快排的算法本身实在是简单到爆。
If you have a problem that you don’t understand even after a few hours, go ahead and explain it to your girlfriend. I don’t mean the usual talk to a wall kind of thing, when you realize in the middle of the sentence what you wanted to do and abandon the conversation. Try to really explain it to her, even if she isn’t technical at all. It will be easy for her to understand once you find the right metaphor.
如果你有一个问题不理解,甚至想几个小时都不理解,去找你女朋友并且把问题讲给她听。不是通常那种(讲给外行人听的)对牛弹琴式的谈话,你讲到一半,发现你想做的就不讲了。试着解释给她听,即使她一点技术都不懂。一旦你找到正确的隐喻,那么对她来说,理解这个问题就简单了。
Just keep in mind that she has to be willing to learn these things, you can’t force your knowledge into her, she has to be the one who wants to learn. The biggest obstacle here I would say is breaking the I would never understand that fear.
记住这一点,她必须愿意学这些东西,你不能把你会的灌给她,她一定得想要学这些知识。我想说,最大的障碍是战胜我永远不能理解这东西的恐惧心理。

并不困难,只是费时1

About 6 months ago my girlfriend was studying political sciences for her masters degree. She didn’t really have any technical experience up until this point.
大概六个月前,我女朋友正在读政治学硕士。在这之前,她没有任何技术经验。
One day she decided she wants to learn some cool things in JavaScript to make some animations on her personal website that I made. A week later and I was teaching her Ruby on Rails. A couple of weeks after that she was already building her own web app. A couple more weeks after that she realized that she needs more in depth knowledge, so we started learning more basic things.
有一天,她决定学习一些 JavaScript 中炫酷的东西,做一些动画效果,用在我为她搭建的个人网站上。一周后我就在教她 Ruby on Rails 了。几周后她已经构建出自己的 web 应用了。又过了几周,她意识到她需要学习更深层次的知识,于是我们开始学习更多基础的东西。
We’ve learned things like how computers work, how to manually allocate memory, differences between stack and heap allocation, how to do properly reference counting in Objective-C, how garbage collectors work, functional programming (yes I mean Haskell), networking protocols and much more. She even knows things that I didn’t know just a year ago.
我们学了计算机是怎么工作的、怎么手动分配内存、堆栈分配内存的区别、在 Objective-C 中如何恰当的进行引用计数、垃圾回收器是怎么工作的、函数式编程(没错,说你呢,Haskell)、网络协议和其他一些东西。她甚至知道一些我一年前都不知道的知识。
Basically I’m able to take what I know, extract the important things, throw away the 99.5% of wasted time on figuring out what is important and just teach her what she needs to know.
基本上我能掌握自己知道的知识,抽取出重要的部分,少花99.5%的时间来搞清哪些是重要的,并且仅仅教她所需的知识。
Is this enough to make someone a programmer? No. She will have to go through the hard parts as well, figure a lot of things out, but she already knows more than most people who go study software engineering on a technical university, just after 6 months.
是不是这就足够让一个人成为程序员了呢?不。她同样也必须学习那些难以掌握的知识,搞清楚一堆东西,但是仅仅过了六个月,她已经比大部分在技术型大学学习软件工程的学生懂得更多了。

你是专业的老师2

Being a professional developer also means that you’re a professional teacher to some extent, since our job forces us to constantly explain things to other people. We have to put ourselves into the role of the reader and make our code understandable. We have to explain what we did when it doesn’t make sense, and we have to coach our interns on their path to greatness.
作为一个职业开发者,同时也意味着在某种程度上来说,你是一个专业的老师,因为我们的工作强迫我们不断的给其他人解释一些东西。我们不得不将自己置于读者的角度,并且使我们的代码容易理解。当软件出现异常时,我们必须解释我们的工作,并且我们必须教导我们的实习生用他们自己的方式变强。
All we do in our jobs is take complicated things and make them simple (hopefully, some people like to do the exact opposite). One of the reasons why it takes so long to learn something is that you get lost all the time. You might have a professor who will occasionally explain something, but you still only have about one lecture per week.
我们所做的所有工作都是理解复杂的东西,并且简化它们(事与愿违,大家总喜欢做恰恰相反的事情)。你需要花很多时间去学习某个东西的原因之一是因为你常常感到困惑。可能有个教授能偶尔给你讲解一下,但你顶多每周上一次课。
On the other hand, if you’re teaching the person you live with, she’ll have unlimited access to you, the person who can answer any question, immediately.
另一方面,如果你教的是和你生活在一起的人,她会一直和你保持接触,而你能立即回答出她提的任何问题。
Developers are so good at googling because we get lost all the time. We’re constantly looking for answers. But how productive would you be if you had someone with all the answers sitting in the same room?
因为开发者总是感到困惑,所以我们非常擅长用 Google 进行搜索。我们不断的寻求答案。但是如果坐在同一房间的某人知道所有问题的答案,那么你会有多么高效呢?

No comments:

Post a Comment