The Puzzle 谜题

作者: 安迪·赫茨菲尔德 日期: 1983年9月 人物: 安迪·赫兹菲尔德、杰罗姆·库南 主题: 软件设计、管理 概要: 关于苹果第一代Macintosh的开发以及制造它的人的轶事: 拼图桌配件引起了争议。 , 谜题 The Puzzle

The first Macintosh computer could only use one big program at a time, but it could also run smaller programs called “desk accessories” at the same time. These desk accessories shared some of the computer’s memory with the main program. Most people who wrote programs for the Macintosh used a type of computer code called “assembly language”, but I wanted to show that it was possible to write desk accessories using a different language called Pascal. So, I wrote a tiny helper program that would connect Pascal code to the Macintosh, and this showed other programmers how they could do the same thing.

第一台麦金塔电脑一次只能使用一个大程序,但它也可以同时运行称为“桌面配件”的较小程序。这些桌面配件与主程序共享一些计算机内存。大多数为 Macintosh 编写程序的人都使用一种称为“汇编语言”的计算机代码,但我想表明可以使用另一种称为 Pascal 的语言来编写桌面配件。因此,我编写了一个小型帮助程序,将 Pascal 代码连接到 Macintosh,这向其他程序员展示了如何做同样的事情。

Before, people usually put useful things on their desks, like a calculator or clock. I thought it would be good to add some fun games to the Macintosh computer too. So, I made a “15 number puzzle”. It has 15 numbers in a 4x4 grid that you need to put in the right order. You can click on a number next to the empty space, and it will move to that space. It’s a fun way to relax and get better at using the mouse.

以前,人们通常会在办公桌上放置有用的东西,例如计算器或时钟。我认为在 Macintosh 计算机上添加一些有趣的游戏也很好。于是,我做了一个“15个数字拼图”。它在 4x4 网格中有 15 个数字,您需要按正确的顺序排列。您可以单击空白区域旁边的数字,它将移动到该区域。这是一种放松并更好地使用鼠标的有趣方式。

The puzzle was written in a special code called Pascal. This meant it had to connect to another part of the code called the Pascal run-time. But this run-time brought a lot of extra code that wasn’t actually needed. This made the puzzle very large, bigger than 6,000 bytes, even though most of it was just extra code and not what we actually needed.

该谜题是用一种称为 Pascal 的特殊代码编写的。这意味着它必须连接到称为 Pascal 运行时的代码的另一部分。但这个运行时带来了许多实际不需要的额外代码。这使得谜题变得非常大,超过 6,000 字节,尽管其中大部分只是额外的代码,而不是我们实际需要的。

By the end of 1983, we needed to decide what to include in the Macintosh computer. We had shown it to many experts, and while most were excited, some didn’t understand the graphical user interface and thought it was only for fun, not for serious computer work. This made some of the people in charge of marketing a bit worried about the more playful parts of the design, like the puzzle game. They thought it might not be a good idea.

到 1983 年底,我们需要决定在 Macintosh 计算机中包含哪些内容。我们已经向许多专家展示了它,虽然大多数专家都很兴奋,但有些人不理解图形用户界面,并认为它只是为了好玩,而不是为了严肃的计算机工作。这让一些负责营销的人对设计中更有趣的部分(例如益智游戏)感到有点担心。他们认为这可能不是一个好主意。

One morning, Jerome Coonen, the person in charge of software, came to my desk to tell me that they won’t be sending out the puzzle. This was because people thought it was too much like a game, but mostly it was because it was too big. The puzzle used a lot of memory, which was a problem for the computers. Also, it took up a lot of space on the computer’s hard drive because it was written in a language called Pascal. It was so big that it took up over 6,000 units of storage space.

一天早上,软件负责人杰罗姆·库宁 (Jerome Coonen) 来到我的办公桌前告诉我,他们不会发送拼图。这是因为人们认为它太像游戏了,但主要是因为它太大了。该谜题占用大量内存,这对计算机来说是一个问题。此外,它还占用了计算机硬盘上的大量空间,因为它是用一种名为 Pascal 的语言编写的。它太大了,占据了六千多单位的存储空间。

I liked the puzzle and didn’t want to agree with the idea that it had to be a certain size. I told Jerome, “You know, the puzzle doesn’t have to be huge. I think I can make it smaller so it takes up less space. Would you still want it if it were that small, or is something else the problem?”

我喜欢这个拼图,但不想同意它必须有一定尺寸的想法。我告诉杰罗姆,“你知道,这个谜题不一定很大。我想我可以把它做得更小,这样它占用的空间就更少。如果它那么小,你还会想要它吗?还是有其他问题? ”

Jerome thought about it and said that if I could make it shorter, about 600 bytes, it would be included in the release. The problem was that I had to finish it quickly over the weekend because the manuals needed to be sent to the printer soon, and I had other tasks to complete too.

Jerome 想了想,说如果我能把它弄短一点,大约 600 字节,它就会包含在发行版中。问题是我必须在周末快速完成它,因为手册需要很快发送到打印机,而且我还有其他任务要完成。

I took a few hours on Saturday to fix the code using a basic programming language called assembly language. This made the code smaller and more efficient, which is important when you have limited space. I was happy to show my new version to everyone on Monday, and it was included in the very first release. It stayed in the code for a long time, but was updated a couple of times to make it better.

周六我花了几个小时使用一种称为汇编语言的基本编程语言来修复代码。这使得代码更小、更高效,这在空间有限时非常重要。我很高兴在周一向大家展示我的新版本,它包含在第一个版本中。它在代码中保留了很长时间,但进行了几次更新以使其变得更好。
目录