(unless he's using
a picture of
I did check it out, and not just because he called me a C++ guru hero. Though I had not watched all of Bret Victor's demo, I had watched part of it, so I had some idea what was involved, and the idea that something similar could be done for C++ intrigued me. Also, when people tell me they have done something in C++ that nobody has done before, that tends to catch my attention. Most important, at the time I was trying to figure out what to do with Julian's email, I had much more pressing things to work on that I didn't want to attack yet, so I needed a way to tell myself I was working without actually, you know, working. So I toddled over to the screencast Julian had put together and invested the six minutes and thirty-six seconds it runs.For the last decade I've been running a big C++ cross-platform toolkit called JUCE. Won't attempt to describe it in this email - there's plenty of info about it on my website if you want to learn more.
I've just been making some announcements about a new tool that I'm aiming to release soon, and being proud of what I've managed to cook-up, I thought it'd be worth pestering some of my C++ guru heros to have a look at it. It's something that nobody's managed to do in C++ before, so I think you'll probably find it interesting!
Hope you can spare 10 mins to check it out!
It's a nifty demo, but the application area is GUI development, and that's not really an area I know a lot about. So when he ran the GUI from the compiled application, changed the application source code, then showed how the GUI updated itself, I was impressed with what must be happening behind the scenes, but I didn't have to hold onto my hat, nor was I concerned that my socks would be knocked off. And when he modified the running GUI and some literals changed in the source code, I thought it was, well, nice. But then I saw something that made me replay that part of the video several times. Not only did the literals in the source code change when he moved a GUI widget around, he was also able to have new statements added to the source code by interactively editing the running GUI. He was editing the program source code through the GUI.
Maybe this is old news. Maybe Visual Studio and Eclipse and various other IDEs for GUI development allow you to create and edit source code via both text (traditional source code) and generated GUI (arguably an alternative form of source code). As I said, I'm not a GUI development guy, so I have no idea what the state of the art in this area is. What I do know is that Julian's demo is consistent with the idea that there is no such thing as canonical source code. C++ text is source code, of course, but there's no reason that the GUI generated from that source code can't be viewed as source code, too. Since they're both source code, it makes sense that the underlying program can be edited through either. One could argue that each representation of the program (C++ text and displayed GUI) is simply a view of that program, and the program itself is something more fundamental--something more abstract that transcends the concrete syntax and semantics of whatever view is used to see and manipulate it.
I'd like to believe that this is a reasonable argument, because, in essence, this was the topic of my PhD research many years ago. My dissertation, Representing Software Systems in Multiple-View Development Environments, explored how one could represent programs such that they could be viewed and edited through any of a variety of concrete syntaxes ("programming languages"). Let me save you the trouble of reading my dissertation by summarizing my conclusion: It's hard.
I'm guessing that Julian was not expecting that his demo would remind me of the research I was pursuing over 20 years ago, but it did. And that's why I'm blogging about it. Besides, as far as I know, he has done something in C++ that nobody has done before, and groundbreakers like that deserve encouragement. If you're wise in the ways of GUI development with C++, I encourage you to watch Julian's screencast and offer him feedback to help him continue his work. I'm sure he'd be pleased to hear from you.