Saturday, June 27, 2009

The Hangover

Went to see the movie The Hangover today. The movie-going experience was marred by a sold-out theater. The movie's been out for at least a couple of weeks, and we went at 2:30 in the afternoon, and I don't remember every going to a movie that sold out in Lafayette...what the hell? Anyway, there were a couple of particularly annoying audience member. One woman to my left howled and squealed in exaggerated laughter at everything that happened on-screen. I'm glad she was having a good time, but screeching at every phrase and gesture in the movie is a bit much. I think the woman was either drunk or had a chemical imbalance.

The second big annoyance was sitting right in front of me. It was one of those people that feels the need to say everything that happens to be going through her head at the time, which happens to be not a whole lot. Mostly it was just stating what was the on the screen. When the characters in the movie wake up and we see a chicken in their hotel room, the genius in front of me said "It's a chicken." Guess what she said when the tiger was on-screen? This went on pretty much through the whole movie.

Oh yeah, how was the movie? It was all right, but definitely not worth packing the cineplex in the middle of the afternoon. Mostly the humor went for the lowest common denominator and ended up hitting it. We got copious helpings of full-frontal male nudity, and ass, and pedophilia jokes, and vomiting. And you know, there's nothing funnier than a baby getting hit with a car door. That's not to say there weren't a few clever bits, but for the most part the humor was pitched at the level of your average 7th-grader. If you find an old man getting a physical check-up inherently funny, this is the movie for you. Apparently it was also the movie for a lot of other people, because like I said, the theater was packed and the howler monkey to my left wasn't the only one enjoying the show.

That's one thing I really miss about Japan. The audience members in movies were blissfully silent. Here, everyone treats a theater like their living room. I hope if there is a hell, there's a special place in it for the chick sitting in front of me today. And when she gets there, she'll probably be placed front and center so she can contribute to the suffering by saying stuff like "It's hot in here."

Sunday, June 21, 2009

Windows 7 Sleep Nightmare

So I went through the horrible ordeal of trying to build my own PC and having the motherboard fry out on me, so I ordered a pre-built system.

In my continuing hubris, I decided to install the Windows 7 stable release candidate, mostly because I heard it was very good, and that Vista sucks. So I got my new machine on Friday night and spent most of yesterday installing new software and configuring the machine to my liking. Until today, I'd been very pleased with Windows 7.

However, there was a small problem that turned into a very large one. My computer is in the same room that I sleep, so I like to have the monitor either power down or go to a blank screen saver when I'm not using it. Sounds easy enough, but no matter what settings I used, the monitor would never power off or go to a blank screen saver. I read some stuff in various forums saying this was a problem with Vista not filtering input from optical mice (basically it thinks you're still using the mouse, so never shuts off). There's a patch for Vista, but nothing so far that seems to work for Windows 7. Still not a big deal.

I did notice the "Sleep" function in the Start menu and thought that might be a good thing to use. I could put the PC to sleep and it would quickly reboot each morning. So I put it to sleep. And guess what, friends and neighbors? The motherfucker wouldn't wake up. I pushed the power button, and the keyboard would light up, but it acted like it was still sleeping. I powered it completely off and then back on. Same deal. I unplugged the machine and tried again...nada.

This was about 5 hours ago. I was pretty upset, because I didn't want to have to return any more hardware to NewEgg and get a new machine. I tried Gateway's customer service. That was a huge freaking mistake. Both their chat and phone reps told me that I had to register my machine before they could assist me. Sounds easy, right? After all, I've got my warranty, the serial number, the SNID, and shitloads of paperwork on the thing. I've even got a piece of paper in the box that says "Register your computer online at It's quick and easy." Yeah, okay. But when I tried to register online, it tells me that since I don't have a 20-digit serial number, I'll have to register either by phone or chat. Guess what the tech support reps told me? That I'd have to fax or mail a proof of purchase to Gateway and wait 48 hours for processing, then call them back. WTF?

I asked the rep on the phone exactly why I couldn't register right then with him...I had all the information. He said it was because the computer was manufactured in June of 2008 and because of the time period between being shipped to the retailer and the purchase, Gateway had a policy of requiring a proof of purchase. Huh? Does that make any sense whatsoever? It shouldn't matter what the gap between the manufacture and the purchase. All that should matter is that I have evidence that I purchased the machine, and that they give it to me upon purchase so that I can quickly and easily verify that I purchased it. This isn't a fucking box of cereal, people. So I'm not happy with them.

