黑客与画家:三

三 黑客工具和工作方法

3.1 编程

关于编译器 compiler

A compiler is a program that translates programs written in a convenient form, like the oneliner above, into the simple-minded language that the hardware understands.
 

关于解释器

An interpreter, which examines your program one piece at a time and executes the corresponding machine language commands, instead of translating the whole thing into machine language and running that.

关于源码 目标码
The high-level language that you feed to the compiler is also known as source code, and the machine language translation it generates is called object code.
 

编程语言的结构和实质

Any programming language can be divided into two parts: some set of fundamental operators that play the role of axioms, and the
rest of the language, which could in principle be written in terms of these fundamental operators.
Languages evolve slowly because they’re not really technologies.

Languages are notation. A program is a formal description of the problem you want a computer to solve for you.

So the rate of evolution in programming languages is more like the rate of evolution in mathematical notation than, say, transportation or communications.

Mathematical notation does evolve, but not with the giant leaps you see in technology.
一句话:编程语言是工具,不是技术。

Code size is important, because the time it takes to write a program depends mostly on its length.
 

关于浪费

This isn’t just something that happens with programming languages.

It’s a general historical trend. As technologies improve,each generation can do things that the previous generation would
have considered wasteful.

People thirty years ago would be astonished at how casually we make long distance phone calls.(P159)
There’s good waste, and bad waste.

I’m interested in good waste—the kind where, by spending more, we can get simpler designs.

How will we take advantage of the opportunities to waste cycles that we’ll get from new, faster hardware?(P160)
 

3.2 论文essay

关于论文

The word “essay” comes from the French verb “essayer,” which means “to try.”

An essay, in the original sense, is something you write to try to figure something out.

This happens in software too.

I think some of the best programs were essays, in the sense that the authors didn’t know when they started exactly what they
were trying to write.(P161)
 

In any academic field, there are topics that are ok to work on and others that aren’t.

Unfortunately the distinction between acceptable and forbidden topics is usually based on how intellectual the work sounds when described in research papers, rather than how important it is for getting good results.
The extreme case is probably literature; people studying literature rarely say anything that would be of the slightest use to those
producing it.(P165)
 

3.3 创业公司

关于创业公司startup

When you choose technology, you have to ignore what other people are doing, and consider only what will work best.
This is especially true in a startup.

In a big company, you can do what all the other big companies are doing.

But a startup can’t do what all the other startups do.

I don’t think a lot of people realize this, even in startups.
The average big company grows at about ten percent a year.
So if you’re running a big company and you do everything the way the average big company does it, you can expect to do as well as the average big company—that is, to grow about ten percent a year.
The same thing will happen if you’re running a startup, of course.

If you do everything the way the average startup does it, you should expect average performance.

The problem here is, average performance means you’ll go out of business.

The survival rate for startups is way less than fifty percent.  

So if you’re running a startup, you had better be doing something odd.

If not, you’re in trouble.(P171)
不走寻常路,才会有出路。

It might give us a technological edge, and we needed all the help we could get.

When we started Viaweb, we had no experience in business.

We didn’t know anything about marketing, or hiring people, or raising money, or getting customers.

Neither of us had ever even had what you would call a real job.

The only thing we were good at was writing software.

We were just able to develop software faster than anyone thought possible.

一无所有,不惧前行。

3.4 设计与研究

设计和研究的区别

The difference between design and research seems to be a question of new versus good.

Design doesn’t have to be new, but it  has to be good.

Research doesn’t have to be good, but it has to be new.

I think these two paths converge at the top: the best design surpasses its predecessors by using new ideas, and the best
research solves problems that are not only new, but worth solving.

So ultimately design and research are aiming for the same destination, just approaching it from different directions.
 

尽快出1.0

If you’re building something new, you should get a prototype in front of users as soon as possible.
The alternative approach might be called the Hail Mary strategy.

Instead of getting a prototype out quickly and gradually refining it, you try to create the complete, finished product in one
long touchdown pass.

Countless startups destroyed themselves this way during the Internet Bubble.

I’ve never heard of a case where it worked.
 

关于士气 morale

Morale is key in design.

One of my first drawing teachers told me: if you’re bored when you’re drawing something, the drawing will look boring.

 For example, suppose you have to draw a building, and you decide to draw each brick individually.

You can do this if you want, but if you get bored halfway through and start making the bricks mechanically instead of observing each one, the drawing will look worse than if you had merely suggested the bricks.
Building something by gradually refining a prototype is good for morale because it keeps you engaged.

In software, my rule is: always have working code.

If you’re writing something you’ll be able to test in an hour, you have the prospect of an immediate reward to motivate you.

The same is true in the arts, and particularly in oil painting.

 Most painters start with a blurry sketch and gradually refine it.

If you work this way, then in principle you never have to end the day with something that looks unfinished.
Indeed, there is even a saying among painters: “A painting is never finished. You just stop working on it.

This idea will be familiar to anyone who has worked on software.
 

猜你喜欢

转载自blog.csdn.net/Bluenapa/article/details/87609179