研究生怎么研究算法_不再研究算法

研究生怎么研究算法

遗产 (Legacy)

Thirty years ago a software development interview meant standing at a whiteboard holding a marker pen and writing some hyper-optimized screaming fast code representing an algorithm. OK whiteboarding is an abhorrent process and leaves interviewees with the impression that speed optimization is their life’s work but back then it made sense to test for ability to write an efficient algorithm. Because we would do that in our work, and do it a lot.

三十年前,一次软件开发面试意味着站在白板上拿着一支记号笔,并写一些代表了算法的超优化尖叫快速代码。 OK 白板是一个令人讨厌的过程,给受访者留下了印象,即速度优化是他们一生的工作,但在那时,测试编写高效算法的能力才有意义。 因为我们会在工作中做到这一点,并且会做很多事情。

Algorithms were central; if we were serious about our work we owned all three volumes (now four) of Donald Knuth’s The Art of Computer Programming and a few of us had actually read them. Fancy that.

算法是核心。 如果我们认真对待我们的工作,那么我们拥有Donald Knuth的《计算机编程艺术》的全部三册(现在为四册),而我们中的一些人实际上已经读过它们。 看中了。

Image for post
Read them once in a while
偶尔阅读一下

But ten years later it was already starting to become pointless and is now completely so. How many times was I told to reverse a linked list or search a binary tree? I last wrote linked list code around 1994 and I have never worked with binary trees except in interviews.

但是十年后,它已经开始变得毫无意义,现在已经完全没有意义了。 我被告知要反向链接列表或搜索二叉树多少次? 我上次在1994年左右编写了链表代码,除采访中外,我从未使用过二叉树。

All these useful structures have long ago been wrapped into classes or libraries and been tested by thousands of developers and really tested by billions of users.

很久以前,所有这些有用的结构都被包装到类或库中,并已由成千上万的开发人员进行了测试,并由数十亿用户进行了实际测试。

仍然是有用的技能 (Still a Useful Skill)

I like writing algorithms. I do my best work away from the computer and driving a car; I remember once being completely unconscious of where I was for 75 minutes and coming up with a solution to a permutation problem that would have taken trillions of cosmic lifetimes to do clumsily but which in my implementation ran in a half-second.

我喜欢编写算法。 我尽我最大的努力远离计算机和开车。 我记得曾经完全不知道我在哪里呆了75分钟,并且想出了解决排列问题的方法,这个问题本来要花费数万亿的宇宙生命来笨拙地完成,但是在我的实现中却花了半秒钟。

These are very personally rewarding achievements.

这些都是非常有益的个人成就。

But I can’t even remember the last time I worked at that level, it’s been many years. But it could conceivably come up again and I should be able to write something that worked reasonably fast and within constraints like limited memory or slow processors. I would however, as I always do, seek to minimize optimization and instead favor stability; a slow-loading web page is irritating but crashing software is injurious, and optimization produces more easily-broken code.

但是我什至不记得我上一次在那个级别上工作了,已经有很多年了。 但是可以想象,它又会出现,我应该能够编写出速度相当快并且在有限内存或慢速处理器之类的约束下工作的东西。 但是,我将一如既往地寻求最小化优化,而倾向于稳定性。 加载缓慢的网页很令人讨厌,但是崩溃的软件却很有害,优化产生的代码更容易被破坏。

但是我们不再那么做了 (But We Don’t Do This Much Anymore)

If I might work at a company for years and never write anything at this level, why should it remain the most critical skill for hire? It shouldn’t. But then again writing code in an interview brings in all kinds of polluting factors like trying to concentrate while someone watches, sniffing and fidgeting, offering misleading suggestions, and acting irritated at being taken from his own work.

如果我可能在一家公司工作了多年,却从未在这个级别上写过任何东西,那为什么它仍然是聘用最关键的技能? 不应该这样 但是,随后在访谈中再次编写代码会带来各种污染因素,例如试图在某人观看时集中精力,嗅探和坐立不安,提供误导性建议以及因从自己的工作中被取而发怒。

I have never sent an interviewee to the whiteboard, even if instructed to interview this way. I would much rather sound him out on approaches to problem-solving and original thinking. Someone who too eagerly projects his conformity and has never thought much about why, only about how, isn’t going to be as good as the opposite.

即使指示您以这种方式进行采访,我也从未将受访者送至白板。 我更愿意在解决问题和原创思维的方法上大声疾呼。 有人急切地计划自己的顺从性,却从来没有想过为什么 ,只是如何做 ,就不会像对立面那么好。

只是偶尔,但这是一项重要技能 (Only Occasionally But Then It’s a Vital Skill)

While we don’t work at this level anywhere near as much as we used to, the time may come and we should be able to write a good algorithm. We may go for years without doing so.

尽管我们无法像以前那样在此级别上工作,但是时间可能会到来,我们应该能够编写出一个好的算法。 如果不这样做,我们可能会走很多年。

But there are other reasons to learn about this: it’s great cerebral exercise.

但是还有其他原因需要了解:这是很棒的大脑锻炼

My degree is in Mathematics, not Computer Science; when I completed the degree requirements the personal computer was still new, a PC was as big as a car (I exaggerate) and it ran a forgotten operating system called CP/M. The only mathematics I have used in my work that I didn’t learn in or before high school was some number theory, which wasn’t part of my degree.

我的学位是数学,而不是计算机科学。 当我完成学位要求时,个人计算机仍然是新的,PC像汽车一样大(我夸大了),并且运行了一个被遗忘的操作系统,称为CP / M。 在我的作品中,我上高中或上学前唯一没有使用过的数学是数论,这不是我学位的一部分。

Years of practicing mathematics left me with a lot of skills that while not directly applicable to software development still enabled me to come up with approaches to problem-solving. I wasn’t doing Fourier transforms but I was using the same well-exercised gray matter.

多年的数学实践使我掌握了许多技能,尽管这些技能不直接适用于软件开发,但仍然使我能够提出解决问题的方法。 我没有进行傅立叶变换,但是我使用的是同样执行良好的灰质。

And this is why, contrary to my title paraphrasing Pete Seeger, you should study algorithms and, yes, optimization.

这就是为什么与我的标题Pete Seeger相反的原因,您应该研究算法,是的,优化。

Just don’t put all your work and preparation into this area because unless you are writing at a very low level you will not use it much anymore.

只是不要把所有的工作和准备都放在这方面,因为除非您的写作水平很低,否则您将不再使用它。

翻译自: https://medium.com/@cheopys/study-algorithms-no-more-ac3a3296df8a

研究生怎么研究算法

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值