Archive for March, 2008

Life: Update from Tuesday through Saturday night


The second day of sprinting, I spent the morning reading Ian’s middleware commenting code with Jeff trying to understand how it might work in bitsyblog. It took a bit of fiddling to get things to work; turned out caching was the problem. Mrrgh to caching. You are a lovely thing, but boy do you make debugging hell. I think I’m slowly coming to grips with this “interwebs” thing and how web-based programming kind of works. A little. See, this is the problem with being a global learner; you can’t grasp things sequentially, you just have to swim around and swim around and mess up until slowly, slowly, very slowly, enlightenment dawns, and you look up one day and realize you grok something new in fullness. And then it’s yours. But until then, it’s baffling and obtuse.

On the plane back to New York, Chris had some episodes of Planet Earth on his laptop, so we stared in awe at close-up shots of moths with fungi growing from their brains in gorgeous, gorgeous time-lapse for a few hours. Meanwhile, Doug (in the seat next to us) played with Sugar on his Gentoo-running laptop. It’s really awesome to work with such a funky, smart group of people. I’m learning so much, and I hope and hope I can give back just as much someday (and that I’m doing a little bit of that now).

Thursday night I took the train out to New Jersey and had dinner with my uncle and my cousin Mark, who was here from Babson on his spring break. The next morning, bereft of work (day off – Good Friday), Mark and I walked from Penn Station to the bus stop in Chinatown, eating pizza and rice porridge as we went. It was good to catch up. He only has one semester left in undergrad after this one, and is beginning to face the same “so what do I do now?” question that I’ve been purposefully ignoring for almost a year now (more on this later). Afterwards, I headed back to I.House (distracted by several bookstores along the way) and dined on butternut squash ravioli with a friend who’s majoring in music education at NYU.

The evening concluded with the weirdest theatrical performance I have ever seen; the Neo-Futurists attempting to perform 30 sketches in 60 minutes (I believe they managed 26). Acts included a neon baby doll flying between a banana-eating man and an origami fortune teller, five people rhythmically head-bobbing in the subway, and a man attempting to console a chair that he had just knocked over (upon orders from… a ghost, I think). My favorite was the 12.5 question meta-quiz and the sketch where audience members read from their pre-planted scripts on how their actions were being controlled by the scriptwriters and by gum they weren’t going to stand for it (whereupon they continued to read from the script… and sometimes attempt to juggle). The price of admission was determined by adding $10 to $N, where N is the roll of a 6-sided die. I rolled a 2. A huge thank-you to Sumana for the spontaneous invitation. I have also learned that there is a very large black cube in Astor Place, and that it spins. And that it wobbles with rather terrifying amplitude if you spin it faster than 10RPM or so.

This morning I had brunch with Sam and friends from Yale and NYU. After stopping by the Chocolate Bar (a little candy-store cafe) and consuming half of what I think a Snickers was supposed to taste like (gorgeous) before it got all mass-produced and yicky, we took the subway back up towards Columbia, where Sam did some tweaking of audio filters and dynamic ranges on his laptop and I heard music with hi-hats.

To realize how strange this is to me, you have to realize that the first few bars of a song (introduced by a rapid beat on the hi-hats before the bass line and other instruments come in) used to sound like this:

*silence*
*silence*
*silence*
(bass:) BHUMMMMMMMMMMM
(other instruments:) *faint gasping noises*

And afterwards, it was…

tappity-tappity-tappity-tappity
tappity-tappity-tappity-tappity
(bass:) BHUM(tappity)BHUM(tappity)BHUM(tappity)BHUM(tappity)
(other instruments:) Whoooe(tappity)EEE(tappity)eeooo(tappity)OOooooo(tappity)Eeee(tappity)EEeeooo

