Hunter的大杂烩 技术学习笔记

2008-11-24

[转]37 Signals的实用最小主义实践

Filed under: 技术话题 — hunter @ 9:54 pm

from: http://www.infoq.com/cn/articles/37signals-small-beauty

摘自:《梦断代码

    —- 从这篇文章看,梦断代码这本书还是有一读的价值

 

尽管有那些可能性——复杂度、延误和不可预知的改动——还是有许多软件写出来、交付出去、而且最终被使用。偶尔软件会很好。在一些罕见情形下,软件的确有创新和价值。在一些案例中,还真按计划达成了目标。

(more…)

unix utils for win套装

Filed under: 技术话题 — hunter @ 8:23 pm

 

有心人为在windows下撰写linux程序的兄弟编译了一套常用unix工具集(http://unxutils.sourceforge.net/),最近为了搞脚本分析器,用了里面的flex/bison,其中bison版本太低,顺便移植了cygwin中的bison模块到里面,如有需要可以下载下面的压缩包来用:

(more…)

2008-11-13

关于c++程序编译的过程原理详解[转]

Filed under: C++,技术话题 — hunter @ 10:38 pm

原始网址:http://zengzn.blogspot.com/2008/02/boostregexhpp-lnk2005.html

加入boost/regex.hpp库后静态编译通不过的问题–LNK2005 产生原因及解决方法

许多Visual C++的使用者都碰到过LNK2005:symbol already defined和LNK1169:one or more multiply defined symbols found这样的链接错误,而且通常是在使用第三方库时遇到的。对于这个问题,有的朋友可能不知其然,而有的朋友可能知其然却不知其所以然,那么本文就试图为大家彻底解开关于它的种种疑惑。

大家都知道,从C/C++源程序到可执行文件要经历两个阶段:(1)编译器将源文件编译成汇编代码,然后由汇编器(assembler)翻译成机器指令 (再加上其它相关信息)后输出到一个个目标文件(object file,VC的编译器编译出的目标文件默认的后缀名是.obj)中;(2)链接器(linker)将一个个的目标文件(或许还会有若干程序库)链接在一起生成一个完整的可执行文件。

编译器编译源文件时会把源文件的全局符号(global symbol)分成强(strong)和弱(weak)两类传给汇编器,而随后汇编器则将强弱信息编码并保存在目标文件的符号表中。那么何谓强弱呢?编译器认为函数与初始化了的全局变量都是强符号,而未初始化的全局变量则成了弱符号。比如有这么个源文件:

extern int errorno;
int buf[2] = {1,2};
int *p;

int main()
{
return 0;
}

其中main、buf是强符号,p是弱符号,而errorno则非强非弱,因为它只是个外部变量的使用声明。

有了强弱符号的概念,我们就可以看看链接器是如何处理与选择被多次定义过的全局符号:

规则1: 不允许强符号被多次定义(即不同的目标文件中不能有同名的强符号);

规则2: 如果一个符号在某个目标文件中是强符号,在其它文件中都是弱符号,那么选择强符号;

规则3: 如果一个符号在所有目标文件中都是弱符号,那么选择其中任意一个;

(more…)

programming or algorithms:各种语言程序和算法源代码

Filed under: 技术话题 — hunter @ 10:31 pm

From August 2007, I have worked at Virginia Tech a second time.

From August 2002 to August 2007, I worked at the School of Computational Science (SCS) at Florida State University.

From August 2000 to August 2002, I worked at Iowa State University a second time.

From March 1998 to August 2000, I worked at the Pittsburgh Supercomputing Center a second time.

From January 1997 to November 1997, I worked at Bell Helicopter.

From May 1995 to December 1996, I worked at Iowa State University the first time.

From July 1992 to May 1995, I was a PhD student and postdoc under Max Gunzburger while at the Interdisciplinary Center for Applied Mathematics (ICAM) at Virginia Tech. You might be interested in Max’s mathematical genealogy.

From May 1988 to June 1992, I worked at the Pittsburgh Supercomputing Center the first time.

If you are interested in programming or algorithms, you can look at some

(more…)

2008-11-09

Google的十诫

Filed under: 技术话题 — hunter @ 12:27 am

Google的十诫
1. 一切以用户为中心,其他一切纷至沓来  Focus on the user and all else will follow.
2. 把一件事做到极致. It’s best to do one thing really, really well.
3. 快比慢好. Fast is better than slow.
4. 网络社会需要民主. Democracy on the web works.
5. 您不一定要在桌子前找答案. You don’t need to be at your desk to need an answer.
6. 不做坏事也能赚钱. You can make money without doing evil.
7. 未知的信息总是存在的. There’s always more information out there.
8. 对信息的需求无所不在. The need for information crosses all borders.
9. 不穿西装也可以严肃认真. You can be serious without a suit.
10. 仅有优秀是远远不够的. Great just isn’t good enough.  

Powered by WordPress