本文介绍了如何实际编写程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 你好, 我一直在学习编码(python是我在一些BASIC之后研究过的第二种语言)。我真正想知道的是 ,如果你打算实际编写一个程序或某种类型的项目, 你是如何实际开始的。 想象一下,你知道你想要程序做什么(它的功能),你 对程序的工作原理有一个大概的了解。你打开了一个 空的文本文件并将其保存为''mykewlprogram.py'',现在你坐在空文本文件前面的 ...现在然后....我从哪里开始。 关于这个问题的任何想法:-) Ta NickHello there,I have been on and off learning to code (with python being the secondlanguage I have worked on after a bit of BASIC). What I really want to knowis, if you are going to actually write a program or a project of some sort,how do you actually start.Picture this, you know what you want the program to do (its features), youhave a possably rough idea of how the program will work. You have opened anempty text file and saved it as ''mykewlprogram.py'' and now your sitting infront of an empty text file... Now then.... where do I start.Any ideas about this problem :-)TaNick推荐答案 关闭文件。打开test_mykewlprogram.py并开始编写单元测试。 http:// www .extremeprogramming.org / 当然答案比这要大得多。如此之大,我甚至不会试图更充分地回答它。 :) JpClose the file. Open test_mykewlprogram.py and begin writing unit tests. http://www.extremeprogramming.org/The answer is much larger than this, of course. So large I''m noteven going to try to answer it more fully. :)Jp 当然,首先你要写一个测试。然后你运行它并确保它失败 (因为当然还没有其他代码存在)。然后你只需要编写足够的代码来通过测试。再次运行测试,并获得 通过。清理干净并重新开始...... http:/ /diveintopython.org/unit_testing/ http ://c2.com/cgi/wiki?TestDrivenDevelopment http://www.amazon.com/exec/obidos/tg...24713?v=glance > http://www.objectmentor.com/writeUps .. .venDevelopment http:// www.agiledata.org/essays/tdd.html http://groups.yahoo.com/group/testdrivendevelopment/ http://www.testdriven.com/ 等...... -PeterSure, first you write a test. Then you run it and make sure it fails(because of course no other code exists yet). Then you write justenough code to pass the test. Run the test again, and get it topass. Clean things up and go back to the start... http://diveintopython.org/unit_testing/ http://c2.com/cgi/wiki?TestDrivenDevelopment http://www.amazon.com/exec/obidos/tg...24713?v=glance http://www.objectmentor.com/writeUps...venDevelopment http://www.agiledata.org/essays/tdd.html http://groups.yahoo.com/group/testdrivendevelopment/ http://www.testdriven.com/etc...-Peter 这篇关于如何实际编写程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!