# James Hague

Published articles for James Hague.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## So Long, Prog21

DevFeed: [So Long, Prog21](<https://devfeed.tech/articles/so-long-prog21-21082.md>)

Original publisher: [Read original article](<http://prog21.dadgum.com/229.html>)

Author: James Hague

Published: 2017-01-04T06:00:00Z

Content type: opinion

Language: en

Sources: [James Hague](<https://devfeed.tech/sources/james-hague.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [programming](<https://devfeed.tech/tags/programming.md>), [retrospective](<https://devfeed.tech/tags/retrospective.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

The author explains why he is ending Programming in the 21st Century after more than 200 articles. He reflects on the blog's shift from creative and cultural topics toward technical programming subjects, and describes moving toward using technology to create enjoyable things.

### Source excerpt

I always intended "Programming in the 21st Century" to have a limited run. I knew since the Recovering Programmer entry from January 1, 2010, that I needed to end it. It just took a while. And now, an explanation. I started this blog to talk about issues tangentially related to programming, about soft topics like creativity and inspiration and how code is a medium for implementing creative visions. Instead I worked through more technical topics that I'd been kicking around over the years. That was fun! Purely Functional Retrogames is something I would have loved to read in 1998. More than once I've googled around and ended up back at one of my essays. As I started shifting gears and getting back toward what I originally wanted to do, there was one thing that kept bothering me: the word programming in the title. I don't think of myself as a programmer. I write code, and I often enjoy it when I do, but that term programmer is both limiting and distracting. I don't want to program for its own sake, not being interested in the overall experience of what I'm creating. If I start thinking too much about programming as a distinct entity then I lose sight of that. Now that I've exhausted what I wanted to write about, I can clear those topics out of my head and focus more on using technology to make fun things. Thanks for reading! It's hard to sum up 200+ articles, but here's a start. This is not even close to a full index. See the archives if you want everything. (There are some odd bits in there.) widely linked Things That Turbo Pascal is Smaller Than Do You Really Want to be Doing This When You're 50? Organizational Skills Beat Algorithmic Wizardry Retiring Python as a Teaching Language Computer Science Courses that Don't Exist, But Should popular Five Memorable Books About Programming A Spellchecker Used to Be a Major Feat of Software Engineering Want to Write a Compiler? Just Read These Two Papers. On Being Sufficiently Smart Optimizing for Fan Noise Free Your Technical

## Writing Video Games in a Functional Style

DevFeed: [Writing Video Games in a Functional Style](<https://devfeed.tech/articles/writing-video-games-in-a-functional-style-21081.md>)

Original publisher: [Read original article](<http://prog21.dadgum.com/228.html>)

Author: James Hague

Published: 2016-12-29T06:00:00Z

Content type: article

Language: en

Sources: [James Hague](<https://devfeed.tech/sources/james-hague.md>)

Topics: [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Code](<https://devfeed.tech/topics/code.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [functional](<https://devfeed.tech/tags/functional.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [games](<https://devfeed.tech/tags/games.md>), [immutability](<https://devfeed.tech/tags/immutability.md>)

### AI overview

The article examines whether video games and other interactive programs can be written in a functional style. It discusses the difficulty of preserving immutability in large, stateful, evolving programs and describes an approach based on function calls and immutable data structures, informed by experience rewriting a 60fps 2D shooter in mostly pure Erlang.

### Source excerpt

When I started this blog in 2007, a running theme was "Can interactive experiences like video games be written in a functional style?" These are programs heavily based around mutable state. They evolve, often drastically, during development, so there isn't a perfect up-front design to architect around. These were issues curiously avoided by the functional programming proponents of the 1980s and 1990s. It's still not given much attention in 2016 in either. I regularly see excited tutorials about mapping and folding and closures and immutable variables, and even JavaScript has these things now, but there's a next step that's rarely discussed and much more difficult: how to keep the benefits of immutability in large and messy programs that could gain the most from functional solutions--like video games. Before getting to that, here are the more skeptical functional programming articles I wrote, so it doesn't look like I'm a raving advocate: Admitting that Functional Programming Can Be Awkward Back to the Basics of Functional Programming Functional Programming Went Mainstream Years Ago Puzzle Languages Let's Take a Trivial Problem and Make it Hard Functional Programming Doesn't Work (and what to do about it) I took a straightforward, arguably naive, approach to interactive functional programs: no monads (because I didn't understand them), no functional-reactive programming (ditto, plus all implementations had severe performance problems), and instead worked with the basic toolkit of function calls and immutable data structures. It's completely possible to write a video game (mostly) in that style, but it's not a commonly taught methodology. "Purely Functional Retrogames" has most of the key lessons, but I added some additional techniques later: Purely Functional Retrogames (4 parts) Turning Your Code Inside Out A Worst Case for Functional Programming? Messy Structs/Classes in a Functional Style Reconsidering Functional Programming The bulk of my experience came from rew