Oct.27, 2008
[Source: sciam.com.cn]
北京时间9月18日消息,据美国《时代》周刊报道,在20世纪的战场上,爆炸声震耳欲聋,军官们要下达命令,或者士兵之间互相交流看法,只能大声喊叫。但现在美军方刚刚批准一项投资400万美元的项目,用于开发“思想头盔”,它可以通过读取人脑电波在部队间实现安全的指令传递,并最终仅通过思维在部队系统内实现直接的思维控制。也就是说,未来在战场上,你想对谁说什么,只需要在脑子里过一下就可以了,根本不用发出声音,对方就可以“听”得一清二楚。
仅仅在几年之前,这个想法还被认为疯狂而荒诞,然而随着计算机技术的提高和科学家揭示的人类自言自语时大脑运转过程中独特的神经活动,这一设想成为可能。美国军方的最初构想是运用最先进的软件捕捉脑电波活动,并将其翻译成听得见的无线电信息,再传递给战场上的其他官兵。
美国军方负责该项目研制的神经学科学家艾尔玛.施梅瑟博士表示,“它可以称之为没有麦克风的无线广播。由于士兵们在日常训练中都要求语言表达清晰、简炼、程式化,因此很容易让他们的思维也通过这样的形式来传达。”
电影迷们可能会联想到,克林特·伊斯特伍德在1982年的影片《火狐狸》中曾使用过类似的“脑电波-微机解码器”技术,片中苏联战斗机飞行员可以用思维控制机上的武器,而伊斯特伍德就被派去窃取这架飞机。不过这项技术并不像想象的那样牵强不着边际--视频游戏迷们正在翘首以待一项全新的商业发明:位于旧金山的Emotiv公司将于2009年夏天推出一款定价为299美元的初级脑电波控制耳麦。
在这方面,美国军方的研制进程甚至还不如游戏迷们快,但它们研发的系统要复杂先进得多,至少需要十几至二十年的时间才能问世,更不要提具体应用了。今年8月签署的这份开发合同期为五年,来自加利福尼亚大学、卡内基·梅隆大学和马里兰大学的科学家们联手,开始“脑电波的解码之旅”。如果取得成功,士兵们在战场上只需在头脑中想想就可通过无线传播向周围的战友传达相关的指令和信息。开始时,会通过耳机中的机器人声音向接受指令者传达,但是科学家们希望最终能实现通过传达者的声音发送指令,并能显示出传达者的距离和接受者的方向。
在去年的合同预谈会上,美国军方曾表示,“士兵们如果掌握了不用语音的信息传达方式,将来不论在战场上还是战场伤员救治方面都意义重大,这项具有革命意义的科技进步会使无声沟通和传递成为可能,再也不受外界环境中声音和光的影响。”
研制过程中最关键的难点是开发出能精确辨别出与语言有关的脑电波的软件,到时会在士兵头盔中植入128位传感器来提取相关脑电波。这些传感器可以辨别大脑进行思维活动时由神经活动产生的瞬间电流,并据此在电脑屏幕上生成一幅脑电图,科学家们对脑电图进行研究并从中找出语言交流的关键部分。
施梅瑟博士表示,“我们认为可能通过电子计算机的运算来扼要分析脑电图,从而全部解读大脑向嘴和唇发出的指令。不幸的是这一过程可不是找到一个正确的脑电波那样简单,在语言方面并不存在黄金神经元。”
该项目首席科学家、来自加利福尼亚大学的迈克·D·祖姆拉博士表示,自己的任务无异于大海捞针,不仅要细心找寻,还要将各个元素重新排列组合,找到最后的答案。不过随着电脑的计算能力进一步改进,这些都可实时完成。还需训练使用者学会大声思考,也就是让他们在思考问题时能够在脑电图上留下有别于背景噪声的清晰明显的信号,科学家们可据此进行完全解读。最后,由于每个人的脑电图各不相同,使用“思维头盔”的人要经过训练并通过各自的思维模式,以便于电脑截取这些没说出来的指令。
科学家们要抢先剔除那些混杂于大脑中的非指令性脑电波。很多人都能通过解读无线信号,得出大脑所思所想,但反向为之却从未有人做得到。这不仅需要心甘情愿,由于人的大脑活动各不相同,还得让电脑系统能解读出人的思维,因此不可能违拗人的本意,或在他不合作的状态下完成。
另外,也不能忽视该项目潜在的用于平民领域的价值。你是不是经常会被那些对着手机大声通话的人搞得烦燥不堪呢?如果能将他们的蓝牙耳机变成蓝牙头盔,他们根本无需开口说话就能让对方明白自己的意思,也还周围的人一个清静环境。这样说来,估计连和平主义者都会支持这项军方项目了,这可是罕见的。
Sunday, October 26, 2008
Tuesday, October 21, 2008
Software Crisis
Oct.22, 2008
Introduction
The software crisis was a term used in the early days of software engineering, before it was a well-established subject. The term was used to describe the impact of rapid increases in computer power and the complexity of the problems which could be tackled. In essence, it refers to the difficulty of writing correct, understandable, and verifiable computer programs.
The crisis manifested itself in several ways:
·Unmanageable.
·Projects running over-budget.
·Projects running over-time.
·Software was of low quality.
·Software often did not meet requirements.
Causes
Basic roots: complexity, expectations, and changes.
· The causes linked to the overall complexity of the software process.
· Conflicting requirements have always hindered the software development process. Users demand a large number of features, but want to minimize the pay amount and the development time. (Details in AP?)
· The causes linked to the relative immaturity of software engineering as a profession. Software development is seen as a craft, rather than an engineering discipline. The approach to education taken by most higher education institutions encourages that "craft" mentality. (Details in AP? Immature?)
Solutions
Various processes and (Lightweight) methodologies have been developed over the last few decades to "tame" the software crisis, with varying degrees of success.
· Careful planning and actual design.
· Modern IDE tools. Generate code automatically.
· Agile software development. The use of rapid-prototyping evolved to entire lightweight methodologies, such as Extreme Programming (XP), which attempted to simplify many areas of software engineering, including requirements gathering and reliability testing for the growing, vast number of small software systems.
· High level abstraction programming languages. (Lead to new uncontrollable crisis? )
However, it is widely agreed that there is no "silver bullet"(Really?), that is, no single approach which will prevent project overruns and failures in all cases. In general, software projects which are large, complicated, poorly-specified, and involve unfamiliar aspects, are still particularly vulnerable to large, unanticipated problems.
Future
Multi-core crisis? (Really a crisis?)
Multi-core designs are forcing us to face an ugly truth, namely that we cannot continue to hide parallelism from the software designer. A compiler or runtime system will not transform sequential software, be it Windows or Linux operating system code or research or commercial application code to execute efficiently with hundred-way parallelism. This ugly truth must be faced squarely and directly.
Embedded software crisis? (Really a crisis?)
The lack of abstraction that we have in embedded software engineering makes more than 50% of all embedded software projects being later, over budget or not deliver on expectations. Adding code is easy, but removing dead code (without breaking the actually used parts of the code) is hard.
New solutions? (new methodologies & new tools &new languages?)
Introduction
The software crisis was a term used in the early days of software engineering, before it was a well-established subject. The term was used to describe the impact of rapid increases in computer power and the complexity of the problems which could be tackled. In essence, it refers to the difficulty of writing correct, understandable, and verifiable computer programs.
The crisis manifested itself in several ways:
·Unmanageable.
·Projects running over-budget.
·Projects running over-time.
·Software was of low quality.
·Software often did not meet requirements.
Causes
Basic roots: complexity, expectations, and changes.
· The causes linked to the overall complexity of the software process.
· Conflicting requirements have always hindered the software development process. Users demand a large number of features, but want to minimize the pay amount and the development time. (Details in AP?)
· The causes linked to the relative immaturity of software engineering as a profession. Software development is seen as a craft, rather than an engineering discipline. The approach to education taken by most higher education institutions encourages that "craft" mentality. (Details in AP? Immature?)
Solutions
Various processes and (Lightweight) methodologies have been developed over the last few decades to "tame" the software crisis, with varying degrees of success.
· Careful planning and actual design.
· Modern IDE tools. Generate code automatically.
· Agile software development. The use of rapid-prototyping evolved to entire lightweight methodologies, such as Extreme Programming (XP), which attempted to simplify many areas of software engineering, including requirements gathering and reliability testing for the growing, vast number of small software systems.
· High level abstraction programming languages. (Lead to new uncontrollable crisis? )
However, it is widely agreed that there is no "silver bullet"(Really?), that is, no single approach which will prevent project overruns and failures in all cases. In general, software projects which are large, complicated, poorly-specified, and involve unfamiliar aspects, are still particularly vulnerable to large, unanticipated problems.
Future
Multi-core crisis? (Really a crisis?)
Multi-core designs are forcing us to face an ugly truth, namely that we cannot continue to hide parallelism from the software designer. A compiler or runtime system will not transform sequential software, be it Windows or Linux operating system code or research or commercial application code to execute efficiently with hundred-way parallelism. This ugly truth must be faced squarely and directly.
Embedded software crisis? (Really a crisis?)
The lack of abstraction that we have in embedded software engineering makes more than 50% of all embedded software projects being later, over budget or not deliver on expectations. Adding code is easy, but removing dead code (without breaking the actually used parts of the code) is hard.
New solutions? (new methodologies & new tools &new languages?)
金融危机“捧热”马克思 《资本论》将成圣诞礼
Oct.21, 2008
[Source: sohu.com]
金融危机“捧热”《资本论》
华尔街金融危机的蔓延,让自由资本主义走入了死胡同。批判资本主义的鸿篇巨著《资本论》重新成为读者的宠儿。德国出版商预测,马克思的《资本论》将重新成为今年圣诞节最佳礼物,目前该书的销售量相比2005年已提高两倍。
读者多是青年一代
柏林卡尔-迪茨出版社社长尤尔根·施特隆普说:“现在,马克思又成为了时尚。我们看得非常清楚,现在马克思的书非常热销,我们预计到了今年年底,销量还会增加很多。因为很多人都会选择这本书做圣诞节的礼物。”
马克思的著作中,最畅销的还是他在1867年出版的《资本论》第一卷。施特隆普介绍说,现在这本书的主要读者是青年学者。因为这次金融危机的大爆发告诉青年一代,新自由主义的幸福诺言并没有兑现。
销售量提高两倍
据施特隆普透露,如今在德国,《资本论》销售量与2005年相比提高了两倍。据统计,在德国黑森地区《资本论》最为畅销。
《资本论》是马克思献给全世界无产阶级的一部最重要的科学文献。100多年前,它在世界各国广泛流传。现在随着金融危机的爆发,年轻一代的读者们再次产生了阅读这部鸿篇巨制的热情。
也正是因为《资本论》的巨大销量,英国媒体开玩笑称,如果马克思还在世的话,《资本论》的巨额版税收入会让他轻松进入福布斯富豪榜。
德国财长成马克思粉丝
现在,越来越多的德国人也准备开始了解这位一百多年前的伟大思想家。
影响力逐步扩大的德国左翼党领袖拉方丹自然是马克思的坚定信徒。因为金融危机而焦头烂额的德国现任财长施泰因布吕克,现在也开始阅读《资本论》。如今已经数个月没有睡个安稳觉的施泰因布吕克,甚至成了马克思的粉丝。
施泰因布吕克在接受德国《明镜周刊》杂志采访时说:“通常情况下,大家都承认马克思理论的相当一部分是不错的。”《汉堡晚报》则评论说:“现在马克思的魅力正在飞速增加。”
[Source: sohu.com]
金融危机“捧热”《资本论》
华尔街金融危机的蔓延,让自由资本主义走入了死胡同。批判资本主义的鸿篇巨著《资本论》重新成为读者的宠儿。德国出版商预测,马克思的《资本论》将重新成为今年圣诞节最佳礼物,目前该书的销售量相比2005年已提高两倍。
读者多是青年一代
柏林卡尔-迪茨出版社社长尤尔根·施特隆普说:“现在,马克思又成为了时尚。我们看得非常清楚,现在马克思的书非常热销,我们预计到了今年年底,销量还会增加很多。因为很多人都会选择这本书做圣诞节的礼物。”
马克思的著作中,最畅销的还是他在1867年出版的《资本论》第一卷。施特隆普介绍说,现在这本书的主要读者是青年学者。因为这次金融危机的大爆发告诉青年一代,新自由主义的幸福诺言并没有兑现。
销售量提高两倍
据施特隆普透露,如今在德国,《资本论》销售量与2005年相比提高了两倍。据统计,在德国黑森地区《资本论》最为畅销。
《资本论》是马克思献给全世界无产阶级的一部最重要的科学文献。100多年前,它在世界各国广泛流传。现在随着金融危机的爆发,年轻一代的读者们再次产生了阅读这部鸿篇巨制的热情。
也正是因为《资本论》的巨大销量,英国媒体开玩笑称,如果马克思还在世的话,《资本论》的巨额版税收入会让他轻松进入福布斯富豪榜。
德国财长成马克思粉丝
现在,越来越多的德国人也准备开始了解这位一百多年前的伟大思想家。
影响力逐步扩大的德国左翼党领袖拉方丹自然是马克思的坚定信徒。因为金融危机而焦头烂额的德国现任财长施泰因布吕克,现在也开始阅读《资本论》。如今已经数个月没有睡个安稳觉的施泰因布吕克,甚至成了马克思的粉丝。
施泰因布吕克在接受德国《明镜周刊》杂志采访时说:“通常情况下,大家都承认马克思理论的相当一部分是不错的。”《汉堡晚报》则评论说:“现在马克思的魅力正在飞速增加。”
Monday, October 20, 2008
为什么不法商家会向奶制品中加入三聚氰胺
Oct.20, 2008
[Source: sciam.com.cn]
三聚氰胺是化工原料,并无营养价值,目前价格大约是1吨12,000元人民币,制假者使用的常常是生产三聚氰胺过程中产生的废渣(含70%三聚氰胺)。在奶粉中添加三聚氰胺来冒充蛋白质,是利用了国家标准的漏洞:根据国家标准,在测定食物中的蛋白质含量时采用的是凯氏定氮法,这种方法通过灼烧样品释放其中的氮元素,测出氮的含量,再换算成蛋白质含量(因为在正常情况下,食物的主要成分中只有蛋白质含有氮)。三聚氰胺分子式为C3N3(NH2)3,含有66.6%的氮,如果把它偷加到牛奶中,在用凯式定氮法检测牛奶蛋白质含量时,就会把三聚氰胺中的氮含量也换算成了蛋白质含量,这样就虚报了蛋白质含量。
三聚氰胺可能通过两种途径被添加到奶制品中。一种是原奶兑水后,掺入三聚氰胺,这样就能骗过检测,让兑水奶的蛋白质含量也能符合国家收购鲜牛奶的标准;一种是在生产奶粉或液态奶的过程中加入三聚氰胺,让产品的蛋白质含量“达标”。
之所以被用来冒充蛋白质的另一个原因,是因为三聚氰胺是白色无味的结晶粉末,微溶于水(100毫升水可以溶解0.31克三聚氰胺),添加在液态奶和奶粉中不易察觉,并且被认为毒性较小。据1945年的试验报告,大鼠口服三聚氰胺,半致死量(能导致一半的实验对象死亡的喂食剂量)大约为每千克体重3克,和食盐相当。大剂量喂食大鼠、兔、狗,也未观察到明显的急性中毒现象。但是,三聚氰胺被摄入生物体后,由于胃酸的作用,三聚氰胺和三聚氰酸相互解离,并分别通过小肠进入血液循环,最终进入肾脏。在肾细胞中两者再次结合沉积,从而形成肾结石,堵塞肾小管,最终造成肾衰竭。2007年3月和4月,美国和南非相继发生宠物食品被三聚氰胺污染的事件,全美共有14,000份宠物肾结石或肾衰竭的报告,至少死亡4,500例。目前还未发现有成年人因为摄入三聚氰胺而形成结石,可能是因为与成人体重相比,摄入的三聚氰胺量还不足以形成结石。也可能是因为成年人的泌尿系统功能比婴儿完善,在三聚氰胺晶体变成结石之前已将其排出体外。但哺乳期的婴儿,由于食物来源单一,并且相比成年人肾脏狭小,更容易形成结石。
没有简单的办法可以鉴别混入奶制品中的三聚氰胺。要鉴别它需要用到高效液相色谱法(HPLC)、气相色谱质谱联用法(GC-MS)等高科技手段。预防三聚氰胺结石的可靠办法是尽量避免摄入三聚氰胺。如果曾经长期、大量服用过掺入三聚氰胺的奶制品,通过多饮水、勤排尿等方法,有可能把三聚氰胺晶体排出体外。
[Source: sciam.com.cn]
三聚氰胺是化工原料,并无营养价值,目前价格大约是1吨12,000元人民币,制假者使用的常常是生产三聚氰胺过程中产生的废渣(含70%三聚氰胺)。在奶粉中添加三聚氰胺来冒充蛋白质,是利用了国家标准的漏洞:根据国家标准,在测定食物中的蛋白质含量时采用的是凯氏定氮法,这种方法通过灼烧样品释放其中的氮元素,测出氮的含量,再换算成蛋白质含量(因为在正常情况下,食物的主要成分中只有蛋白质含有氮)。三聚氰胺分子式为C3N3(NH2)3,含有66.6%的氮,如果把它偷加到牛奶中,在用凯式定氮法检测牛奶蛋白质含量时,就会把三聚氰胺中的氮含量也换算成了蛋白质含量,这样就虚报了蛋白质含量。
三聚氰胺可能通过两种途径被添加到奶制品中。一种是原奶兑水后,掺入三聚氰胺,这样就能骗过检测,让兑水奶的蛋白质含量也能符合国家收购鲜牛奶的标准;一种是在生产奶粉或液态奶的过程中加入三聚氰胺,让产品的蛋白质含量“达标”。
之所以被用来冒充蛋白质的另一个原因,是因为三聚氰胺是白色无味的结晶粉末,微溶于水(100毫升水可以溶解0.31克三聚氰胺),添加在液态奶和奶粉中不易察觉,并且被认为毒性较小。据1945年的试验报告,大鼠口服三聚氰胺,半致死量(能导致一半的实验对象死亡的喂食剂量)大约为每千克体重3克,和食盐相当。大剂量喂食大鼠、兔、狗,也未观察到明显的急性中毒现象。但是,三聚氰胺被摄入生物体后,由于胃酸的作用,三聚氰胺和三聚氰酸相互解离,并分别通过小肠进入血液循环,最终进入肾脏。在肾细胞中两者再次结合沉积,从而形成肾结石,堵塞肾小管,最终造成肾衰竭。2007年3月和4月,美国和南非相继发生宠物食品被三聚氰胺污染的事件,全美共有14,000份宠物肾结石或肾衰竭的报告,至少死亡4,500例。目前还未发现有成年人因为摄入三聚氰胺而形成结石,可能是因为与成人体重相比,摄入的三聚氰胺量还不足以形成结石。也可能是因为成年人的泌尿系统功能比婴儿完善,在三聚氰胺晶体变成结石之前已将其排出体外。但哺乳期的婴儿,由于食物来源单一,并且相比成年人肾脏狭小,更容易形成结石。
没有简单的办法可以鉴别混入奶制品中的三聚氰胺。要鉴别它需要用到高效液相色谱法(HPLC)、气相色谱质谱联用法(GC-MS)等高科技手段。预防三聚氰胺结石的可靠办法是尽量避免摄入三聚氰胺。如果曾经长期、大量服用过掺入三聚氰胺的奶制品,通过多饮水、勤排尿等方法,有可能把三聚氰胺晶体排出体外。
Friday, October 10, 2008
String Operation Functions Implementation in C++
Oct.11, 2008
// Concatenate source to the end of dest
char* strcat(char* dest, const char* source, int flag)
{
assert( dest!=NULL && source!=NULL );
char* address=dest;
while(*dest) dest++;
while(*dest++ = *source++);
return address;
}
// Copy source to dest
char* strcpy(char *dest, const char *source, int flag)
{
assert( dest!=NULL && source!=NULL );
char* address=dest;
while(*dest++ = *source++);
return address;
}
// Compare str1 to str2
int strcmp(const char *str1, const char *str2, int flag)
{
for( ; *str1==*str2; str1++, str2++)
if(*str1=='\0') return 0;
return *str1 - *str2;
}
// Return the length of str
int strlen(const char *str, int flag)
{
int i=0; while(*str++) i++;
return i;
}
// Convert the string to the lowercase
char* strlwr(char *str, int flag)
{
assert( str!=NULL );
char* address=str;
while( (int)*str>=(int)'A' && (int)*str<=(int)'Z' )
(*str++)+=32;
return address;
}
// Convert the string to the uppercase
char* strupr(char *str, int flag)
{
assert( str!=NULL );
char* address=str;
while( (int)*str>=(int)'a' && (int)*str<=(int)'z' )
(*str++)-=32;
return address;
}
Reference:
The C programming Language.
Best Practice for programmer interview.
Internet.
// Concatenate source to the end of dest
char* strcat(char* dest, const char* source, int flag)
{
assert( dest!=NULL && source!=NULL );
char* address=dest;
while(*dest) dest++;
while(*dest++ = *source++);
return address;
}
// Copy source to dest
char* strcpy(char *dest, const char *source, int flag)
{
assert( dest!=NULL && source!=NULL );
char* address=dest;
while(*dest++ = *source++);
return address;
}
// Compare str1 to str2
int strcmp(const char *str1, const char *str2, int flag)
{
for( ; *str1==*str2; str1++, str2++)
if(*str1=='\0') return 0;
return *str1 - *str2;
}
// Return the length of str
int strlen(const char *str, int flag)
{
int i=0; while(*str++) i++;
return i;
}
// Convert the string to the lowercase
char* strlwr(char *str, int flag)
{
assert( str!=NULL );
char* address=str;
while( (int)*str>=(int)'A' && (int)*str<=(int)'Z' )
(*str++)+=32;
return address;
}
// Convert the string to the uppercase
char* strupr(char *str, int flag)
{
assert( str!=NULL );
char* address=str;
while( (int)*str>=(int)'a' && (int)*str<=(int)'z' )
(*str++)-=32;
return address;
}
Reference:
The C programming Language.
Best Practice for programmer interview.
Internet.
Subscribe to:
Posts (Atom)