Apparently recordings aren’t supposed to be entirely overwhelmed by bass drums, bass guitars, and the occasional singer – other instruments (like guitars and non-bass-drum forms of percussion) are supposed to also be perceptible to human ears. After rebalancing the track so I could actually hear all the parts, I can confidently say that it sounds really weird. It’s like having sunglasses on your whole life and suddenly having those removed and going “WHOA the world is bright.” What Sam put together was definitely a rough cut (the filters interacted with each other in strange ways), and it sounds completely foreign (as in “I know this is closer to what it’s supposed to sound like, but the one without the filters sounds better only because it sounds less weird to me”) but it was very, very cool to get a taste of it and I want more. I’d like to be able to have that balance sound “normal” to me as well.

Finally, these are the coolest mesh networking explanation videos. Ever. Mad props to Matt and FFM and crew. I don’t know any of the other folks who have produced these videos, but hopefully I’ll get to come out to DC in May and meet more of you; it was fantastic to meet the GASP folks, including Jeff Elkner, Allen Downey’s coauthor – I started learning Python from their book before I learned that Allen was going to come to teach at Olin the next year. I really want to experiment more with GASP, which is a gorgeously simple wrapper API on top of Pygame (yes, pygame can be easier to use) so hopefully I’ll have time to rewrite Pac-man using GASP tomorrow in between going to church (it’s Easter) and triple-booting my laptop (probably start that up before I leave for church) and finishing some books and attempting to write my first Trac plugin, or at least get started.

A bit more work now, and then it’s bedtime. I’m not sure why I’ve been so tired the last two weeks; I’m not actually getting less sleep or worse food or anything, but I keep having this nagging feeling that what I’d really like instead of working on everything all the time is a good massage and then a long, long nap under fluffy blankets, and then hot tea. I’ll probably have to take an evening “off” this week and do the last one and attempt to simulate the first two by going for a run and stretching out really well afterwards, and using my sleeping bag, which is… well, kind of like a synthetic fluffy tube-blanket, right? Right.


Grammaticality


Seen on a train in Boston. The first line of graffiti, in case you can’t see it, reads “Diagram your sentences.”


(from a Boston Public Schools poster)


Installing Trac without root privs


Trac is a most excellent bugtracking, wiki, version control, <insert other things relevant to development> system. However, the default instructions for installing Trac require root (superuser) privs, which isn’t possible if you use a shared server (I do) or don’t have sudo on the box you’re trying things out on (or for whatever reason, want to isolate your Trac install). Fortunately, the fix is easy; use virtualenv.

I haven’t seen these instructions up anywhere, so I’m posting them here (if someone would like these on the Trac wiki, feel free to port them over, or to ask me to). Thanks to Noah (coderanger) who suggested using virtualenv (by Ian) early on, saving a lot of unnecessary pain.

First, if you don’t have root and your default python install (type “python -V” at your prompt) is earlier than python2.4, you’ll want to custom-install Python2.5 or some other more recent version. Instructions on how to do that are here. After you’ve got python2.4 or later, you can proceed.


# get the code...
wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.0.tar.gz #md5=fb86aabdfc2033612b936cf08ad811ec
tar zxfv virtualenv-1.0.tar.gz # untar/unzip
mv virtualenv-1.0/virtualenv.py ./ # copy out the python files
rm -r virtualenv-1.0 # not strictly necessary, but cleans stuff up
rm virtualenv-1.0.tar.gz # ditto
python virtualenv.py . # to install virtualenv in your current directory

(If you want to install virtualenv somewhere else, run python virtualenv.py somewhere_else as the last command instead.) You should now have a /bin and a /lib in your current directory. Now you can follow the Trac installation guide, using the stuff in ./bin/python.


bin/easy_install Pygments
bin/easy_install Genshi
bin/easy_install Trac

That’s it. And now you can create your project wherever you like (replace /path/to/yourproject with whatever you want – /home/yourusername/nameofproject or whatnot) and test it…


bin/trac-admin /path/to/yourproject initenv
bin/tracd --port 8000 /path/to/yourproject

and then go to http://localhost:8000 or http://your-url.com:8000 to check it out. Follow the instructions on the Trac wiki guide thereafter to customize Trac and deploy it on a “real” (non-tracd) webserver – just use your virtualenv’s bin/python python-instance.

Suggestions, corrections, and clarifications are, as usual, welcome.


sprint! sprint!


Sprint day so far:

~2am-ish: Catch a cab with fellow TOPPers from the party at Ian’s, which was wonderful fun (a fellow partygoer: “This is surreal. We’re surrounded by these pioneers of the web… I mean, to introduce yourself with ‘Hi. I wrote CherryPy,’ or ‘I wrote Paste’, what’s that like?”) and subsequently crash in my hotel room.

10am: Wake up, having slept deeply and for far, far longer than usual. Remember previous night’s falafel with great satisfaction; am most decidedly not hungry. Decide to read. Read.

Noon: Meander over to hotel. Discover OLPC sprint location moved. Discover laptop still hates wifi.

1pm: Give up on wifi. Use cable. Grumble a bit. Eat lunch.

2pm: Install, install, setup, install, setup, install, install, branch, checkout. Scatter around trying to figure out what to do and which of multiple routes to installation and getting-started-developing is the one to take. Resolve to document much more. Oi.

4pm: Finally settle into a groove of coding. “Coding” is a slight misnomer; what I’m actually doing is learning pygame which involves bouncing between multiple tutorials and copying and modding lines of code until I have a structure I can work with with a simple event-handling loop. Occasionally become distracted by Pippy and looking through Pippy code as well as email, newsfeeds, and so forth, but finally realize this multitasking kills all my efficiency, and close all windows except for “Learning Pygame” ones. Proceed significantly more productively henceforth.

7pm: Finish game. It’s ugly, hackish, and not terrifically entertaining; basically, you are a bird, you poop on cars, and send them spinning when you hit. No scoring. No end. Atrocious art (done in 5 minutes on my laptop). Consider myself to have “sort of learned pygame.” (Later confirm, while looking at Anil’s code, that there is much I do not know.)

8pm: Now it runs inside the XO emulator! Yay! I’ve made an Activity! So to speak.

8:30: Pizza – doubleyay!

Now: Eating pizza, blog.

Later: Exploring Pippy.

I think what I enjoy most about the TOPP and the OLPC offices is that they kind of feel a bit like sprinting all the time. Not constantly, not entirely, but there are aspects of the environment that are sprintlike that I’m quite fond of – collective ad-hoc question-answering, loose physical layout, ridiculously smart people from varied backgrounds, fun projects (that do kind of save the world and all). I wish that I could do this all the time.

Also, it’s really nice to be at a sprint that I’m not running! I actually learn to code this way. I think people assume I know a lot more than I actually do because I’ve run OLPC sprints (well, Jams) before – I can point people towards lots of resources, but haven’t actually contributed substantial code myself. Been trying to change that. I’m trying to back out of “management” for a while. It’s hard, because was beginning to get effective at the former, and feel really awkward and raw-newbie in comparison when coding (there are people here in high school who can code in circles around me – it’s amazing).

I’d like to do more sprints, but find it hard to do them (physically) on my own. Something like Saturday House might be real nice for that – a space where I can go, surround myself with people, declare I’m doing This For Sprint, then sprint, then show it off.


Conference talking, talking, talking…


PyCon wifi is going mildly funky; the hammering of hundreds of geeks with laptops is remarkably effective at Taking Things Down.

To wax poetic in the meantime: conferences (and classes with lectures, to a large extent) are moving streams of knowledge into which I can’t quite dive, but can lounge on the side of, blowing dandelion seeds of other-subjects into the wind, occasionally dipping in a foot into this stream of information, or plunging in for a moment to get a cold jolt that’ll wake me up and reorient me to the world. It’s great. I get stuff done.

However, if you ask me to fill in what the lecture was about afterwards, I’ll only be able to recount a bit of it, or talk about whatever off-topic activity I was pursuing instead of listening like I was “supposed” to.

Do I get something out of talks? Oh, yeah. Perhaps not what’s intended, but I do. By filling in peripheral noise around the edges (which magically turns into information when I focus on it), it lets me zone in on a task; it’s almost like I need the background thing-I-should-be-paying-attention-to in order to pay attention to something else. For instance, I’m here in a lecture about Pythonic math classes (in the course/school sense, not the object-oriented one) watching code on a large screen do something with Pascal’s triangle, but I’m actually writing this post, and a pilot proposal for a school, and catching up on WSGI before Paul’s talk on it this afternoon.

