注册
登录
新闻动态
其他科技
返回
亨里克·沃恩(Henrik Warne)的博客 关于编程的想法...
作者:
糖果
发布时间:
2024-04-17 02:15:56 (9天前)
来源:
henrikwarne.com/2012/06/02/why-i-love-coding/
Why I Love Coding Posted on June 2, 2012 | 20 Comments I love coding. Ever since I bought my first computer (a VIC-20), I’ve been fascinated by computer programming. For many years I never thought of why I enjoyed it so much – I just knew I did. 为什么我喜欢编码 发表于 2012 年6月2日| 20条留言 我喜欢编码。自从我购买了第一台计算机(VIC-20)以来,我就对计算机编程着迷了。多年以来,我从未想过为什么会如此享受–我只是知道自己做到了。 But that changed when I read The Mythical Man-Month by Fred Brooks. Most people associate that book with Brooks’s law: adding people to a late project makes it later. But for me, that is not the best part of the book. The best part is one page at the end of chapter one, entitled The Joys of the Craft. There, Fred Brooks quite eloquently put into words what I love about coding. 1. The sheer joy of making things. Programming is fundamentally about creating solutions to problems. At the end of the day, you have created something that didn’t exist that morning, and that is in and of itself satisfying. 2. The pleasure of making things that are useful to other people. One of most satisfying aspects of the job as a programmer is seeing code you wrote deployed in a live system and used by actual people, especially if it improves their lives in some way. 3. The fascination of fashioning complex puzzle-like objects of interlocking moving parts, and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning. Very well put. Not only do programs have complex structure and dependencies, there is also the dynamics of the interaction between the parts as the program executes. The ultimate puzzle indeed! 4. The joy of always learning, which springs from the nonrepeating nature of the task. While constructing the program you constantly expand your understanding of both the problem and the solution. In addition, there is almost no limit to what you can learn to improve your craft – languages, algorithms, methodology, tools, frameworks. 5. The delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of imagination. Easily my favorite in the list – insightful and wonderfully formulated. And he goes on to note that “yet the program construct, unlike the poet’s words, is real in the sense that it moves and works, producing visible outputs separate from the construct itself“. Yeah! To these five excellent points from Fred Brooks I would add: 6. The expressiveness of code. It sounds counter-intuitive, given the strict specification of a programming language, and the relatively few constructs it contains (compared to a natural language like English), but there is almost an infinite number of ways to write a program to solve a given (non-trivial) problem. First and foremost, you as a coder name classes, methods and variables. But you also decide the algorithm, the partitioning of the logic, and finally the layout. All these factors combine to give the programmer great freedom in expressing the solution in code. There – six reasons why I love coding! 但是,当我阅读弗雷德·布鲁克斯(Fred Brooks)的《神话人月》时,情况发生了变化。大多数人把这本书与布鲁克斯定律联系起来:在一个较晚的项目中增加人员会使它更晚。但是对我而言,这不是本书的最佳部分。最好的部分是第一章末尾的一页,名为 《工艺的喜悦》。 在那里,弗雷德·布鲁克斯(Fred Brooks)雄辩地用语言表达了我对编码的热爱。 1.做事的纯粹乐趣。编程从根本上讲就是为问题创建解决方案。最终,您创建了当天早上不存在的东西,而这本身就令人满意。 2.做对他人有用的事情的乐趣。作为程序员,工作中最令人满意的方面之一就是看到您编写的代码已部署在实时系统中并由实际人员使用,特别是如果代码以某种方式改善了人们的生活。 3.着迷于将可动部件互锁的复杂的类似拼图的物体成型,并看着它们以微妙的周期工作,从一开始就发挥出内置原理的后果。放得很好。程序不仅具有复杂的结构和依赖性,而且随着程序执行,零件之间的交互也具有动态性。的确是终极难题! 4. 总是学习的乐趣,源于任务的非重复性。在构建程序时,您会不断扩展对问题和解决方案的理解。此外,您可以学习的语言,算法,方法论,工具,框架几乎没有限制。 5.在如此易处理的媒介中工作的乐趣。像诗人一样,程序员的工作只是从纯思想上移开了一点。他凭空发挥想象力,在空中建造自己的城堡。在列表中,我很容易成为我的最爱-洞察力强,配方精美。他继续指出:“然而,程序结构与诗人的话语不同,它在移动和工作的意义上是真实的,产生与结构本身不同的可见输出”。是的! 除了弗雷德·布鲁克斯(Fred Brooks)的这五个要点之外,我还要补充: 6.代码的表现力。考虑到严格的编程语言规范以及包含的构造相对较少(与自然语言(如英语)相比),这听起来有点违反直觉,但是几乎有无数种方法可以编写程序来解决给定的问题(非平凡的问题)。首先,您以编码器的名称命名类,方法和变量。但是,您还需要确定算法,逻辑分区以及布局。所有这些因素共同为程序员提供了在代码中表达解决方案的极大自由。 那里-我喜欢编码的六个原因!
收藏
举报
1 条回复
动动手指,沙发就是你的了!
登录
后才能参与评论