Author:


Learning to Do Things the Hard Way

Posted by – March 14, 2010

I’m a little stuck on this game called VVVVVV. It doesn’t look like much on paper: it was made with Flash, and the graphics might have been at home on a Commodore 64. However, the music is great, the quirky little humorous storyline is fun, and, despite multiple playthroughs, I’m still not sick of it.

But this is not a review of the game. No, this is me sharing yon pictograph. But first, some background. (Feel free to skip it if you’re familiar with the game.)

VVVVVV has collectibles (what game doesn’t?) called “shiny trinkets”. Collecting them is the key to accessing the secret bonus level, but some of them are really hard to get. The hardest is appropriately titled “Doing Things the Hard Way”. This trinket is so epic that it took me three minutes to get…the fifth time through. The first time…well, let’s not dwell on that.

The following is a pictographic representation of my fifth time collecting the “Doing Things the Hard Way” trinket. Click it to see it in it’s original-sized glory.

Learning-to-Do-Things-the-Hard-Way-Small.png

As you can see, it’s quite an endeavor. I feel like I have to retrain my reflexes every time I try it.

Here’s how I made it:

  1. Turn off the backgrounds before palying as they’ll mess up the compositing process.
  2. Obtain the trinket. Record the attempt using a screen recorder (in my case, Snapz Pro) at 15 FPS, which makes good motion trails. Save the resulting movie using lossless compression (I used PNG).
  3. Export the movie to a sequence of still images. I used Quicktime 7 Pro for this (with Snow Leopard, this must be specially installed from the Snow Leopard DVD).
  4. Sort the over 3000 resulting images by room. This doesn’t take all that long but is very tedious and boring since there’s really no way to automate it. I listened to podcasts while I did it.
  5. Copy one of the images and erase the little blue man. This is our base.
  6. Create a Photoshop action that composites the images by:
    1. Copy the base onto the target image (into a new layer).
    2. Set the blend mode of this new layer to “Difference’. This erases everything but the little blue man, leaving him on a black field.
    3. Copy this onto the base (into a new layer).
    4. Use the Select > Color Range… command to select all black.
    5. Delete the black. Now you’ve got the little blue man isolated in his own layer on top of the room base.
    6. Set the little blue man’s transparency to 17%.
  7. Batch-run this action on every image file for every room.
  8. Combine the resulting individual room composites into one very tall image.

Sadly, by the time I actually got the trinket, the timing had drifted enough so the motion trail depicting Captain Viridian (that’s the little blue man’s name) swooping down to collect his prize looks a bit strange.

I thought this was an interesting sight. Perhaps more interesting would be a recording of someone learning to do things the hard way for the first time…but, then again, such a beast would probably be impossibly thick with little blue men. Most first-timers (myself included) die literally hundreds of times on their first attempt at this.

We Will Be Victorious

Posted by – December 8, 2009

Believe it or not, I drew this for a computer science class. The assignment was to do something right-brained that dealt with the subjects of the course. Well, we watched Robert X. Cringely’s Triumph of the Nerds videos during the semester, and I’m an ambigram nerd. These two facts conspired to bring you the image below:

It says 'Triumph of the Nerds', in case you couldn't tell

In case you couldn’t tell, this says “Triumph of the Nerds”. It’s rotationally symmetric; that is, if you rotate it 180 degrees it will still say the same thing.

I’m not wholly satisfied with the design. For one thing, there is no spacing between “the” and “nerds”; I didn’t have enough time to experiment with ways to separate them without compromising the “m” in “triumph”. That notwithstanding, I feel it’s good enough to share, and certainly good enough to make the grade.

Addicted to the Mostly Harmless

Posted by – December 1, 2009

Note to readers who are not my CS404 TA: this post is an echo of the last, not by my choice, but because the topics were assigned by my CS404 class, which requires me to post its writing assignments on my blog.

I have looked into the abyss. I have dabbled in online games, dipped my toes in the text-based precursor to MMORPGs; I have wiled away hours in pointless chat rooms. I have stared into the grasping maw of the MMORPG, and said, “There but for the grace of God go I.”

