强肉弱食是什么意思| 大脑供血不足头晕吃什么药最好| 康复新液是什么做的| 时间是什么| 电解质氯高是什么原因| 空调多少匹是什么意思| 小孩耳朵痛什么原因| 一次不忠终身不用什么意思| 改姓需要什么手续| 炮机是什么| 百合花什么颜色| 盍是什么意思| 为什么会得阴虱| 处女座男和什么座最配对| 丁香泡水喝有什么功效和作用| 子字五行属什么| 舂米是什么意思| 鸟加一笔变成什么字| 1978年是什么年| 指模是什么意思| 梦见兔子是什么预兆| 丁是什么意思| 什么是处方药和非处方药| 透明质酸是什么| 巩加虫念什么| 同房后出血是什么原因| 盐吃多了有什么危害| 嘴巴里长血泡是什么原因| 胃胀想吐是什么原因| 宜宾燃面为什么叫燃面| 看颈椎病挂什么科| 中学为体西学为用是什么意思| 好人是什么意思| 肋骨下面是什么器官| 刀纸是什么| 甲状腺钙化是什么意思| 催产素是什么| 早上吃什么减肥| 阿托伐他汀钙片有什么副作用| 经期喝什么茶好| 白羊男和什么星座最配| 酒花是什么| 火牛命五行缺什么| 心结是什么意思| 戒手淫有什么好处| 什么是脱肛| 教科书是什么意思| 什么食物降胆固醇最好| 白细胞低吃什么补| 什么闻乐见| 希特勒为什么杀犹太人| 勃起是什么意思| 池字五行属什么| 胸闷挂什么科| 什么情况下要打狂犬疫苗| 甲钴胺片主治什么病| loa是什么意思| 什么叫多动症| 白芝麻有什么功效| 脾大是什么意思| 腹泻吃什么药好| 成都有什么区| 一月25号是什么星座| 胬肉是什么意思| 腿脚肿胀是什么原因引起的| 属鸡的跟什么属相最配| b是什么牌子的衣服| 红色的海鱼是什么鱼| 为什么会下雨| 不良资产是什么| 胭脂是什么东西| 主动脉夹层是什么原因引起的| ye是什么意思| nt和无创有什么区别| 伯邑考为什么不姓姬| edenbo是什么牌子| 肾结石要忌口什么东西| 眼科属于什么科| 党费什么时候开始交| 周遭是什么意思| 高大尚是什么意思| 两性是什么意思| 不敢造次是什么意思| 牛肉汤配什么菜好吃| 深水炸弹什么意思| 血虚吃什么药| 经常拉肚子吃什么药好| 8.8是什么星座| 嘴唇干是什么原因引起的| 学习机什么牌子好| 肉痣长什么样子图片| 锦囊妙计是什么意思| 近亲为什么不能结婚| 嗓子疼喝什么饮料| 喝酒后胃不舒服吃什么药| 2月5号什么星座| 为什么贫血| 什么时候入伏| 寒热往来什么意思| 复方石韦胶囊治什么病| 7.14日是什么日子| 支原体肺炎吃什么药| 喉咙痒咳嗽吃什么药好| 沙眼衣原体是什么病| 结婚是什么意思| 脸上老是长闭口粉刺是什么原因| maxrieny是什么品牌| elephant什么意思| 2月14日是什么星座| 手关节疼痛是什么原因| 人瘦是什么原因造成的| 金字旁的字有什么| 阳气不足是什么意思| 水泻拉肚子吃什么药| 促黄体生成素低说明什么| 牵牛花又叫什么名字| 毛孔大什么原因形成的| 为什么一到晚上就痒| 头晕冒汗是什么原因| 伤官见官什么意思| 土豆淀粉能做什么美食| 什么床最环保没甲醛| 辅警是什么编制| cl是什么牌子| 白内障吃什么药| 尿常规红细胞高是什么原因| 暗物质和暗能量是什么| 做蹲起有什么好处| 风热感冒吃什么药最快| 六月二七是什么星座| 红色的对比色是什么颜色| 七月八号是什么日子| 变化不著是什么意思| 红色的菜叫什么| 奔跑的马是什么牌子的车| 烤冷面是什么做的| 舌头麻木是什么原因| 炁怎么读什么意思| 夏季风寒感冒吃什么药| 双鱼座和什么座最配对| 享福是什么意思| 总经理是什么级别| 滔滔不绝的绝是什么意思| 脚起水泡是什么原因| 不自觉是什么意思| 一字千金是什么生肖| 紫癜是什么| 子宫肥大是什么原因| 41年属什么生肖| BORDEAUX是什么红酒| vans属于什么档次| 发迹是什么意思| 甲减长期服用优甲乐有什么危害| 低密度脂蛋白高的原因是什么| 血小板是什么意思| 同床出血什么原因呢| 虎是什么意思| 什么门关不上| 前程无量是什么意思| 怀孕可以吃什么| 血友病是什么意思| 脸上皮肤痒是什么原因| 梦魇什么意思| 口干口苦吃什么中成药| 肌张力高有什么症状| 耳朵响吃什么药| 周公解梦梦见蛇是什么意思| 周边什么意思| 什么是白条| 缺钙吃什么食物| 梦见好多猪肉是什么意思| 芋圆是什么| 男性肛门瘙痒用什么药| 晚上扫地有什么说法| 痰湿中阻吃什么中成药| 瑞士用什么货币| 县里的局长是什么级别| 爱趴着睡觉是什么原因| 孤独终老什么意思| 为什么叫六小龄童| 话说多了声音嘶哑是什么原因| 什么是邮箱地址应该怎么填写| 梦见打老公是什么意思| 平躺就咳嗽是什么原因| 妈妈的姐姐的儿子叫什么| 保护声带喝什么| 姓卢的男孩起什么名字好| 老虎的天敌是什么动物| 腾蛇是什么意思| 低血压食补吃什么最快| 怀疑心梗做什么检查| 香港为什么不用人民币| 黑胡桃色是什么颜色| 梦见杀蛇是什么预兆| 福五行属什么| 包皮炎挂什么科| 什么是黑色星期五| 什么情况下才做冠脉cta| 遗物是什么意思| 夹腿综合症是什么| 来大姨妈能吃什么水果| 阿莫西林吃多了有什么副作用| 矢量是什么意思| 男人腰痛吃什么药| 甲状腺炎有什么症状| 癌胚抗原偏高说明什么| 三个七念什么| 末法时期是什么意思| 全糖是什么意思| 主观臆断是什么意思| 什么样的疤痕影响当兵| 莞字五行属什么| 梦见自己头发白了是什么意思| 体内湿气太重吃什么药能快速除湿| 头皮问题挂什么科| dl是什么单位| 右脚麻是什么病的前兆| 为什么会流口水| 鱼油什么时候吃| 婴儿吐奶是什么原因| 手掌发紫是什么原因| 为什么经常打嗝| 5.16号是什么星座| 玛卡是什么药| 楞头青是什么意思| 室上速是什么病| 托人办事送什么礼物较好| 动脉斑块是什么意思| 嘴角长痘痘是什么原因| 弟弟的女儿叫什么| 为什么叫买东西不叫买南北| asmr是什么意思| 尿酸偏高有什么危害| 前列腺增生吃什么药效果最好| 万岁是什么意思| 超负荷是什么意思| 吃什么丰胸效果最好最快| 狗翻肠子什么症状| shark是什么意思| 下午一点半是什么时辰| 兔头是什么意思| 口腔溃疡吃什么药好| 何首乌泡酒有什么作用| 丹参与什么搭配最好| 牙疼吃什么止疼药见效快| 眉头长痘痘是因为什么原因引起的| 醛固酮高吃什么降压药| 迪根是什么药| 甲功是什么意思| 素土是什么| 睡觉咬舌头是什么原因| 种植牙有什么危害| 人的本质属性是什么| 国二是什么意思| 为什么空调外机会滴水| 脑萎缩是什么意思| today什么意思| 捡到金子预示着什么| 五谷丰登是什么生肖| 八面玲珑是指什么生肖| 海澜之家是什么档次| 虾肚子上的黑线是什么| 穷极一生是什么意思| 肚子响是什么原因| 百度


