2005年02月04日

blog已经迁移至http://blog.csdn.net/tp0cs

欢迎大家来光临我的新窝

2004年08月26日

KDE Project Ships New Major Release Of Leading Open Source Desktop Environment

Splash

August 19, 2004 (The Internet) – The KDE Project is pleased to announce the immediate availability of KDE 3.3, the fourth major release of the award-winning KDE3 desktop platform. Over the past six months, hundreds of applications and desktop components have been enhanced by a community of developers, with a particular focus on integration of components.

Stephan Kulow, KDE Release Coordinator, said: “The desktop reached a quality hard to top in previous releases. Nevertheless, KDE 3.3 is a great improvement and will further strengthen KDE’s position as the leading Free desktop environment.”

Building upon previous releases, version 3.3 provides an integrated desktop and a comprehensive set of applications that make KDE the most usable and feature-rich environment of its kind. Responding to the needs of their users, KDE developers have implemented an impressive range of new features, as well as several new applications that make your desktop even more productive and pleasing to use. Of note in this release are the many integration efforts, linking applications across the desktop together to save you unecessary time and effort. Stephan Kulow added that “improvements in terms of usability, stability and integration are particularly noticeable in the KDE PIM (Personal Information Management) suite.”

Reflecting its international team and focus, KDE 3.3 is currently available in over 50 different languages. Partial translations into 30 other languages are also available, many of which are expected to be completed during the KDE 3.3 life cycle. During the past six months, Qt gained increased support for Indic languages, and languages as diverse as Farsi and Frisian were added. With 89 different languages and full localization support, no other desktop is as ready to serve the needs of today’s global community.

KDE has earned a reputation for quality and a comprehensive feature set among its global user base that is estimated to number in the millions. KDE is also proud to be the default user interface for several operating systems including Ark Linux, Conectiva, Knoppix, Linspire, Lycoris, Mandrake Linux, SUSE Linux, TurboLinux and Xandros. KDE is also available as a part of Debian, Free/Open/NetBSD, Gentoo, Libranet, Fedora, Slackware and Solaris, among others. In addition to these operating system vendors, more and more companies are offering commercial support for KDE, some of which are listed in the business directory of the KDE::Enterprise website. With the release of KDE 3.3, the KDE Project looks to enhance and grow this ecosystem of users and supporters.

Highlights At A Glance

