Evolution is the Greatest Force in the Material World

Posted in culture on March 13th, 2011 by Samuel Kenyon

“Evolution is the greatest force in the material world” is said by Jeff Bridges in this newly leaked video. “Flynn Lives: The Next Day” is a TRON:Legacy epilogue for the Blu-Ray release, but it is perhaps also a teaser for TR3N.

Via Tron-Sector.

Tags: , , , ,

A Boy and His 286: Into the Coding Wilderness

Posted in culture on January 24th, 2011 by Samuel Kenyon

Every boy should have a journey into the coding wilderness. To prepare yourself for this chronicle, imagine an Australian walkabout, except in the Grid of TRON.

ASCII'd.

This story begins with my first PC. It was a hand-me-down 286 Turbo, which was 1980s technology (but I got it in the 1990s).

286 Turbo

Turbo (reenactment).

I had used various computers before that (PCs, Apple IIes, Macs, Nintendos, etc.), but it wasn’t until I completely owned one that the real exploring and learning began. When you have your own computer in your room it is truly personal—you have free reign to hack it, break it, fix it, and explore new worlds with wild abandon.

Wild abandon.

The first development environment I used was the then ancient Microsoft GW-BASIC (which first came out in 1983 and was bundled with MS-DOS). Microsoft got their start with BASIC interpreters (Altair BASIC in 1975) and continued making excellent (for BASIC, that is) IDEs all the way through to the VisualBasic years.

GW-BASIC may look pretty lame compared to pretty much everything that came after it, but it does get points for having a function called TRON (you can see it listed in the function keys at the bottom in the code screenshot above).

The way it happened was I was exploring the programs on the computer and ran GW-BASIC, having no clue what it was. I was presented with a mostly black screen with a prompt, not entirely unlike a DOS prompt. I was not at all impressed and started typing guesses at what the quit command would be. Nothing worked, so I went to find the printed manual and located the command that would quit: SYSTEM, and it worked. But it was too late—I was already reading all the other commands in the manual and immediately set out to make some graphics appear on the screen, and of course try to make video games.

Screenshot from my first program.

Screenshot from my first program.

Screenshot from my first program.

Let the blazingly advanced graphics melt your eyeballs.

From the get-go, I was coding from scratch. But I found that analyzing and modifying existing source code published in books was a way to accelerate the first phase of learning. The books were usually several years old by the time I got to them—in the 1970s and 1980s they would print BASIC programs in magazines and books and the readers would dutifully type them in and try to run them. Some of those programs were for other dialects, such as on Trash-80s (RadioShack TRS-80) and other 1980s relics, so I had to translate them.

Puberty and Programming

The early to mid 90s were exciting times for me: I was finishing puberty, I was teaching myself to program computers, and the World Wide Web appeared.

At age 14 I got my first legal paid job (of course I had done jobs before that but not official taxed jobs) during the summer with a youth job training council in NH held at the local high school (which I had never seen before, still being in middle school), which then placed me in an accounting office (David L. Connors & Co. in Concord, NH).  I was like an intern, except I didn’t learn that much about accounting because I preferred to spend most of my time making spreadsheet macros as that was the closest to programming I could get there.

They were running Windows 3.11 at the time and once while exploring that I discovered a link to the DOS program QBasic, which was Microsoft’s free subset of QuickBASIC, their much better BASIC system spawned in the 1980s. When you’ve been using GW-BASIC, the QuickBasic family is like a revolutionary jump forward.

Screenshot of QuickBasic development environment

Wallow in the deep blue sea of QuickBasic 4.5.

For one thing, the IDE is probably the most user friendly DOS program I’ve ever used. I particularly liked the feature showing just one subroutine/function at a time in the buffer (and accessing the list of subs with one key press). In fact, I’ve been wanting that same feature in IDEs ever since but they never have exactly that, and only recently with code folding can I do something that results in equal efficiency. QB also had a built in help system that was useful.

SUBS (subroutines and functions) selection dialog.

