Info Guide #02 |
|
Story - The story of Mel, Hastoyaschego programmer.
This epic poem was sent to USENET by its author Ed Neserom (utastro! nather) May 21, 1983. History Mel, Real Programmers. In a recent article devoted to the courage of professional programmers, with no all sorts of ploys the author declared: "The real programmer writes only in FORTRAN. Maybe someone else is doing it in our decadent era of clarified beer pocket calculators and "user-friendliness", but in the good old days when the word "Software" sounded like something strange, but the real computer to do of drums and vacuum tubes, Real Programmers working in machine code. Not FORTRAN. Not on RATFORe. And not even on the assembler. Just machine codes. No prikrashennye, obtuse raw hexadecimal numbers. Has grown up a generation of programmers who do not know something about our glorious past. And I realized that I must fill that gap, I have to tell young people about how to write your code present Programmer. I'll call him Mel, because that was his name really is. I met Mel by going to work at the Royal MisiBi Computer Corporation, which is now no longer exists, but those days was hoo! The firm has produced LGP-30 is very small and very cheap computer (of course, by the standards of those days), which used drum memory organization, and only just starts manufacturing RPC-4000 large, advanced and faster computer and also with a drum memory. Magnetic core memory in those days was very expensive - probably why you never did and never heard anything about this company, nor on this computer. I had to write a Fortran compiler for this supercar, and Mel was my guide. He never approved of compilers. He was asking me: "Well, what good can be in a program that can not even change my code?" In hexadecimal native Mel written the most popular program of All that only existed in the company. Her run on LGP-30 on various computer trade shows, and she began to play with potential buyers in the Black Jack and always produced a sensation. At each exhibition hall around the LGP-30 crowd sellers of IBM, but we never broke their heads over so well or do not sell our computers. Mel had to rewrite his toy for RPC-4000. (Port? What is this?) In new car used for addressing the scheme "one plus one", so each machine instruction, except for the operation code and addresses the right operand input of the second address that indicated where the rotating drum recorded the following statement. In modern parlance, after each command, the operator GO TO! Zasun'te all in Pascal's pipe and smoke. Mel loved the RPC-4000 because he could optimize the code for it: he wrote machine instructions on the drum so that as soon as one completes the instructions under the read head instantly provided Next, the processor could immediately be taken for the performance of this team. Was special program that all these things, and called it "optimizing assembler", but Mel refused to use it. "You never know what address She writes the command, "- he explained me - so I had to use individual constants. It took a long time before I was able to understand his words. Since Mel knew by heart the numerical value of each team and always appoints address the team on a drum, he could have each of his instructions to use as a numerical constant. For example, he could pull out from the memory of the old manual "add" and multiply it. It is not easy would the person who would even think of to change something in his program! I compared the program debugged Mel manually, with the same programs that have gone through "optimizing assembler", and each time it appeared that the program Mela is faster. This was because in those days was not yet invented a method programming top-down "and therefore Melo did not need to use it. First he wrote the most critical internal cycles, so in the future could choose the most appropriate address on the drum. No optimizing assembler could not do so. Mel never inserted into their empty cycles for the delay, even when I had to write to the antediluvian Flexowriter, which required that at displaying symbols has always been a pause between two characters, otherwise he was choking. Mel so arranged his team in memory, that every time they needed a delay the next instruction is behind Readhead exactly one position, therefore, the drum had to make full circle, to find the correct address. He even invented a term for this procedure. We know that there are universal The term "optimal", in order to deny sometimes say, "suboptimal" or "not at all optimal "or even" not very optimal. "Mel called the maximum time delay to find the right address on the drum of "the most pessimal. Shortly after the program was put ("Even though the initialization is optimized," - he said proudly), from sales Request for change has come. For the cards and select the next card from the deck in the program used an elegant (and also optimized) random number generator and some marketoidy decided it was too too be honest - the players and the car were equalized at odds, so the potential buyers could be a loser! They demanded that Melissa, that he bit changed its prorammu, to be her stopping and using a special console switch to choose from a deck appropriate map. Then the buyer can always win! Mel balked. He felt that it will be apparent fraud and compromise him as a programmer, so he refused to do so. First Mel persuaded Chief Marketoid, then the cause took the main boss, and after that, as Mel was not scared and the owner, he made a deal to take those programmers, who went to the friends with Mel. Finally Mel surrendered. He rewrote the program and put it in a test that checks whether a switch occurred, and if the answer is yes, then the program knew how to cheat better than human when installed was a new switch, it turned out that now wins only program! Mel did not conceal delight declared: "Now everything is honest and with a haughty air refused to make any corrections. Of course, Mel retired. A week later Big Boss called me into his office and ordered to investigate the program, and Mel try to detect the test. And in the case good luck I had to throw it. That do? Poupiravshis how could I agreed - but in the end, only one study of any program of Mel did not worse than the most incredible adventure! I've always intuitively felt that Programming is an art which assess truly capable of Only he who himself is a master in this case, what are the depths of the human thought the essence of programming hidden away in long columns of numbers. You can learn a lot about a person just by reading written by the program, even a native. I realized that Mel was a genius. At first I was shocked to discover that in the main loop of the program there is no test. No test. No. Common sense suggests that there must be a cycle which turns the program may indefinitely. But nowhere is not transferred to the control of the cycle. Two weeks out of me trying to understand what was happening. Machine PPC-4000 was progressive in the times means, which is called index register. This allows the programmer to organize the cycle with Indexed instructions: each time the contents of index register was added to operand address, and it allows you to access the following data elements in the array. Each time it was necessary only increase by one the contents of the index register. But this is not Mel never used it. Instead, he pushed the instructions in register, then adds one to its address and hidden back in the memory. After that, he could carry out this change of instructions directly from the register. Cycle has been organized in such a a way that took into account the additional time spent to perform this instruction - as soon as it finishes, the next is exactly under the read head drum, ready to make it read and execute. But in This cycle was no test. The clue was in a bit, which indicates the index register is used or not. It was located between the address operands and the operation code in a word instruction. It was installed, although I knew that Mel never works with an index register, and in it all the time should be zero. When I realized vision of Mel, he blinded me with its beauty and perfection. All the data that he needed to work, it is situated in the uppermost memory addresses - the biggest addresses that were only available. And after processing the last item in the array of incrementing addresses instruction led to overflow: Bit transfer unit would add to the code of the operation, thereby altering its values, and it becomes the following in instruction set, a jump instruction. Naturally, the next instruction after it was recorded already at zero, so the program quietly jumped back. I never again saw Mel, so do not even know he was able to withstand of the current wave of innovations that make it great art in the collection of primitive shabby methods by which any more or less educated guy can cook up a working version. I would love to believe that Mel did not succumb to temptation. Being able to finally understand the structure program has no difficulty, I found it unfortunate place to check special switch. Of course, the Big Boss that I said nothing, only reported that he could not understand the program; looks like it is not surprising. When I left that company, blackjack is still starting cheat, it was worth Right click on the console switch, and I think it should be. I've never could not forgive myself if I zahachil Real Programmers code.
Similar articles:
В этот день... 24 November