Some of the highlights in KDE 3.3 are listed below.

  • New applications
    • Kolourpaint, an easy-to-use replacement for KPaint
    • KWordQuiz, KLatin and KTurtle expand the list of education packages for schools and families
    • Kimagemapeditor and klinkstatus make life easier for web designers
    • KSpell2, a new spellchecking library that fixes all of KSpell’s shortcomings
    • KThemeManager, a new control center module to globally handle KDE visual themes
    • The Python bindings PyQT and PyKDE are now maintained with KDE in our CVS
  • Integration of desktop components
    • Kontact is now integrated with Kolab, KDE’s groupware solution, and Kpilot
    • Konqueror features better support for Instant Messenging contacts, with the capability to send files to IM contacts, and support for IM protocols (e.g. irc://)
    • KMail can display the online presence of IM contacts
    • Kopete can display a “now listening to” message from amaroK
    • Juk has support for burning audio CDs with K3B
  • Many small desktop enhancements
    • Tab improvements in Konqueror, including scrollwheel switching
    • An RSS feed viewer sidebar in Konqueror
    • A searchbar for Konqueror, compatible with all keyword: searches
    • HTML composing, anti-spam/anti-virus wizards, automatic handling of mailing lists, improved support for cryptography and a handy quick search bar all make their way into KMail
    • Kopete gains support for file transfers with Jabber
    • Quanta Plus has a VPL (Visual Page Layout) mode to make editing even easier
    • aRts gains jack support, and aKode, a new multithreaded audio decoding/encoding library to replace mpeglib
    • KWin has new buttons to support its full features, including “always on top”
    • Over 7,000 bugs have been closed, and over 2,000 wishes have been fulfilled
    • Over 60,000 lines of code, documentation and other contributions have been committed to CVS

For a more detailed list of improvements since the KDE 3.2 release, please refer to the KDE 3.3 Feature Plan.

Getting KDE 3.3

KDE 3.3 can be downloaded over the Internet by visiting download.kde.org. Source code and vendor supplied and supported binary packages are available. KDE 3.3 will also be featured in upcoming releases of various Linux and UNIX operating systems and can be purchased separately on CD-ROM. For additional information on package availability and to read further release notes, please visit the KDE 3.3 information page.

KDE is available at no cost and all source code, art and documentation is freely available under Open Source licenses. Additional third-party KDE applications can be downloaded from kde-apps.org. KDE 3.3 is also compatible with other Linux and UNIX software packages including popular Open Source applications such as Open Office and the Mozilla web browser.

Supporting KDE

KDE is supported through voluntary contributions of time, money and resources by individuals and companies from around the world. To discover how you or your company can join in and help support KDE please visit the Supporting KDE web page. There may be more ways to support KDE than you imagine, and every bit of support helps make KDE a better project and a better product for everyone. Communicate your support today with a monetary donation, new hardware or a few hours of your time!

2004年08月14日

从今晨开始,通向鼎好的一条必经之路被人莫名其妙的拦截起来。别说机动车,就连要去鼎好的行人,都只能越过栅栏才能过去。

作为鼎好的工作人员,当他们试图将阻挡在自己道路门前的栅栏撤走时,海龙的保安竟然搭起人墙,依旧不让车辆进入鼎好电子市场。

鼎好方面见不能调和,遂举出大牌子,牌子上并没有过激语言。(高举牌子,以及牌子周围的保安即鼎好方面的员工)

从另外一个角度看,两边电子市场的保安达到200人以上,场面相当壮观。

到笔者截稿时为止,海龙、鼎好以及及时赶到的公安人员还在积极协商。到底因为何种原因闹到如此地步;接下来鼎好、海龙的保安会不会发生械斗;有关部门如何解决这种问题;甚至于在日趋竞争激烈的中关村整个电子卖场群落中,如何面对类似问题再度发生,本站记者和编辑,在实地和总部正在全力奋斗,以期在最快的时间内给广大读者一个答案,敬请期待。

?

SelfDelete() is a simple Win API function for creating a self-deleting executable. It works by invoking the command shell as a serialized process to delete the program file.

The Command Shell

The command shell program is defined by the environment variable “COMSPEC”. This varies with the Windows OS: Win9x/ME use COMMAND.COM, while WinNT/2K/XP use CMD.EXE. The following string is passed to the command shell:

/c del Filename > nul

(continued)

which translates to: “Run a single command to delete a file and redirect the output to nowhere.” Filename is the full path and name of the file we want to delete. This name needs to be converted into its short 8.3 name to change any extended characters into OEM equivalents.

The command shell is started as an independent process by calling the ShellExecuteEx() function. Its process handle is defined by the SHELLEXECUTEINFO struct member “hProcess”. NOTE: The “/c” switch is necessary for the command shell process to exit. Do not omit it from the parameters string.

Serializing Processes

Self-deletion presents us with a special problem: The main program must exit and close its opened file handle before the command shell deletes the file. To do this, we must serialize two independent, parallel processes—the current program process and the command shell process. This is done by manipulating CPU resource priorities to temporarily suppress the command shell process. As written, the code will allocate all CPU resources to the main program until it exits. This effectively blocks any command shell execution until the program has terminated.

CPU Allocation

Allocating the REALTIME_PRIORITY_CLASS and THREAD_PRIORITY_TIME_CRITICAL settings can interfere with driver functions and can cause Windows to “hang” if kept in a prolonged state. To avoid these problems, a self-deleting app must exit cleanly upon a boolean return of TRUE. Developers need to make sure all ancillary processes and threads have finished and all handles are closed before calling the function. SelfDelete() should only be called at a program’s main exit:

 INT APIENTRY WinMain(...) 
{ ... 
???// on program exit 
 // close all handles etc. 
 if(!SelfDelete()) 
 { 
 // add error messaging 
 } 
 return 0; // WinMain exit 
 } 

It may be desirable to use a lower CPU allocation, such as:

 SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS); SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_HIGHEST); 

