OG GUI Programmer doesn't know what IM is
Musings about RM an IM. If you don't know what this means, neither did I a year ago :-)
Back to the beginning
Who am I?
If you subscribed to my very first article (that’s what Google told me to call a Substack “post”) then you might know who I am as a person. If you met me you’d think I was a super nerd, cat person and piano playing programmer.
Actually, that’s exactly what I am. I come across as exactly the person I really am.
I’m not cool.
But I’m an OG GUI programmer. I’ve programmed every sort of GUI. DOS based Borland Pascal and C, Macintosh System 7, OS X, iOS, Windows 3.0 on, Linux of all sorts. 2D, 3D, text based right up to iOS, Metal and OpenGL.
I’ve build heaps of UI’s.
Anything famous? Sort of but not really. Here’s the brag (why not it’s my substack):
Wrote something called “MaX” which was a graphical Unix terminal emulator running on the original Mac (get it, M(ac) X). I did this while I was at Wollongong Uni in about 1987 (dates a blurry back then). You’d run it on your Mac and it would show Unix files as little icons you could drag around. It actually used the serial port on the mac to access our Universities’s Unix system. Why didn’t it use X Windows? You haven’t been reading. It ran on a 1987 Macintosh :-)
Written in Think C on a Mac II, ran on all macs of that era.
Wrote a bunch of Hypercard XCMDs that let you build Midi interfaces in Hypercard. Wrote some simple Hypercard Midi hardware editors, like for an ESQ-1 and the EPS. I loved Ensoniq :-)
Wrote a bunch of Hypercard XCMDs for accessing Oracle databases and helped write an LMS in Authorware for various things like Australian Navy and American Arilines. (not really GUI)
Worked on Macromedia Authorware versions 3 and 4. Eventually bought by Adobe.
Originally we wrote in MPW C with CFront on the Mac and Visual C on windows (windows 3.x) but later on we wrote a single C code base for Windows and Mac.
Wrote “mBED Interactor” for mBED software, an early internet browser plugin that did something like Flash.
This was a single code base that used MFC (Microsoft Foundation Classes) in Visual C++ on windows and PowerPlant (C++) on the macintoshes which were by now PowerPC/68k. It was a full interactive GUI for building visual animations that ran on both the Mac and Windows. The way I made that happen is to write a layer called “MFC2PP” which let you use all the MFC stuff on the mac but implemented in PP. Side note, we licensed this to Macromedia/Adobe to build out some stuff with Dreamweaver since Microsoft ditched something called ActiveX on the mac.
Worked on Objective corps document management system. Originally trying to write some clever XSL translation layer for web interfaces in Java blah blah. Echhh. When it was obvious that was all just bullshit eventually helped them build end to end testing into their far superior SmallTalk based client. Pretty sure it’s still in use today in Australian businesses and governments. I love SmallTalk. What a beautiful thing. I wrote an iOS app while I was there too. Eventually I helped design and start to build this https://secure.objectiveconnect.com which is pretty excellent I think.
Java, XML, XSL (yucko).
SmallTalk, Visual C++
Lot’s of Web systems (that are all private so you can’t see them) for Visual Ops. Suffice to say they are all “message based” systems so people can collaborate on important things like arranging water and food in a hurricane or trying to work out what’s happening with Girl Schools being targeted in Afghanistan (what is with that?)
Swift (iOS)
MEAN (Mongo Express Angular Node)
PaperJS
ArcGIS
Modern C++ on Mac and Linux (no Windows anymore. Yay!).
Why am I telling you all this.
All of this work has been using something that we needed by necessity up until a fews ago called “Retained Mode Graphics”. This sounds fancy but it’s really just a big phrase to describe almost ALL GUI programming except for Games.
I’ve never written a game so that’s why I’d never heard of something called “Immediate Mode”.
RM (retained mode) has a programming model where you design an “OO graphics system” which has all the different elements as fundamental primitives in a big list, often in layers. You work on this big list of text, squares, curves of all various colours and shades and after you’ve finished you called an “update” method which goes through this big list, works out what areas of the screen have changed (changed rects) and then redraws these bits to an offscreen buffer, and then when that’s done it “Blits” the offscreen buffer to the user.
In the very early days, like with the old macs and windows, the basic graphic primitive list existed as a thing in the OS. On the Mac it was called a “PICT” and on windows you would make a “WMF’. So you would keep one of these and modify it, adding text and image objects.
Then on the mac you would work out how big the bit that would change on the screen was, and you would update an offscreen buffer and then in the “VBI” (vertical blanking interval) you would “blit” just that little bit that changed onto the screen in front of the user. This would make it seem like interactions with the GUI were nice and smooth. Same sort of thing on Windows.
This was how we did stuff in 1984. Fast forward to 2025 and it’s exactly how an internet browser works. Chrome, WebKit, Edge etc. They all do this exact thing (you can look at the source code to see if you want :-). That’s most of the worlds GUI’s using RM for 41 years.
State of the art in 1928 was a Lockheed Vega. 41 years later, 1969, we were on the moon. That’s how long.
All the way back in 1984, probably till earlier this century, maybe 2010, the computers that end users used weren’t fast enough to be able to do it any other way.
But Games!
A better way to write your GUI is to forget all this and just have a tight loop, in the loop you do all your work and draw eveything to the screen. You do this 30 times a second.
This is what Game programmers do.
And this is what “IM” is. You can just concentrate on being your best GUI programmer self and go for it.
And now computers, phones and tablets are easy fast enough to do this.
I know I’m late in the game, but I’ve started a new project for myself where I’m building a non-game IM “thing” :-)
And that’s where my “dsurf” I’ve been working on comes in. It’s not a game but it’s a new sort of GUI for something that I do all day every day lately, which is to edit JSON and YAML, specifically “Dictionaries”.
What is a dictionary?
JSON is a Dictionary, so is YAML. A dictionary is a data structure that contains pairs of “Name-Values” where the values are strings, numbers etc or even other Dictionaries. The values can also be lists of these things, including lists.
MongoDB stores all it’s stuff in Dictionaries. They are the most widely used type of data structure in modern computing.
But I edit these things using a Text Editor and store them in Github where I compare them using a Text comparison tool.
That’s super annoying.
Here is the sort of thing I want.
All nice and smooth and fast and I just draw everything that I want directly without all this OOP Hooha.
I know it doesn’t seem that cool, but if you’d like to help me build it, or see how I built it and what I’m talking about you can find all the code on
https://github.com/phamtec/dsurf
It’s written using something called “SDL” (Simple DirectMedia layer) which is also quite excellent. I have it running well on the Mac but I’m also making sure it builds on Linux (it crashes so I need to get my Linux dev environment fired up). I don’t have it running on Windows but it uses CMake so you can probably make that work.
I have big plans for it but it’s just a curiosity for now so no actual App to download or install.

