Category: Programming

  • People Who Spammed Me This Week

    Banged A. Outmaneuvered
    Stockades U. Khufu
    Bridegrooms O. Serviles
    Conjugates B. Pulleys
    Posh G. Brooches
    Horne P. Tatar
    Bogies R. Jarred
    Inhabit B. Haynes
    Conclave B. Frenzied
    Flexibility J. Carries
    Piranhas I. Canned
    Hyperbolae P. Unsnarling
    Aristocrat L. Banality

  • Extruding Into Meatspace

    I spend a lot of time at Mathworld looking at some of the amazing interactive geometry examples therein , and wishing I had the time to learn to do similar things. So when I come across someone who has built real-world versions , it makes me want to hang up my programming spurs and find work in the food service industry.

    Nah, not really. But BOY would it be cool to have one of those.

    (link found at Transphormetic )

  • Not Dead…Only Working

    Where have I been? Making one of these in Flash.

  • Ooooohh!! Swirrlllyyyy!!!!!

    I spend more than a little time every year trying to come up with aesthetically pleasing Flash experiments. Then I come across something like this , which makes me want to trade in my computer for a dremel and a stack of sandpaper. This guy does cooler things than I have ever done, but HE does them with wood and springs.

    Aargh.

  • Synchronology

    …interesting article over on Kuro5hin : Japanese for Nerds . Basically a primer on looking at linguistics as another flavor of programming.

    Despite the articles several flaws — not the least of which is the fact that article seems to be vaguely insulting to its intended audience — it brings up a very interesting point: programming languages and human languages are (surprise!) very similar! They both, at the core, follow strictly logical rule sets made up of syntax and semiotics. Rule sets (grammar) for different languages have points of similarity which can be useful for using one language as the basis of learning another.

    Most of the rest is learning the words.

    Note that I said at the core languages are similar. Colloquialism can be equated to non-standards-compliance (or genetic drift), and can usually be reverse-engineered to find the original rules from which they sprang.

    As an example of how this kind of thing works, try reverse-engineering some “English” words in order to learn a little Latin, Greek, or Anglo-Saxon: economy ecology psychiatry psychology absent abate neologism physiology physiognomy

    Perhaps I will explore the interesting interplay between -logos and -nomos and what they imply about the way the words we use have drifted from their original meanings.

    Someday.

  • Building a Better Timeline

    I’m a programmer. And I like working in Flash. The timeline is an integral part of Flash, and I hate it. I don’t like touching anything in the development environment, ever.

    So I wrote one in Actionscript. It was surprisingly simple.

     // this goes in an external actionscript file
     var frameCounter = 0;
     // position in the timeline
     var loopSize = 200;
     // length of the timeline
     this.onEnterFrame = function() {
     switch(frameCounter) {
     case 1: // something which happens on frame 1
     break;
     case 9: // something which happens on frame 9
     break;
     case 42: // something which happens on frame 42
     break;
     }
     frameCounter = (frameCounter+1) % loopSize;
     }

    …and that is all there is to it. The only frames I have to worry about are the ones in which something actually happens. No filler necessary. No more digging through dozens of layers spread across hundreds of frames for a mis-typed variable.

    And I did it myyyyyyyy wayyyyyyyyyyyyy!!!!!!

  • Notes on Artificial Life

    To model artificial evolution chromosome for chromosome is impossible. We would have to have an operating system create random strings of digits and try to run them all, and then build upon the successes; e.g. those strings which will perform some function within that hardware.

    Instead it is more useful to begin the modeling at a level of sophistication where the beings’ interaction with the environment is obvious – when the being is mobile. Mobility is perhaps the fundamental interaction with the environment; the key word there being “interaction”. Awareness of the environment is tricky, as it assumes a certain level of self-awareness: “I am not that within which I exist.” Interaction and awareness are not quite the same thing.

    Interaction begins when there is more than one autonomous being with an environment: There is a thing here which is demonstrably not “I”.

    Therefore, in modeling interaction, there seems at the moment to be three levels: awareness, recognition, and reaction.

    Awareness: there is a thing here which is not-me
    Recognition: that thing is of type “X”
    Reaction: X is friend/foe/food

    …and perhaps there is some resonance between recognition and reaction.

    This begs the question: is existence a pre-requisite for awareness? Is the chain:

    Existence – awareness – recognition – reaction?

    The answer seems to be “yes”, for (in the realm of AI/ALife) a thing must exist before it can be made aware of any other thing. And it must be aware of a thing for it to recognize that thing. And it must recognize a thing before it can react to that thing.

    And here we must make a distinction reflex action and re-action. The action of X is its existence/proximity, and it is to that which I am re-acting.

    In modeling an entity we can approximate Awareness with a simple distance calculation: You are this close to me, therefore I am aware of you.

    Recognition requires a more refined set of senses, say, sight/smell/hearing. This can be another distance calculation, or combine distance with (say) sight in a particular direction.

    Using this as a beginning allows us to add a great many modifiers onto the base behavior:

    • fight/flight
    • arbitrary reaction to different Xs
    • different senses
    • – some senses broadcast (sight) – active
    • – some senses receive (smell) – reactive
    • reflex (pre-recognition) actions at different levels

    This brings up another question: Does a thing actively broadcast its existence or do other things become passively aware of its existence?

    Could be some of both; call it “signalling”.
    Active: noise, colors
    Passive: smell, body heat

    …all of which allows different senses to react to different stimuli at different levels. It also suggests a slight change to the structure of awareness:

    Exist — ?
    Awareness — Reflex
    Recognition — Reaction

    This is a good starting point; the rest is just code.

  • Directions

    The following is the short list of search strings which have brought visitors to my site so far this month:

    flash experiments
    ecce signum
    project gutenberg xml
    amazing flash experiment
    gutenberg xml
    memoirs of a madman etext
    tom sawyer gutenberg
    william t. vollmann interview 2004
    build a flash top-down game
    carp through the ice
    cellular automata in flash
    cellular automoton
    diary of a madman gogol etext
    duplicate dynamically createemptymovieclip
    flash experiments.
    flash fractal
    flash programming experiment
    gutenberg project xml
    isometric tracking flash
    load dynamic jpegs before movie starts how

    I suppose that by posting the search strings which bring people to my site on my site, I will set up an infinitely recursive loop which will suck the entire internet into Google.

    Woo Hoo! Three day weekend!

  • Aargh

    Got to Kendall but the internet was broken, so my students got the evening off.

    No, that isn’t entirely true. The internet was fine, but the IT monkeys up in Big Rapids let a virus through their fish-net of a firewall, and somehow that took down our connection here in Grand Rapids. Nothing the local IT folk could do about it.

    And this after I spent hours (hours!) putting together an assignment which would have transformed all fourteen of my students into web developers the likes of which the world has seldom seen!

    As the Russians say, i tak cebya .

    So in order to maintain some semblance of a productive evening I downloaded and installed noeGNUd , which is nothing less than an isometric/3d interface for NetHack!!!

    Yes, I know… NetHack can only truly be appreciated in the original Klingon ASCII. Yarbles to that, says I! Great Bolshy Yarblockoes! Someone went through the trouble to do this fantastic thing and make it available to the public, absolutely for free! And even put together a Windows port , which works fantastically!

    And so, to bed.

  • Teachers and Students

    Another day, another class. Today was the first in-class assignment: Find a poem or song lyrics, and using basic HTML and Cascading Style Sheets, mark up the document so that [a] The code is clean, and [b] it renders appropriately in the browser.

    At the beginning of class I asked the (what will soon be) usual question: “Does anyone have any questions about anything we have covered in this class, thus far?”

    Silence.

    “Okay! This is your assignment!”

    The questions began after about half an hour, and continued until the end of class at 8:30. All in all, everyone did quite well, but it was a good learning experience; for them, the difference between what you think you know and what you know; and for me, what to emphasize in my lessons, and in what order.

    Talking over teaching strategies with Bock later in the evening I recalled something Scott and I concluded a year or so ago: Web development, and indeed almost all aspects of programming, would be best taught in an apprentice/master environment. Programming is equal parts science and art, left-brain and right-brain, inductive and deductive. Were it pure science the classroom would work perfectly. The classroom is the best place for rote memorization and repetition. Were it entirely art there would be no real instruction at all; merely predefined tools and a blank canvas.

    But in development and in programming, you have at your disposal a very specific set of tools which work in very specific ways, and thus set up very specific boundaries. Within those boundaries you have a great deal of freedom, and thus have ample opportunity to use those common tools to create something unique. The science eventually becomes art.

    Perhaps in a more rational world apprenticeship would be the next step after school, but for now there are internships where students learn to smile while being pissed on. All we teachers can do is try to make them waterproof.