This allocation does not guarantee a complete cessation of the command shell process, but nevertheless works well.

Code Limitations

  • There is no error checking if the command shell cannot delete the file. Make sure the program file is not set with a “hidden,” “system,” or “read-only” attribute.
  • The explorer shell will always remove the program icon from view regardless of whether the command shell is able to actually delete the file. Pressing F5 will update the shell folder and correct any erroneous listings.
  • The command shell can only run a single command. Multiple commands such as to delete a file and remove its directory cannot be done without a script file.

Update

The code has been modified to work better on NT kernel computers with multiple processors. Windows allocates resources through a thread priority queue rather than by time-slicing CPU cycles. Two modifications have been made to the code:

  • The thread allocation to the program process has been increased prior to invoking the command shell process. This ensures the program process will always have priority in the resource queue. Threads created by the ShellExecuteEx function do not inherit the resource allocation of the calling process.
  • The NT kernel will transiently increase priority to whatever process is granted CPU resources. The SetProcessPriorityBoost function has been added to prevent this from happening to the command shell process.
//////////////////////////////////////////////////////// 
#include  
#include  
BOOL SelfDelete() 
{ 
 SHELLEXECUTEINFO sei; 
 TCHAR szModule [MAX_PATH], 
 szComspec[MAX_PATH], 
 szParams [MAX_PATH]; // get file path names: 
 if((GetModuleFileName(0,szModule,MAX_PATH)!=0) && 
 (GetShortPathName(szModule,szModule,MAX_PATH)!=0) && 
 (GetEnvironmentVariable("COMSPEC",szComspec,MAX_PATH)!=0)) 
 { 
 // set command shell parameters 
 lstrcpy(szParams,"/c del "); 
 lstrcat(szParams, szModule); 
 lstrcat(szParams, " > nul"); // set struct members 
 sei.cbSize = sizeof(sei); 
 sei.hwnd = 0; 
 sei.lpVerb = "Open"; 
 sei.lpFile = szComspec; 
 sei.lpParameters = szParams; 
 sei.lpDirectory = 0; 
 sei.nShow = SW_HIDE; 
 sei.fMask = SEE_MASK_NOCLOSEPROCESS; // increase resource allocation to program 
 SetPriorityClass(GetCurrentProcess(), 
 REALTIME_PRIORITY_CLASS); 
 SetThreadPriority(GetCurrentThread(), 
 THREAD_PRIORITY_TIME_CRITICAL); 
 // invoke command shell 
 if(ShellExecuteEx(&sei)) 
 { 
 // suppress command shell process until program exits 
 SetPriorityClass(sei.hProcess,IDLE_PRIORITY_CLASS); 
 SetProcessPriorityBoost(sei.hProcess,TRUE); 
 // notify explorer shell of deletion 
 SHChangeNotify(SHCNE_DELETE,SHCNF_PATH,szModule,0); 
 return TRUE; 
 } 
 else // if error, normalize allocation 
 { 
 SetPriorityClass(GetCurrentProcess(), 
 NORMAL_PRIORITY_CLASS); 
 SetThreadPriority(GetCurrentThread(), 
 THREAD_PRIORITY_NORMAL); 
 } 
 } 
 return FALSE; 
} 

Downloads

Download source – 4 Kb

2004年08月13日