I am only grateful that World of Warcraft emerged after my vulnerable formative years were through, so that I could recognize what they would do to me if I tried them. I have avoided them like the drug they would to me become, and advise all others to do the same. You may not know how deep that abyss goes for you, and the potential enjoyment you might glean from the game is not worth the risk of it ensnaring you in life-destroying addiction.

Addicted to the Harmless

Posted by – November 19, 2009

Talking to people online. Reading, keeping current, increasing your knowledge. Working on hobby projects. Enjoying a good book. Writing for your blog. Tweeting and (more often) reading others’ tweets.

These things are harmless; they’re good, healthy activities; but they do not a full life make, and they are all addictive. The Internet is a great connection machine; there are always more people to talk to and more things to read. You could spend your entire life on the Internet and never reach the bottom. Some days, I want to; wrapped up in reading (for example) articles about Cocoa, it’s very easy to forget the homework that’s due tomorrow. These harmless and positive activities then become as detrimental as any imbalance-creating addiction.

That said, the wonderful thing about addiction to the harmless is that you don’t have to give it up to get better. Once moderated, these addictions become an important and wholesome contribution to a healthy and balanced life. If I can do it, and I can, then you can, too.

Third World Think Tank

Posted by – November 14, 2009

This is a story about a shirt.

When I was 19, I served a mission for the Church of Jesus Christ of Latter-Day Saints to Nicaragua. This is a country with few natural resources, a literacy rate of 68%, a government steeped in nigh inescapable corruption, and an economy that has yet to recover from the regime of the Sandinistas (to say nothing of the earthquake that leveled the capital 30-odd years ago). Poverty doesn’t begin to describe it—if one who lives as well as I still lives beneath the poverty threshold, then a new word must be found to describe how the poorest live in Nicaragua.

In Nicaragua, I met a woman who studied industrial engineering in Russia. There was no work for her; she sold tomatoes in the market. I’ve heard that most college graduates do not work in their field of study, but, really, tomatoes?

By complete random chance, the shirts that I bought (in Provo, UT) for my mission were made in Nicaragua. By a chance somewhat less random, I spent six months of that mission in Tipitapa, where those shirts were made. I taught a woman who worked in the factory that made the shirts; when I told her they were made in Nicaragua, she peered at them for a moment, nodded her head, and said that she remembered those shirts.

Hours in the factory are long; 12- to 16-hour days are the norm. A factory worker cannot choose her shift; rather, her hours are dictated to her. If the factory has a deadline to meet, well, it works overtime, whatever the wishes of its workers. Fortunately, the pay is good; it starts at $80/month, with the most skilled and dedicated making $150/month or more.

Some may read a degree of sarcasm in that last sentence; I assure you, I mean it precisely as written. If you can manage to earn $80/month in Nicaragua, you are above the average GDP per capita. At $80/month, you can even afford certain luxuries, like sending your kids to school.

Nicaragua is a country in which one may subsist with very little. Electricity is nice, but hardly needed; the temperature never drops below 80 ºF in most of the country, and nearly everyone cooks over wood fires. If you can’t pay for running water, you can dig a well (though only the truly destitute take this route). Food is cheaper—a small family can subsist on less than a dollar a day. And if you don’t own the land on which you reside, well, nobody cares enough to kick you off.

You think they have poor factory workers in China? At least one of those clothes factories was owned by a man from China.

I don’t feel guilty (well, not very guilty, anyway) that most of what I own was made in a third world country. I can honestly say, from what I witnessed with my own eyes, that those who work at that particular lousy, exploitative sweatshop are the fortunate ones. Because businesses in the developed world realized that a third-world living wage amounts to a comparative pittance, and because the world is flat, literally thousands of Nicaraguans have secure jobs at a competitive wage.

That said, my hope is that our first world free ride will not last forever. My hope is that circumstances in Nicaragua will one day improve to the point where no one would stoop to work for a mere $80/month. Surely the poverty of the developing world cannot last forever; in a flat world, even the Nicas can participate in the same global economic machine that turned America into a nation where poverty is a joke.

It may mean paying more for my shirts, but it would also mean less chance of my job going to India, or China, or Russia. And, you know, it would be pretty great for the people in third world countries, too.

