跳至主要内容

Attitude


Attitude matters too
When you see the right thing, do it — this may look like more work in the short term, but it's the path of least effort in the long run. If you don't know what the right thing is, do the minimum necessary to get the job done, at least until you figure out what the right thing is.
To do the Unix philosophy right, you have to be loyal to excellence. You have to believe that software design is a craft worth all the intelligence, creativity, and passion you can muster. Otherwise you won't look past the easy, stereotyped ways of approaching design and implementation; you'll rush into coding when you should be thinking. Otherwise you'll carelessly complicate when you should be relentlessly simplifying — and then you'll wonder why your code bloats and debugging is so hard.
To do the Unix philosophy right, you have to value your own time enough never to waste it. If someone has already solved a problem once, don't let pride or politics suck you into solving it a second time rather than re-using. And never work harder than you have to; work smarter instead, and save the extra effort for when you need it. Lean on your tools and automate everything you can.
Software design and implementation should be a joyous art, a kind of high-level play. If this attitude seems preposterous or vaguely embarrassing to you, stop and think; ask yourself what you've forgotten. Why do you design software instead of doing something else to make money or pass the time? You must have thought software was worthy of your passion once....
To do the Unix philosophy right, you need to have (or recover) that attitude. You need to care. You need to play. You need to be willing to explore.
We hope you'll bring this attitude to the rest of this book. Or, at least, that this book will help you rediscover it.

评论

此博客中的热门博文

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...

Suse 开机不能进入os

接到个case。机器通电后死活进不了系统,onsite也不知道怎么进去看。 service desk只能派case到我这里。因为不能用正确的root password直接登录,所以只能另想办法。其实网上说要进入failsafe在打init=/bin/bash, 其实从个人使用后,发觉如果有failsafe以后硬盘是无法加载的,也许是因为这个机器之前的原因。 从总体上来看, 是因为硬盘出错导致没有办法做fsck。 系统提示只能手动做fsck. 按照init=/bin/bash后,进入会(none)#, 然后因为硬盘还没加载,但你可以使用大部分命令,可以run fsck.ext3然后就开始检测,这时候狂按y就成。系统检查完了,想reset root password但是这时候不能进入会提示module is unkwon...然后正常启动的时候,登录界面也没有办法得到焦点,切到ctrl+alt+f1也没办法登入。 那个郁闷啊, 这个时候只能停下来,看google。大部分的原因是因为pam不能正常工作导致的, 这点也是比较失败的地方,其实可以直接从/var/log/messages里面看到。  后来查看了一下,确实pam出问题了,但是这个问题并不是源于机器本身的pam而是vas登录的时候在/opt/quest/lib/security/pam_vas.so这个文件丢失了, 那只能先把vas全部卸掉,然后重启,在rest root password. 这个时候就成功了, 然后只需要重新安装vas就好了  -- Alex Tu ----------------------------------------------------------- ShangHai,China