第一帖 一刀两断

  

  女人初一,男人十五。幻想中的梦中情人不能成为事实,最好的结果当然是及早脱离,注意不要太伤害自尊心。感情就像一团死结,解不开的就必须剪断。”剪”一定会流血,但动作越快越利落,受伤就越轻。如果让她先向你开刀,那么受伤的当然是你!不论事情是怎样发生的,做男人的当然是不能忍受,整个人的斗志丧失,生活完全失去乐趣。但是时间能抚慰一切,几个星期后,你的伤口必须愈合,万万不要为了一个女人而躺下来等死。

 

  第二帖 一脚踢开

 

  感情破裂后,谈判是无济于事的,只能延长痛苦。假如你仍然觉得她十全十美,请仔细看看她究竟”完美”到什么地步。你把她性格中不能接受的地方列出来,把”没有她”能活得更好的理由记录下来。每次意志晕头晕脑时,将她的罪状再看一遍,别以为这样太刻薄,实在只有好处。坚定一点,将她一脚踢出你的世界!

 

  第三帖 一切如梦

 

  失恋是不是真的没有面子?事情发生后,无论是寂寞、心碎、难过,随便你觉得什么都好,但是残局总要有人收拾。不要以为失恋是没有面子的事,即使真的是你不再被爱,又何必让别人都这样认为呢?失恋没什么大不了的,更谈不上”没面子”。不能再在一起,当然要分开,应该为自己的决定感到骄傲。同时,你要坚信前一场恋爱只是一场梦,失恋才是梦醒。

 

  第四帖 一去无踪

 

  不管你是否多情,千万别为欲望诱惑。有时候你会产生幻觉,好像恶梦已过,一切又可以好起来了。假如她离去,她已经用事实表明了态度,根本不值得你花精力去改变什么。如果继续交往,你就好比泥足深陷,不能自拔。谁不知道分手后恋人的关系越深,情况就越糟?意识不坚定时,你想起她在你的泪光中掉头而去的情景了吗?

 

  第五帖 一丝不挂

 

  女人即使提出分手,她也喜欢放根线,说一句,”如果我们有缘,可能会再在一起。”你千万别上当,所谓的一线生机,简直是猪八戒说笑话。虽然你好像觉得轻松点,但其实她在做猫捉老鼠的游戏。潜台词是,你这个可怜的男人,不要沮丧、伤心,我可能有事要你的帮助呢!马上承认你们的关系已经结束。一丝不挂的胸怀,是永远的清爽。

 

  第六帖 一往无惧

 

  你要告诉自己一个真相:人经常会害怕,你在追求她的时候,你会怕失去她;你在得到她的时候,你会怕她别恋移情。当失恋的火山爆发之后,你在精神上要放松放松再放松,所谓勇气也不过如此。区区一个女人,何足怕也!

 

  第七帖 一味沉默

 

  失恋后从第一天开始,你就要决心闭嘴。虽然好心的朋友围着你,述说她的短处给你安慰。这时,你千万不要开口应和,损坏前任女友的名誉,至少不强迫自己去”否定她”。众人的怜悯只能使你的创伤更大,最严重的是你将成为被怜悯的对象。这对你的男人形象有致命的损害。假装不在乎没有什么意义,保持沉默却是石比金坚!

 

  第八帖 一生一次

 

  最后,如果你还觉得难于交待,那么就相信命运吧!几次失恋根本不足以证明什么,承认运气在恋爱中扮演重要的角色,想想你学会走路前摔了多少跤?恋爱?最后不过是一种游戏!一次失败的恋爱总比一次失败的婚姻幸运的多吧。

2004年08月11日

Introduction

One of the most common questions that get asked during interviews for C++ programmers is to explain the differences between using malloc and using new. It’s also a fairly common question in some of newsgroups and C++ forums. This article will try and explain as simply as possible how malloc and new are two entities that are essentially non-interchangeable, and there is nothing is this article that you wouldn’t find in most decent C++ programming books; but the article tries to put all the information together in a single place using simple code snippets and is targeted at newbies who might be unfamiliar as to the differences.

Constructors and Destructors

When you new an object, space for the object is not only allocated but the object’s constructor is called. And similarly when you delete an object, the object’s destructor is called before the memory is released. If you use malloc and free, the destructor and constructor do not get called respectively and obviously, this simply won’t do in C++ except in certain very rare situations where you have classes without any specific destructor/constructors.

It’s very easy to test this out by using the following test class.

class Test 
{ 
public: 
???Test() 
???{ 
??? cout << "Test : ctor\r\n"; 
??? } 
??? ~Test() 
??? { 
??? cout << "Test : dtor\r\n"; 
??? } 
??? void Hello() 
??? { 
??? cout << "Test : Hello World\r\n"; 
??? } 
};

