My 9-year-old daughter wants to be a doctor. Should she learn to code?
Short answer
Yes. Medicine runs on software now, and she'll spend her working life inside it. In one study, family doctors spent nearly 6 hours of an 11.4-hour workday in the electronic health record.1 Learning to code at 9 teaches her how those tools think, so the computer side of medicine never stands between her and her patients.
She wants to help people. Why would a future doctor need code?
Because the job she's dreaming of happens on a computer far more than it looks from her bedroom floor. At your house the dream probably looks like this: a waiting room of stuffed animals lined up along the bed, a toy stethoscope she wears to dinner, a clipboard of crayon charts, and a dog who has been bandaged so many times he sighs when he sees the tape. She asks the pediatrician real questions at her checkup. She has already picked the hospital she'll work at.
So you're doing the sensible things: the body books from the library, the science kit for her birthday, a little extra math. Then someone mentions coding, and it sounds like a detour. She's a people kid. Code sounds like something for the boy down the street who wants to make video games. Whatever she ends up wanting to be, you want her ready for it, and you're not sure a laptop belongs on that list.
How much of a doctor's day really happens on a computer?
For a family doctor, more than half of it. Researchers at the University of Wisconsin tracked 142 family physicians and found they worked an average of 11.4 hours a weekday, nearly 6 of them at the computer.1 About 1.4 hours a day of it came before 8 in the morning or after 6 at night, including 51 minutes per weekend.1 The software is everywhere: as of 2024, 91% of office-based physicians and nearly all non-federal acute care hospitals had adopted a certified electronic health record, according to HealthIT.gov.2
The newer tools are spreading fast, too. In an American Medical Association survey, 66% of physicians said they used health care AI in 2024, up from 38% the year before.3 In a University of Michigan study of 73 hospitals, robotic surgery went from 1.8% of general surgery procedures in 2012 to 15.1% in 2018.4 And in 2021, 37% of American adults said they had used telemedicine in the past year.5
If she takes the usual road through college, medical school and residency, she'll be practicing on her own in the mid-2040s, and the AI and robotic-surgery figures above climbed in just a few years. The stethoscope stays. A big share of her day will run through a screen, and the question is whether she'll understand the machine or just put up with it.
What if she's great with patients and lost with computers?
Then she'd likely still become a good doctor, and spend years wrestling tools she doesn't understand. The Wisconsin authors tie the hours doctors spend in health records to work-life imbalance, dissatisfaction, doctors leaving and a burnout rate above 50%.1 Medical school won't close the gap for her. When the University of Toronto built a programming course for its medical students, the authors wrote that future doctors are poorly prepared in computer literacy and that learn-to-code programs are largely absent from medical school curricula.6 Their students noted a sometimes-present disconnect between the computer scientists who make medical technology and the physicians who use it.6 They said two-way talk between the fields would make that technology realistic and usable,6 and the authors expect doctors with computing skills to communicate more effectively with the people who build it.6
For a daughter there's an earlier cost. In the 2020 Google-Gallup study, about half of boys said an adult had encouraged them toward a career in computer science, compared with 37% of girls.7 Parents expected it less, too: 29% of parents of girls said their child would very likely need computer science for a career, against 36% of parents of boys.7 Among students in grades 7 to 12, 30% of girls felt very confident they could learn it, compared with 41% of boys, though Gallup notes ability is equal across genders.7
This can be fixed, and 9 is a very good age to do it. Confidence with code is built from evidence: each time a line she typed makes something happen, she has proof she can do this. A third grader can pile up that proof in a few short sessions a week, years before anyone gives her a reason to doubt it. The aim is modest and it lasts: enough hours telling a computer what to do, watching it go wrong and fixing it that the machine feels like her ground too.
Why don't a doctor kit and a shelf of science books cover it?
They feed the dream, and they should stay. None of them ever puts her in charge of a machine. The other usual moves miss in their own ways. Extra math worksheets "to stay on track for med school" turn a 9-year-old's dream into a chore with a deadline a decade away. Waiting until she's older means waiting until the confidence gap has already opened, and the Toronto students who wanted programming picked it up as an elective they chose on top of medical school.6 A coding class pitched as medical school prep becomes homework with a career stapled to it, and kids can smell homework. Drag-the-arrow puzzle apps feel babyish at 9 and look nothing like the typed code she'll see later.
What works for a kid who wants to be a doctor borrows the things that drew her to medicine. Look for three things. Someone to help: she wants to take care of someone, and code clicks fastest when a character needs her to get it right. A problem to diagnose: fixing broken code runs the same loop as a checkup, from noticing the symptom to guessing the cause, testing the guess and checking the fix. A kid who loves asking "what's wrong with him?" already has the instinct. Real code she makes herself, typed and working on screen, so the proof belongs to her. Many of the Toronto students also reported that the course built up their algorithmic and logical thinking,6 and a 9-year-old gets that head start.
What can we do this week to set her up?
Start with medicine she can touch, then add a little real code.
- Chart each other's pulse. Count her heartbeats for 15 seconds, then do it again after 30 jumping jacks. Put each person's counts in a spreadsheet, one row each, and let the sheet do the multiplying: beside a count in B2, type
=B2*4for beats per minute. Then make a chart together. That's medical data in a real program, and she wrote the formula. - Ask to see the screen at her next checkup. Ask the doctor whether she can see how her visit looks on the computer. On the way home, tell her a person wrote that program, and doctors who understand it can help make it better.
- Play "find the bug" with no computer at all. Write five steps for a robot (you) to walk from the couch to the fridge, slip in one wrong step and let her work out which line walked the robot into the wall. Then swap: she writes the steps, you play the robot, and she fixes her own bugs.
- Give her real typed code twice a week. Microsoft's MakeCode is free,8 and its Arcade editor builds games that run in the browser.9 Kids can start with blocks and move into its JavaScript editor.8 Start a new project, switch to JavaScript at the top and have her type
game.splash("Next patient, please!"). Her words appear as a title on the little game screen.10 Short sittings are plenty. - Say the encouraging sentence out loud. Girls hear it less often than boys,7 so say it plainly: "Doctors use computers all day, and you'd be great at this."
- Keep the clinic open. The stethoscope, the body books and the questions for the pediatrician all stay. Code joins them.
- Call it making. Leave medical school out of the pitch. She's building something tonight, and that's reason enough.
How might it go once a future doctor starts coding?
Take a made-up clinic as the example: nine stuffed patients along the bed, a doctor who is nine herself, and now a laptop on the floor beside the clipboard. Her parents half expect the laptop to empty the waiting room, and they try two half-hour sessions a week anyway. In the first week the character she's coding walks off the left edge of the screen when it should go right. She frowns, reads her lines one at a time like a chart, finds a minus where a plus belongs and fixes it. "I diagnosed it," she tells the whole table at dinner.
By the end of the month she wants to chart the family's heart rates, and she asks how a spreadsheet knows how to draw a line. She still wants to be a doctor. She has also stopped thinking computers belong to the boy down the street.
How does Star Catcher fit a kid who wants to take care of someone?
Codestronauts' first mission, Star Catcher, gives a born caretaker what she's looking for: someone who needs her. It opens on a call for help, an empty hangar and Cody, a nervous robot who is fast asleep. Your daughter presses Run to wake her, then types her first line of real JavaScript, and the ship starts to take shape. From there every line she writes pushes the story on. Together they get the Star Catcher flying again and head out to light the Great Beacon, and in the fourth episode, Radio Silence, Cody loses her voice and only your daughter can bring it back.

