Software Architect. Learning English, French, German, and Lisp.

Thursday, September 27, 2007

Monday, September 10, 2007

Software Architecture

As a rookie software architect, it's not so easy to understand the role. What's a SW ArT's job scope, how should one participate in a project, who he/she shall contact and what kind of documents or codes shall he/she deliver?

Just some reference readings... http://docs.google.com/Doc?id=dgsp7s2q_127gsdq3

Friday, September 7, 2007

Recompile MFC 4.2

I could only say, it's horrible.

http://docs.google.com/Doc?id=dgsp7s2q_11d57qqt

Thursday, September 6, 2007

POSA1

Bought POSA5 but never finish, now browsing throught the series again, from volumn 1 to 5. There are quite some interesting things to read in even volumn 1, such as their difinition of architectural patterns and design patterns (http://www.hillside.net/patterns/books/Siemens/abstracts.html), idioms, and discuss on Patterns & Software Architecture (Chapter 6). summary: http://docs.google.com/Doc?id=dgsp7s2q_10fbtd2c .

GMAT@chasedream.com

Gathering GMAT materials, found a nice website: http://www.chasedream.com
summary: http://docs.google.com/Doc?id=dgsp7s2q_9vmdkc4

Thursday, August 30, 2007

blog reading: Cheng Meng

Cheng Meng’s Blog

01.17.2006
Graphviz
Posted in Computer and ... at 3:11 am by chengmeng
Graphviz是个画有向图的工具。直接使用的可能并不太多,但是被不少软件拿来做后端,比如从源代码生成函数调用图(可以参看这篇文章),UML类图(完全不知道是什么东西……)之类的。输入是一个文本文件(典型的Unix风格),后缀名是dot,文件描述了图中各节点的样式和节点之间的关联,然后交给graphviz处理就行了。输出可以是jpg,gif,png等等常见图形格式。下面是一个比较小儿科的例子:
















clustercrazydatastructfsm


相应的dot文件只有一行:digraph G {Hello->World}。还有一些比较复杂的图形可以去官方网站的gallery里看看。

01.17.2006
Project Euler
Posted in Computer and ... at 11:55 am by chengmeng
Project Euler和Euler其实没什么关系。说是一个Programming Exercises倒八九不离十。它提供了一系列的问题,按照官方的说法,require more than just mathematical insights to solve,但是同时你还必须会Program,否则就是mission impossible。每个题目刚给出时分值是20分,被解决的次数越多分数就越低,所以个别仅供热身或练打字的题目(例如Problem 1:Add all the natural numbers below 1000 that are multiples of 3 or 5)只有2分。另外一个特点是,所有题目都遵守“One-minute rule”,意思是,如果你有有效的算法,那么所有这些题目都能在一台过得去的电脑上在一分钟之内找出答案。我已经注册了一个账号,并作了一道(目前为止)还是19分的题目。


02.19.2006
lua 5.1发布
Posted in Computer and ... at 6:24 am by chengmeng
昨天lua 5.1 final release终于出来了。开发了三年,lua的开源社区的确非常沉得住气。而且5.1的源代码和5.0.1相比有不小的变化,起码整个代码的组织更清楚了。语言特性上,大的方面增加了module机制(庆祝),小的修补更多,比如十六进制数(到现在才加入,有点奇怪)。
我觉得如果对程序语言的实现有兴趣的话,读lua的源代码是第一选择。首先它小,相对python和ruby等语言。当然这里说的是脚本语言,但很多方面和传统的编译型语言是相通的。gcc的源码可就,基本不是一个数量级的。其二,虽然小,但该有的都有了,所谓“麻雀虽小,五脏俱全”。其三,源码是用干净的C语言写的,可移植性好的一塌糊涂(无论Win还是Linux,编译都非常顺利,直接make就行了),写得很漂亮,足为我等C语言的拥觱效法。在代码的设计和组织上,确实非常值得一看。


01.20.2006
分析函数调用图
Posted in Computer and ... at 3:25 am by chengmeng
前面写过一篇关于graphviz的帖子,说到用graphviz画函数调用图.当然,只是拿它做后端,画个图而已,分析源代码的活还得找别的家伙,像codeviz,egypt,ncc都是不错的.
codeviz 的方法是给gcc打补丁,似乎意味着要重新编译gcc,所以就不考虑了,但功能是最强的,能分析C++代码,而且比较灵活.egypt比较聪明,让gcc自己dump出rtl文件,然后用perl分析分析就得到调用关系了.我个人觉得这是个很好的办法,可以直接搬到Windows上去,只要有perl和MinGW就行了,codeviz和ncc似乎只能在Linux下应用.
再来讲讲ncc.前面说的codeviz和egypt都有把分析源代码的工作交给gcc做,所以对源代码的正确性有点要求:至少不能有语法错误,而且必要的函数声明不能少。但要求也不高,有时虽然出一堆error,照样能dump出rtl代码。ncc可谓白手起家,自己干出一个C编译器,不光分析函数调用,连变量使用什么的也一并解决了,就算源代码有错误也能分析个八九不离十.但它最后的输出不是供graphviz画图用的,作者自己用curses库写了个查看分析结果的东西(所以编译之前检查一下你的系统里有没有ncurses.h这个头文件).
给几个链接:
codeviz
egypt
ncc

Thursday, August 23, 2007

Scripting in dotnet

Oh yeah, that's the Greenspun's Tenth Rule of Programming:

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

ok, to do scripting in dotnet (C# is still C, anyway), summarize some interesting links: http://docs.google.com/Doc?id=dgsp7s2q_8qgm66z

Friday, August 10, 2007

Hello, world :)

my first blog here