Create, use and delete the object using new/delete as well as using malloc/free :-

int _tmain(int argc, _TCHAR* argv[]) 
{ 
 cout << "1\r\n"; 
 Test* t1 = new Test(); 
 t1->Hello(); 
 delete t1; cout << "2\r\n"; 
 Test* t2 = (Test*) malloc(sizeof Test); 
 t2->Hello(); 
 free(t2); 
 return 0; 
}

You’ll see the following output:-

1 
Test : ctor 
Test : Hello World 
Test : dtor 
2 
Test : Hello World

?

As obvious from the output, malloc/free did not result in either the destructor or the constructor being called.

Choosing constructor overloads

For non-array allocations, you can actually specify the specific overload of the constructor that you wish to use as in :- T t = new T(x, y, z); For array allocations using new, the default constructor will get used. If you attempt an array allocation on an object that does not have a default constructor, you get a compiler error :-

class Test2 
{ 
public: 
 Test2(int y) 
 { 
 } 
}; //... 
Test2* t2array = new Test2[10];

?

For example, if you attempt to compile the above snippet, you’ll get an error C2512: ‘Test2′ : no appropriate default constructor available with the VC++ 7.1 compiler.

Type-casting forced by malloc

Because malloc returns a void* the caller has to do a type-cast to get it to compile.

?
Test* t1 = new Test();

?

is so much easier to code and is a lot more readable than

?
Test* t2 = (Test*) malloc(sizeof Test);

Native types

For native types new/delete and malloc/free work the same way except for the need to type-cast in the case of malloc/free. So it’s just a matter of user preference.

//declaring native type 
int* i1 = new int; 
delete i1; 
int* i2 = (int*) malloc(sizeof(int)); 
free(i2); 
 
//declaring native type array 
char** c1 = new char*[10]; 
delete[] c1; 
char** c2 = (char**) malloc(sizeof(char)*10); 
free(c2);

Safety tip

Always delete what you new, and free what you malloc, never mix new with free or malloc with delete.

The reason for this is that if you do that, then the behavior is technically undefined because there is no guarantee that new would internally use malloc, or that delete would internally use free.

Tip for scalar and vector new/delete

Thanks to Mike Dunn for referring me to Raymond Chen’s blog on this issue. The basic point is that you should not mix scalar new with vector delete and vice versa.

Test* t = new Test[3]; 
delete t; // <-- this="" is="" very="" bad="">

The above code will result in a memory leak as only the first Test object is deleted.

?
Test* t = new Test; 
delete[] t; // <-- this="" is="" even="" worse="">

Similarly, the above code snippet is just as bad and probably worse by a good deal. The vector delete will try to delete more objects depending on the random value it gets from its object-count location and will obviously result in heap corruption.

No realloc alternative for new/delete

The new/delete couple not have a realloc alternative that is available when you use the malloc/free pair. realloc is pretty handy if you want to resize the length of an array or a memory block dynamically, specially since the contents of the array/block remain same up to the shorter of the old and new sizes. To see this in action, see the following code snippet :-

?
char* p = (char*)malloc(sizeof(char)*12); 
strcpy(p,"hello world"); 
cout << p << "\r\n"; 
p = (char*)realloc(p, sizeof(char)*24); 
strcat(p," from Nish"); 
cout << p << "\r\n"; 
free(p);

?

The output you get will be :-

hello world 
hello world from Nish

As you can see from the output, the original contents were retained. Thanks to Minox for reminding me of the realloc issue.

Conclusion

Please feel free to send in further information on new/delete/malloc/free so that I can enhance the article.

Acknowledgements

2004年08月09日

完成了!!!!

2004年08月07日

