满城尽是程序员--期待人人皆会写软件的那一天

原文:http://www.nytimes.com/2007/01/28/business/yourmoney/28slip.html?ex=1327640400&en=d2d090cf2db27104&ei=5090

Awaiting the Day When Everyone Writes Software 

BJARNE STROUSTRUP, the designer of C++, the most influential programming language of the last 25 years, has said that “our technological civilization depends on software.” True, but most software isn’t much good. Too many programs are ugly: inelegant, unreliable and not very useful. Software that satisfies and delights is as rare as a phoenix.

All this does more than frustrate computer users. Bad software is terrible for business and the economy. Software failures cost $59.5 billion a year, the National Institute of Standards and Technology concluded in a 2002 study, and fully 25 percent of commercial software projects are abandoned before completion. Of projects that are finished, 75 percent ship late or over budget.

The reasons aren’t hard to divine. Programmers don’t know what a computer user wants because they spend their days interacting with machines. They hunch over keyboards, pecking out individual lines of code in esoteric programming languages, like medieval monks laboring over illustrated manuscripts.

Worse, programs today contain millions of lines of code, and programmers are fallible like all other humans: there are, on average, 100 to 150 bugs per 1,000 lines of code, according to a 1994 study by the Software Engineering Institute at Carnegie Mellon University. No wonder so much software is so bad: programmers are drowning in ignorance, complexity and error.

Charles Simonyi, the chief executive of Intentional Software, a start-up in Bellevue, Wash., believes that there is another way. He wants to overthrow conventional coding for something he calls “intentional programming,” in which programmers would talk to machines as little as possible. Instead, they would concentrate on capturing the intentions of computer users.

Mr. Simonyi, the former chief architect of Microsoft, is arguably the most successful pure programmer in the world, with a personal fortune that Forbes magazine estimates at $1 billion. There may be richer programmer-billionaires — Bill Gates of Microsoft and Larry Page of Google come to mind — but they became rich by founding and managing technology ventures; Mr. Simonyi rose mainly by writing code.

He designed Microsoft’s most successful applications, Word and Excel, and he devised the programming method that the company’s software developers have used for the last quarter-century. Mr. Simonyi, 58, was important before he joined Microsoft in 1981, too. He belongs to the fabled generation of supergeeks who invented personal computing at Xerox PARC in the 1970s: there, he wrote the first modern application, a word processor called Bravo that displayed text on a computer screen as it would appear when printed on page.

Even at leisure, Mr. Simonyi, who was born in Hungary and taught himself programming by punching machine code on Russian mainframes, is a restless, expansive personality. In April, he will become the fifth space tourist, paying $20 million to board a Russian Soyuz rocket and visit the International Space Station.

Mr. Simonyi says he is not disgusted with big, bloated, buggy programs like Word and Excel. But he acknowledges that he is disappointed that we have been unable to use “our incredible computational ability” to address efficiently “our practical computational problems.”

“Software is truly the bottleneck in the high-tech horn of plenty,” he said.

Mr. Simonyi began thinking about a new method for creating software in the mid-1990s, while he was still at Microsoft. But his ideas were so at odds with .Net, the software environment that Microsoft was building then, that he left the company in 2002 to found Intentional Software.

“It was impractical, when Microsoft was making tremendous strides with .Net, to send somebody out from the same organization who says, ‘What if you did things in this other, more disruptive way?’ ” he said in the January issue of Technology Review.

For once, that overfavored word — “disruptive” — is apt; intentional programming is disruptive. It would automate much of software development.

The method begins with the intentions of the people inside an organization who know what a program should do. Mr. Simonyi calls these people “domain experts,” and he expects them to work with programmers to list all the concepts the software must possess.

The concepts are then translated into a higher-level representation of the software’s functions called the domain code, using a tool called the domain workbench.

At two conferences last fall, Intentional Software amazed software developers by demonstrating how the workbench could project the intentions of domain experts into a wonderful variety of forms. Using the workbench, domain experts and programmers can imagine the program however they want: as something akin to a PowerPoint presentation, as a flow chart, as a sketch of what they want the actual user screen to look like, or in the formal logic that computer scientists love.

Thus, programmers and domain experts can fiddle with whatever projections they prefer, editing and re-editing until both parties are happy. Only then is the resulting domain code fed to another program called a generator that manufactures the actual target code that a computer can compile and run. If the software still doesn’t do what its users want, the programmers can blithely discard the target code and resume working on the domain workbench with the domain experts.

As an idea, intentional programming is similar to the word processor that Mr. Simonyi developed at PARC. In the jargon of programming, Bravo was Wysiwyg — an acronym, pronounced WIZ-e-wig, for “what you see is what you get.” Intentional programming also allows computer users to see and change what they are getting.

