views:

149

answers:

3

How can you tell a normal person (i.e. your mom, grand mom, your little brother) how was the first program was written? They ask this question a lot and I really can't give an answer they can understand.

+1  A: 

Maybe you find you answer in Wikipedia: Bootstrapping. Basically its more about Compilers than on programming languages, as the very first program is written either on other machines or by hand, e.g. using Punch Cards.

nob
+7  A: 

It depends on how you define things. The first computers were programmed largely by rearranging patch-cords. Only (a little) later was memory added to produce stored-memory computers. The first programs for these were written by turning switches on or off to set 0's or 1's for a word, then (when they were all set to the right values) toggling another switch to "push" that word into memory, and setting the "current location" counter to the next memory address.

The same basic idea continued to be used for the initial boot program for quite a while after computers had memory -- e.g., once upon a time I wrote code for a Control Data mainframe that had a set of switches to toggle in the boot program (though in this case, they were on an auxiliary computer called a "PPU"). I also (again, long ago) booted a rather oddball variant of a DEC PDP-8 by toggling the boot code in on front-panel switches (and even though that was decades ago, the computer in question was already obsolete at the time).

Jerry Coffin
It's always *amazing* to hear about these early "mechanical brains". I suppose soon after having to toggle a switch for each and every bit yourself, punch-hole cards would have entered the stage... right?
stakx
One of the selling points of the IMSAI home computer, back in the mid-70s, was that the front-panel switches were flatter and easier on the fingers than the Altair's.
David Thornley
@David: yup -- and they were too. The disadvantage was that the IMSAI's switches were *right* next to each other, so it was a lot easier to fat-finger it and change the bit "next door" to the one you intended.
Jerry Coffin
@stakx:At least in my experience, Hollerith cards were used primarily for source code, and object code was normally written to a magnetic tape. The boot code was normally just enough to get the PPU to read data from a tape drive and then jump to the beginning of what it had just read. In most cases, the "system deadstart" tapes were specially formatted, with no label, blocks, etc., so all they contained was raw binary (for at least part of the tape).
Jerry Coffin
+10  A: 

Easy, send them to Ada Lovelace's wiki page. She wrote a "program" to calculate a set of Bernoulli numbers using Charles Babbage's Analytical Engine in 1843.

During a nine-month period in 1842-43, Lovelace translated Italian mathematician Luigi Menabrea's memoir on Babbage's newest proposed machine, the Analytical Engine. With the article, she appended a set of notes. The notes are longer than the memoir itself and include (Section G), in complete detail, a method for calculating a sequence of Bernoulli numbers with the Engine, which would have run correctly had the Analytical Engine ever been built. Based on this work, Lovelace is now widely credited with being the first computer programmer and her method is recognised as the world's first computer program.

T.E.D.
While this is probably a bit _too_ historical to answer the question, you get +1 from me exactly for the interesting computing history links.
stakx
@stakx: Thanks, but this pretty much **is** the answer.
T.E.D.
[email protected].:_ Just re-read the original question, and in fact you're right. This question is at least partially open to interpretation; I assumed the OP wanted to know how the first program was written, _considering that there was not yet any compiler or interpreter available_.
stakx