Driving and Test-driven programming--Where do we stand?

本文通过将编程比喻为驾驶来探讨编程过程中的挑战与解决方案。新手司机开车时常会从一个过度纠正到另一个过度,而编程也类似地充满了平静期与突发的修正期。文中提到,测试驱动的编程方式可以提供一种稳定且连续的修正路径,使代码更易于管理和维护。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I live in a very flat part of the world. Many of the roads are straight and level--you can almost imagine you could point a car down the road, take your hands off the steering wheel, and the car would go exactly where you pointed it. You can't, of course. Even on Illinois roads, driving is a matter of frequent, tiny corrections to you course. And even on these roads, the novice driver wil lurch wildly from one overcorrection to its opposite.

Programming, for many, is like forever being a novice driver: periods of calm where things go invisibly wrong, followed by bursts of frantic panic and correction. I sometimes think that the only people who become programmers are ones who can tolerate that enviroment and that observing programmers struggle is the reason so many other people think programming is too hard for them.

However, programming can be much more like driving a car: steady, small corrections on the way to the goal. Test-driven programming is a good way to do that. It makes code more accessible. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值