I think this is a side effect of how I process information into understanding in a more general sense – I need to walk around a subject, not linearly through it, in order to grok something beyond a mechanistic ability to parse through pre-set directions A, B, and C. I have a difficult time following sequential information (except in books, and even then I need multiple quick reads to parse things most effectively). Step-by-step steps tend to step nicely into one side of my brain and out the other. I don’t need to do, although messing around helps quite a lot – I need to be able to write or tell or teach the bigger picture to somebody else before I can get into details and implement things on my own. (This reversal is really strange; I have to teach something before I’m able to learn it, which leads to me doing a lot of Talking About before I do a lot of Doing.)


(Eu)stress


Can you do a backbend? On pointe? On a guy’s head? At the same time?

In other news, I leave for PyCon tomorrow and have way too much to do before I leave. Too many websites to make… blergh. Who was it who said that if you want something done, give it to a busy person?

I wish I didn’t have to run on the edge of panic to get things to happen, though – I seem most effective in the intermittent glitchy periods between overloads, but the overloads are necessary for me to have those intermittent downtimes during which stuff gets done. I wonder if my work habits could learn anything from sports training methodologies (where you overuse your body, then let it rest, then repeat – but do it in a safe and semi-systematic, planned manner).


I can has self esteem? More?


I recently remembered one of the reasons I usually have a pull-down resistor on my self.perception_of_abilities pin. Putting a blanket “I don’t know stuff” setting out makes it easier to deal with people who seem to think you know less than you (probably) do, because you can chalk it up to your directly telling them to treat you like a n00b instead of… other things.

(What I perceive as) the assumptions of others about my ability levels are not always correct. I shouldn’t let myself be tossed around by them like this. I should not let something somebody else says suddenly cause me to see myself as incompetent. But it does. And this rankles me – not so much that I think someone else has made that assumption, but that I’m not certain enough in my own abilities to be able to stand my ground and calmly proceed, instead of immediately flying into “wait, do I suck? How can I prove – to myself and them – that I don’t?” mode. I like being responsive and reactive, but… not that way. It makes me less effective.

Over the years, i’ve definitely learned how to not seem outwardly affected by this. I continue doing what I think I ought to be doing, but it spawns a back-of-brain thread that sucks up extra cycles that could be used to better effect, and I have to spend time afterwards – talking to a friend over dinner, writing, whatever – hunting down and killing those rogue processes. And I don’t like being motivated by a desire to prove myself to anyone; I want to be motivated by doing things that I think are important and useful and fun, not boosting up my karma/ego/score on some arbitrary chart.

Bleh. Okay. I think that’s purged it from my mind. Back to the code.


One way to deal with an email backlog…


Tonight I got rid of my email backlog.

Tonight I actually got rid of all of my email. Unintentionally. While playing around with offlineimap, I… (am really ashamed to say this, and I) didn’t really bother to read the manual thoroughly beforehand. And… well…. yeah.

My brain went something like this.

1 second afterwards: *blink*
5 seconds afterwards:[multiple four-letter words unprintable here in the presence of polite company]
10 seconds afterwarsd: Well, that’s one way to deal with an email backlog.

I then proceeded to calmly drink a glass of water, and then – with a blissful feeling of peace and serenity blanketing my mind – began to hyperventilate.

This has been the latest in your series of Mel Does Stupid Things. I will now go improve all my backup processes.

Epilogue: Dreamhost does automatic backups
in a ~/.backup folder, bless them. So that was an easy revert, and it appears as if I’ve only lost the last 12 hours of
incoming email (if you sent me something important in the last 12
hours, you may… want to resend.)


Analog vs. digital fabrication


Note: I’m posting this partly because I recognize the thoughts therein are rough and have gigantic logical holes in them, and welcome people to blow cannonballs through them to force me to make my thinking on this topic more rigorous. Also, I’m really bad at fabrication.