我认为有些人的观点错了。错得一塌糊涂。 
对于这个问题,我的基本观点是:任何实践都是理论的载体或表现形式。而理论也是由实践上升而来的。两者是辨证的。今天,我们只关注它的前一部分:任何实践都是理论的载体和表现形式。 
我不是想故弄玄虚,但真理的外表看上去往往就是这么奇形怪状、难以理解。让我来给你解释一下吧。 
比如:战争是军事理论的实践,也是它的表现形式。战争的胜负取决于指挥者军事理论的掌握程度(别给我举赵括这类“纸上谈兵”的反例,他们根本算不上掌握了军事理论,充其量只算是“背”下了军事理论。“掌握”和“倒背如流”这是两个概念。) 

1、VC、VB、Delphi …… ,你该学哪个? 
具体到编程而言,我要告诉你:任何一种计算机语言,都是计算机科学理论的载体或表现形式。C++很神吗?Java很酷吗?它们差距很远吗?是的。但从理论的层面上讲,它们没有区别,都是“面向对象”理论的一个具体形式而已。 
现在的程序员们被发行编译软件(通常我们将其称为“系统软件”)的商家不断推出的产品搞得眼花缭乱,头痛欲裂。不断地跟在新语言后面跑,这条路还没跑到头,那边的“新路”又鸣锣开张了,于是再跟着跑……渐渐地有些人开始感叹:学海无涯、学无止境,或什么“程序员是青春饭,过了三十别想干”…… 
在此我不得不叹息:中国的教育真是一种“形而上学”的教育。早在高中时代我们就学过“辨证唯物主义”的基本理论:做事情要抓主要矛盾。这一条恐怕谁都知道,却鲜见谁能在实践中把这一理论运用得“炉火纯青”的。把这一理论运用到编程上来讲就是: 
理论是主要矛盾,语言是次要矛盾,学会了理论,再具体到学一种语言时,你只不过是在进行某种消遣而已。 
现在学VC的普遍看不起学VB的或学Delphi的。但如果一个用Delphi的人,在需要写web程序时,用TCP/IP做了一个构架,嵌入到应用程序中;而另一个用VC的人却只会把一个又一个的组件拖来拉去的做些个“例子程序”的翻版。你说他们两个谁历害?Delphi和VC谁历害? 
真应了这样一段话,问:纽约好还是上海好?答:有钱哪儿都好,没钱哪儿都不好。上海的富人并不比纽约的富人少多少的优越感,而纽约的乞丐也不比上海的乞丐多多少幸福感。 
现在你还会说学VC的人就一定比学Delphi的人水平高、“钱景”好吗? 

2、“浅薄”绝不该是中国程序员的性格特征!!! 
想问一句:中国程序员这么多,你们真地把基础理论学好了吗?别用你现有的编程经历告诉我:编程不需要数学,不需要数据结构,不需要编译原理…… ……说话得负责任,您知道吗?我之所以发表这篇文章,就是因为再也看不下去这种在中国编程界漫延的歪理邪说了!邪教害死的是人的个体,你们害死的是中国软件业的未来!如果再让这种理论继续毒害编程新手的思想,中国将在计算机领域失去民族的尊严!!! 
请问,操作系统、编译软件、数据库系统…… 这些被称为“系统软件”的东东,中国有几样拿得出手的产品?也许是我孤陋寡闻,据我所知:我们国家一件像样的也没有。 
不错,我们是有一些网站的股票在西方上市了,我们是有一些人被国外公司请去做高级职员了,我们也有一些人把西方的官方网站给黑了……但是,我们用的编译工具是谁的产品?我们微机里装得是谁做出的操作系统?我们的程序跑在谁的芯片上? 
爱之深,恨之切。我爱的是中国,但我痛恨不是中国,而是在中国编程界普遍流行的“浅薄”和“自以为是”,这是我们民族软件业的一颗毒瘤! 
是的,现在编程方面快速入门的书满天飞,让程序员的门槛越来越低。我这个外行就得益于这个“低门槛”,跑了进来。但进来后,我们就不能再这样浅薄下去了——我的兄弟们! 
用他国提供的工具做几个网站,写几个应用程序,弄出几个病毒…… 是振兴不了民族软件业的。顺便说一句:我尊敬求伯君,但我不认为金山公司和其系列产品配得上被称为“民族软件业”的大旗,相对这个称号,它差得太远了。 
…… …… 
写flash软件的人会认为用flash做动画的人比他历害吗?Adobe公司真的认为考取Adobe证书的人是“人才”吗?MSCE、MSCD…… 通过这类考试得到微软徽章的人,在微软眼里是“人才”还是“义务推销员”?持这类证书以及其他一些大软件公司认证的人,你们还在以为自己是“中国软件业的精英”而感叹“怀才不遇”、工资太少吗? 
醒醒吧,朋友。别再用编程不需要理论的话来自欺欺人了,别再用自己的浅薄来教导别人像自己一样浅薄了。我想问问那些称数学、数据结构等基础课程对编程没用的人: 
请你们搞清一个概念:是这些理论“没用”,还是你们“没用到”;是你们“没用到”,还是你们的水平根本“用不到”;是你们“不需要用”,还是你们根本“不会用”? 
举个例子,操作系统中的工作调度,若工作优先权相同,用什么方法进行调度?当然是“先到先做”——这就是数据结构中“队列”的应用。你们说“用不到”,只怕是因为到目前为止还没机会接触这类“高端编程”的挑战吧?这样的话,那就算了,挣你的钱去,但别再来这里误人子弟,吹嘘什么优秀的程序员不需要理论。 
是谁说系统软件发展的黄金时代已经过去了?Linux不就是在MS操作系统雄霸多年的情况下一举成名的吗?中国难道就找不到这样一个机会? 不,如果我们的程序员克服了现在的浮燥与急功近利,我们一样可以在“系统软件”这一软件业的“高端”树立自己的品牌!所以请看下面—— 

