2006年10月16日星期一
写代码的乐趣。
前段时间,在Linux下看了一些代码和资料,也写过一些简单的“Hello World” ,但总没有正经写过一个像样的完整的程序。借着这次选修高级操作系统的机会,终于能够练练手了。
第一个作业是写一个事件驱动的磁盘仿真器,已知一个Cache两个Disk,以及一些基本参数和事件点,给定一个输入的tracefile,模拟磁盘的运行过程。
冒着工作量较大的危险,还是决定用C开发,是因为目前最喜欢C的简洁优美。
在Eclipse+CDT环境下,边玩边学地断断续续写了两天。好长时间不写程序了,噼噼啪啪敲着键盘,看着代码一行行多起来程序一点点完善,真舒服啊。
写完之后特别想和旁人交流代码,由此我觉得真正喜爱代码也是程序员钟情开源的一个因素,前提是要在喜爱的平台和编程环境下使用喜爱的语言。
第一个作业是写一个事件驱动的磁盘仿真器,已知一个Cache两个Disk,以及一些基本参数和事件点,给定一个输入的tracefile,模拟磁盘的运行过程。
冒着工作量较大的危险,还是决定用C开发,是因为目前最喜欢C的简洁优美。
在Eclipse+CDT环境下,边玩边学地断断续续写了两天。好长时间不写程序了,噼噼啪啪敲着键盘,看着代码一行行多起来程序一点点完善,真舒服啊。
写完之后特别想和旁人交流代码,由此我觉得真正喜爱代码也是程序员钟情开源的一个因素,前提是要在喜爱的平台和编程环境下使用喜爱的语言。
2006年10月13日星期五
程序员问答。
一位程序员用邮件向数位著名的程序员询问了几个相同的问题,并在Blog上贴出他们的答案。
接受询问的程序员有:
Linus Torvalds : Linux内核作者;
Dave Thomas : 许多Ruby相关等编程技术书籍的作者;
David Heinemeier Hansson : Web开发框架Rails的作者;
Steve Yegge : 知名技术博客的作者,也是游戏Wyvern的作者;
Peter Norvig : Google的技术主管,写了许多关于人工智能的书;
Guido Van Rossum : Python语言的作者;
Bjarne Stroustrup : C++语言作者;
James Gosling : Java语言作者;
Tim Bray : XML创始人之一。
所有的问题和比较好的答案:
- How did you learn programming? Were any schools of any use? Or maybe you didn’t even bother with ending any schools :) ?
- What do you think is the most important skill every programmer should posses?
: written and verbal communication skills.
: "good taste" on code, ability to communicate well what you want to do and how you are going to do it.
: a strong sense of value.
: the ability to think clearly - understand problems and express solutions.
- Do you think mathematics and/or physics are an important skill for a programmer? Why?
- What do you think will be the next big thing in computer programming? X-oriented programming, y language, quantum computers, what?
: web application programming, all related technologies need to improve gradually, open source browser first.
: large-scale distributed processing.
: coping with parallelism and complexity.
- If you had three months to learn one relativly new technology, which one would You choose?
: dojo and advanced Ajax and DHTML.
: FPGA, love the notion of playing with hardware.
: JavaScript and Flash.
: catch up on the latest in 3D rendering, photon-map renderer.
: Security, encryption, digital signatures, identity, etc.
- What do you think makes some programmers 10 or 100 times more productive than others?
: concentrate on the things that matter.
: the ability to restate hard problems to easy ones.
: the ability to fit the whole problem into their heads at one time.
- What are your favourite tools (operating system, programming/scripting language, text editor, version control system, shell, database engine, other tools you can’t live without) and why do you like them more than others?
: Unix, Ruby, Emacs, Firefox, GIMP, MySQL, Bash, SVN, Perforce.
: Unix/Linux, Python, vi+emacs, Firefox.
- What is your favourite book related to computer programming?
: SICP.
: The C Programming Language.
: Operating Systems : Design and Implementation.
: Extreme Programming Explained, Patterns of Enterprise Application Architecture.
: Programming Pearls.
- What is Your favourite book NOT related to computer programming?
: Neil Stephenson’s Quicksilver.
: Stroustrup series
- What are your favourite music bands/performers/compositors?
接受询问的程序员有:
Linus Torvalds : Linux内核作者;
Dave Thomas : 许多Ruby相关等编程技术书籍的作者;
David Heinemeier Hansson : Web开发框架Rails的作者;
Steve Yegge : 知名技术博客的作者,也是游戏Wyvern的作者;
Peter Norvig : Google的技术主管,写了许多关于人工智能的书;
Guido Van Rossum : Python语言的作者;
Bjarne Stroustrup : C++语言作者;
James Gosling : Java语言作者;
Tim Bray : XML创始人之一。
所有的问题和比较好的答案:
- How did you learn programming? Were any schools of any use? Or maybe you didn’t even bother with ending any schools :) ?
- What do you think is the most important skill every programmer should posses?
: written and verbal communication skills.
: "good taste" on code, ability to communicate well what you want to do and how you are going to do it.
: a strong sense of value.
: the ability to think clearly - understand problems and express solutions.
- Do you think mathematics and/or physics are an important skill for a programmer? Why?
- What do you think will be the next big thing in computer programming? X-oriented programming, y language, quantum computers, what?
: web application programming, all related technologies need to improve gradually, open source browser first.
: large-scale distributed processing.
: coping with parallelism and complexity.
- If you had three months to learn one relativly new technology, which one would You choose?
: dojo and advanced Ajax and DHTML.
: FPGA, love the notion of playing with hardware.
: JavaScript and Flash.
: catch up on the latest in 3D rendering, photon-map renderer.
: Security, encryption, digital signatures, identity, etc.
- What do you think makes some programmers 10 or 100 times more productive than others?
: concentrate on the things that matter.
: the ability to restate hard problems to easy ones.
: the ability to fit the whole problem into their heads at one time.
- What are your favourite tools (operating system, programming/scripting language, text editor, version control system, shell, database engine, other tools you can’t live without) and why do you like them more than others?
: Unix, Ruby, Emacs, Firefox, GIMP, MySQL, Bash, SVN, Perforce.
: Unix/Linux, Python, vi+emacs, Firefox.
- What is your favourite book related to computer programming?
: SICP.
: The C Programming Language.
: Operating Systems : Design and Implementation.
: Extreme Programming Explained, Patterns of Enterprise Application Architecture.
: Programming Pearls.
- What is Your favourite book NOT related to computer programming?
: Neil Stephenson’s Quicksilver.
: Stroustrup series
- What are your favourite music bands/performers/compositors?
2006年10月6日星期五
济南游。
千佛山、趵突泉、大明湖是济南的三大胜景,大学期间只登过千佛,没看过泉和湖。
这次来济南,一是想补上这个缺憾;二来十一将尽,不想荒废了这次假期,因此一早酒醒之后就和同学奔往泉城广场。
趵突泉公园里景点繁多,而且挨得都很近,一不小心就会错过一个。
濯缨池是一片完整的风景区,山石树木围绕着一潭湖水,还有缓缓的瀑布小溪点缀,清凉幽静。
金线泉、卧牛泉等若干小泉聚居一隅,时不时地争相吐着一串串一簇簇晶莹珍珠,惹得鱼儿摇尾撒娇。可惜摄影器材简陋、技术有限,不能拍下那种活泼灵动、沁入心脾的舒服感觉。
以前想不到趵突泉的泉水真是那么汩汩翻腾出来的,也不知道一共有三眼,每个都大如大的睡莲叶,真的有些震撼了。
据说原来泉眼大如碾盘、水柱高一尺,那又是何等壮观。真不愧称“天下第一泉”。
突然对盆景感兴趣了,原来盆景不只是土木和塑料枝叶,它是有生命的,仔细看看,你能看到绿色的、灰色的各种颜色的生命力,能看到艺术家倾注的心思和情感。拍了一个亦枯亦荣的树桩盆景:
其他还有山水盆景、树石组合盆景、微型组合盆景很多种类。
刚进大明湖的时候感觉没有什么特别,甚至免不了普通公园的俗气,在湖边摆上嘈杂的游乐场。直至走到明湖居,突然意识到这就是老残游记中老残听书的地方,不过直到现在也不知道“大珠小珠落玉盘”是什么感觉。我们没有进去,因为现在明湖居是个戏楼,要另购票,而我们对这个现代戏楼不敢抱很大希望。
通过藕神祠,到了雨荷厅,发现隔壁就是明湖居戏楼。戏楼偏门外聚集着一伙儿青年与少年,有围着石桌打扑克的,有追着打闹的,还有个小女孩在练腿功。
雨荷厅据说是乾隆某次下江南路过济南歇脚的地方,就在这个地方遇到了一见钟情的夏雨荷。至今厅前还有一个略显破旧的朱红游船“天憩舟”。一元钱一位,我们也没有上去。
我们在雨荷厅和小沧浪亭呆得时间最长,因为这两个地方有亭廊轩榭又依湖傍水,最适合休息,在廊下一坐就不想动了。