“中国龙舞之乡”舞龙人忙碌在外 鼓了腰包扬了文化


By Alex Allain
In daily life, we're all constantly making small corrections. Even walking in a straight line is a difficult task when there is no feedback on whether you are, in fact, going straight. If you're making sauce, you'll constantly be checking the consistency of the mixture to make sure it's not too watery. You may find that even when writing, you go back and revise your sentences or restructure paragraphs before you've finished your piece.



In short, in daily life, almost everything we do involves constant feedback on whether we're doing it right. Why would programming be any different? Very few of us, especially when just starting out, will create a program that Just Works. Instead, we'll get a ton of compiler errors, and once we've worked through them, the program will probably not work correctly. If you've written hundreds of lines of code, then you might have dozens or even hundreds of compiler errors to sort through and once you've managed to get through them, you'll still be faced with a frustrating debugging chore because you won't know where in that 200 lines of code your error resides.

Start Small

The key to avoiding this frustration is to start small--unless I have an extremely good idea of what needs to be done, the first thing I do when starting any program is to get a simple program that I can run. This program probably doesn't do much; it might just display the welcome screen. But it does something, and it means that I've got no compiler errors to deal with in that part of the code. Better still, I know it works because I can see it and test it.

What makes a good initial framework? I like to have some basic output and possibly some input. If I'm working on a network application, my first goal is just to send one packet over the network from one computer to the other. Doing these things helps to test your basic assumptions about how things work. If you can't get the basic input to work, then it's unlikely you'll even be able to test the rest of your program.