I was ready to call NewEgg and just replace the stupid machine, but their customer support isn't open on Sundays, so I decided to wait until tomorrow morning. In the meantime, I figured I'd research the problem a bit more.

Thankfully, I came across this Gizmodo post.

Win 7 Tip: Sleep/Hibernate Mode Is Buggy, May Incapacitate Your Machine

When I came home last night, I thought my previously healthy Windows 7 machine was dead. It was making a horrendous squeal and refused to reboot multiple times. Turns out it was asleep.

I'm not sure what kind of sleep it was in (I was only gone for 6 hours and I've left it alone for half a day before and it was fine), but a regular reboot refused to restart it. So I did that ten times in a row, before giving up. I had to pull out the power cable (it's a desktop) and let the motherboard's lights go off and battery drain out. After this, it was able to correctly boot up again to a "Resuming Windows" screen, which then didn't respond to any keyboard/mouse inputs, so I had to reset again.

It's not like previous the sleep mode in Windows versions worked perfectly, but the manufacturer usually tests it once or twice to make sure that it's compatible enough that you don't have to jump through crazy hoops to re-enable your system. So our hint is to disable sleep/hibernate/power save mode on your system, in case it's incompatible, for now to save yourself headaches later.

And yes, it's a beta, so we're hoping compatibility gets fixed by release time.

Now I had unplugged the machine, but only for a few seconds. I went ahead and unplugged the machine for about half an hour, then tried again. It did exactly what the post said, attempting to resume windows on the first reboot, stalling again, then properly booting on the second attempt.

Holy shit, people. What a noxious bug. It locks you utterly and completely out of your system. You can't boot into the BIOS. You can't boot from CD. You can't do shit because the system never properly shuts down and so stays forever in sleep mode.

That was scary, let me tell you. I would have been irritated by having to reinstall the operating system, but when you can't even do that, things are looking really bad. So now at least I know. I disabled all sleep functions in the power management settings, and I'll never manually use it again.

This when I was planning on writing a blog on the coolness of Windows 7. I was very pleased with it until then. It's fast and slick. I really like the way it handles the layout of screens, the toolbar, and the desktop view. But now I'm a little afraid of it. Mostly, I'm just glad I was able to boot back into my machine.

Friday, June 19, 2009

Back From Atlanta

I'm back from the IJCNN in Atlanta, where I presented my paper "Sequential Hierarchical Recruitment Learning in a Network of Spiking Neurons". Sounds like a barrel of monkeys, don't it?

Even though I presented on the last day, attendance to the session on spiking neural networks was good. Eugene Izhikevich was in the audience, but didn't say or react much to the talks. Incidentally, his talk on large-scale brain models was very nice. I've been increasingly skeptical about the approach of trying to make enormous models when we have such little grasp of how small, local circuits in the brain work, but he made a very good case. I see the usefulness of large-scale models for studying global phenomena and simply have available a model of that magnitude to tweak and study. Hopefully the large-scale and small-scale models will one day be able to tie all the theory together in one, nice coherent bundle.

John Hopfield's talk was also a highlight. The theme was basically that you want to pick hardware that's best going to fit with the type of algorithm you need to run, and that evolution leads to such efficient coupling. Thus, if we want to try to understand the algorithms of the brain, we need to pay close attention to the type of operations that neurons carry out very well. His conclusion was that understanding the synchronous operations of populations of neurons is key to understanding how they learn and process information. I wholeheartedly agree. :)

