Wednesday 30 March 2005

项目中的交流

     觉得做项目有的时候挺有意思的。~~~尤其是在和大家一起讨论接口的时候。功能的实现和接口规范的确定的困难简直不是一个数量级的。作为一个菜鸟,要想实现功能,啃书+用GOOGLE去查代码,应该没有什么太大问题。出现了调试问题,用心DEBUG~~~,不行就轰炸认识的牛人:P,但是接口嘛,就必须和大家交流,讨论,才能使接口的定义成为一种可能。每次讨论,都要提前用心准备,才能不会被动,别人说什么就是什么。有一点自己的想法很重要。当然更重要的是要脚踏实地~~~



      用心交流,用心体会,Open-minded,从别人的角度去体谅别人,确保交流的概念一致,才有交流的可能。~~~~



      喜欢,喜欢接口~~嘿嘿

  

Wednesday 23 March 2005

程序与人品无关~~~~

   最近陷入一系列Bug中,~~无法自拔。因为两个失误的叠加的效果,令我的程序在别人的机器上“成功”的运行了,让我一度认为自己的人品有问题~~~或者自己的CLR有问题- -~~~

     

       但事实上,怎么会呢?~~~从这一点拥有如此荒谬的想法来看,我的确不是一个合格的程序员,~~~作为一个程序员,需要的是巨大的耐性,以及坚定的相信计算机就是一个无比忠诚的伙伴,它忠诚到令人发指的程度------他能够忠实体现你的一切程序的优点和BUG,只要你足够细心的去测试他们。而所谓的人品问题,不过是自己不走运---或者说是,水平不够,没有很好的发现错误所在的原因罢了~~~~~



      这个困扰了N天的BUG十分有趣,它高度的考验了我的耐性~~~。先是出现了错误,然后是在别人机器上操作失误,引入了第二个错误,然后是这两个错误的综合结果就是这个程序表面上运行正常了- - 然后我就开始开发下面的模块,偶然发现了上面两个错误中的第二个错误,第二个错误删除了,于是,第一个错误的错误结果显现了出来。经过一阵耐心的DEbug和和其他好使的程序进行对比,发现了错误的原因,fix it~~`that'sover。



    过程非常简单,但是又暴露了我的很多不好的编程习惯,或者说,人生习惯吧。

首先,过于迷信- - 。过于迷信自己的人品,嘿嘿,虽然,这只是自己的运气或者别的什么~~~

其次,不够耐心,第一个错误出现的时候,如果我能够正视它,并且耐心的Debug的话,就不过这么固执的,主观的认为是其它错误,并且走这么大的弯路了。所以,一定要耐心+客观,不要主观臆测,主观猜测是有必要的。但是不能一味的偏执的相信。要open-minded....



then??学会热爱程序吧~~,毕竟这是自己的辛勤成果。呵呵~~~



开始喜欢当一个程序员了~~


   

Tuesday 22 March 2005

程序调试终于有了一点进展了~~~

     呼呼,今天阳光明媚,昨夜大风~~~和心情一样。呵呵,~~调了两天的程序莫名其妙的出现错误。最后居然只能无奈的归结为人品问题。 - -这是何等的可笑啊~~~



     不管怎样,从15日开始计划编写这个东东,到现在有了一点点雏形。~~原以为5天写完的程序却折腾了这么久~~~,对自己的能力又更深了一层。不过,进步也是有的。~~~也算喜忧参半吧~~~发现了太多的自己的编写程序的问题,~~~要努力把它们都总结出来,下次不要再犯~~不要在相同的pitfall中跌倒。希望前面的路能够走好~~~

Sunday 20 March 2005

今天去看招聘会了~~

    似乎已经有一个星期都没有更新blog了~~但是感想的确还真不少。~无论是生活也好,学习也罢~~都有不少收获~~希望我这几天不犯懒,不会把他们丢掉,一一记述blog里面~~呵呵



    今天早上9点多路过体育馆门口~~发现招聘会的人还真是不少~~3条几百米的长队,人潮汹涌啊~~结果一大早就把小余叫过来了,她却没有能来参加, - -小小的道歉一下~~~



   下午1:30的时候,一进去就是大批大批出来的学生,连警察叔叔都不要学生证了。~~进去以后就是学生还是不少,不过大部分摊位已经人去楼空了。~~~几个比较火爆的单位依旧非常多的人。主要集中在联通和移动还有一些大连的软件公司。~~再就是一些让人望而却步的大学站台。基本上都是博士。还有几个是大熊哥以前有意向的~~呵呵,都认真参观了一下。



       总体的感觉不是特别好。不过自己需要注意的事情也是非常多的。首先一点,就是我的简历一定不要封皮。~~~封皮实在没有任何用处,还不如第一页纸的格式要一点。~~~第二,去之前一定要有目标,了解公司要招什么样的人,背景一定要打听清楚。~~否则,去了太被动。~~第三,就是要硬件条件好了。这个不用废话了。现在多学习吧。~~第四,注意仪表,我很庆幸现在终于开始注意到自己的仪表问题了。希望到时候去上海的时候不会太傻~~~



      

  

Friday 11 March 2005

刚刚看了火影忍者的125~~

      从昨天晚上就开始惦记125集了~~~,今天早上调动各方人马,终于看到了。果然不负期待~~125非常的精彩!!到目前为止,最喜欢的动漫就是火影~~,虽然早期很喜欢乱马1/2。但是与火影相比,乱马更多的是轻松,随遇而安,在危机面前显现出的爱情和随机应变。~~



      而火影则包含更多更深层次的意义。它不仅仅包含的是表层次的友谊,友谊实在是太宽泛了~~从主线上的佐助和鸣人,小浓眉悬崖勒马的我爱罗。还有胖子和鹿丸~~等等。更深一层的是这些友谊建立的来之不易。这些孤儿在心智发展的过程中,遭遇了孤独与离弃,而因此,他们的身心遭到了很大的摧残!~~而,正是一些关怀他们的人,(无论他们是否是好人,他们是真心还是利用。~~)



     想想看,人生的确如此,拼搏一生。还是为了自己的热爱,更重要的是为了自己在乎的人也能从自己身上分享幸福~~~



     看火影中那些小家伙们在自卑自弃中说的一些话,那些沮丧、放弃社会的想法~~~,就想起童年大概也是差不多大的时候,同年最灰暗的时候,也有同样的想法。嘿嘿!有的时候也会暗自庆幸,我最终没有选择那样一条路。~~也许,火影的作者对童年的孤独和那种被抛弃的感觉也是印象深刻吧~~所以才会写出那么好的作品。



      不管童年如何的想法,如何的背叛,~~~人总是要有一些追求的目标的~~就象君麻吕说的那样:“那么我存在的意义是什么呢?~~~那么就是.......”虽然他最终被人利用~~他还是找到自己存在的意义。~~~



      我仅仅希望,仅仅希望自己存在的意义是对我周围的人有帮助的~~~,能够对爱我的人有帮助,能够让他们幸福我就心满意足了......



  

Thursday 10 March 2005

时间管理读后记(四)

目标、计划、优先原则



制定激励人的目标

 

若使整个人生获得成功,就必须画一幅生活蓝图:明确工作和生活目标,并努力达到这个目标,只有这样,今天的付出才会取得明天的成功。



笛卡尔原理,进行有效的工作:

1、书面描述问题(目标,项目)

2、将整个工作分割成若干部分。

3、根据优先原则,按照时间先后顺序,将各个部分进行排列。

4、完成各个部分工作,并对结果进行检验。

  非常类似微积分,嘿嘿!~~~



你的目标是什么?

长期、中期、短期

呵呵,保密 .......



帕累托原理:



20%的时间可以产生80%的效果。



成功人士善于克制自己,他们总是把精力用于处理最重要的同时也是最困难的事情。正因为如此,他们才能比别人取得更多的成就,才能从自己的行动中获得更多的满足。~~





最重要的计划原则是形成书面文字

 



每天的时间应该分成三大部分:

60%的时间应该用于计划内的活动。

20%以外活动。

20%用于本能需求,社会活动。








Tuesday 8 March 2005

分布式系统模式笔记(四)

     N久都没有写读书记了,~~~倒不是俺最近没有学习,实在是没有时间更新,(小样!你就别为自己的不负责任推托啦~~~狂扁!·#、¥%……—)



      另外一方面,偶也有小小的忏悔,本来打算和banianMM学习一下认真感悟书的,但是无奈啊,读书笔记都写成ZZ帖子了,实在比较汗颜~~~~还有一个小小的方面就是偶发现偶帖子上面潜水人士实在多,但是却没有回帖, 0  0 好有挫败感阿。不管了,继续继续 .......



  Client  Session State   VS  Server Session State



Client 部分:



基本想法:将state保存在Client部分。而server端是stateless的。简单的有几种实现方式:

URL parameters   优点:简单实现,缺点:SIZE有限制。如果采用SessionID,需要修改URL,那么将影响一些系统的书签功能。



hidden field:在网页上面不显示。在请求和读取请求返回消息的时候存取hidden field的state,优点:比较简单。缺点:安全性差,hidden仅仅针对网页可视性而言,若察看源代码就可以看到state  = =



Cookie:缺点;cookie的安全性也不好,而且容易被IE禁用。不能完全依赖。



何时使用?



支持Stateless server,支持clustering failover,(这是client 较server 的优点。)

安全性能差,解决方案需要封装,以及拆封的过程,需要性能的Cost做代价。



Server Session state



Keep the session state on a serer system in a serialized form.



Server Session State 有很多不好的假设:

no clustering , no fail(集中管理,不支持集群)

实现中主要解决两个问题:

1、用什么形式存储?

a、二进制  优点:简单,需要存储空间小,缺点:不可读,版本控制会出现问题。

b、xml文件  

2、在哪里存储?

数据库,index by session Id



实现:

.net下的session 管理,在Web server端。




Monday 7 March 2005

President Sworn-In to Second Term

  This is my first reading of my English class~~


President Sworn-In to Second Term


      Inauguration 2005


Vice President Cheney, Mr. Chief Justice, President Carter, President Bush, President Clinton, reverend clergy, distinguished guests, fellow citizens:


On this day, prescribed by law and marked by ceremony, we celebrate the durable wisdom of our Constitution, and recall the deep commitments that unite our country. I am grateful for the honor of this hour, mindful of the consequential times in which we live, and determined to fulfill the oath that I have sworn and you have witnessed.


At this second gathering, our duties are defined not by the words I use, but by the history we have seen together. For a half century, America defended our own freedom by standing watch on distant borders. After the shipwreck of communism came years of relative quiet, years of repose, years of sabbatical - and then there came a day of fire.


We have seen our vulnerability - and we have seen its deepest source. For as long as whole regions of the world simmer in resentment and tyranny - prone to ideologies that feed hatred and excuse murder - violence will gather, and multiply in destructive power, and cross the most defended borders, and raise a mortal threat. There is only one force of history that can break the reign of hatred and resentment, and expose the pretensions of tyrants, and reward the hopes of the decent and tolerant, and that is the force of human freedom.


We are led, by events and common sense, to one conclusion: The survival of liberty in our land increasingly depends on the success of liberty in other lands. The best hope for peace in our world is the expansion of freedom in all the world.


America's vital interests and our deepest beliefs are now one. From the day of our Founding, we have proclaimed that every man and woman on this earth has rights, and dignity, and matchless value, because they bear the image of the Maker of Heaven and earth. Across the generations we have proclaimed the imperative of self-government, because no one is fit to be a master, and no one deserves to be a slave. Advancing these ideals is the mission that created our Nation. It is the honorable achievement of our fathers. Now it is the urgent requirement of our nation's security, and the calling of our time.


So it is the policy of the United States to seek and support the growth of democratic movements and institutions in every nation and culture, with the ultimate goal of ending tyranny in our world.


This is not primarily the task of arms, though we will defend ourselves and our friends by force of arms when necessary. Freedom, by its nature, must be chosen, and defended by citizens, and sustained by the rule of law and the protection of minorities. And when the soul of a nation finally speaks, the institutions that arise may reflect customs and traditions very different from our own. America will not impose our own style of government on the unwilling. Our goal instead is to help others find their own voice, attain their own freedom, and make their own way.


The great objective of ending tyranny is the concentrated work of generations. The difficulty of the task is no excuse for avoiding it. America's influence is not unlimited, but fortunately for the oppressed, America's influence is considerable, and we will use it confidently in freedom's cause.


My most solemn duty is to protect this nation and its people against further attacks and emerging threats. Some have unwisely chosen to test America's resolve, and have found it firm.


We will persistently clarify the choice before every ruler and every nation: The moral choice between oppression, which is always wrong, and freedom, which is eternally right. America will not pretend that jailed dissidents prefer their chains, or that women welcome humiliation and servitude, or that any human being aspires to live at the mercy of bullies.


We will encourage reform in other governments by making clear that success in our relations will require the decent treatment of their own people. America's belief in human dignity will guide our policies, yet rights must be more than the grudging concessions of dictators; they are secured by free dissent and the participation of the governed. In the long run, there is no justice without freedom, and there can be no human rights without human liberty.


Some, I know, have questioned the global appeal of liberty - though this time in history, four decades defined by the swiftest advance of freedom ever seen, is an odd time for doubt. Americans, of all people, should never be surprised by the power of our ideals. Eventually, the call of freedom comes to every mind and every soul. We do not accept the existence of permanent tyranny because we do not accept the possibility of permanent slavery. Liberty will come to those who love it.


Today, America speaks anew to the peoples of the world:


All who live in tyranny and hopelessness can know: the United States will not ignore your oppression, or excuse your oppressors. When you stand for your liberty, we will stand with you.


Democratic reformers facing repression, prison, or exile can know: America sees you for who you are: the future leaders of your free country.


The rulers of outlaw regimes can know that we still believe as Abraham Lincoln did: "Those who deny freedom to others deserve it not for themselves; and, under the rule of a just God, cannot long retain it."


The leaders of governments with long habits of control need to know: To serve your people you must learn to trust them. Start on this journey of progress and justice, and America will walk at your side.


And all the allies of the United States can know: we honor your friendship, we rely on your counsel, and we depend on your help. Division among free nations is a primary goal of freedom's enemies. The concerted effort of free nations to promote democracy is a prelude to our enemies' defeat.


Today, I also speak anew to my fellow citizens:


From all of you, I have asked patience in the hard task of securing America, which you have granted in good measure. Our country has accepted obligations that are difficult to fulfill, and would be dishonorable to abandon. Yet because we have acted in the great liberating tradition of this nation, tens of millions have achieved their freedom. And as hope kindles hope, millions more will find it. By our efforts, we have lit a fire as well - a fire in the minds of men. It warms those who feel its power, it burns those who fight its progress, and one day this untamed fire of freedom will reach the darkest corners of our world.


A few Americans have accepted the hardest duties in this cause - in the quiet work of intelligence and diplomacy ... the idealistic work of helping raise up free governments ... the dangerous and necessary work of fighting our enemies. Some have shown their devotion to our country in deaths that honored their whole lives - and we will always honor their names and their sacrifice.


All Americans have witnessed this idealism, and some for the first time. I ask our youngest citizens to believe the evidence of your eyes. You have seen duty and allegiance in the determined faces of our soldiers. You have seen that life is fragile, and evil is real, and courage triumphs. Make the choice to serve in a cause larger than your wants, larger than yourself - and in your days you will add not just to the wealth of our country, but to its character.


America has need of idealism and courage, because we have essential work at home - the unfinished work of American freedom. In a world moving toward liberty, we are determined to show the meaning and promise of liberty.


In America's ideal of freedom, citizens find the dignity and security of economic independence, instead of laboring on the edge of subsistence. This is the broader definition of liberty that motivated the Homestead Act, the Social Security Act, and the G.I. Bill of Rights. And now we will extend this vision by reforming great institutions to serve the needs of our time. To give every American a stake in the promise and future of our country, we will bring the highest standards to our schools, and build an ownership society. We will widen the ownership of homes and businesses, retirement savings and health insurance - preparing our people for the challenges of life in a free society. By making every citizen an agent of his or her own destiny, we will give our fellow Americans greater freedom from want and fear, and make our society more prosperous and just and equal.


In America's ideal of freedom, the public interest depends on private character - on integrity, and tolerance toward others, and the rule of conscience in our own lives. Self-government relies, in the end, on the governing of the self. That edifice of character is built in families, supported by communities with standards, and sustained in our national life by the truths of Sinai, the Sermon on the Mount, the words of the Koran, and the varied faiths of our people. Americans move forward in every generation by reaffirming all that is good and true that came before - ideals of justice and conduct that are the same yesterday, today, and forever.


In America's ideal of freedom, the exercise of rights is ennobled by service, and mercy, and a heart for the weak. Liberty for all does not mean independence from one another. Our nation relies on men and women who look after a neighbor and surround the lost with love. Americans, at our best, value the life we see in one another, and must always remember that even the unwanted have worth. And our country must abandon all the habits of racism, because we cannot carry the message of freedom and the baggage of bigotry at the same time.


From the perspective of a single day, including this day of dedication, the issues and questions before our country are many. From the viewpoint of centuries, the questions that come to us are narrowed and few. Did our generation advance the cause of freedom? And did our character bring credit to that cause?


These questions that judge us also unite us, because Americans of every party and background, Americans by choice and by birth, are bound to one another in the cause of freedom. We have known divisions, which must be healed to move forward in great purposes - and I will strive in good faith to heal them. Yet those divisions do not define America. We felt the unity and fellowship of our nation when freedom came under attack, and our response came like a single hand over a single heart. And we can feel that same unity and pride whenever America acts for good, and the victims of disaster are given hope, and the unjust encounter justice, and the captives are set free.


We go forward with complete confidence in the eventual triumph of freedom. Not because history runs on the wheels of inevitability; it is human choices that move events. Not because we consider ourselves a chosen nation; God moves and chooses as He wills. We have confidence because freedom is the permanent hope of mankind, the hunger in dark places, the longing of the soul. When our Founders declared a new order of the ages; when soldiers died in wave upon wave for a union based on liberty; when citizens marched in peaceful outrage under the banner "Freedom Now" - they were acting on an ancient hope that is meant to be fulfilled. History has an ebb and flow of justice, but history also has a visible direction, set by liberty and the Author of Liberty.


When the Declaration of Independence was first read in public and the Liberty Bell was sounded in celebration, a witness said, "It rang as if it meant something." In our time it means something still. America, in this young century, proclaims liberty throughout all the world, and to all the inhabitants thereof. Renewed in our strength - tested, but not weary - we are ready for the greatest achievements in the history of freedom.


May God bless you, and may He watch over the United States of America.


 

Thursday 3 March 2005

今天又去三院了

      为我爷爷买一种药已经去了N次了。但是下周还要去一次,又要去见刘教授。虽然她挺吓人的,但是我倒是真的挺喜欢她的。主要是因为她说话的直白和出人意料以及一针见血。因此我每次见到她都有意想不到的收获^_^。



      上次被她发现的问题是我不够果断,不会应急处理问题。所以导致她生气啦~~~~,这次呢?问题就更多了,先是我不够镇定,结果气喘吁吁的和她说话,她什么没有听懂,= = 结果我就被教训了。不过,我挺开心的,为什么她总是能这么帮助我呢?帮助我发现身上的各种弱点。然后我拿着药单开药,等了20分钟,终于开到了药。但是却找不到她了。就给她打电话,结果明明是手机,却变成家里电话了。 =  =好不容易得到知道她去门诊了。然后她,很焦急的告诉我她没有带钱。要我把药带回去。我这时候终于随机应变了。说您给我打个欠条把。我拿着药怕不保险,我在学校。于是就约好下星期继续见面。



     今天上午的事情到此结束。不过可以总结出目前我有的很多很多的缺点。首先不够镇定,给人非常慌张的印象。其次,说话不能明了,不能用最简洁的方式让人明白自己的意图。第三、打电话预约不能太提早,尽量在办事情的前一天打一遍电话。这样,办事情的人才不会忘记,才会提前有准备。嘿嘿



     希望下周再见到她的时候,不要再让她挑出什么毛病才好。~~~就算是一个提前面试的测验吧~~~~~



    ^_^


   

Wednesday 2 March 2005

分布式模式笔记(三)

Broker(代理程序)



上下文:   



许多复杂的软件系统运行在多个处理器或分布式计算机上。将软件分布在多台计算机上的原因有多种,例如:

l 分布式系统可以利用多个 CPU 或一群低成本计算机的计算能力。

l 某个软件可能仅在特定计算机上可用。

l 出于安全考虑,软件的各部分可能必须运行在不同的网段上。

l 一些服务可能是由业务合作伙伴提供的,并且只能通过 Internet 进行访问。

但是,实现分布式系统是不容易的,因为您必须处理诸如并发性、跨平台连接和不可靠网络连接之类的问题。



问题:



如何构建分布式系统以便应用程序开发人员不必关心远程通信的细节?(设计目标就是将底层的细节隐藏。)



解决方案:



使用 Broker 模式可以隐藏远程服务调用的实现细节,方法是将这些细节封装到一个与业务组件自身不同的层.(分层可以有效的解决隐藏实现细节的问题。但牺牲了灵活性和优化的能力。)





ServiceInterface可以在服务器端不必公开实现细节的情况下由服务器来提供服务。代理将完成所有数据封送和拆收、安全控制、传输通道配置和任何其他附加工作。代理将完成所有数据封送和拆收、安全控制、传输通道配置和任何其他附加工作。



服务器查找:



(目的:为了克服避免公开服务器的确切位置的问题。)



      而应当将新组件(即代理程序组件)部署在一个众所周知的位置,然后向客户端公开该位置。此后,代理程序组件负责为

客户端查找服务器。代理程序组件还会实现一个用于添加和删除服务器组件的储存库,这样就有可能在运行时添加、删除或交换服

务器组件。这种类型的功能通常称为"名称服务"。查找远程对象是企业计算中的一项常见要求。例如,Microsoft 使用 Active Directory® 目录服务。(我们的命名服务,除了应当提供这种类似的远程对象查找来适应remoting外,还需要提供web service 的创建和查找服务。

   



       代理程序驻留在一个不应该频繁更改的、众所周知的位置。已被激活并且准备接收请求的任何服务器都将向代理程序注册自己,以便下一次客户端向代理程序请求这种类型的服务器时,代理程序能够使用它。这还可能提高系统的性能和可用性,因为它使您可以拥有多个同时运行并服务于多个客户端的、完全相同的服务器组件。这种机制有时称为负载平衡。下图显示了一个这些组件之间的交互方案示例。







Tuesday 1 March 2005

时间管理读后记(三)

     两天没有写了,但是并不代表我没有按照TM的方式执行哦~~~呵呵。

昨天的时间抓得的确不是很好,感觉是第一次发现实验室来了这么多人~~,有点不习惯吧。而且自己在身体不好的情况下,不休息,却在实验室玩,感觉不太好。-  -,今天呢,总体来说还是不错的。呵呵,com+服务还有最后一章就OK了。打印了厚厚一本书,终于没有白费啊!呵呵,模式那本的进展依旧不大,不过非常有收获。它介绍的东西和我们的服务都很相似。发现原来模式这么有意义。现在看COM+的感觉就是分布式模式的标准思想。呵呵,真的有种尼奥看Matrix都是数字的感觉了。拨开现象看本质,也许就是模式的强大之处吧。不过今天看的不多,明天再来补习分布模式的笔记把。



自我测试:工作状况:挑几个自己主要的问题:

      1、有的工作时间紧迫,任务繁重,所以我常常觉得棘手,故而总是推迟,或者从未把它们完成过,因为我总是静不下心来。



(这个问题在上学期对于我来说是一个首要的问题,因为我面对压力总是选择逃避,最后不得不在滚雪球般的压力面前阵亡。)



     2、没有明确的先后次序,我总是想一口吃成一个胖子,我经常纠缠于琐事,而不能集中精力做最重要的工作。

(由于我对工作不会分出优先级,而需要掌握的资料又非常多,于是导致了这种状况,因此,一定要学会将工作分类,然后注意力集中在那些最重要的工作上面。这样才会有成效!)



    3、常常屈从于压力,我才遵守我的时间表,因为有些事情难以预料,或者我打算做的事情太多了。

    (计划没有变化快,天天做白日梦有什么意义呢??不想有关工作的任何事情,只要将项目和英语搞定就可以了。其余的事情以后再说吧)



    4、写字台上的文件堆积如山,回复与阅读需要很多时间。(资料很多,也没有分出重点,于是就被资料活活压死了 = =)



    这些是我主要的问题,主要原因有两个,一个是不会高效利用时间和资源,将他们分类。另外一个就是抗压能力非常的差。不能坚持。



    总的得分:15分,评价,“没时间计划,人云亦云,既不能驾驭自己,又不能领导他人。时间管理可以使你开始崭新又成功地生活。”



    嘿嘿,我的选择还没错。呵呵,这几天初见成效,继续努力!!