-
http://97-things.near-time.net/wiki/97-things-every-software-architect-should-know-the-book
Simplify essential complexity; diminish accidental complexity
-
Dynamic programming futures
2010-01-02
http://www.infoworld.com/d/developer-world/dynamic-programming-futures-839?page=0,0
JavaScript, Perl, PHP, Python, Ruby, and other dynamic languages are remaking the Web and bringing programming to the masses.
-
http://news.idg.no/cw/art.cfm?id=BB4D0290-1A64-67EA-E45E67380366F219
The year that loved smartphones, scripting languages, the cloud, and open source was not always kind to developers.
//In the old days, people "install software on their own machine"
-
Google's free business model, supported by advertising, has hugely disrupted news and other information services. More disruption is coming to more business categories in the early 2010s.
Is this disruption evil? The answer may depend upon worldview.
-
ruby ms word automation win32ole programming
2009-12-22
-
Watching the Alpha Geeks
2009-12-19
<<The passionate programmer>>
Alpha geeks are those supernerds who are always on the bloodiest tip of the bleeding edge, at least in their hobby activities. Tim’s assertion, which I have since observed in the wild, is that if you can find these people and see what they’re into, you can get a glimpse of what’s going to be big one or two years down the road. It’s uncanny how well this works.
http://macdevcenter.com/pub/a/mac/2002/05/14/oreilly_wwdc_keynote.html
There are always people in any field who are the most clued in to the deep trends, who seem to be playing with all the coolest stuff, and seem to have their finger in everything before most people even know about it.
Someone introduces a fundamental breakthrough, a disruptive technology, or business model that will change the nature of the game.
Hackers and "alpha geeks" push the envelope, start to use the new technology, and get more out of their systems long before ordinary users even know what's possible.
-
signed int vs unsigned int
2009-11-26
large scale c++ software design prefer signed int
Bjarne Stroustrup says, "The unsigned integer types are ideal for uses
that treat storage as a bit array. Using an unsigned instead of an int
to gain one more bit to represent positive integers is almost never a
good idea. Attempts to ensure that some values are positive by declaring
variables unsigned will typically be defeated by the implicit conversion
rules."
-
The Art in Computer Programming
2009-11-09
-
dll crt msvcrt.dll visual studio 2005
2009-10-22
http://www.itwriting.com/blog/?postid=261
http://kobyk.wordpress.com/2007/07/20/dynamically-linking-with-msvcrtdll-using-visual-c-2005/
nnd,花了好大劲
COM模块老是load出错
现在又体会到静态库的好处了
动态库看似依赖少了,其实依赖只不过是隐藏起来了。而且把问题从链接拖到了运行。
-
乱七八糟
2009-10-21
CPU其实就是一个计算机
或者,一个程序执行器
或者,一个程序解释器
CPU定义了自身的一套语言
这套语言是所有程序的基础
和所有的语言都有相似之处
是最基本,最简单的语言
几类元素
变量,数据运算,数据移动,跳转
这三种元素可以用来描述任何的程序
函数可以由跳转来实现
函数相当于数据运算
只要有了这三样,就有了基本的语言
-
Registers
2009-10-21
From <<Fundamentals of Computer Organization and Architecture>>
Registers are essentially extremely fast memory locations within the CPU that are
used to create and store the results of CPU operations and other calculations.
Two registers are essential in memory write and read operations: the memory data
register (MDR) and memory address register (MAR). The MDR and MAR are used
exclusively by the CPU and are not directly accessible to programmers.
Two main registers are involved in fetching an instruction for execution: the program
counter (PC) and the instruction register (IR). The PC is the register that contains
the address of the next instruction to be fetched. The fetched instruction is
loaded in the IR for execution. After a successful instruction fetch, the PC is updated
to point to the next instruction to be executed. In the case of a branch operation, the
PC is updated to point to the branch target instruction after the branch is resolved,
Condition registers, or flags, are used to maintain status information.
-
CPU
2009-10-21
From <<Fundamentals of Computer Organization and Architecture>>
The primary function of the CPU is to execute a set of instructions stored in the computer’s memory.
A simple CPU consists of a set of registers, an arithmetic logic unit (ALU), and a control
unit (CU).
The ALU provides the circuitry needed to perform the arithmetic, logical and shift operations demanded of the instruction set.
The control unit is the entity responsible for fetching the instruction to be executed from the main
memory and decoding and then executing it.
The CPU fetches instructions from memory, reads and writes data from and to
memory, and transfers data from and to input/output devices.
-
X86
2009-10-21
From <<Fundamentals of Computer Organization and Architecture>>
The X86 family of processors defines a number of instruction types. Using the
naming convention introduced before, these instruction types are data movement,
arithmetic and logic, and sequencing (control transfer).
-
assembly language
2009-10-15
From <<Fundamentals of Computer Organization and Architecture>>
An assembly language program is a symbolic representation of the machine language program.
Machine language is pure binary code, whereas assembly language is a direct mapping
of the binary code onto a symbolic form that is easier for humans to understand
and manage.
Converting the symbolic representation into machine language is performed
by a special program called the assembler.An assembler is a program that
accepts a symbolic language program (source) and produces its machine language
equivalent (target). In translating a program into binary code, the assembler will
replace symbolic addresses by numeric addresses, replace symbolic operation
codes by machine operation codes, reserve storage for instructions and data, and
translate constants into machine representation.
-
cpu instructions
2009-10-15
From <<Fundamentals of Computer Organization and Architecture>>
The type of instructions forming the instruction set of a machine is an indication of
the power of the underlying architecture of the machine.
Data Movement Instructions
Arithmetic and Logical Instructions
In addition to the ADD and SUBTRACT instructions, some machines
have MULTIPLY and DIVIDE instructions. These two instructions are expensive
to implement and could be substituted by the use of repeated addition or repeated
subtraction. Therefore, most modern architectures do not have MULTIPLY or
DIVIDE instructions on their instruction set.
Sequencing Instructions
Control (sequencing) instructions are used to change the sequence in which
instructions are executed. They take the form of CONDITIONAL BRANCHING
(CONDITIONAL JUMP), UNCONDITIONAL BRANCHING (JUMP), or CALL
instructions.
The CALL instructions are used to cause execution of the program to transfer to a
subroutine. A CALL instruction has the same effect as that of the JUMP in terms of
loading the PC with a new value from which the next instruction is to be executed.
However, with the CALL instruction the incremented value of the PC (to point to the
next instruction in sequence) is pushed onto the stack. Execution of a RETURN
instruction in the subroutine will load the PC with the popped value from the
stack. This has the effect of resuming program execution from the point where
branching to the subroutine has occurred.
Input/Output Instructions
Input devices are interfaced with a computer through dedicated input
ports. Computers can use dedicated addresses to address these ports.
-
addressing modes
2009-10-14
From <<Fundamentals of Computer Organization and Architecture>>
The different ways in which operands can be addressed are called the addressing
modes. Addressing modes differ in the way the address information of operands is
specified. The simplest addressing mode is to include the operand itself in the
instruction, that is, no address information is needed. This is called immediate
addressing. A more involved addressing mode is to compute the address of the
operand by adding a constant value to the content of a register. This is called indexed
addressing. Between these two addressing modes there exist a number of other
addressing modes including absolute addressing, direct addressing, and indirect
addressing.
-
one-and-half address instruction
2009-10-14
From <<Fundamentals of Computer Organization and Architecture>>
Between the two- and the one-address instruction, there can be a one-and-half
address instruction. Consider, for example, the instruction ADD B,R1. In this case,
the instruction adds the contents of register R1 to the contents of memory location
B and stores the result in register R1. Owing to the fact that the instruction uses
two types of addressing, that is, a register and a memory location, it is called a
one-and-half-address instruction. This is because register addressing needs a smaller
number of bits than those needed by memory addressing.
-
cpu instruction operation register memory
2009-10-14
From <<Fundamentals of Computer Organization and Architecture>>
Information involved in any operation performed by the CPU needs to be addressed.
In computer terminology, such information is called the operand. Therefore, any
instruction issued by the processor must carry at least two types of information.
These are the operation to be performed, encoded in what is called the op-code
field, and the address information of the operand on which the operation is to be
performed, encoded in what is called the address field.
Instructions can be classified based on the number of operands as: three-address,
two-address, one-and-half-address, one-address, and zero-address.
It should be noted that in presenting these examples, we would use the convention operation,
source, destination to express any instruction. In that convention, operation represents
the operation to be performed, for example, add, subtract, write, or read.
The source field represents the source operand(s). The source operand can be a constant,
a value stored in a register, or a value stored in the memory. The destination
field represents the place where the result of the operation is to be stored, for
example, a register or a memory location.
-
mdr mar memory cpu read write
2009-10-14
From <<Fundamentals of Computer Organization and Architecture>>
Three basic steps are needed in order for the CPU to perform a write operation
into a specified memory location:
1. The word to be stored into the memory location is first loaded by the CPU
into a specified register, called the memory data register (MDR).
2. The address of the location into which the word is to be stored is loaded by
the CPU into a specified register, called the memory address register (MAR).
3. A signal, called write, is issued by the CPU indicating that the word stored in
the MDR is to be stored in the memory location whose address in loaded in
the MAR.
It is worth mentioning that the MDR and the MAR are registers used exclusively
by the CPU and are not accessible to the programmer.
Similar to the write operation, three basic steps are needed in order to perform a
memory read operation:
1. The address of the location from which the word is to be read is loaded into
the MAR.
2. A signal, called read, is issued by the CPU indicating that the word whose
address is in the MAR is to be read into the MDR.
3. After some time, corresponding to the memory delay in reading the specified
word, the required word will be loaded by the memory into the MDR ready
for use by the CPU.
-
read write word cpu
2009-10-14
From <<Fundamentals of Computer Organization and Architecture>>
In order to be able to move a word in and out of the memory, a distinct address
has to be assigned to each word. This address will be used to determine the location
in the memory in which a given word is to be stored. This is called a memory write
operation. Similarly, the address will be used to determine the memory location
from which a word is to be retrieved from the memory. This is called a memory
read operation.
The number of bits, l, needed to distinctly address M words in a memory is given
by l = log2 M.
Alternatively, if the number of bits in the address is l, then the maximum
memory size (in terms of the number of words that can be addressed using these
l bits) is M = 2^l.
Typically, memory read and memory write operations are performed by
the central processing unit (CPU).
-
bit byte word
2009-10-14
From <<Fundamentals of Computer Organization and Architecture>> Chapter I
The (main) memory can be modeled as an array of millions of adjacent cells, each
capable of storing a binary digit (bit), having value of 1 or 0. These cells are
organized in the form of groups of fixed number, say n, of cells that can be dealt
with as an atomic entity. An entity consisting of 8 bits is called a byte. In many
systems, the entity consisting of n bits that can be stored and retrieved in and out
of the memory using one basic memory operation is called a word (the smallest
addressable entity). Typical size of a word ranges from 16 to 64 bits.
-
yahoo pipes
2009-10-08
Pipes is a powerful composition tool to aggregate, manipulate, and mashup content from around the web.
//很强大,但还不是我想要的,我需要api
-
genotype
2009-10-05
From http://www.brooklyn.cuny.edu/bc/ahp/BioInfo/GP/Definition.html
This is the "internally coded, inheritable information" carried by all living organisms. This stored information is used as a "blueprint" or set of instructions for building and maintaining a living creature. These instructions are found within almost all cells (the "internal" part), they are written in a coded language (the genetic code), they are copied at the time of cell division or reproduction and are passed from one generation to the next ("inheritable"). These instructions are intimately involved with all aspects of the life of a cell or an organism. They control everything from the formation of protein macromolecules, to the regulation of metabolism and synthesis.
-
api documentation
2009-10-05
http://techbase.kde.org/Development/Tutorials/API_Documentation
Look at the Qt documentation to get a feeling of what good apidox look like. There is a consistency of style, a thoroughness which permeates all the documentation. It is possible to learn a lot about Qt just from reading the documentation. You do not necessarily need to run the tutorial programs or read the source code of the library to find out what a parameter flags does in some method of the library. It is all spelled out for you.
http://aseigo.blogspot.com/2007/02/why-api-documentation-is-good-but-not.html
http://www.codeproject.com/KB/tips/doxysetup.aspx
-
good apis
2009-10-05
-
project management using wiki
2009-10-01
-
wav 32768.0
2009-09-29
32768 = 0x8000
16 int16 (signed integer) -32768 <= y <= +32767 -
why size_t?
2009-09-28
-
回国这码事
2009-09-21
http://www.mitbbs.com/article1/Returnee/12710533_0_1.html
发信人: XBaldwin (Baldwin), 信区: Returnee
标 题: 浙江大学海归跳楼自杀
发信站: BBS 未名空间站 (Sat Sep 19 22:19:22 2009, 美东)
刚听一朋友说,一2002年清华毕业生,Northwest University 博士5年,在美国做了两
年博士后,5月份到浙江大学建工学院工作,讲师。于前天凌晨从自己住的楼上跳下去
结束了自己年轻的生命。听说因为工作压力太大。还有一3岁的女儿,好可怜。据说浙
江大学完全封锁了消息。如果有其他消息,我会再更新。
朋友奉劝大家,在海归前请做好最坏的打算。发信人: stoneshower (stoneshower), 信区: Returnee
标 题: 音容宛然 -- 记我的本科同学
发信站: BBS 未名空间站 (Sun Sep 20 13:08:52 2009, 美东)
14年前我们一起进入清华水利系,从此成为5年同窗
2000年本科毕业后,他在清华多待了一年,拿到法律第二学士学位
然后他来了美国,西北大学
4年前我初次来美,他已经博士三四年了。
跟他和夫人,以及热心来接我的另一个本科同学一起聚餐。
他挺乐观的样子。
4个月前我去芝加哥给他饯行的时候
他依然挺乐观的样子。说浙大建工学院给了他副教授职位,口头offer
我提醒他要注意浙大可能不守承诺,可能只给他讲师职位,因为此前已有stanford海归
的前车之鉴
他说,没关系,讲师就讲师,关键是以后要好好干,处理好关系
昨天晚上,这里的好友D打电话叫我上MITBBS某版看看
我跟D提过这位同学海归到浙大的事,他觉得经历太相似
是的,经历太相似
于是我发了信给原作者
于是我赶紧联系国内也在浙江的熟人H
H同样震惊与不敢置信
几经周折终于联系到了建工学院的人
确认了是他,事情发生在三天前
MITBBS首先发帖的兄弟也回了信:sorry, 是他
具体的原因尚未可知,未曾联系到他的家人
遗书内容知道些,但未经证实
可以确认的是
他至今仍然只是“师资博士后”,连讲师都还不是
还可以确认的是
浙大现在正在进行职称评审
作为他多年的同学
我不认为“工作压力大”是主要原因
他是个喜欢工作压力,喜欢挑战自我的人
本科期间竞争激烈,他以刻苦自律而表现卓异
曾经是当之无愧的年级第一名
博士期间因为老板抢第一作者的缘故,文章都压在老板手里未曾投出
但是他未曾放弃,薄厚至今已经发了3篇一作,1篇二作,若干在审
我也不认为"家庭问题"是主要原因
他的太太,虽然接触不多,但性格并不咄咄逼人
而且为了跟他一起回国,放弃了已经到手的faculty offer
悲伤之余
写下这些
一来,纪念我的同窗兄弟
二来,为后来者鉴 -
encapsulation
2009-09-13
from <<Emergent Design>>
Maintainability is the goal—the ability to change the code without fear, without hesitation, and without feeling resistance. To work in an evolutionary style, we must see change not as an enemy, but as an ally, as a good thing, as something we are actually eager to do. That is a tall order indeed. One of our most important allies in this quest is encapsulation. Encapsulation is a fancy word for hiding. We hide one part of the system from another part of the system, and in so doing we prevent one possible place where we might do unforeseen harm. If a system is fundamentally encapsulated, we are fundamentally free to change it. If a system largely lacks encapsulation, we are not free, and thus the system cannot evolve. Although the things that follow—coupling, cohesion, and redundancy— are, in fact, the key qualities that define good (changeable) code, encapsulation is a first principle, because it guides us toward them.