3、年轻人应该有宏伟的志向。 
用别人的产品做自己的东西,你永远只是个“高级客户”,成不了真正的开发者。不管你用他国的系统软件开发出多少好的产品,挣了多少钱,只要人家一升级、或一推出新产品,你口袋里的银子连同最后一条小裤叉也会被剥夺得一干二净。你,只不过是一个高级打工仔。 
我希望打算进入编程界的朋友们,特别是现在还很年轻的朋友,能有一个比较高的志向。更希望已经进到这行的朋友们能有以“振兴民族软件业”为己任,力争成为中国软件业的“旗手”。 
我不赞同方东兴把微软骂得一无是处。更不赞同年轻人学他那样,一赌气而拒绝用微软的产品,拒绝Windows、拒绝VC 、拒绝IE …… 
我认为方东兴只是个狭隘的民族主义者。他看到了中国软件业民族的一面,却不愿承认我们落后的一面。毫无根据的“自尊”等于自取灭亡。清朝末年,我们的科技并不落后于西方多少,但我们过分“自尊”的“大国思想”却使我们失去了向其他国家学习的机会。当我们嘲笑西方人的蓝眼睛、大鼻子的时候,他们的坚船利炮,却把我们“央央大国”的皇帝、太后打得满世界逃难。慈禧太后被打得满地找牙的时候,不得不说出“量中华之物力,博与国之欢欣”的龌龊话,此时,她“大国皇太后”的自尊何在呢?前面自尊过了头,事后必遭报应。这报应一持续,就是几百年,直到现在。难道我们还要继续闭门造车,再走老路吗? 
我们现在承认微软比我们强,向微软学习,并不等于我们永远要跟在他后面跑!在我们低下头的时候,我们就应该想到,何时能再抬起这颗高贵的头颅!!!而且是“一定”!!!!!自尊不是错,错是错在“太盲目”——妄自尊大,你就要和慈禧一样被打得满地找牙。做为一个大国,一个明智的民族,我们不能讳疾忌医。 
年轻人,志当存高远。相信我,当你以民族振兴为己任的时候,封王称帝、富贵荣华,都只不过是千秋伟业的一个副产品。在这个尊重知识、崇尚科学的年代,志向高远的人,永远不必担心自己的“钱途”。 
不必讳言,我承认我当初进入编程领域不完全出于兴趣,也有“钱途”方面的考虑。但就好像当年参加八路的战士当中,有些只是报着能吃上军粮或打鬼子报家仇的思想入伍的,但后来却学习了马列,提高了觉悟,转为以兴国救民为目标一样,当我一步步深入到这行以后,当我决定考研并慢慢提高了认识以后,我的目的变了。我觉得应该有个更高的人生目标,更高志向和追求来支持我的行动。这个目标就是:为民族软件业尽一把自己的力。 
真心希望你与我同行。 

