华为 编程语言实验室,薪水
Stop banging your head against a textbook.
别再撞到教科书上了。
Four chapters into “MATLAB for Neuroscientists”, my friend asked me for advice. Her knowledge of psychology and neuroscience helped her a lot as an experimentalist, but with little background in mathematics or programming, my friend found herself slogging through the textbook. Feeling stuck in learning programming was all too familiar to me — although I read some programming books, took some programming classes, and successfully taught myself to build functional robots, it was AFTER these experiences when I gained strong reasoning abilities for programming. In retrospect, I could have saved at least a hundred hours of frustration if I knew what I know now about how to learn programming. I gave my friend the same advice I would give my past self.
我的朋友问我“ MATLAB for Neuroscientists”的四章。 她的心理学和神经科学知识为她成为实验学家提供了很多帮助,但是由于我在数学或程序设计方面的背景很少,所以我的朋友发现自己在教科书中苦苦挣扎。 陷入学习编程的感觉对我来说太陌生了-尽管我读了一些编程书,参加了一些编程课,并且成功地自学了如何构建功能机器人,但在这些经历之后,我获得了强大的编程推理能力。 回想起来,如果我知道我现在对如何学习编程的了解,我至少可以省下一百个小时的挫败感。 我给我的朋友同样的建议,就像我过去的自我。
Textbooks are great because they put a lot of information in one place, they have indexes, and the reader can look the things up that they need. But textbooks can also be very dry and devoid of analogies. Learning programming by reading a textbook is like learning a foreign language by reading a textbook on grammar in the foreign language. Without enough prior knowledge to begin with, you may find yourself lost. Although the textbook may seem like the most accessible way to get started in programming, conversations with people who program can be more useful for a person who is very new to the field.
教科书之所以出色,是因为它们将大量信息集中在一处,具有索引,并且读者可以查找所需的内容。 但是教科书也可能非常枯燥,缺乏类推。 通过阅读教科书来学习编程就像通过阅读外语语法教科书来学习外语一样。 没有足够的先验知识开始,您可能会发现自己迷失了方向。 尽管教科书似乎是开始编程的最便捷途径,但是与编程人员进行的对话对于本领域的新手而言可能更为有用。
When you are so lost that you do not know what to Google, you will need to learn what to Google. Like the textbook, Google is also a reference. Looking up the errors that the command window gives you can give more insight to the errors. Being able to Google means you can learn to code without necessarily needing to lug a textbook around. Online forums, such as Stack Overflow, may show multiple solutions to the same problem. At first, reading the descriptions of what different functions do may seems strange, but as you become a stronger programmer, it will become easier to determine which search terms will likely return a useful result from Google and how to make sense of the documentation. If I remember how I would create an algorithm, but forget the precise syntax, a quick Google search will help me to format my idea into the correct syntax for that particular programming language.
如果您迷路了,不知道对Google会做什么,那么您将需要了解对Google的了解。 像教科书一样,Google也是参考。 查找命令窗口提供的错误可以使您对错误有更多的了解。 能够使用Google意味着您不必学习一本教科书就可以学习编码。 在线论坛(例如Stack Overflow)可能会显示针对同一问题的多种解决方案。 首先,阅读有关不同功能的描述可能看起来很奇怪,但是当您成为一名更强大的程序员时,将更容易确定哪些搜索字词可能会从Google返回有用的结果以及如何理解文档。 如果我记得如何创建算法,却忘记了精确的语法,那么快速的Google搜索将帮助我将我的想法格式化为该特定编程语言的正确语法。
Learning one programming language can help to learn others later. Similar to how knowing English can help with learning Spanish, and knowing English and Spanish make it much easier to learn Italian, knowing one programming language can help you learn others with relative ease. The big difference is which syntax to use. For example, if I know that I would need to assign a variable if I was programming in MATLAB, but am learning to program in R, then I can Google “assign a variable in R” and know what to write into my script or command line. I have learned that Googling how to do things is a reason why programmers commonly have a seemingly-ridiculous number of tabs open in their internet browser at once.
学习一种编程语言可以帮助以后学习其他语言。 就像了解英语可以帮助学习西班牙语一样,了解英语和西班牙语可以使学习意大利语变得更加容易,了解一种编程语言可以帮助您相对轻松地学习其他语言。 最大的区别是使用哪种语法。 例如,如果我知道如果我在MATLAB中进行编程,但正在学习在R中进行编程,则需要分配一个变量,那么我可以通过Google“在R中分配变量”并知道要在脚本或命令中写入什么内容线。 我了解到,谷歌搜索方法是程序员通常在其互联网浏览器中一次打开看似荒谬的选项卡的原因。
I think the biggest reason why people give up on learning to program is because they feel too stuck and cannot find their way to become un-stuck. Gaining some individualized attention can help you to keep moving forward.
我认为人们放弃学习编程的最大原因是因为他们觉得自己被困住了,无法找到摆脱困境的方法。 获得一些个性化的关注可以帮助您不断前进。
There is no need to re-invent the wheel, but it can help to deconstruct and/or reconstruct the wheel.
不需要重新发明轮子,但是它可以帮助解构和/或重建轮子。
If you are in a lab that uses computational techniques, chances are that it already has a repository of code. This is how programming often works: by modifying programs that others have already created. While this sounds simple, it is important to know what the code is doing and how to debug it.
如果您在使用计算技术的实验室中,则很可能已经有了代码存储库。 编程通常是这样工作的:通过修改其他人已经创建的程序。 尽管这听起来很简单,但重要的是要知道代码在做什么以及如何调试它。
Do NOT go into your lab’s repository and look at a random script. Instead, ask a more experienced programmer (I will refer to this person as a “coach”) in your lab for a simple script to look over, a script that your lab uses. A coach can be one person, or you can be coached by several people. The point of a coach is that they are not really doing the programming for you, but they are helping you to learn to produce your own programs and to debug things yourself. While this may be fairly time-consuming up front, it can save a lot of time in the long run.
请勿进入实验室的资料库并查看随机脚本。 取而代之的是,请实验室中经验丰富的程序员(我将这个人称为“教练”)来查找简单的脚本,以供实验室使用。 一个教练可以是一个人,也可以是几个人的教练。 教练的要点是,他们并不是真正在为您做编程,而是在帮助您学习制作自己的程序和自己调试程序。 尽管这可能很耗时,但从长远来看,它可以节省大量时间。
Check out the simple script your coach identified for a bit on your own first, Googling things that you do not know. Then, ask your coach to look over the script together, line by line. This can be done remotely with a screen share if needed. Tell your coach what you think each line of code does. They can validate whether you are correct or not and they can see specifically where you may have gone off track in your reasoning. You can ask your coach about what common errors they find when running that code, and what may need to be modified for different experimental conditions. If your coach can give you mnemonics, stories, draw diagrams, or make analogies to help the ideas stick, that is a big plus.
首先检查一下您的教练确定的简单脚本,用谷歌搜索您不知道的事情。 然后,请您的教练逐行一起查看脚本。 如果需要,可以使用屏幕共享远程完成此操作。 告诉您的教练您认为每一行代码的作用。 他们可以验证您是否正确,并且可以具体查看您可能在推理中偏离的地方。 您可以询问您的教练,他们在运行该代码时会发现哪些常见错误,以及在不同的实验条件下可能需要修改哪些错误。 如果您的教练可以为您提供助记符,故事,绘制图表或进行类比以帮助您坚持想法,那将是一个很大的优势。
Repeat this process, but with increasing levels of complexity to the code, with code that calls other functions in code. This process will knock out two birds with one stone: you will learn about how the code in your lab works in theory AND you may be able to apply this knowledge in practice to help your lab for the specific data analysis you need.
重复此过程,但是随着代码调用代码中的其他函数,代码的复杂性水平将提高。 这个过程将一口气击倒两只鸟:您将了解实验室代码在理论上是如何工作的,并且您可以在实践中应用此知识来帮助您的实验室进行所需的特定数据分析。
After you have some experience understanding other peoples’ code from your lab, you can try making modifications so that it fits the needs of different datasets. Chances are that you will need to debug the code for it to work perfectly. This can help you to learn about applying the debugging process.
在拥有从实验室了解其他人的代码的经验之后,可以尝试进行修改,使其适合不同数据集的需求。 您可能需要调试代码才能使其正常工作。 这可以帮助您了解有关应用调试过程的信息。
Some projects may require methods of analysis that your lab has never used before, and you may find yourself needing to write scripts. Remember that a script really is just a list of instructions. If you find yourself overwhelmed, write pseudocode: a list of instructions for what needs to be done, written in plain English. Then, think about how to make this happen using the commands and syntax of your programming language of choice, Googling as needed.
有些项目可能需要您的实验室以前从未使用过的分析方法,并且您可能发现自己需要编写脚本。 请记住,脚本实际上只是指令列表。 如果您发现自己不知所措,请编写伪代码:使用简单的英语编写的一系列说明。 然后,考虑如何使用所选编程语言的命令和语法来实现此目的,并根据需要进行谷歌搜索。
If you spend more than ten minutes stuck with the same problem and cannot think of a way around it, talk with a coach. Ask them to give you a hint or to let you know if you are barking up the right tree. Bugging them may help to debug you.
如果您花费超过十分钟来解决同一问题,而又想不出解决办法,请与教练交谈。 要求他们给您一个提示,或让您知道是否在树桩正确。 调试它们可能有助于调试您。
Some ways to ease the feedback process include taking screenshots of specific error messages, asking questions about what to keep in mind, and bringing up your own ideas of what you have tried and what the results were.
简化反馈过程的一些方法包括:截取特定错误消息的屏幕截图,询问要记住的问题以及提出自己对尝试过的内容和结果的想法。
Being able to use a computer to process large datasets is an important skill to hone, especially in the information age we live in. Programming can be very rewarding when you understand it well. By applying these methods, you can learn to code efficiently. In summary, the steps are:
能够使用计算机处理大型数据集是一项磨练的重要技能,尤其是在我们所处的信息时代。熟悉编程后,编程将是非常有益的。 通过应用这些方法,您可以学习有效地编码。 总之,这些步骤是:
Find at least one coach who is more experienced than you in programming, preferably in the same lab.
至少找到一名比您更有经验的教练,最好是在同一实验室中。
Talk through each line of a simple script with a coach.
与教练讨论简单脚本的每一行。
Repeat step 2, with increasing levels of complexity.
重复步骤2,增加复杂性。
Start modifying code that already exists.
开始修改已经存在的代码。
Start building new scripts.
开始构建新脚本。
The views expressed in this article are solely those of the author and do not necessarily reflect those of the OmarLab, University of Michigan, or Intvo. The electrophysiological trace image is a screenshot taken during an openEphys recording session.
本文表达的观点仅是作者的观点,不一定反映OmarLab,密歇根大学或Intvo的观点。 电生理迹线图像是在openEphys录制会话期间拍摄的屏幕截图。
翻译自: https://medium.com/swlh/learning-programming-as-a-laboratory-scientist-b7cb8666ab30
华为 编程语言实验室,薪水