Another highlight was a 3-hour tour of some neuroscience labs at Emory. I got to see live recordings from the network that controls the involuntary "swallowing" in crabs and lobsters. I got to see how they make brain slices from rats and mice (first you drug, then decapitate the animals, then you use a razor blade affixed in a machine that's moving back and forth very fast). Another group was studying a group of neurons in leeches which control their heartbeat. Another group was monitoring cells in awake, alert mice, studying how cells in their auditory cortex respond differently to sounds of mice pups depending on whether or not they have given birth to them. And yet another group was monitoring the activity of cells in a rat's hippocampus as it explored novel objects.

Just as with the Boston conference, I'm exhausted, though. Lots of information to assimilate, so time to fall into bed and sleep.

Tuesday, June 16, 2009

The IJCNN in Atlanta

I'm current attending the International Joint Conference on Neural Networks in Atlanta. It's my first time at this particular conference. For any given conference, I typically expect 20-30% of the content to be relatively engaging and relevant to what I'm studying. In this case, that number is a bit lower. The plenary talks have been decent, but the sessions and posters haven't offered me much of interest. And since there's a serious engineering contingent here, some talks are simply slide after slide of equations, which I don't get much out of.

There's a talk this afternoon on large-scale brain simulations...hopefully that will be interesting. And then, I give a talk on Thursday morning. And Thursday evening there's a tour of "wet" neural labs at Emory, i.e. we're gonna tour labs where people work with real brains.

So more later...

Saturday, June 13, 2009

Polyclef Blog

A lot of indie software developers use their blog to promote their products and keep in touch with other devs and sometimes customers. I thought it would be a good idea to bifurcate this blog into my personal/school related stuff, which I'll keep here, and the Android/game development stuff, which is at a new blog here:

Building Your Own PC Adventures

So I put an end to the little adventure of trying to build my own PC. I don't think you're going to really save much (if any) money. You can boost your geek cred, but pre-built computers with great specs are cheap these days, and my experience was pretty much a nightmare.

A friend who said he would help me put it together was unable to get it to boot into BIOS, so we started swapping individual components (e.g. PSU, ram, video card, etc.) to try to isolate the problem. After swapping in my friend's PSU, the motherboard started to smoke. Nice, huh?

Having had enough, I called NewEgg customer service and told them the whole sordid story. They let me return all the parts and they paid for the shipping, as long as I ordered a pre-built system from them, which I did. Hopefully they'll issue a full refund on the returned parts upon receiving them and my new machine will work when I plug it in.

Anyway, I learned a valuable lesson. To whit...I am not a hardware dude. One of the advantages of human culture is the whole division of labor thing, and I'll let someone in a Taiwanese sweat shop who does it for 16 hours a day put my PC together for me, while I work on the software side of things.

Tuesday, June 9, 2009

Why You Should Not Try to Build Your Own PC: Part II

Because when you finally get all the right parts and you put it together and turn it on, it just clicks, like the teeth of a dead man's skull clicking together in laughter at you.

My Favorite Games: Robot Odyssey

A while back I picked up the book Game Design Workshop, which is quite good. One of the most interesting features of the book are interviews with professionals in the industry. Most of the time they ask them what their favorite games are, and it's interesting to hear their answers.

I thought I'd answer the question myself. Of course I love to play games...doesn't everyone? So it's no surprise that I've gotten sucked into developing them as a sideline.

Originally I planned to write a single blog talking about all of my favorite games, especially ones that have stuck in my mind over the years, ones that I've played for decades, ones that I don't play anymore but which had a big impact on my life. But that turned out to just be too damned long. So this is the first in a series of posts talking about my favorite games.

Here's the list:

Card/Board Games:
Crazy Eights
Settlers of Catan

Collectible Card Games:
Magic The Gathering

Video Games:
Space Invaders
Robot Odyssey
World of Warcraft
Peggle and Peggle Nights
Bookworm Adventures
Puzzle Quest
Zelda: Twilight Princess

Text-based computer games:
Zork I, II, and III
Enchanter, Sorcerer, and Spellbreaker
Hitchhiker's Guide to the Galaxy

Arcade Games:
Dig Dug

Again, this isn't meant to be some comprehensive list of games. These are games that influenced me in some way. I'm not sure I'll get to all of them, but we'll see.

One particular video game that I'm going to inaugurate this series with is one that's stuck in my head for decades, and that's Robot Odyssey. The graphics were pretty bad, even for the time period (early 80's), and I didn't even own the game. I ended up pulling all-nighters with a friend of mine who owned the Apple II that ran it.

What makes this game so memorable? Well, the basic setup is that you are a person in an underground city and you're trying to get home. To do so, you have to solve a series of puzzles. The catch is that these puzzles most often have to be solved by programming the robots and having them solve the task. You did this by actually entering the robots and wiring up their various sensors and thrusters with logic circuits (you had a little toolbox of these). For example, you might wire the robot's right bumper to its bottom thruster, so that if it hits the right wall, it goes up. Puzzles usually involved having robots navigate simple maze configurations and get items for you. I may be making it sound dry, but it was amazingly fun and addictive.