The second thing is the language itself—not only had it grown, but it added intrinsic support for structured programming. Previously, BASIC programs would quickly turn into spaghetti code. You could still write spaghetti of course, but now you could control the insanity better with true subroutines, functions, do loops, data structures, etc. And those damn line numbers were no longer required.

The Golden Years of Basic on the Web

I believe the first BASIC Internet resource I encountered was the ABC (All Basic Code) packets curated by William Yu, which was started in 1995. Soon after, when the web became popular and more people had access, that hobby exploded into hundreds of websites and meta-sites.

A lot of the code was for QuickBasic 4.5 (and the “professional” superset QBX aka PDS 7.1) but there was also code for competitors like PowerBASIC. Some people even started trying to make new BASIC interpreters like DarkBASIC which intrinsicly support the elements needed for making more modern games. (More recently somebody made a cross platform backwards-compatible compiler called QB64). And of course people were sharing the interpreters and compilers.

dontcopyfloppy

Oh shut up.

Whenever an individual shared some tricks or assembly code that extended QuickBASIC, for instance accessing extended memory or outputting WAVs to sound hardware, it would spread through the community quickly. People were making libraries for loading and saving modern image and audio formats, and making games with those libraries that were pretty good considering these were hobbyists using obsolete software.

Games

I made many games myself but never finished any of them. That was ok for a learning phase, but of course eventually I had to learn that completing a project and having closure was also important.

As is usually the case, I also made and/or modified many utilities for making games, for instance graphics editors, bitmapped font editors (and yes I actually made my own bitmapped fonts), a slide-show based game editor with a GUI system I made from scratch, etc.

screenshot of font editor

Editing my Celtic bitmap font in my font editor.

screenshot of face generator

Experiment to auto-generate face textures.

screenshot of ASCIIFX

ASCII Grafix, my text mode drawing program.

This playful sandbox of BASIC enthusiasm continued for many years. I was aware of other languages, and had been informed that C was the best general purpose language in engineering industries. However, BASIC was so much fun that I ignored C for a long time. And as one would expect, an interpreter facilitates exploration and learning rapidly as compared to a compiler.

Paradigm Shift

I realized there was something called C++ and assumed that it must be better than old fashioned C. In high school one day I was at a flea market and happened upon a wicked good book deal—three C++ books for $1 each. One of them, Simple C++ by Jeffrey M. Cogswell, is possibly the best programming introduction book ever—it teaches you object oriented programming (OOP) with examples from a fake project to make a robot dog (and it has a sense of humor too). It was an intro to C++, but it did it the right way, via OOP.

I have observed that many others learn C++ the wrong way, as is common in colleges, with almost no emphasis on OOP. When I was in college I took two C++ courses but I did not buy the books we were supposed to. I chose to read more useful books like Industrial Strength C++ by Mats Henricson and Erik Nyquist (for which I raked up some hefty late fees at the library) and Effective C++ by Scott Meyers.

My point, gentle programmers, is that our forefathers of computing started out in the primordial mud of undocumented disorganization, so now us advanced apes live in the Aftermaths…of CHAOS!
—Samuel H. Kenyon, circa 1998

My programming paradigm progression in the 1990s:

⇨ Mostly-chaotic BASIC spaghetti code.
Structured QuickBasic.
⇨ Object-oriented C++.

So, my personal development recapitulated a path of programming evolution of the late 1960s to the 1980s.

To be continued…


Image credits:

  1. Turbo button: Tamas Kemenczy
Tags: , , , , , , , , ,

TRONtastic New Year’s Eve and Human Factors of Crotch Access

Posted in interaction design, making and hacking on January 1st, 2011 by Samuel Kenyon

I improved my TRON:Legacy-esque illuminated vest and added some illuminated leg cladding. Here is a photo of me from last night (New Year’s Eve):

Me at GALACTICA: A TOGETHER NEW YEAR'S EVE @ Think Tank, Cambridge MA

What Worked

This time the vest front and back worked without fail for several hours.  The overall design worked—everybody either understood the TRON reference or thought it was cool even if they had not heard of TRON (yes, there are many people who have no clue what TRON is despite all the advertising).

