IP
AboutResearchProjectsBlogUsesCV
Ishan Perera

Neurosurgeon · Developer · Researcher

AboutResearchProjectsBlogUsesCV
NowReadingGuestbook

© 2026 Ishan Perera. All rights reserved.

Back to blog
NeurosurgerySoftwareAI/MLOpinion

Why Neurosurgeons Should Learn to Code

January 15, 20252 min read
Share

The Convergence of Surgery and Software

Medicine is undergoing a transformation. The days when a surgeon's toolkit consisted solely of scalpels and sutures are fading. Today, we operate alongside robots, interpret AI-generated predictions, and rely on software for everything from pre-operative planning to post-operative monitoring.

As a PGY-1 neurosurgery resident who also happens to write code, I see this convergence every day. And I believe it's not just an advantage — it's becoming a necessity.

The Case for Computational Thinking

Programming teaches you to think in systems. You learn to break down complex problems into smaller, solvable units. You develop an instinct for edge cases and failure modes. These skills translate directly to the operating room:

  • Pre-operative planning becomes more rigorous when you can write scripts to analyze imaging data
  • Research accelerates when you can build your own analysis pipelines instead of waiting for someone else
  • Quality improvement gains a new dimension when you can query databases and visualize trends

AI/ML is Reshaping Neurosurgery

Consider what's already happening in our field:

  1. Automated tumor segmentation on MRI scans
  2. Predictive models for surgical outcomes
  3. Natural language processing of clinical notes
  4. Computer vision for intraoperative guidance

If you don't understand the fundamentals of how these tools work, you're trusting black boxes with your patients' lives. That's not a comfortable position for any surgeon.

You Don't Need a CS Degree

Here's the good news: you don't need to become a software engineer. Even a basic understanding of Python, data manipulation, and statistical modeling can be transformative. Start with:

# Your first step: learn to manipulate medical data
import pandas as pd
 
# Load a dataset
df = pd.read_csv("surgical_outcomes.csv")
 
# Basic analysis
print(f"Total cases: {len(df)}")
print(f"Complication rate: {df['complications'].mean():.1%}")

From there, the possibilities expand exponentially.

The Bigger Picture

We're entering an era where the best surgeons will also be the best technologists. Not because they need to build everything themselves, but because understanding the technology means better decisions, better research, and better patient care.

The future of neurosurgery is computational. The question isn't whether to learn — it's when to start.


If you're a medical professional interested in learning to code, feel free to reach out. I'm always happy to help someone get started on this journey.

Comments