Personalised Brain Mapping Preserves Critical Skills

A 41-year-old computer programmer solved 126 coding exercises during awake brain surgery at Hospital Universitari de Bellvitge in l'Hospitalet de Llobregat, Barcelona, as part of a pioneering medical protocol. The procedure, which took place earlier this year, successfully removed a brain tumour while preserving the patient's ability to code, a skill essential to his professional life. Researchers from the Computer Vision Center (CVC), Universitat Autònoma de Barcelona (UAB), Bellvitge Biomedical Research Institute (IDIBELL), Hospital Universitari de Bellvitge (HUB), University of Barcelona (UB), and ICREA developed the protocol to identify brain regions critical for complex cognitive functions beyond standard language or motor skills. The study was published on Thursday 26th November 2026 in the scientific journal Human Brain Mapping.

How the Procedure Worked

Before surgery, the patient completed programming exercises while undergoing functional magnetic resonance imaging (fMRI), allowing researchers to map brain activity linked to coding. During the operation, neuropsychologists Anna Gasa Roqué and Immaculada Rico from Bellvitge Hospital presented him with short code snippets and asked whether the proposed outcomes were correct. Neurosurgeons Andreu Gabarrós and Alejandro Fernández Coello then electrically stimulated different areas of the brain to observe any disruption in the patient’s reasoning. The patient answered 126 questions during cortex mapping, correctly solving 104, and over 100 more during the tumour removal, which lasted more than an hour. The coding assessment phase lasted about 26 minutes.

For this patient, programming was not just a job: it was an essential part of his life. The language test we routinely perform did not detect any critical areas in this region, but the personalised protocol showed us two points that we had to respect.

Dr. Andreu Gabarrós, head of the Neurosurgery Service at Hospital Universitari de Bellvitge and an IDIBELL researcher, explained that two regions in the left frontal cortex were found to be crucial for code comprehension. One lay close to the tumour’s edge. Stimulating these areas impaired coding ability, even though standard language tests remained unaffected.

Implications for Future Neurosurgery

The case demonstrates the value of tailoring intraoperative cognitive assessments to individual patients' professional and personal skills. Victor Cepero, a researcher at CVC and UAB, noted that standard protocols may not safeguard complex abilities like programming. The technology behind the protocol is now being advanced by BrainMapp, a spinoff company from UAB and CVC, which has already supported 31 neurosurgical procedures across Spain. The team stresses this is a single case and the identified brain regions are not exclusive to coding, but the findings expand understanding of cognitive preservation during surgery. Three months after the operation, the patient had fully resumed his work as a software engineer.


Sources: elDiario.es, uab.cat, portalrecerca.uab.cat, idibell.cat.