Ada Lovelace Cracks the Code
Page 3
“Is it right to call it a thinking machine?” Mary asked, peering at it curiously.
“It’s not actually thinking,” Ada said thoughtfully. “A person still has to enter the numbers. This machine is simply doing the work of sorting out the answer.”
Charles looked at Ada, blinking in surprise that she had understood his Difference Engine so well. “That’s correct, Miss Byron.”
“When will it be finished?” she asked, unable to take her eyes off the machine.
“Who knows,” Charles said, shrugging. “My foolish engineer quit, and the British government won’t fund it.”
“You’re not giving up, are you?” Ada looked up in alarm.
“Never,” Charles replied with a wink. “Though there are many people who would be relieved if I did.”
CHAPTER SEVEN
Ada sat at her harp, practicing her favorite song. As she struck each chord, she imagined the sound as its own shape floating from the strings into the air and dancing above her head. She thought a lot about music these days and even more about Charles Babbage’s machine. It was as if the clicking wheels of the Difference Engine were now spinning in her own mind, working through a problem whose solution would be more exciting than any she had found before.
There was a knock at the door. A footman appeared holding a silver tray piled with letters and invitations. Ada noticed her name scrawled in unfamiliar handwriting and plucked it from the pile. She read it quickly, and immediately seized a pen from the desk to write back, happily accepting Charles Babbage’s invitation to join him for tea.
~
“Good Lord, doesn’t he have a housekeeper?” Ada’s mother whispered as they stepped into Charles’s parlor. In the light of day, the inventor’s house looked far more suited to science experiments than fancy parties. Sketches and drawings cluttered the tables. Even more crumpled pieces of paper were strewn across the floor.
Ada was disappointed to see the Difference Engine sitting unchanged on its table. She asked Charles whether he’d made progress on it since they’d last met.
“No, no, of course not.” Charles waved Ada’s question away. “I suspect I’ll be working on it forever. No, I’ve set it aside for now. Another idea has come to me, one that makes my Difference Engine look dull by comparison. Look.” He picked a sheet of crumpled paper off the carpet and smoothed it out on the table.
Ada wasn’t sure what she was looking at. Babbage’s drawings were sloppy, his handwriting nearly unreadable. But she thought she could make out a diagram of a new machine.
“What on earth is that, Mr. Babbage?” Annabella asked skeptically.
“It’s my greatest idea yet.” Charles’s face shone with excitement. “The Difference Engine can calculate mathematical tables, certainly. But this machine can do far more. I call it the Analytical Engine. It will be the size of a small train. I’ll need several thousand cogwheels, I’m not sure just how many yet, and it will be controlled by a series of punch cards—”
“Like the Jacquard loom!” Ada blurted out. She could still picture the amazing machine in the loud textile mill.
“Exactly! And with the punch cards, the number of operations the engine can perform are limited only to the number of cards we can create. Every calculation will be performed the same way, every time. It has excited me more than any other project! It feels like I’m walking across a bridge from the known world to an unknown one. I have no idea what I’ll find once I’m there, but I am curious about where the path will lead.”
~
Later, when Ada and her mother were at home, Annabella wrinkled her nose in disapproval. “Mr. Babbage is a brilliant man, and I agree that his Difference Engine is an intriguing and highly practical machine. But this Analytical Engine doesn’t make sense. Babbage himself doesn’t seem to know how it works.”
“That’s what makes it exciting! It’s the seed of an idea. I don’t blame him for not being able to think about anything else,” Ada replied.
“Is that because your thoughts are consumed with it as well?” Annabella asked with a raised eyebrow. “Ada, I am pleased to see your progress in math, and delighted by your friendship with Mrs. Somerville. But it’s time to turn your thoughts to your future. To marriage.”
“Marriage to whom, exactly? That man you had me sit next to at that one dinner party—Lord What’s-His-Name? I talked about math to him for nearly forty-five minutes, and he hardly said a word. I’m not sure he even knew what geometry was. And that awful ball the week before . . . I asked every dance partner his favorite equation, and not one had a decent answer. Can you imagine spending a lifetime with someone like that?”
“It is possible that, over the course of a lifetime, you’ll find something to talk about other than numbers.” Annabella had the hint of a smile on her lips. “There is a ball next week, Ada. A gentleman will be present that you should meet. Mrs. Somerville herself has invited you, and I’ve written to accept the invitation on your behalf.”
Ada took a deep breath. It was something she’d learned long ago to stop her from saying something she might regret. “Very well, Mother,” she said.
~
The ball was as dull as Ada imagined. The hostess, Lady Philips, looked disapprovingly at Ada’s dress, and Ada noticed how she emphasized the “Byron” part of her name in each introduction. It was as though Ada was only worth talking to because of her famous father.
Ada hid a yawn of boredom behind her fan. If the ball ended early enough, she might be able to finish the problem she’d been working on at home.
Lady Philips approached, practically dragging a young man behind her. “Miss Byron, may I introduce you to Lord William King?”
“Just ‘William’ will do.” William bent to kiss Ada’s hand, and she blushed. The face that looked back at her when he lifted his head was quite nice to look at.
“It is a pleasure to meet you, Miss Byron. Lady Philips tells me that you are interested in mathematics. I am as well, although a different sort. I am interested in architecture. I appreciate the curves of an arch all the more when I can work out the calculations behind it. Sometimes during services at my church, I’m distracted trying to understand the angles of the steeple. It’s an odd hobby, I know.”
“Not odd at all,” said Ada.
“It’s a beautiful church,” William went on. “I would love to show it to you one day.”
Ada met his eyes and smiled. “I think I might like that very much.”
The next morning Ada sat with a blank piece of paper and a nervous feeling in the pit of her stomach. She tapped her fingers on the desk, wrote a few lines, then scratched them out, and crumpled the paper, hurling it toward the fireplace. She reached for a fresh sheet of paper, took a deep breath, and tried again.
Dear Lord King,
I thought to myself after we met last night how few young men would talk with so much feeling about their country church. I admire your enthusiasm.
She moved on to the next line before she lost her nerve.
It was the first of many letters Ada wrote to William, who replied kindly and thoughtfully. He seemed to remember every detail, asking about her health if she mentioned having a cold, or if she’d enjoyed a lecture she was planning to attend. He shared details of life in his countryside home as well, until it felt as familiar to her as a place she’d already been. By the time he wrote to invite her for a horseback ride on his estate, Ada could see herself living alongside him there.
Ada went for her visit and when they returned from their horseback ride, her cheeks were pink and shining. William had asked her a very important question. Ada had said yes.
~
Two months later, Ada stepped into the drawing room at her mother’s home wearing a dress of cream silk. Annabella quietly wiped away tears, but Ada noticed only William, standing by the priest at the front of the room. She walked carefully toward him.
“The rings, please,” the priest said.
Ada heard a tinkling sound beh
ind her and turned to look. There, sauntering up the aisle, was Puff with two gleaming gold rings dangling from a velvet ribbon around her neck.
CHAPTER EIGHT
“Are we finished yet?” asked Ada, stretching her aching shoulders.
The painter peeked out from behind the canvas, a spare paintbrush clenched in her teeth, and shook her head.
Ada resumed her position, with her hand at her waist and her head turned to the side. She had a million things she’d rather be doing than standing for her portrait, like concentrating on the quadratic equations waltzing through her mind.
A crash came from down the hall—her eldest son, Byron, undoubtedly. The mess that boy could make never ceased to amaze her. The chattering voice of his little sister, Annabella, followed soon after. It was only a matter of time before baby Ralph began to cry.
“Lady Lovelace?” called the frazzled governess, sticking her head into the room.
It took a moment for Ada to realize that the woman was referring to her. William had only recently been made “The Earl of Lovelace.” And her new title, “The Countess of Lovelace,” sounded like an old person locked away in a stuffy old tower. She supposed the name would grow on her.
The painter waved the governess away and shut the door. But the idea that had been forming in Ada’s mind had dissolved into a jumble of random numbers. She sighed.
Life as a mother and wife left Ada less time for math than she’d hoped. Although she was taking a correspondence course in mathematics, the children always seemed to demand her attention just when she’d started a particularly hard equation.
William was kind as always, but he’d become obsessed with renovating their country home. He was either buried in blueprints or dashing off to another meeting with his chief architect. This left the children and the care of their estate to Ada.
Worst of all, Mary Somerville was moving away to Italy. Ada could still write to her, but it would take forever to get responses to her questions. She was going to miss her friend and mentor terribly.
Ada loved William and her children, but she wanted a project to fully immerse herself in, the way she’d been obsessed with flying as a child, or the way Charles Babbage was obsessed with his engines.
Babbage! Of course! One of England’s greatest unfinished inventions sat right in her friend Charles’s living room. She could help him finish the Difference Engine, his brilliant calculating machine! Then, with that out of the way, he might start working on his Analytical Engine again, the even more mysterious invention he had explained to her years before.
She must write to him at once. Ada hurried off to her study, the velvet robe trailing behind her.
“Lady Lovelace! Lady Lovelace, come back!” the painter cried.
But Ada had already shut herself in her study.
~
“How is your work coming along, Lady Lovelace?”
“Very well. Thank you for asking, Mr. Babbage.”
Since she’d walked out of her portrait session, Ada and Charles had been writing to one another regularly. Today, Ada had finally made the journey to visit him.
“I spent all week on this last problem you sent.”
Babbage flipped through the pages she’d brought him. “You did well. I can’t find a single flaw in your logic.”
“When I sit down to study, I feel as if I could never be tired, like I could go on forever. But at the end of the day, I’ve accomplished barely half of what I set out to do.” She laughed. “Now tell me, what’s this issue you’re having with the Difference Engine?”
“My problem, Lady Lovelace, is that—gah! Hang on.”
Charles leapt from his chair and threw open his front door. “STOP THAT INFERNAL RACKET!” he bellowed into the street, where a surprised-looking organ grinder had started playing a tune.
“Street musicians,” he grumbled, returning to his seat. “They’re the bane of my existence. As I was saying, Lady Lovelace. My problem is that the scientific men of this country are fools. No one understands me, so no one will give me the money to finish my machine.”
“You don’t make things easy,” Ada replied. “You did not attend that investment meeting. I also tried to introduce you to that newspaper editor. He might have written something encouraging about it.”
“And have him bungle all the facts? No thank you.”
“And then there was the prime minister . . . ”
“Oh, that old—”
“You shouted at him, Mr. Babbage! Of course no one wants to pay for our . . . I mean your . . . machine if you’re going to be so difficult about it.”
Babbage set down his tea and rummaged around on his desk before pulling out a stack of bound papers.
“This might interest you, Lady Lovelace. A man in Switzerland has written an article about the Analytical Engine, and I’d like it to be published here in England. The only problem is that it’s all in French. I need a translator. If I recall, your French is excellent.”
Ada took the stack of papers from him eagerly. The article was many pages long, with diagrams she recognized as tidier versions of Babbage’s sketches. She read aloud from the final paragraph, translating from the French: “Who can foresee the future uses of such an invention?”
“Ada, you understand my machine better than almost anyone,” said Charles. “I’d like you to translate the article. But I’d also like you to help people understand what this machine has the power to do.”
Ada flipped through the paper faster, her mind and heart racing. “How long do we have?”
“Six months.”
“Six months! In that case, goodbye for now, Mr. Babbage. I have work to do.”
CHAPTER NINE
Back at home, Ada spread the pages of the article across her desk. The writer had done a good job describing the engine’s workings. But his paper didn’t talk about what was so thrilling about Babbage’s new idea.
The Difference Engine, the machine Ada had seen on her first visit to Babbage’s house, was fairly straightforward. Crank the handle, and solved equations came out.
The new machine was capable of so much more. The Analytical Engine could perform virtually any calculation, but beyond that it might be able to work with complex math problems, words, music notes, maybe even pictures. Ada understood how even educated people like her mother found the Analytical Engine difficult to understand. What they needed was someone to explain it to them in simple, everyday language, just as Mary Somerville had once explained geometry to her.
“It’s not just a calculating machine,” Ada muttered to herself, tapping her fingers on the desk. “The Analytical Engine weaves algebraic patterns, just as the Jacquard loom weaves flowers and leaves into cloth.”
She grabbed her pen and started to write.
~
Back and forth the letters went. Ada’s neighbors grew used to the sight of Lady Lovelace racing to catch the mail carrier’s horse, with her skirts gathered in one hand and a letter in the other, flapping the envelope in the air to dry the ink. As the deadline drew nearer, Ada often joined Charles in his home and they sat together surrounded by notes and half-drunk cups of tea.
Ada pushed a pile of papers across the table toward Charles. “Here’s the latest draft. I added the bit about using the machine to calculate Bernoulli numbers you asked for last time.”
“Ah, excellent.” Charles peered over his glasses as he flipped through the pages. “These are quite useful. I want people to appreciate the power this machine has for complex concepts.”
“I’ve also added a few of my own theories.” Ada pointed to a passage she’d written. “I firmly believe that the machine could work with any bit of information, like letters, words, or even musical notes. Can you imagine: a machine that understands the notes well enough to compose its own songs? What if it could create images, like a painter on canvas?”
“The Analytical Engine is a machine for numbers, Lady Lovelace,” Charles countered, frowning and scribbling something out. “It�
��s not for—”
“Mr. Babbage,” Ada interrupted impatiently, “math isn’t just about how numbers relate to each other. It’s about how all things relate to each other.”
Babbage laughed, but Ada carried on. “It is! Everything is math: the arc of the sun in the sky, the distance between the stars, the way a family expands as children grow up and have children of their own. Those relationships are the same, no matter where in the world a person lives or what language they speak. It can’t be a coincidence. It’s science, but it’s also poetry. It’s poetical science! And this machine has the power to understand that language, even if you don’t see it.”
“I think you have too much imagination, Lady Lovelace,” Charles chuckled.
“I think you don’t have enough,” she shot back.
Ada left feeling annoyed. Halfway down the street she spotted one of the street musicians she knew Charles loathed, and a mischievous grin spread across her face.
She handed the organ grinder a few coins and pointed to Charles’s house. “Stand out front, play as loud as you can, and don’t stop until you’ve finished the song, no matter what the gentleman inside says.”
Then she walked toward the park feeling much better.
Ada got so wrapped up in her work that she rarely left her room, even for meals. William warned the children to keep their voices down outside their mother’s study. One night, while going over her penciled diagrams in ink, she fell asleep with her cheek on the desk. When she woke the next morning, there was a blanket around her shoulders and a stack of diagrams finished in ink. William had completed them for her.
She finished just in time for the deadline. Her notes were more than twice as long as the original article. She flipped through her final draft and a sentence leapt out at her.