Margaret Hamilton, lead software engineer, Project Apollo
threefingeredfox.net
threefingeredfox.net
Incidentally, when you post articles like this, please don't use a title that makes it sound like an obituary.
Fortunately there is a lot of work in progress to improve the situation.
Did you mean they're not in wide use?
Where are the toolchains, IDEs, libs, etc for those?
I haven't used Idris, but as a proof assistant, Coq is one of the best computer games I know[1]. As a programming language, it's a very good proof assistant.[2]
[1] Really! It's fun. I've found the resulting proofs impossible to read, though. The closest description I can make is that they're programs for a stack machine; reading those is not a skill I've developed.
[2] All of the dependently typed languages, like Coq, that I've seen have not been very good programming languages, in my opinion. Except for ATS, which I don't think is a good programming language for different reasons. But I really like it, anyway.
Yeah, that's why I'm looking at Idris - it seems like the only one that's oriented towards practical programming. I did eventually get it installed, but it's tough going doing anything with it when you don't know Haskell tbh.
Whether you like ATS or not, it's very oriented towards practical programming. Also, ATS mostly looks bad IMO because of the style the author uses.
I still haven't fully formed an opinion on ATS though. Idris does seem really cool and stuff like enforcing time/space usage through the type system excites me.
ATS is based on ML (the author started with Dependent ML), but the code has a very imperative feel, leading to statements like "let () = expr() in ..." and "let x = ... in ()".
The stuff at http://www.ats-lang.org/Examples.html is just hideous, by the way.
----------------- Copying File ----------------
Authors version:
fun
fcopy (
inp: FILEref
, out: FILEref
) : void = let
val c = fileref_getc (inp)
in
if c >= 0 then let
val () = fileref_putc (out, c) in fcopy (inp, out)
end // end of [if]
end (* end of [fcopy] *)
-----------------
Naieve Fibonacci
----------------My version:
fun fcopy (
inp: FILEref,
out: FILEref
) : void = let
val c = fileref_getc (inp)
in
if c >= 0 then let
val () = fileref_putc (out, c) in fcopy (inp, out)
end
end
Authors version: fun
fib (
n: int
) : int =
if n >= 2 then fib (n-2) + fib (n-1) else n
My Version (not sure if valid!): fun fib ( n: int ) :
int = if n >= 2 then fib (n-2) + fib (n-1) else n
-----------------
Fast Fibonacci
----------------Authors Version:
fun
fibc (
n: int
) : int = let
fun loop (n: int, f0: int, f1: int) =
if n > 0 then loop (n-1, f1, f0+f1) else f0
// end of [loop]
in
loop (n, 0, 1)
end // end of [fibc]
My Version: fun fibc ( n: int ) : int =
let
fun loop (n: int, f0: int, f1: int) =
if n > 0 then loop (n-1, f1, f0+f1) else f0
in
loop (n, 0, 1)
end
0: http://www.ats-lang.org/Examples.htmlThis old article (2009) has a lot more details on this old sociological phenemonon:
http://homes.soic.indiana.edu/nensmeng/files/ensmenger-gende...
The author has a whole blog about this topic:
My first two programming teachers- in college and in high school- were both women who were also professional programmers at previous jobs.
It was a prestigeous job, as the computer was seen to clearly be the herald of a new age. The personal computer revolution was really significant. It was a job for smart, mathematically inclined people.
I think programming is seen as a lower status job now than it was then. Now programmers are subservient to ignorant business people (When the reality is, its much easier for use to learn business than them to program.)
I think in the past women were more likely to be programmers because the profession didn't have a gender stigma. Because men were more likely to have picked out a profession, and women who entered college without a specific degree plan were more likely to pick this one up.
And frankly, I've never seen a problem with women programmers. I've worked with women programmers at every job where there were more than 10 programmers, and they haven't been seen as deserving, or treated with less respect... this goes back to the 1980s.
I would like you to back up your assertion that the "only reason" they were involved was low status. That paper you linked to is fallacious beyond belief. You may disagree with my anecdotes below, but he's merely giving us his spin on an article. (So he's not only anecdotal, but derivative.)
That's barely in the 1980's or late 1970's, well after the events being described in the articles I mentioned.
Can you contest that Von Neumann considered programming a clerical job?
> That paper you linked to is fallacious beyond belief.
Well, I suppose I would have to read his citations too, to check if they were all lies as well.
Brilliant scientist. World-class ego.
It's not like STEM software today like the codebase of ATLAS for example, is give much praise in the public eye. It's simply overshadowed by the larger more ambitious project that it was part of. This was the case back then as well.
Her site has a pretty neat article called "Inside development before the fact":
> Today's traditional system engineering and software development environments support their users in "fixing wrong things up" rather than in "doing them right in the first place". Things happen too late, if at all. Systems are of diminished quality and an unthinkable amount of dollars is wasted. This becomes apparent when analyzing the major problems of system engineering and software development.
Also a cool paper she wrote:
> The key to software reliability is to design, develop, and manage software with a formalized methodology which can be used by computer scientists and applications engineers to describe and communicate interfaces between systems. These interfaces include: software to software; software to other systems; software to management; as well as discipline to discipline within the complete software development process. The formal methodology of Higher Order Software (HOS), specifically aimed toward large-scale multiprogrammed/multiprocessor systems, is dedicated to systems reliability. With six axioms as the basis, a given system and all of its interfaces is defined as if it were one complete and consistent computable system. Some of the derived theorems provide for: reconfiguration of real-time multiprogrammed processes, communication between functions, and prevention of data and timing conflicts.
http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=170233...
And some NASA work related to HIOS: http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/1975001...
> She was all of 31 when the Apollo 11 lunar module landed on the moon, running her code. (Apollo 11 was able to land at all only because she designed the software robustly enough to handle buffer overflows and cycle-stealing.)
You could read that paragraph in several ways. Back then, accomplishing something like that at 31 seems precocious. Today, in the hype about 18-year-olds becoming millionare-startup founders, she sounds like a late bloomer of a programmer.
I will look up the story in Kranz's autobiography when I get home tonight.
But by the time the alarm went off the second time on descent, it was completely different. Someone - whoever was in overall charge - called a role (something like "descent control officer") and that person responded "go", all within one second.
But, yes, it wasn't a problem because the priority scheduling recovered from this problem, and that recovery was a really big deal.
The amazing thing is that Garman was the only one to have a quick reference of the various error (numeric) codes.
You have to be careful interpreting something like that. Without the backstory, you run the risk of projecting your own emotions onto the events.
Mission Control was actually not very worried about the program alarms. According to Gene Kranz in his memoirs, the white team had been fed a program alarm during a pre-flight simulation. In fact, it was the last simulation they ran through before launch, so it was fresh in their minds.
During the simulation, Mission Control incorrectly called an abort. During the debrief, the instructors told them that the program alarm was non-fatal, and they should have continued to a lunar landing.
During the actual lunar landing, Mission Control was astonished to run into the same scenario. It was like running through the simulation a second time.
> But by the time the alarm went off the second time on descent, it was completely different. Someone - whoever was in overall charge - called a role (something like "descent control officer") and that person responded "go", all within one second.
Neil Armstrong did have to ask twice, but he did get a response from Mission Control on the first alarm. Mission Control did not ignore the first alarm.
The delay was caused by having to consult a list of fatal and non-fatal program alarms. Once they had that list, it was easy to call a Go on subsequent program alarms. However, they couldn't just give a Go to the first alarm without checking the list.
Armstrong and Aldrin hadn't participated in that earlier simulation, so they were probably a lot more worried than Mission Control was!
Here is the transcript with references to Kranz's book: http://www.hq.nasa.gov/alsj/a11/a11.landing.html
Incredible.
Apollo Guidance Computer History Project, Margaret Hamilton's introduction:
http://authors.library.caltech.edu/5456/1/hrst.mit.edu/hrs/a...
"Many of the things I was intrigued by had to do with how to make the mission software safe and reliable. And one of the things I remember trying very hard to do was to get permission to be able to put more error detection and recovery into the software. So that if the astronaut made a mistake, the software would come back and say "You can't do that." But we were forbidden to put that software in because it was more software to debug, to work with. So one of the things that we were really worried about is what if the astronaut made a mistake -- We were also told that the astronauts would never make any mistakes, because they were trained never to make mistakes. (Laughter)
So we were very worried that what if the astronaut, during mid-course, would select pre-launch, for example? Never would happen, they said. Never would happen. (Laughter) It happened."
She also mentions her companies:
"So since that time, the theory has evolved and now I actually lost the first company to venture capital people, and started a second company called Hamilton Technologies."
The link to the second:
http://en.wikipedia.org/wiki/Margaret_Hamilton_%28scientist%...
Also, she was interviewed in "Moon Machines" episode three, about the nav computer.
Check out some of the Apollo 11 code for the Lunar Module's (LM) Apollo Guidance Computer (AGC). It's just awesome browsing through it, reading the comments, and thinking about the zeitgeist of being on a team that was working on something of that world-altering magnitude.
Code Library:
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
KALMAN_FILTER.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
LAMBERT_AIMPOINT_GUIDANCE.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
LANDING_ANALOG_DISPLAYS.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
LUNAR_LANDING_GUIDANCE_EQUATIONS.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
- - -
Incredible quote:
"There was no second chance. We all knew that. We took our work very seriously, but we were young, many of us in our 20s. Coming up with new ideas was an adventure. Dedication and commitment were a given. Mutual respect was across the board. Because software was a mystery, a black box, upper management gave us total freedom and trust. We had to find a way and we did. Looking back, we were the luckiest people in the world; there was no choice but to be pioneers; no time to be beginners." - Margaret Hamilton
- - -
Edit: OK, this is interesting. Note the filename. The filename and comments suggest that it was for driving keyboard and information display...
PINBALL_GAME_BUTTONS_AND_LIGHTS.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Lum...
Artemis072/ASSEMBLY_AND_OPERATION_INFORMATION.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Art...
Artemis072/SERVICER207.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Art...
Comanche055/CONTRACT_AND_APPROVALS.agc
https://code.google.com/p/virtualagc/source/browse/trunk/Com...
---
An overview of the code:
KALMAN FILTER USER'S PAGE NO. 1
http://www.ibiblio.org/apollo/ScansForConversion/Luminary099...
KALMAN FILTER USER'S PAGE NO. 2
http://www.ibiblio.org/apollo/ScansForConversion/Luminary099...
In turn the main source of navigation information came from mission control using least squares. A source on that would be nice too!
I can't make heads or tails of the assembler listing either. The specific thing I would look for in the assembler code is the division operation which is required to find the Kalman gain. I don't see it.
But, the anecdote about the Kalman filters use in this setting is well-known. (E.g., search for "Apollo" in http://ieeecss.org/CSM/library/2010/june10/11-HistoricalPers...)
The amazing thing from my point of view is not the implementation. It is rather that the theory, which was quite novel at the time, was only understood and published in 1960/61. To have it used in a flight system, and indeed a manned flight system, only 8 years later is really incredible.
// and the following section is where we attempt to land on the Moon
No, we think they're pretty neat too :-)
Margaret's role is a role model.