本文主要是介绍记忆 编码矩阵_编码肌肉记忆,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
记忆 编码矩阵
介绍 (Introduction)
What do I mean by “Coding Muscle Memory?” Well, most of us know what muscle memory is, you have done something so many times that you can repeat the action without conscious thought. Athletes, Dancers, Musicians, and Martial Artists are some of the examples that come to mind when I think about people with muscle memory. I know I have tasks that are “programmed” into my body as well. I have a horrible time changing keyboards, I have used the same keyboard on my primary home workstation since the mid-1990s, and every time I went to work on a new job, it took me weeks to adjust to having the keys in slightly different places. My dependence on this keyboard is so bad that since the manufacturer of my keyboard no longer makes this model. All of their similar models are different enough that I would have to go through the adjustment. I went online and found a used, but in good shape keyboard of the same model on eBay and purchased it so I wouldn’t need to change.
“编码肌肉记忆”是什么意思? 好吧,我们大多数人都知道什么是肌肉记忆,您已经做了很多次,以至于无意识地重复动作。 当我想到具有肌肉记忆力的人时,就会想到一些运动员,舞者,音乐家和武术家的例子。 我知道我的任务也被“编程”到我的体内。 我的键盘更换时间很糟,自1990年代中期以来,我一直在主要的家用工作站上使用相同的键盘,每次去上一份新工作时,我花了数周的时间来适应与键盘稍有不同的按键。的地方。 我对这个键盘的依赖性很差,以至于我的键盘制造商不再生产这种型号。 他们所有相似的模型都足够不同,因此我必须进行调整。 我上网了,在eBay上找到了一个二手但形状良好的同型号键盘,并购买了它,所以我不需要进行更改。
So, what about coding. Well, I had an interesting experience yesterday. One of my customers asked me to debug a program written in C++ for them. Now, understand it has been ten or twelve years since I regularly programmed in C++. I have kept up on the changes with the language and done some minor “hello world” level programs to try out some of the new features, but debugging a program written in the latest version of C++ that could be a challenge. Then I started reading the code, and like a bolt, it all came back. I was reading C++ as quickly as I now read C#, Java, or JavaScript. It was like the years just disappeared. Within about a minute, I could see what was wrong. Then it took me another two or three minutes to work out what the new syntax was to solve the problem.
那么,编码呢? 好吧,昨天我经历了一次有趣的经历。 我的一位客户要求我为他们调试用C ++编写的程序。 现在,了解到我定期用C ++编程已经有十到十二年了。 我一直在跟上语言的变化,并做了一些次要的“ hello world”级别的程序来尝试一些新功能,但是调试用最新版本的C ++编写的程序可能会遇到挑战。 然后,我开始阅读代码,就像螺栓一样,它们全部回来了。 我阅读C ++的速度和现在阅读C#,Java或JavaScript的速度一样快。 仿佛岁月不见了。 在大约一分钟内,我可以看到出了什么问题。 然后,我花了两到三分钟的时间才能弄清楚解决该问题的新语法。

为什么这很重要? (Why should this matter?)
So what I can hear some of you asking, is he just bragging? Nope, this has a point beyond how cool it felt to be able to pull that off. The point is that our brains have muscle memory as much as our bodies. We learn things that we do hundreds or thousands of times. Our mind having something like muscle memory is vital for us to remember. Not just for the obvious reasons like remembering our kid’s birthdays and our anniversaries. But keep in mind that bad skills are drilled into muscle memory too. So, if you get in a bad habit, oh say returning true from every method no matter what the result and giving the real result in a reference variable passed into the call. You are going to do that by habit.
所以我能听到你们问的,他只是在吹牛吗? 不,这超出了能够实现这一目标的感觉有多酷。 关键是我们的大脑对肌肉的记忆与我们的身体一样多。 我们学习成百上千次的事情。 记住诸如肌肉记忆之类的东西对我们而言至关重要。 不仅仅因为显而易见的原因,例如记住我们孩子的生日和周年纪念日。 但是请记住,坏的技巧也会渗透到肌肉记忆中。 因此,如果您养成不良习惯,请说无论结果如何,都应从每种方法返回true,并在传递给调用的引用变量中提供真实结果。 您将按习惯进行操作。
I grew up on Fortran, and Basic, both of these languages had drastically limited variable naming. So badly limited that the versions of Fortran that I originally programmed in had specific letters for integer, floating-point, or double-precision floating-point values. You didn’t declare a variable. You used one of the languages defined single-letter variables, and prepare for a marathon debugging session if you forgot what that letter had been used for before. Because side effects? Some programmers thought of side effects as features of the language, not bugs. When I moved on to other languages, it took me years to break the single or two-character meaningless variable names. Even today, I find myself slapping an “i” or “j” in as a loop indexer or short term throwaway integer value, just because that is still my reflex. Finding those in code is like a homecoming; it’s an ugly broken home, but still home.
我在Fortran和Basic上长大,这两种语言都大大限制了变量命名。 如此严格的限制使我最初编写的Fortran版本对整数,浮点数或双精度浮点值有特定的字母。 您没有声明变量。 您使用了一种语言定义的单字母变量,并且如果忘记了该字母以前的用途,则准备进行马拉松调试会话。 因为有副作用吗? 一些程序员认为副作用是语言的功能,而不是错误。 当我转向其他语言时,花了我很多年的时间才能打破一个或两个字符的毫无意义的变量名。 即使在今天,我仍然发现自己将“ i”或“ j”当作循环索引器或短期丢弃的整数值,只是因为那仍然是我的反思。 在代码中找到这些就像是一个归宿。 这是一个丑陋的破屋,但仍在。
结论 (Conclusion)
So keep your muscle memory in mind, watch for bad habits, try to break these habits before they become muscle memory. Retrain your coding muscle memory by paying close attention and doing things to build good habits. There is no point in trying to define what good habits are. At the time, single-letter variables with side-effects were a good habit in Fortran. So the idea of what constitutes a good habit change over time, pay attention to yours and decide which are worth changing and which are just your style.
因此,请记住您的肌肉记忆力,注意不良习惯,并在它们成为肌肉记忆力之前设法打破这些习惯。 密切注意并做一些养成良好习惯的习惯,以训练您的编码肌肉记忆。 试图定义什么是好习惯是没有意义的。 当时,具有副作用的单字母变量在Fortran中是个好习惯。 因此,构成好习惯的观念会随着时间而改变,注意您的习惯并决定哪些值得改变,哪些才是您的风格。
Good luck, and have fun.
祝好运并玩得开心点。
翻译自: https://medium.com/the-innovation/coding-muscle-memory-6fdc10cf2ddd
记忆 编码矩阵
相关文章:
这篇关于记忆 编码矩阵_编码肌肉记忆的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!