Beyond Functional Programming: Manipulate Functions with the J Language
by Adam Tornhill, February 2017
The Pragmatic Programmer recommends that we learn at least one new language every year. To be effective, the languages we learn should differ sufficiently from those we already master and ideally introduce us to a new paradigm too. Learning a different programming language affects the way we view code. A new paradigm may even alter our problem solving abilities by reshaping the way we think. The J programming language offers both of these qualities.
Software (r)Evolution is a series of articles that explore novel approaches to understanding and improving large-scale codebases. Along the way we'll use modern data science to uncover both problematic code as well as the behavioral patterns of the developers that build your software. This combination lets you to identify the parts of your system that benefit the most from improvements, detect organizational issues and ensure that the suggested improvements give you a real return on your investment.
- Part 1 - Predict Maintenance Problems in Large Codebases, August 2016.
- Part 2 - Novel Techniques to Prioritize Technical Debt, August 2016.
Best Articles of 2015
by Adam Tornhill, February 2016
I'm proud to announce that my articles made it to the top of ACCU's survey for people's favorite articles of 2015. ACCU publishes two magazines. My article Meet the Social Side of Your Codebase made it to the top in the Overload magazine while Writing a Technical Book made the second place in the CVu magazine. These awards actually mean a lot to me. Yes, really, they do. Let me explain how it all started.
Kill the Clones: How Temporal Coupling helps you identify Design Problems in large-scale Systems
by Adam Tornhill, December 2015
In this article we'll put Empear Developer to work on a real-world system under heavy development: Microsoft's ASP.NET MVC. You'll see why and how Temporal Coupling helps us design better software as we detect a number of possible quality issues in the code.
Analyzing Code Churn with Clojure and Zoo
Clojure in combination with the powerful Incanter library is a great platform for data analysis. In this article we'll put Clojure to work as you learn to calculate and visualize code churn trends.
The Code as a Crime Scene Gallery
A best of collection from some of the open source projects I've analyzed with the Code as a Crime Scene techniques.
Writing a Technical Book: Motivation, Publishing and how to stay focused without ruining your Life
Do you dream of writing your own technical book? I hope you do – our programming profession needs more high-quality books. In our fast evolving field there’s an endless amount of new topics to cover and timeless ideas to rediscover. This article is here to help you get started. I’ll make sure to give you a high-level overview on everything from the initial planning to tips on different publishing models. You’ll also learn about the motivational hacks I used to stay on track and make a steady progress on my own books.
This article was published in CVu Volume 27 (2) in May 2015
Meet the Social Side of Your Codebase
Let’s face it — programming is hard. You could spend an entire career isolated in a single programming language and still be left with more to learn about it. And as if technology alone weren’t challenging enough, software development is also a social activity. That means software development is prone to the same social biases that you meet in real life. We face the challenges of collaboration, communication, and team work.
This article was published in PragPub issue 70, April 2015
Why I view Code as a Crime Scene
The interview was done by my project editor, Fahmida Y. Rashid. I chose to publish it here as well for a reason; Over the past years I've delivered several presentations about this topic. One of the most common questions I get is how I came up with the idea. So, here it is - this is why I view Code as a Crime Scene!
Beauty in Code
The challenge of all software design is to control complexity. Less complexity means that our programs are easier to understand, reason about and evolve. This article shows how we can use beauty as a mental tool for that purpose. Starting in the field of the psychology of attractiveness, we'll expand its theories on physical beauty to also cover code. In the process we'll learn a bit about Clojure, meta-programming and destructuring.
This article was published in Overload 121, June 2014
The Soundtrack to Code
To a programmer, noisy work environments are a devastating killer of job performance. Surprisingly, most workplaces still seem to ignore the problem and leave the root causes untreated. Instead the symptoms of a deep, severe problem are left to the individual programmers to address. The following essay discusses the consequences, perils and possible remedies from a cognitive perspective.
This article was published in C Vu Volume 25, Issue 6
Lisp for the Web - The Book
I'm proud to announce my new book Lisp for the Web. The idea with the book is to convey a feeling of how it is to develop in Lisp rather than focusing on the details. In the process we'll find out how a 50 years old language can be so well-suited for modern web development and yes, it's related to all those parentheses.
You can get the book at Leanpub for any price you want (free included).
Code as a Crime Scene
Technical challenges rarely come in isolation. In any large-scale project they interact with social and organizational aspects. To address that complexity we need to look beyond the current structure of the code. We need strategies to identify design issues, a way to find potential suspects like code smells and team productivity bottlenecks. Where do you find such strategies if not within the field of criminal psychology?
An earlier version of this article was published in Overload 117
The Signs of Trouble: On Patterns, Humbleness and Lisp
As software developer and author of a technical book on patterns I obviously find value in the pattern format. And as a psychologist I see the links to our cognitive capabilities and the social value of patterns. In this article I will detail my view on patterns and the value I see in them. Since patterns are a controversial topic, I will build the article around the criticism against patterns. Let the critics have the first word.
Patterns in C - The Book
Dear reader, I'm pleased to announce my first book, Patterns in C. Patterns in C is a collection of idioms, design and architectural patterns in the C programming language. The book highlights the value of patterns. In the right context, patterns serve as an excellent tool for communication and reasoning. The book provides a C programmer with techniques to benefit from the growing body of knowledge captured in patterns.
Development Fuel: software testing in the large
July 2012 (co-autored by Adam Tornhill and Seweryn Habdank-Wojewodzki)
As soon as a software project grows beyond the hands of a single individual, the challenges of communication and collaboration arise. We must ensure that the right features are developed, that the product works reliably as a whole and that features interact smoothly. And all that within certain time constraints. These aspects combined place testing at the heart of any large-scale software project.
Code Patterns discuss the challenges involved in introducing and teaching TDD. It investigates something we programmers rarely reflect over, the form and physical layout of our code, and illustrates how it may be used as a teaching-tool.
Read Code Patterns here .
Lisp for the Web
A case study in developing a three-tier web application using Common Lisp. The article was published in the 2008 April issue of C Vu.
Read the article here .
The code for the developed application (Retro Games) is available here .
Design in Test-Driven Development
An article discussing the impact of TDD on the development process.
Solving FizzBuzz using C++ compiler error messages
Using C++ template metaprogramming, I'll try to solve FizzBuzz by having the compiler output the solution as error messages.
Objects for States
Originally captured in Design Patterns, Objects for States is described in close conjunction with the Singleton pattern. This article will explain why this is an unfortunate combination and investigate better alternatives for implementing the pattern in C++.
Objects for States (pdf, 116 kb), published in Overload 73, June 2006
Download the full source code here (zip, 17 kb).
As a language evolves, certain efficient patterns arise. These patterns get used with such a high frequency and naturalness that they almost grow together with the language and generate an idiomatic usage for the practitioner of the language. This article captures some of these idiomatic expressions.
Idiomatic Expressions in C (164 kb), published in C Vu 18.1, February 2006
Patterns in C
This series has been published in the C Vu, which is a bimonthly ACCU publication.
All documents are stored as PDF.
Patterns in C - Part 1 (196 kb), published in C Vu 17.1, February 2005
Patterns in C - Part 2: STATE (237 kb), published in C Vu 17.2, April 2005
Patterns in C - Part 3: STRATEGY (197 kb), published in C Vu 17.3, June 2005
Patterns in C - Part 4: OBSERVER (210 kb), published in C Vu 17.4, August 2005