The leg cladding looked really cool, but it only worked for a few minutes.

leg cladding

What Failed

One point in the EL wire on my left leg right before the knee failed before I even got to the destination.  After a while the EL wire next to that one also broke.  Since the leg cladding was one long wire, this caused my entire trousers to be conspicuously not shining.

partially illuminated left upper leg plate

partially illuminated upper leg plate

So I had to walk around and dance with a bunch of cardboard strapped to my legs for no reason.

the broken connections

Human factors of crotch access: Another problem with the cyber trousers ensemble is due to rushing at the last minute I used just one long wire for both legs instead of two.  This resulted in an illuminated wire going straight across my fly, a clear violation of human factors.  After all, I would be drinking and that will inevitably result in needing to urinate, and hence needing to open my fly. Also if I wanted to illuminate my crotch I could come up with a much more attractive scheme than a wire going straight across.  So my quick fix was to cover it with a black wire shroud and push it against my belt, but that in turn probably made the strain on the EL wire much worse.

The arm band: I figured the tiny connector and wires on my arm band would probably fail, and sure enough they did.  I had added some tape as strain relief but it wasn’t enough:

broken wires (pulled out from the heat shrink)

Lessons Learned

Having dealt with lots of wires and connectors in the past on robotics and wearable computers, I knew that the connectors and wires should be robustified, however I ran out of time before the event.  Also, EL wire really does not handle flexing and pulling very well, so I will pay special attention to that.  Also, a more robust solution than having one long EL wire for both legs would be to have separate EL wires so that if one fails the other will stay illuminated (it’s somewhat annoying though to solder EL wire because you have to scrape the phosphorous off the center lead).

Also, making the cardboard attachments for my legs forced me to figure out how to make crude patterns.  Interesting, but certainly not something I’d want to do all the time!

So, next time we will see what else I can come up with to improve this getup before I get completely bored with it.

Tags: , , , , , ,

Tron:Legacy and Isomorphisms

Posted in artificial intelligence, culture, philosophy on December 21st, 2010 by Samuel Kenyon

One of reasons I like Tron:Legacy is the existence of ISOs.  ISOs are “isomorphic algorithms”, which are lifeforms that emerged–unplanned–from the artificial environment of the grid.  Besides being a cool movie manifestation of ALife and emergent phenomena, there is also an association with certain philosophical and AI ideas via the word “isomorphic.”  The introduction to ISOs may have sounded like a brief moment of technobabble to some, whereas to me it was a brilliant reference to Gödel, Escher, Bach.

In this famous (in some circles) 1979 book by Douglas Hofstadter , the author suggests that since isomorphisms produce meaning in simple formal systems (they act as the link between symbols and real world objects) they might be behind all meaning in humans.

Hofstadter says (p. 82):

In my opinion, in fact, the key element in answering the question “What is consciousness?” will be the unraveling of the nature of the “isomorphism” which underlies meaning.


The other awesome element of Tron:Legacy is the digital DNA.  This can be repaired by manipulating the holographic interface of an entity’s identity disk.  In the movie this was demonstrated when Flynn fixed the digital DNA which then somehow resulted in the regeneration of Quorra’s missing arm.  Although this is Hollywood’s presentation of hacking incredibly complex system of codes (note that unlike most movies, Tron:Legacy shows actual UNIX commands being entered in the real world 2010 scenes, saving the fake interfaces for the Grid), it makes one wonder–what if repairing DNA and/or physical body parts really was that easy?

The concept of the ISO’s digital DNA is also a provocative idea aside from the ID disk interface.  Is this DNA better than biological DNA?  Are ISOs truly better than humans?  Or are they simply the Grid isomorphism of “real” world humans?  Flynn talks about all the improvements he can make in the world from Grid projects.  However, Flynn tells his program CLU (which is a partial copy of himself) that there’s no such thing as perfection.  So we are left in the middle ground, and anybody who thought this movie was a simple black and white good vs. evil epic Hollywood effects regurgitation has missed the important grey areas.

Quorra, an ISO

Cross-posted with Science 2.0.

Tags: , , , , , ,