Build In Increments

Once I've got a simple program running, I try to add small pieces of code that are self-contained enough to be easily tested. This gives me the confidence that my new addition will actually work correctly. Another advantage is that if I have only small additions to my code, then I will limit the number of annoying error messages I have to deal with at one time. I hate dealing with fifty error messages just as much as anyone else, but I'd rather deal with fifty errors in chunks of three or four than all at once!

In many cases, it will be obvious which part of your program you should write next (perhaps because everything else will depend on that piece of code). In some cases, you might have the luxury of choosing between two or more possible next steps. In these cases, I generally like to solve the easiest problem first because I don't want it sitting around bothering me while I try to think about the harder problem. I want to devote all of my mental energy to the hard problem, whereas I can afford to worry a bit about the hard problem while I solve the easier one.

If you're not sure what to write next, don't be afraid to write simpler code than you expect will actually be necessary. It's fine to write some basic functionality without filling in all the details if it's sufficient to let you test an assumption about a part of the code that's more important. Of course, it's not always clear what's most important, but generally it would be whatever is at the core of the program. In a game, it might be the game engine; in an AI program, it might be the learning algorithm. In a network application, it might be the ability to create a network connection. Prioritize the core of the program over features that might never be used!

Finally, once I've added a chunk of code, I test it to make sure that it works as expected. If it doesn't, then at least I know that the mistake has to be in the code that I just added. (There are, of course, times when this isn't the case, but for the most part, it's true.) This means that when I'm debugging, I can ignore most of my old, working code, and focus on looking at what happens when the new code is executing.

Backtracking

One of the great things about building incrementally is that you get feedback on whether you're actually solving the problem. After every small change, you're able to test your implicit assumptions about what should be happening. Sometimes, you might find out that what you expected to happen is very different from what really happened. For instance, you might have incorrect assumptions about how fast your program will be. If it takes an hour to start up, then that's an indication of something wrong! Better to catch it when you first start out than once you've written an entire program based on that assumption.

Better still, even if you don't need to actually back track, you will have a firmer grasp of what you're doing. Once you can actually play with the framework of your program, it's much easier to get a picture for what the rest of it should be doing.

Staying Focused

A major reason for building incrementally is that it lets you focus on a single part of your program at a time. You don't need to worry about whether every line of code will work because you'll have experience with most of it actually working. This lets you focus all of your energy on the new problem you are solving rather than worrying about hundreds of lines of untested code.

Along similar lines, when you're working on a program, it helps to stay focused and work on a single discrete part of the program at a time. If you go back and forth between multiple parts of the code, you'll have to keep more stuff in your head at once (or load and unload information every time you switch what you're working on). You'll also run into the problem of having to come to a stopping place in multiple parts of your code at once before you can test it. If your addition in one place would break some other code, then you have to finish that addition before testing your semi-functional program again.


十二年义务教育什么时候开始 身体缺钾吃什么药 缘是什么生肖 舌头挂什么科 脚趾痒是什么原因
一动就出汗是什么原因 气短咳嗽是什么原因引起的 心跳过快是什么原因 什么贵人能治孤辰寡宿 定位是什么意思
ade是什么意思 大便隐血阴性是什么意思 低血糖吃什么最快缓解 吃什么死的比较舒服 7月26是什么星座
人山人海是什么生肖 ep是什么 晚上三点是什么时辰 英雄难过美人关是什么生肖 replay是什么牌子
聘书是什么luyiluode.com 猪肉和什么菜搭配最好hcv7jop9ns4r.cn 什么国家的钱最值钱hcv8jop0ns2r.cn 什么拉车连蹦带跳inbungee.com seiko是什么牌子hcv8jop5ns1r.cn
夏至为什么要吃面条hcv8jop1ns5r.cn 脚痒脱皮是什么原因hcv8jop8ns2r.cn 疱疹性咽峡炎吃什么食物hcv9jop6ns0r.cn 回族为什么不能吃猪肉hcv8jop2ns6r.cn 常吃南瓜有什么好处和坏处dajiketang.com
倾倒是什么意思hcv9jop8ns2r.cn 虹膜是什么意思hcv9jop3ns5r.cn 读书破万卷下一句是什么hcv8jop5ns0r.cn 夏季吃什么水果好xinjiangjialails.com 入职体检前要注意什么dayuxmw.com
阴人是什么意思hcv8jop0ns9r.cn 洗银水是什么成分hcv9jop3ns2r.cn 强高是什么意思hcv8jop3ns2r.cn 吃什么容易得结石hcv8jop0ns6r.cn 细菌感染吃什么消炎药zsyouku.com
百度