提高你在Algoritm的技能 [英] Improve your Skills in Algoritm

查看:78
本文介绍了提高你在Algoritm的技能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你要提高你在软件程序设计方面的算法技巧,是否建议审查对方的源代码而不是做自己的爱好项目?你有什么经历?



谢谢!

If you gonna improve your skills in algoritm in relation to software programmering, is it recommended to review counterpart's source code than doing your own hobby project? What is your experience about it?

Thanks!

推荐答案

做你自己的。



查看代码并没有告诉你为什么做出决定,考虑了哪些替代方案,或者为什么拒绝这些代价。

做是更好的学习方式 - 它鼓励技能的发展,而不是盲目地重复现有的代码,并希望它是最好的方法。
Do your own.

Looking at code doesn't tell you why decisions were made, what alternatives were considered, or why they were rejected.
"Doing" is a better way of learning - it encourages the growth of skills instead of just blindly repeating existing code and hoping it's the best way to do it.


算法这个词来源于Muḥammadibn的名字Mūsāal-Khwārizmī,第9名。世纪(西方共同时代的历法)波斯学者/数学家;他的作品在300年后被翻译成拉丁文,将他的名字与希腊词for:arithmos混为一谈。



无论如何,在计算机中科学,今天,算法是指解决某些问题的系统方法,例如排序数据集,计算素数等。与配方相比,算法必须是明确的,并且其前提条件(例如数据类型)必须严格定义。 imho,算法与设计模式不同,我将其视为实施策略。



大多数计算机科学专业的学生都在学习算法课程,因为他们可以系统地集中精力。 Donald Knuth的算法经典书籍,Sedgewick和Wayne的更现代的作品,以及来自Cormen,Leiserson,Rivest和Stein的MIT书籍,经常被用作大学教科书。大多数大学教科书都会以某种形式的伪代码或其他计算机语言编写代码示例,而不是......据我所知...... C#。我还没有看到一本关于使用C#的算法的好书,但我承认我在过去的两年里没有看过那里有什么。



你可能会查找此网站有助于概述:[ ^ ] 。



而且,项目Euler,在线教育网站,是一个很好的资源去研究算法,通过分析和编码解决方案来解决需要算法的问题抽象:[ ^ ]。
The word "algorithm" derives from the name of Muḥammad ibn Mūsā al-Khwārizmī, a great 9th. Century (western common era calendar) Persian scholar/mathematician; his work, translated into Latin 300 years later, scrambled his name in combination with the Greek word for "number:" "arithmos."

In any case, in computer science, today, "algorithm" refers to a systematic method of solving some problem such as ordering a data set, calculating prime numbers, etc. An algorithm, in contrast to a "recipe," must be unambiguous, and its pre-conditions (such as data type) must be rigorously defined. imho, an algorithm is not the same as a "design pattern" which I view as an "implementation strategy."

Most computer science students do study algorithms in a special course(s), since they can be focused on in a systematic way. The classic books on Algorithms by Donald Knuth, and the more modern works by Sedgewick and Wayne, and the MIT book from Cormen, Leiserson, Rivest and Stein, are often used as college textbooks. Most college textbooks will have code examples in some form of pseudo-code, or other computer language, not ... to my knowledge ... C#. I have yet to see a good book on Algorithms using C#, but I admit I haven't looked in the last two years to see what's out there.

You might find this site helpful for an overview: [^].

And, Project Euler, the on-line educational site, is a great resource to go and study algorithms by analyzing and coding solutions to problems that do require "algorithmic abstraction: [^].


除了解决方案1:



请注意,您的问题提到算法技能,应该理解为不是应用算法的能力,而是创建解决问题的算法。解决方案2建议我同意这个想法:如果你不自己创建算法,你就无法学习算法的创建过程与任何其他活动领域没有什么不同。此外,解决方案1解释了为什么学习某些代码可能不那么有用。我还要补充一点:从阅读内容中获取的知识往往是虚幻的:你会得到一个印象,你可以很容易地做同样的事情。你需要消除这种错觉。



但这还够吗?显然不是。如果您的活动完全独立,其结果可能不是很成功,有时会失败,有时会产生纯粹的质量。难怪,如果大多数最好的算法的作者都使用了你的同事的经验,所有人类收集的经验,你没有。此外,你需要学习理论。创建算法是一门非常复杂的艺术和科学,同时它有自己的秘密和规律。



所以,我的建议会有所不同来自你拥有。 我的建议是:从自己做起并用自己的方式完成工作。我猜最后的建议很明确:这是因为你的特殊问题可能有你需要的特殊性考虑到,而不是非批判性地应用现有的东西。



但是为什么从你自己开始,如果我已经告诉你,你的工作可能不是很成功。这是因为你可能的失败非常重要!只有在遇到困难问题后,您才能深刻理解其他人的解决方案。您自己的解决方案越好,您就越能理解其他解决方案,但即使您失败了,它也可以帮助您理解。而且,不要忘记:你总是有机会创造一些世界新方法。 绝不会错过这个机会。



-SA
In addition to Solution 1:

Note that your question mentioned "algorithm skills", which should be understood not as the ability to apply algorithms, but create algorithms for solving problems. Solution 2 suggests the idea I agree with: you cannot learn the process of creation of the algorithms if you don't create them yourself. This is no different from any other field of activity. Also, Solution 1 explains very well why learning of some code may be not so useful. I'll also add: knowledge taken from just reading something tends to be illusionary: you receive an impression that you can easily do the same. You need to destroy this illusion.

But is it enough? Apparently not. If your activity is fully independent, its result may be not very successful, sometimes failing and sometimes of pure quality. No wonder, if the authors of most the best algorithms uses the experience of your colleagues, all the collected experience in the humankind, and you did not. Besides, you need to learn theory. Creation of algorithms is a very complex art and science at the same time, it has its own secrets and laws.

So, my advise will be different from "do you own". My advice is: "start with doing your own" and "finish your work with your own". I guess the last advise is clear: this is because your particular problem may have its own peculiarities you need to take into account, instead of non-critically applying something already existing.

But why starting with your own, if I already told you that your work could be not very successful. This is because your possible failures are very important! Only after ramming with a hard problem you can deeply understand the solutions of other people. The better your own solution, the better you can understand others, but even if you failed, it can help you a lot in your understanding. And also, don't forget: you always have a chance to create some world-new method. Never miss this opportunity.

—SA


这篇关于提高你在Algoritm的技能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