The key element of the game is the ability to program robots, something very few games allow you to do. Games like Lemmings have a very crude form of this, where you can assign simple roles to agents, but it's much more limiting. Games that are fun as hell, but still make you think are extremely rare, and this was one of the best. There have been a few ports and similar games, though I haven't checked them out.

At some point I will definitely do my own take on the general concept. I think the idea of gently introducing programming and logic problems to kids is enormously important, and I found the experience of wiring up agents and then watching them act out my programs enormously fun, even when they didn't work (which was most of the time), and especially when they did unexpected things.

In my idea folder are plans for a game that abstracts away the computer/hardware/robot elements but leaves the core game play intact. My video game design uses cards as programming elements. The player assembles a sequence of cards that summon an agent (such as a magical bird, fish, or tiger) and determine its decision policies based on what it encounters in the environment (e.g., a given card might compel the animal to climb a tree if it comes near one). The effects of some cards might be dependent upon adjacent cards in the summoning deck, and others might be independent of order. But the basic idea is that players will solve puzzles by building programs to execute in simple environments in order to solve goals. Hopefully players will be programming, without even knowing that's what they're doing. :)

Anyway, Robot Odyssey has stuck in my head for 25 years, even though I played it less than a month on somebody else's machine. It's a great game, and a model for what a designer can achieve by not dumbing material down and trying to create an innovative experience.

Monday, June 8, 2009

Recap of My Android Market Experiences

So I've been selling and releasing ad-supported apps on the Android market now for nearly 3 months. It's difficult to gauge success. I thought I wasn't really doing all that well, but it sounds like relative to all but the outliers in the iPhone market I'm doing pretty well. This iPhone developer is complaining about having a couple of apps in the top 100 in their respective category and still only pulling in about $20/day.

So here are some summary stats for reference.
  • I released my first paid app, ConcretePal, 83 days ago.
  • My average daily net income for that span is: $19.41
  • My average daily income from ads for that span is: $8.74
    I've released 22 total apps: 14 paid and 8 free (6 of those are ad-supported demo versions of paid apps)
Here's a visual breakdown:

I thought I was going to do very well in the market when I released Spades for $2.99, it was the only one on the market, and it sold very well. But as you can see, that didn't last too long. Sales for a given app settle down to a pretty low baseline, so you constantly need to be releasing new apps if you want to keep the revenue stream coming.

So, I'm not getting rich, but it's nice supplemental income. And it sounds like it's comparable to iPhone apps that are doing reasonably well.

I hope the sales do stay up all right over the next couple of months. I'm not going to be able to release any new apps, since I'm working full-time on my game for the Android Developer Challenge II. It's coming along pretty well. I just hope I can get a decent working version ready for submission by August.

Soon I'll post some screen shots and concept art to give you an idea of where it's headed.

Thursday, June 4, 2009

Building My Own PC

So my old computer is just that...old. It's around 5 years old, which is friggin' ancient for a PC. The video card seems to be going out, so I decided to invest in a new machine, and after debating the pros and cons, I decided to order the parts and build my own.

So far it has not gone extremely well. One friend sent me this guide to assembling a mid-range (~$700) gaming rig, and another friend sent me this guide, for assembling a rig in the range of $800. When I went to order the parts, there were some on the first list that were sold out at the particular retailer. Instead of ordering from two different sites, I just thought I'd piece a system together by combining parts from both guides.

Now, I'm not a hardware guy, though I've mucked around inside PCs a little bit. Still, my knowledge base is pretty scant. I've had compatibility issues with parts before, but that usually arose from the age between them. I assumed that PC parts from the same generation would generally be compatible.

Well, this may seem obvious to anyone who knows anything about PC hardware, but motherboards are specific to certain processors. So one of those systems uses an AMD processor and the other an Intel. I ordered a motherboard that is only compatible with certain AMD processors and I ordered an Intel processor. Guess what? That doesn't work!

So now I get to order a new processor and wait for my new shipment. In the meantime, the return policy at NewEgg is a %15 "restocking fee", so I'd be out about $30 + shipping, which blows. So I listed the processor on Amazon, which, if it sells would actually let me break even.

Also, there was fun with the case. I ordered the Cooler Master RC-534 from the ExtremeTech guide, which it says comes "complete with 460W power supply unit". I found the very same model on NewEgg and ordered it. Guess what? No power supply! Yay! Apparently you can order this model with or without a power supply. That would have been good information to know. So I went to Best Buy last night to get raped on a crappy power supply because I wanted to get my system up and running. This was before I found out about the processor snafu. So since I had to order a new processor anyway, I went ahead and also ordered a much cheaper and much better power supply online. Now I get to return the crappy Best Buy PSU.

