New Coding Paradigms

So I’ve recently been thinking that the whole idea of editing text files filled with code is outmoded. When I’m thinking about code, I certainly don’t think of it as a set of classes and functions laid out in a particular order. I think of it as a cloud of entities with properties and interactions flowing between them. Shouldn’t our experience of writing code reflect this?

We need to start rethinking our code-editing tools. A lot. Here is a simple example:
XML heatmaps

What else could we do? How about the ability to arbitrarily break off chunks of code and view them in parallel, even nesting this behavior to break long blocks of code into a string of chunks:
Nesting chunks

What if we let the flow of the documentation decide how a reader is introduced to the code base, instead of letting the flow of compiler-friendly source files decide it? Chunks of code are embedded within wiki-style documentation, and while you can follow the code back to its source, reading the documentation will eventually introduce you to the whole codebase in a human-friendly fashion.

The same code could even appear in multiple places (obviously updated when the source changes), and you could see all the places in the documentation where a particular chunk of code appears. This could bridge the gap between documentation and code; documentation will never grow stale, as updating code necessitates interaction with it. Similarly, updating documentation is the same process as writing code. When a standard changes or an SLA (service level agreement) is modified, the code changes too.

But why restrict ourselves to semi-linear, text-based documentation a la wikis? We tend to find UML diagrams extremely helpful for visualizing complex systems in code. What if we could build powerful, adaptable tools to translate between raw code, text-based documentation, and visual diagrams? Strictly binding them together might restrict you in the lowest levels of coding (much like, for example, using a high-level language restricts your ability to control memory allocation), but it opens up the new ability to make changes to a diagram and have most of the code rearrange and resolve itself before you. Then you step in to give a guiding hand, and adjust the text documentation, and voila! Best of all, this is more than a diagram-to-code tool; the diagram is a living thing. In fact, the diagrams, the documentation, and the codebase are synonymous. A change in one is a change in the others.

We’re getting to the point where it is much more useful to be able to dance across a codebase quickly than to be able to tweak and tune the minutiae of your code. Some allowances must be made for processing-intensive applications. Perhaps this system wouldn’t even be useful in those cases. But when you find yourself favoring adaptability and iteration speed over efficiency during development, and when you find yourself being hampered by the need to go between files, scroll through large swathes of code, or referring back and forth between code and documentation, maybe it’s time to rethink your coding paradigms.

Hog Derby: Duels

Back when I was part of the Halo: Custom Edition mapping community, I offered my help to a team called Hog Derby Productions. The team had produced a series of poorly made videos (called Hog Derby) which consisted of the infamous “hog duels”, in which two or more players are driving a warthog but lack a gunner. They run into each other and try to flip the opponent, thus allowing them to be crushed. I ended up befriending the guy behind the series (dariusofwest) but, although I offered my services, never did any work on the actual production. I had joined in at a slow time, when everything was coming apart at the seams after only a few episodes of the reboot, Hog Derby: Duels (which actually had story). After a while, I left the CE community. I kept in contact with the producer, though, who also composed all the music for the show.

Nonetheless, after many false starts involving terrible cameramen, voice actors, and production schedules, the series came back together after dariusofwest joined Machinima. Having just recently released Episode 4 after almost 2 years, HDP has more episodes in (speedy) production. The series has gone from terrible filming, story, and voice acting to an OK show with lots of potential. As I watched darius struggle through the months and the different changes that occured, I have to say that the show would not have survived if it wasn’t for his endless dedication. I must also say that the experience of seeing all the behind-the-scenes mechanics was extremely interesting, as was being able to hear and critique all of darius’s music before it went into the show.

Now it seems that I will soon be working as an editor of one of the episodes (actually a short, rather than a full fledged installment). After 2 years, I’m definitely ready. I’ve always liked video production, from script writing to filming to editing. I haven’t worked on a project in months, and I’m eager to get in the production loop again. To support Hog Derby: Duels, please check out the latest episode (or all of them) and give it a thumbs up!

Episode 4: Part 1