4、几点建议: 
建议大家耐下心来先学好理论,然后再选择具体的工具或语言。不过,在所有这一切开始以前,先打好C语言和汇编基础。 
能不能得道,就看你在见到别人做出一些花里胡哨的东西时,是不是能坚定信心、耐住寂寞、抵御诱惑了。 
一个和我一起学习C语言的人,学完就直接开始玩VC,而我则潜下心来学了些C++和理论方面的东西。早早地,他就能仿照书上用VC做些界面似的东西在我面前炫耀,可后来,当我基础理论的学习告一段落,做个图书管理程序卖了800大洋时,他还只是停留在做“例子程序”的水平上。现在我们谈论起编程,深度早已不可同日而语了。他起跑领先,却落在了后面。 
我不敢自以为是,只是想用这个亲身经历告诉大家:学编程,决不可心浮气燥。 
5、结束语 
我的话触到许多人的痛处,而且由于写时心中气愤难平,有些出言不逊,可能要遭人骂了。不过,既然写了,就不怕骂。因为:以上所言全是忠告,识不识货,就看您的眼光了。

2004年08月06日



今年是2004年,我开始上大学,到2009年毕业,Windows 2005估计与2005年发布,全面采用新的.net类库构造,从底层到界面全部都会变。没有api和sdk,有的只是被封装的更结实的,我们更难看到的.net类库。我们又被微软套牢了,我现在在想还跟着微软走吗。是不是要换一种更自由的,更可以发挥自己的环境了。喜欢一样东西就要研究他的地层,在windows下面我想以后不会在有什么,我在徘徊着想去换一种环境。我喜欢c++语言,讨厌c#,讨厌.net类库,我要转行,我要去linux底下,去接受一种更自由的,更宽松的开发方式,我喜欢那种随心所欲的境界,讨厌什么都被束缚。从现在看来linux的发展是十分的快,现在的linux已经从桌面到嵌入式系统开发,有很广阔的开发和就业环境,我想我这次的选择不会错,虽然我从开始到现在都一直拿不定我到底该去研究什么,希望这次我会确定了吧,我对linux一直都很喜欢,虽然我不会用,但是我还是喜欢把他安装了,就算是看着那蓝蓝的背景和哪个代表开放的企鹅都让人喜爱。我喜欢我喜欢的,linux和c++,我相信这条路我会走下去的。祝我成功吧!!!

2004年08月05日

今天作在电脑旁发呆,仔细想想自己好像已经很长时间没有编程了,最近总是很无聊,很懒,总是想着自己要去编程,要好好的把数学和英语学好,可是在学习的时候总是找这种或是那种接口不去学习,我想我真的该去好好的检讨一下了。我进大学的目的难道就只是为了在这个烂本科里面上完四年,然后毕业找个每月领到只能养活一个人的工资,连自己要买个新的电脑都得不吃早饭的地步吗?我想要不是这些,我有自己的梦想。我不要只是上这个本科,我要去考研究生,我要读博士。北京的学校好,我的目标是中科院软件研究所。为了自己的梦想,我要去努力,去奋斗。今天看了一下自己的任务。我是9月13开学,还有40天的时间,在这40天里面我要做的是《Thinking in C++》第一,二两卷。还有英语四级单词的第一遍复习,高中数学的全部复习一遍。我的任务还是很重的。我做了一下的任务安排:

时间
任务
说明
6:00-7:00
英语单词背诵和短文背诵
每天1卷单词和1篇短文
8:30-11:30
《Thinking in C++》学习
每天一章
2:30-5:30
高中数学
每天一个小专题
5:40-6:30
电脑程序实践
做上午学习的程序设计
8:00-11:00
Blog维护和朋友联系
做一些日常的处理