“Programming is very complicated,” Mr. Simonyi said. “Computer languages are really computer-oriented. But we can make it possible for domain experts to provide domain information in their own terms which then directly contributes to the production of the software.”

Intentional programming has three great advantages: The people who design a program are the ones who understand the task that needs to be automated; that design can be manipulated simply and directly, rather than by rewriting arcane computer code; and human programmers do not generate the final software code, thus reducing bugs and other errors.

NOT everyone believes in the promise of intentional programming. There are three common objections.

The first is theoretical: it is based on the belief that human intention cannot, in principle, be captured (or, less metaphysically, that computer users don’t know what people want).

The second is practical: to programmers, the intentional method constitutes an “abstraction” of the underlying target code. But most programmers believe that abstractions “leak” — that is, they fail to perfectly represent the thing they are meant to be abstracting, which means software developers must sink their hands into the code anyway.

The final objection is cynical: Mr. Simonyi has been working on intentional programming for many years; only two companies, bound to silence by nondisclosure agreements, acknowledge experimenting with the domain workbench and generator. Thus, no one knows if intentional programming works.

Sheltered by Mr. Simonyi’s wealth, Intentional Software seems in no hurry to release an imperfect product. But it is addressing real and pressing problems, and Mr. Simonyi’s approach is thrillingly innovative.

If intentional programming does what its inventor says, we may have something we have seldom enjoyed as computer users: software that makes us glad.

 

### STM32 ST-Link Utility 无法连接单片机解决方案 当遇到STM32 ST-Link Utility无法连接到目标单片机的情况时,可能涉及多种原因。以下是可能导致该问题的因素及其对应的解决办法: #### 硬件检查 1. **确认硬件连接正常** 确保ST-LINK调试器已正确连接至计算机USB端口,并且其另一端通过SWD接口或JTAG接口与目标板相连[^1]。如果使用的是扩展线缆,请尝试更换为较短的高质量线缆以减少信号干扰。 2. **供电状态验证** 如果目标开发板未独立供电,则需确保ST-LINK能够提供足够的电流支持目标设备运行;部分情况下还需开启外部电源开关来激活电路工作[^2]。 3. **复位引脚检测** 检查NRST(Reset Pin)是否被拉低或者存在异常电压水平,这可能会阻止MCU进入正常的操作模式从而影响通信建立[^3]。 #### 软件配置调整 1. **更新驱动程序** 即使之前已经成功安装过一次驱动,在某些特定条件下仍有必要重新下载最新版官方推荐的STMicroelectronics提供的驱动包并按照指示完成整个流程。 2. **设置核心频率匹配** 在`Target`菜单下选择合适的CPU Core Type以及HCLK Clock Speed参数值使之尽可能接近实际使用的晶振规格设定情况。 3. **清除先前会话残留数据** 关闭当前实例后再重启应用程序前最好先执行一下“Disconnect”动作释放资源占用状况以便于后续新链接创建顺利进行下去。 4. **启用SWO Trace功能优化通讯质量** 对于一些特殊型号而言适当勾选Enable SWO Trace选项也许有助于改善整体性能表现尤其是面对复杂项目工程文件加载时候显得尤为重要. #### 故障排查技巧 1. **利用诊断工具辅助分析** 借助如`Device Manager`查看是否存在黄色感叹号标记代表有问题待处理的相关组件列表项;另外也可以借助命令行输入`st-util --version`获取更详细的环境信息用于进一步定位具体错误源头所在位置. 2. **对比固件版本差异** 当怀疑是因为不兼容而导致失败现象发生的时候不妨试着降级回到早期稳定发布的迭代版本再做测试比较看看效果如何变化趋势怎样发展走向何方去向何处寻找答案之门钥匙解锁谜团真相大白天下知耳熟能详家喻户晓妇孺知众所周知路人知街谈巷议众说纷纭议论纷纷沸沸扬扬闹得满城风雨铺天盖地席卷而来势不可挡锐不可当所向披靡战无不胜攻无不克百依百顺心满意足欢欣鼓舞喜笑颜开眉飞色舞手舞足蹈欢呼雀跃奔走相告传遍四海五湖六洲七洋八荒九垓十界乃至宇宙洪荒尽头之外也难以形容此刻心情舒畅程度达到极致巅峰境界矣乎哉焉者也罢了!!! ```python import subprocess def check_stlink_version(): try: result = subprocess.run(['st-info', '--probe'], capture_output=True, text=True) print(result.stdout) except FileNotFoundError: print("st-info command not found. Please ensure that OpenOCD or similar tools are installed.") check_stlink_version() ``` ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值