An email discussion started around the multimachine very late last night, and a friend brought up (half-seriously) the question “so what would it take to fully digitize it?”

My reply:

You can CNC-ify a lot of things. To do it with this particular machine would probably involve a somewhat awkward series of contraptions to move (with great precision) either Very Large Motors (the multimachine) or Very Large Parts. But I’m guessing that’s why you asked the question with a grin in the first place, and it’s the reason I’m going to start on my own monologue here in reply.

Disclaimer: I’m a coder and electrical engineer, and I love digital fabrication and the idea (and practice) of treating physical stuff as information to be manipulated. I think it’s a tremendously powerful one. I think that more work in this area can and will happen, and that the resulting developments in personal fabrication will revolutionize the world and make great changes and be an enabling factor and all that stuff.

But.

There are some things that analog fabrication can do that digital can’t, at least not at the moment (and probably for a while). Sloppy, inaccurate, non-mass-producible, human-time-required analog fabrication. Those seeming weaknesses are also, under the right circumstances, strengths.

Sure, we can make welding robots (heck, car factories have been using them for years). But when you’re monkeying around an old steel bridge in Jakarta that needs a couple handrails stuck on, it’s far faster, cheaper, more efficient, and probably just better design to send a human with a tiny welding rig out and tell them to hack. In situations where you’ll never going to want to produce that precise artifact again (the exact way you reassembled the parts of this particular old bike frame won’t be useful to someone wih a different one), analog production makes a lot of sense.

It’s a setup vs execution time tradeoff – digital is heavy on setup time, analog heavy on execution. It’s the same reason why software testing is done with automated scripts and manual exploration (see the work of John and James Bach, and Cem Kaner, and the context-driven school of testing, and their papers on exploratory testing). You pound on software manually because doing that is far more agile than writing scripts to do the tests you’re thinking of (and 99% of those scripts would end up being useless and discarded after the first run, in any case). You write scripts because there’s something you know you want to test the same way every time, many times. There’s a sort of complex dance between the two – where best to use a person, where best to use code.

And call me sentimental, but there’s just something viscerally satisfying about marking off and sawing wood, or shaving off plastic with a dremel, or feeding aluminum stock into a bandsaw and feeling the material respond to your movements. There’s something in the way it feels to heft a good drill that can’t be expressed in any coordinate system that I know of. We don’t need to digitize all information. Not all information will be useful to digitize. And in any case, the end result (right now, at least) has got to be non-digital to actually physically impact the world.

What we can do is digitally share the results of these analog, human-driven adaptations. Pictures of “well, here’s how I built my treehouse around this tree,” an essay on “I took these old bike frames… and made a cart!” What we can also do is use digital fabrication to take the gruntwork away from analog fabrication so that people can spend their time in the creative bits (“how do I build a treehouse around this tree? Maybe I can cantilever this plank out from that branch…”) and less time in the repetitive ones (“great, now I have to make a couple hundred treehouse-plank-holder-together pieces.”)

What we can also do is push digital fabrication forward so that analog fab is forced to find a better and more optimal place to be (like how the advent of high-level languages freed low-level ones like assembly from having to handle All Computer Programming Problems and allowed practitioners of low-level languages to focus on interpreters, performance tweaks, and things that only low-level languages did well – admittedly, this isn’t a great example).

This would probably make an interesting debate to blog out somewhere – digital vs analog fabrication, and where each method finds its strengths and weaknesses. Preferably when it’s not 3:07AM and I’m half-zonked into lack of coherence from exhaustion.


The letter I mailed today


Dear State of Illinois,

It may be somewhat hard for me to serve on jury duty on this coming March 13th. I’m currently an intern in New York working on a project with a major release in less than a month, and while my parents would be thrilled to see my face again, my getting a last-minute plane ticket out to Chicago right now would (1) render me completely bankrupt and (2) force myself and several other people to not sleep for several days to make up for the testing I wouldn’t be able to do while sitting in a waiting room purchasing snacks from vending machines to keep myself somewhat half-sane and occupied.

Can I request a raincheck date for June?

Love,

-Mel

(The actual letter was somewhat more formally worded, of course.)