Baby steps

grid of 61 colored squares

This is the second smidgen of the code for our final project. It pulls RGB values and color names from a tab-delimited text file (which is, itself, based on the actual Krylon color options) and outputs this grid of swatches. The swatches don’t do anything yet—just drawing them took me, like, two days, thank you very much, and that was with some very helpful help from Shawn. Partly this is because I apparently can’t keep in my head for more than thirty seconds how arrays and objects work, and partly it’s because I just. can’t. focus. And partly it’s because I apparently have no idea what the fuck I’m doing.

I’m beginning to really like Diego’s Plan B, as proposed over the weekend:

Fake our own deaths.

I keep telling myself I have to not panic and just write the code one piece at a time. Then, later, I can get somebody to help me put it all together, which is something I know I have no clue how to do. But just accomplishing what seem like they should be simple things is stumping me. Most recently, I was trying to get the swatch name to be displayed when a square is rolled over. This is not by any means an important feature—in fact, it doesn’t really serve any purpose. But I should be able to do it, and I can’t figure out why it doesn’t work. I keep getting errors like “The function showName() does not exist” or “Cannot find anything named ‘swatches.'” Both of these things do, of course, exist, and I can’t see any reason why they wouldn’t be found.

I know it’s pretty rare for computers to just fuck up and much more common for me to do so, so I’m sure the answer is that I’ve done something really dumb and sloppy somewhere. But it could easily take me two hours to find that error, and every new goddamn line of code seems to cause some new mysterious issue. I can feel myself growing older just thinking about it. And there are a lot more lines of code to go. Here’s the stuff I was hoping to get done, oh, by, say, last Thursday:

Graffiti Glove Components

Brush selector

  • Read flex sensor data

    • 1 finger = marker
    • 2 fingers = small spray
    • 3 fingers = medium spray
    • 4 fingers = large spray

Color selector

  • Display grid of color swatches
  • Display color name on rollover
  • Highlight selected swatch on click
  • Change drawing color on click


  • Ask for confirmation


  • Undo last stroke
  • Redo stroke that was just undone

Save drawing

  • Ask for file name
  • Append time stamp
  • Display confirmation

Change background

  • Display four background thumbnails

    • subway car
    • brick wall
    • white van
    • blank

Paint in spray pattern

  • Draw an ellipse

  • Make random pixels within the ellipse transparent

Switch modes

  • Save drawing
  • Display palette
  • Hide palette
  • Restore drawing

And that’s not including the task of sewing us a new glove, for which I bought fabric on Monday, as well as a book about how to use my virgin four-year-old Juki serger. I know that’ll be fun once I get started, but I just can’t get started.

Maybe I need a drink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.