The Cathedral is Still Prettier than the Bazaar

Posted by – November 10, 2009

The open source software model—Eric Steven Raymond’s “Bazaar“—may tend to produce technically solid, stable software systems; it may, as Raymond says, offer many efficiencies over the proprietary software model (the “Cathedral”); it may even be the best way to write certain types of applications. Be that as it may, and with notable exceptions, most FOSS user interfaces are ugly, convoluted, barely-usable dreck. There does not seem to be much market pressure in the Bazaar to make the stall pretty, and in the critical but oft-neglected area of User Experience, the Cathedral continues to dominate.

An Open Letter to Big Content

Posted by – November 5, 2009

Dear music, movie, TV, publishing, and whatever other content industries there may be,

I do not need you. Your wares are not so addictive that you can extort anything from me that you wish, secure in the knowledge that I cannot live without you. Fear me, for I am a nerd, and I will write your future with the technologies I create. Embrace my change, and you will enjoy ever grander success. Fight my change, and you will fade into a distant memory that most are eager to forget.

With love, Ryan

Experiments in Musical Idiots

Posted by – November 3, 2009

“Emily Howell” is a computer program that composes high-quality music. That notwithstanding, Emily is not an intelligent being; she’s just a program that’s backed by a database. That database must be created by a human, and the data provided shapes the music that results. Though rather unlike any other tool for composition, it is nevertheless a tool to be used by humans.

So, of course, there is controversy. Composers reject “her” compositions because they feel music is innately human; performers can’t play it for fear of tarnishing their reputation. Frankly, I don’t understand how these brilliant composers could sound so very much like idiots. I, for one, welcome our new robot overlords.

IANAW

Posted by – October 28, 2009

Paul De Palma is right about one thing: no man is qualified to say for sure why any woman does anything at all, much less why she avoids Computer Science. I therefore find it surprising that all of the articles I’ve read on this subject were written by men.

Now, I am not a woman. (I hope this revelation does not surprise you.) As a man, I can unequivocally opine that this male-dominated discipline wants more women. We want it enough to hem and haw and write articles about Title IX and nature vs. nurture. Women are doing none of these things. Could it be that they just don’t care?

Twenty Years of FAIL: The Common Password

Posted by – October 20, 2009

What would you expect of a man who infiltrated dozens of US military and government computer systems in the mid-1980′s? Would it heighten your perceptions to learn that he sold his discoveries to the KGB? Or that, as the first black-hat ever caught and prosecuted, he was in many ways a pioneer in his field?

Would you believe me if I told you that he mostly just guessed passwords?

Oh, sure, he had the emacs mail-move permissions escalation vulnerability that gives Cliff Stoll’s The Cuckoo’s Egg its distinctive title; props for that one. But to even use it, first he needed to guess a password to gain at least minimal access to a system.

How does one guess a password? The hacker, Markus Hess, mostly tried common choices, guest accounts, and default passwords. In some cases, he used an automated program to guess all of the words in the dictionary. In others, he found the password stored on the system in regular old text, plain for anyone to read.

We know better today, of course. We have best practices. Had they been known and followed in the 80′s, Markus Hess would have been far less successful than he was. Passwords can be quite secure.

There you have it, then. Blog over. Use good passwords. Eat your vegetables. The end.

Epilogue

By the way, nobody follows best practices. A recent study found that only about 4% do. Even today, the most common MySpace passwords are “password1″, “abc123″, “myspace1″, and “password”. Anecdotally, everyone I’ve ever met, and I mean everyone, has at most four passwords they use for everything.

I’ve become convinced that there’s really nothing to be done. Secure passwords are impossible to remember. People will write them down, use the same ones everywhere, email them to each other, and generally make criminals’ lives easier. It’s not their fault; it’s a failing of the human brain. Twenty years after Markus Hess, passwords still fail, and they will continue to fail until something better replaces them.

Something must be found to replace the password, something secure that humans can actually use. As an optimist, I hope it can be done; I’ll be thinking on it. At least, the part of my brain not devoted to remembering long lists of secure passwords will.