| Profilo di 斌自由空间FotoBlogElenchi | Guida |
|
11 maggio 近况报告 好久不见,诸位可好? 前几天把果汁撒到笔记本上了,结果现在键盘都是粘的,尤其是左手小指的区域(Tab, a, Caps等),要不然就是按不下去,要不然就是按下去就不上来,希望过几天会自然恢复…… 于是今天把老戴尔打开了,发现没有想象中那么慢,看来重装系统还是有效地,re-install early, re-install often! 老戴尔有俩月没上网,今天可算赶上这拨了,更新了一堆东西。发现MSN又更新了,好像又加了不少新玩艺儿。既然溜达到这儿了,就写几句好了…… 最近事儿挺多,最重要就是老婆怀孕了,四个月多一点儿,男女还不知道,过两个星期去做超声波,到时候再向大家汇报,目前为止老婆非常健康。另外就是终于买了房子,搬进来一个多月了,目前还是空空荡荡的,家具情况是,沙发和床不需要,其他全需要,慢慢来。还有明天是汶川地震的周年祭,默哀。同时明天也是我28岁的生日,祝我生日快乐。 20 giugno 偶尔也要贴一些技术文章嘛!Rules for Developing Safety-Critical Code (From latest IEEE Computer) 节选
Author: Gerard J. Holzmann, NASA/JPL Laboratory for Reliable Software
1. Restrict all code to very simple fontrol flow constructs --do not use goto statements, setjmp or longjmp constructs, or direct or indirect recursion.
2. Give all loops a fixed upper bound.
3. Do not use dynamic memory allocation after initialization.
4. No function should be longer than what can be printed on a single sheet of paper in a standard format which one line per statement and one line per declaration.
5. The code's assertion density should average to minimally two assertions per function.
6. Declare all data objects at the smallest possible level of scope.
7. Each calling function must check the return value of nonvoid functions, and eac called function must check the validity of all parameters provided by the caller.
8. The use of the preprocessor must be limited to the inclusion of header files and simple macro definitions.
9. The use of pointers must be restricted.
10. All code must be compiled, from the first day of development, with all compiler warnings enabled at the most pedantic setting available.
=================================================================
也许我的经验还不足以让我对以上rules进行评价,不过虽然看起来很好,有些貌似不容易实现,如3 and 9,8没看懂…… -_- 以后还是多贴些code吧……这么high level的东西过几年再说…… 好久没传照片了今天传的是两个月前去西雅图的照片,主要是:租的车, Microsoft Campus, Space Needle, Pike Place Market一角, etc,.
想看帅哥的要失望了,因为帅哥在照相机后边 -_-
Enjoy
过几天传上个月我爸来的照片和上周末的照片。 |
||||
|
|