Adam Tornhill
| Adam Tornhill | |
|---|---|
Adam Tornhill, 2024 | |
| Born | August 20, 1975 Sweden |
| 🏳️ Nationality | Swedish |
| 🎓 Alma mater | Lund University (engineering); Kristianstad University (psychology) |
| 💼 Occupation | |
| Known for | Founder of CodeScene; behavioral code analysis; Your Code as a Crime Scene; CodeHealth metric |
Adam Tornhill is a Swedish software engineer (born 1975), author and entrepreneur best known for applying concepts from psychology to software development and code analysis. He is the founder and chief technologist of the software-analytics company CodeScene and the author of several books on software design and maintainability, including Your Code as a Crime Scene (2015; second edition 2024) and Software Design X-Rays (2018). Tornhill’s work focuses on using insights from forensic psychology to identify “hot spots” in codebases and manage technical debt in large-scale software systems.[1]
Education
Tornhill studied electrical engineering at the Faculty of Engineering (LTH) at Lund University, earning a Bachelor of Science degree in 1997. He later completed a Bachelor of Social Science in Psychology and a Master of Arts in psychology at Kristianstad University between 2007 and 2013, combining engineering and psychology to inform his later work in software forensics.[2]
Career
Tornhill entered the software industry in 1997 and worked in domains such as telecommunications, rail, and simulation modeling.[3] After several years in large software organizations he moved into consulting, during which he studied psychology part-time and explored how cognitive biases and human behavior affect software development.[3]
In 2015 he published Your Code as a Crime Scene, a book that introduced techniques for mining version control data to locate problematic parts of software systems and treat them as “crime scenes” to uncover technical debt and design bottlenecks.[4] Following publication, he founded Empear AB (later branded CodeScene) to provide behavioral code-analysis tools as a service.[3] In 2021, the Swedish business daily Dagens industri reported that the company had raised 30 million kronor (SEK) in venture capital to further develop its AI-based code analysis.[5] By 2023 CodeScene reported customers in more than 75 countries and had secured €7.5 million in venture capital to expand internationally.[6]
Research and contributions
Tornhill’s research explores how empirical data from version-control systems and issue-tracking systems can be combined with principles from psychology to improve software quality. In the paper Code Red: The Business Impact of Code Quality (2022), which analyzed 39 proprietary codebases, he and co-author Markus Borg reported that low-quality code contained fifteen times more defects than high-quality code and that resolving issues in low-quality code took 124% longer; the authors argued that code quality should be treated as a business concern rather than a purely technical issue.[7]
In a later paper, Increasing, not Diminishing: Investigating the Returns of Highly Maintainable Code (2024), Tornhill and colleagues used regression analyses to model how improvements in code quality affect defect counts and implementation time, reporting amplified returns on investment at the upper end of the quality spectrum.[8]
Tornhill also advocates a behavioral approach to code analysis, introduced in his book Software Design X-Rays. The method uses version control metadata to identify “hot spots” where developers expend disproportionate effort and to detect files that tend to change together. These insights can help engineers prioritize refactoring and uncover design bottlenecks.
A key component of Tornhill's work is the maintainability metric CodeHealth, which aggregates about twenty-five code smells into a single score from 1 to 10; higher scores indicate more maintainable code. Peer-reviewed studies have shown that CodeHealth scores correlate with defect density and development velocity in proprietary codebases.[7][8] Benchmarking experiments using the Maintainability Dataset curated by the Technical University of Munich reported that CodeHealth aligned better with human experts’ judgments than competing industrial metrics.[9]
Publications
Books
- Your Code as a Crime Scene (2015; 2nd ed. 2024). (ISBN 978-1680500387 Search this book on
.; 2nd ed. ISBN 979-8888650325 Search this book on
.)[10] – Introduces forensic techniques for analyzing codebases. - Software Design X-Rays (2018). (ISBN 978-1680502725 Search this book on
.)[11] – Presents behavioral code-analysis methods to prioritize technical debt and improve system maintainability. - Lisp for the Web (2015)[12] – Discusses using Lisp for web development.
- Patterns in C (2013)[13] – A guide to idiomatic C programming.
Selected papers
- "Code Red: The Business Impact of Code Quality — A Quantitative Study of 39 Proprietary Production Codebases" (2022).[7]
- "Increasing, not Diminishing: Investigating the Returns of Highly Maintainable Code" (2024).[8]
- "Ghost Echoes Revealed: Benchmarking Maintainability Metrics and Machine Learning Predictions Against Human Assessments" (2024).[9]
Selected talks and media
Tornhill has delivered keynote and technical sessions at major conferences. Recorded talks include:
- "Expert Talk: Code Refactoring" — a GOTO Unscripted session from 2022.[14]
- "Prioritizing Technical Debt as if Time & Money Matter" — delivered at GOTO Copenhagen 2020.[15]
- "Code, Crime, Complexity: Analyzing software with forensic psychology" — a TEDxTrondheim talk from 2014.[16]
He has also been a guest on podcasts such as Software Engineering Radio, Refactoring.fm and Thoughtworks’ Technology Podcast, discussing behavioral code analysis, technical debt and the psychology of programming.
Recognition
Tornhill is a member of the Forbes Technology Council.[1] His paper "Increasing, not Diminishing: Investigating the Returns of Highly Maintainable Code" received the Best Paper Award at the 7th ACM/IEEE International Conference on Technical Debt (TechDebt 2024).[17]
References
- ↑ 1.0 1.1 Tornhill, Adam. "Member profile: Adam Tornhill". Forbes Technology Council. Retrieved October 8, 2025.
- ↑ "Adam Tornhill – Founder and CTO at CodeScene". The Org. Retrieved October 8, 2025.
Adam Tornhill has a Bachelor of Science degree in Electrical Engineering from The Faculty of Engineering at Lund University. Continuing their education, Adam Tornhill earned a Master of Arts (M.A.) degree in Psychology from Kristianstad University
- ↑ 3.0 3.1 3.2 "Bridging Software Coding and Psychology: An Interview with Adam Tornhill". TaskQue. 2020. Retrieved October 8, 2025.
I have been working in the IT industry since 1997, covering telecommunications, railway and simulation
- ↑ "Book review: Your Code as a Crime Scene". Reflectoring. 2019. Retrieved October 8, 2025.
The book shows how to use version control and treat software as a crime scene.
- ↑ "De förutspår felaktig kod med hjälp av AI – tar in 30 miljoner" [They predict faulty code using AI – raise 30 million]. Dagens industri (in Swedish). Retrieved October 9, 2025.CS1 maint: Unrecognized language (link)
- ↑ "CodeScene secures funding to accelerate growth". TechArenan News. 2023. Retrieved October 8, 2025.
English SaaS company CodeScene, founded by Adam Tornhill, has customers in more than 75 countries and has raised €7.5 million to fund global expansion.
- ↑ 7.0 7.1 7.2 Tornhill, Adam; Borg, Markus (2022). "Code Red: The Business Impact of Code Quality — A Quantitative Study of 39 Proprietary Production Codebases". Proceedings of the 2022 International Conference on Technical Debt. New York, NY, USA: Association for Computing Machinery. doi:10.1145/3524843.3528091. Retrieved October 8, 2025.
- ↑ 8.0 8.1 8.2 Tornhill, Adam (2024). "Increasing, not Diminishing: Investigating the Returns of Highly Maintainable Code". Proceedings of the 2024 International Conference on Technical Debt. Association for Computing Machinery. doi:10.1145/3644384.3644471. Retrieved October 8, 2025.
- ↑ 9.0 9.1 "Ghost Echoes Revealed: Benchmarking Maintainability Metrics and Machine Learning Predictions Against Human Assessments". Proceedings of the 2024 International Conference on Software Maintenance and Evolution. IEEE. 2024. Retrieved October 8, 2025.
- ↑ Tornhill, Adam (2024). Your Code as a Crime Scene (Second ed.). Pragmatic Bookshelf. ISBN 979-8888650325. Retrieved October 9, 2025. Search this book on
- ↑ Tornhill, Adam (2018). Software Design X-Rays. Pragmatic Bookshelf. ISBN 978-1680502725. Retrieved October 9, 2025. Search this book on
- ↑ Tornhill, Adam (2015). Lisp for the Web. Leanpub. Retrieved October 9, 2025. Search this book on
- ↑ Tornhill, Adam (2013). Patterns in C. Leanpub. Retrieved October 9, 2025. Search this book on
- ↑ "GOTO Unscripted: Expert Talk: Code Refactoring". GOTO. Retrieved October 8, 2025.
- ↑ "GOTO Copenhagen 2020: Prioritizing Technical Debt as if Time & Money Matter". GOTO. Retrieved October 8, 2025.
- ↑ "TEDxTrondheim 2014: Code, Crime, Complexity". TEDxTrondheim. Retrieved October 8, 2025.
- ↑ "TechDebt 2024 — Conference home". researchr.org. Retrieved October 8, 2025.
External links
- Recording: "Expert Talk: Code Refactoring" (GOTO Unscripted, 2022) — YouTube
- Recording: "Prioritizing Technical Debt as if Time & Money Matter" (GOTO Copenhagen, 2020) — YouTube
- Recording: "Code, Crime, Complexity: Analyzing software with forensic psychology" (TEDxTrondheim, 2014) — YouTube
- Adam Tornhill
- CodeScene
This article "Adam Tornhill" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Adam Tornhill. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