I thought I had done a decent amount of homework, but there were just some glaringly obvious things that someone with no hardware experience might completely overlook, unless they are explicitly told such things. I was expecting problems like parts fitting in the case or looking much farther ahead, getting the whole thing put together, turning it on, and having nothing happen. Fun and joy...I haven't even gotten that far yet.

I'm already wishing I had just built a pre-built system, though I am gaining valuable, if stunningly obvious experience.

More updates if I ever get the damn thing put together.

Tuesday, June 2, 2009

New Ad Strategy

I'm trying a new strategy for serving ads in the free versions of my Android apps. Sales on Golf Solitaire slid way down after the first week, so I've released a free version using a "day pass" model, similar to the way or some videos on Hulu work.

Basically, when you open the app for the first time, a dialog appears with an ad, explaining that you need to click on the ad to visit our sponsor's website. If you do that, then relaunch or reset the app, you can play the app ad-free for the next 24 hours. After that time period, you'll see the ad box again.

I decided to try this model because the old way I was serving up ads periodically throughout the game, and people were just closing the ad window more and more without visiting the ads. For the past two months, I'm serving between 150,000 and 250,000 ads per day, but only getting 100-200 click-throughs.

This strategy focuses on serving far fewer ads, but getting many more click-throughs. If the model works well with Golf Solitaire, I'll go ahead and apply it to Spades. I expect some complaints, but I think some users might actually prefer such a system. We'll see.

Implementing it was a pain, though. AdMob doesn't make it easy to detect whether one of their ads has been clicked, so I had to implement it in a pretty clumsy way to capture that an ad had been visited. I had asked for help in a couple of forums, but got no responses. Luckily I was able to figure it out on my own.

Updates on how well it works will be forthcoming.

Android Developer Challenge II

While I did get a lot out of the Boston conference, I wish I'd been able to attend Google IO this year, a conference for developers which focused a lot this year on Android. They pulled an Oprah and gave all the attendees a model of the new HTC phone running Android, the HTC Magic.

They also announced the second Android Developer Challenge. The first phase of the contest lets users vote on the best apps, which make it to a final phase in which judges pick the winners. There are 10 categories (e.g. lifestyle, travel, etc.), and the top three in each category will win $100,000, $50,000, and $25,000 respectively. And the top three overall will win bonus money on top of the category prizes.

My plan for the summer had been to work on a couple of game ideas, including a word game, and continue producing small apps like medical and construction calculators. But the announcement of the ADC II has changed things. I'm going to try to develop an app to enter by the August deadline.

The project is ambitious, it's a mobile RPG with some really cool features. I don't really want to talk about it too much until it's close to release, but I think it's pretty innovative and will have a decent shot at least at making it into the finals. If I can pull it off. I'm going to have to outsource the music and art, and I may need help with the programming. I'm going to see what I can get done this month and take stock of where I am. There's no way I can implement a full version of the game, but I'm going to try to get a workable demo which includes all of the basic features, and hope that will be enough.

I'll report here periodically about my progress. Wish me luck!

Back From Boston

I got back from Boston on Sunday, and it was a pretty exhausting, but interesting, conference. Neuroscience was probably the main influence, but I was kind of surprised to find many electrical engineers and a strong engineering focus to many of the talks and posters. For example, one of the plenary speakers was R. Stanley Williams from Hewlett Packard Laboratories speaking to us about the memristor.

Unfortunately, a lot of the content, while interesting, wasn't all that directly related to the focus of my current research. The most relevant talk was by James DiCarlo of MIT. He gave a talk about this work, which focuses on the hypothesis that temporal contiguity of visual stimuli is the key mechanism in forming invariant representations, an idea very much in line with the ideas in Jeff Hawkins' book. In 2005 they used an image swapping paradigm to demonstrate the effect in humans, and this most recent work uses cell recordings from monkeys using the same paradigm. I'll probably end up referencing this work in my dissertation.

I got to see some of the luminaries in the field, but by the third day I was pretty exhausted. They pretty much had a full schedule from 8:30 in the morning until 7 or 8 each night. I did get to see a bit of Boston on the last day, and I walked around the Boston University campus and visited Harvard Square.

All in all it was a very good trip and a solid conference.