连着转了两个园子,一天下来两个人累得面如土灰、蹒跚而还。幸好订到的是明早的火车。
这次来济南,一是想补上这个缺憾;二来十一将尽,不想荒废了这次假期,因此一早酒醒之后就和同学奔往泉城广场。
趵突泉公园里景点繁多,而且挨得都很近,一不小心就会错过一个。
濯缨池是一片完整的风景区,山石树木围绕着一潭湖水,还有缓缓的瀑布小溪点缀,清凉幽静。
金线泉、卧牛泉等若干小泉聚居一隅,时不时地争相吐着一串串一簇簇晶莹珍珠,惹得鱼儿摇尾撒娇。可惜摄影器材简陋、技术有限,不能拍下那种活泼灵动、沁入心脾的舒服感觉。以前想不到趵突泉的泉水真是那么汩汩翻腾出来的,也不知道一共有三眼,每个都大如大的睡莲叶,真的有些震撼了。
据说原来泉眼大如碾盘、水柱高一尺,那又是何等壮观。真不愧称“天下第一泉”。突然对盆景感兴趣了,原来盆景不只是土木和塑料枝叶,它是有生命的,仔细看看,你能看到绿色的、灰色的各种颜色的生命力,能看到艺术家倾注的心思和情感。拍了一个亦枯亦荣的树桩盆景:
其他还有山水盆景、树石组合盆景、微型组合盆景很多种类。
刚进大明湖的时候感觉没有什么特别,甚至免不了普通公园的俗气,在湖边摆上嘈杂的游乐场。直至走到明湖居,突然意识到这就是老残游记中老残听书的地方,不过直到现在也不知道“大珠小珠落玉盘”是什么感觉。我们没有进去,因为现在明湖居是个戏楼,要另购票,而我们对这个现代戏楼不敢抱很大希望。
通过藕神祠,到了雨荷厅,发现隔壁就是明湖居戏楼。戏楼偏门外聚集着一伙儿青年与少年,有围着石桌打扑克的,有追着打闹的,还有个小女孩在练腿功。
雨荷厅据说是乾隆某次下江南路过济南歇脚的地方,就在这个地方遇到了一见钟情的夏雨荷。至今厅前还有一个略显破旧的朱红游船“天憩舟”。一元钱一位,我们也没有上去。
我们在雨荷厅和小沧浪亭呆得时间最长,因为这两个地方有亭廊轩榭又依湖傍水,最适合休息,在廊下一坐就不想动了。

连着转了两个园子,一天下来两个人累得面如土灰、蹒跚而还。幸好订到的是明早的火车。
2006年10月5日星期四
婚宴后。
订阅:
评论 (Atom)