Her code is typed, never dragged in blocks. If a line has a mistake, she watches the game do the wrong thing, sometimes hilariously, and then Cody explains what happened. That's the bedroom clinic's symptom, cause and fix, done in code. Cody nudges with hints and points at the line worth a second look, leaving the fix for your daughter to find, and as your daughter improves, Cody's help fades. There are five self-paced episodes, roughly two hours from start to finish, and each ends on a cliffhanger. By the last one she has built her own arcade game, played with the arrow keys, with a score, sound, levels and a boss she designed. You own the account, and your PIN guards the Parent Corner, where you can see every step. It plays in the browser on the family laptop, and the whole mission is $29.99, paid once, for her and any brothers or sisters.
One payment opens all five episodes of Star Catcher, from waking Cody to the final battle for the Beacon.
Get Star Catcher · $29.99Questions parents also ask
Do doctors have to know how to code?
Medical school doesn't require it. The University of Toronto team that built a programming course for medical students found learn-to-code programs largely absent from medical school curricula, and recommended that schools treat computer literacy as an essential skill for future physicians.6 That makes a doctor who can read code rare and valuable: she can talk with the people who build the tools her colleagues use all day.
Will coding take time away from science and math?
Very little, and it gives some back. Two short sessions a week fit around everything else, and code is full of math she already knows: moving a character means adding to its position, and keeping score means counting. A kid who has used numbers to make something move has a new reason to care about the math sheet.
What if she changes her mind about being a doctor?
Then the skill goes with her. Nine-year-olds change dreams, and that's healthy. Breaking a problem into steps, testing a guess and fixing what broke are as useful to a vet, an architect or a pilot as to a surgeon, and she keeps the confidence that she can make a computer do what she means.
My daughter says coding is for boys. What do I tell her?
Tell her doctors use computers all day. Gallup notes that ability is equal across genders, and the Google-Gallup surveys found the difference is confidence: girls are less sure than boys that they could learn computer science.7 Belief like that comes from wins, so get her to one early, like a title on a game screen that she typed herself. Then make sure she hears from you that she's good at it.
Was this answer helpful?
What was missing?
Sources
- Tethered to the EHR: Primary Care Physician Workload Assessment Using EHR Event Log Data and Time-Motion Observations, Arndt et al., University of Wisconsin, Annals of Family Medicine (2017) ↩
- National Trends in Hospital and Physician Adoption of Electronic Health Records, HealthIT.gov, U.S. Department of Health and Human Services ↩
- 2 in 3 physicians are using health AI—up 78% from 2023, American Medical Association ↩
- Trends in the Adoption of Robotic Surgery for Common Surgical Procedures, Sheetz, Claflin and Dimick, University of Michigan, JAMA Network Open (2020) ↩
- 7 telehealth trends that physicians should know, American Medical Association, on the CDC's National Health Interview Survey ↩
- Computing for Medicine: Can We Prepare Medical Students for the Future?, Law et al., University of Toronto, Academic Medicine (2019) ↩
- Women in Tech -- Starting Young(er), Gallup, on the 2020 Google-Gallup study ↩
- About Microsoft MakeCode, Microsoft ↩
- About MakeCode Arcade, Microsoft MakeCode Arcade ↩
- splash, Microsoft MakeCode Arcade reference ↩