Sunday, February 25, 2007

Game page

Got the game page working, and hit counters. That didn't take long. Still no comments, though.

Last week's activity

A full week between posts. Ah well, shows I've been spending the time hacking rather than blogging about it.

Last week's conference call went well, despite not having something demoable. Matt had lots of good logo choices, though he was going to keep working at it and see if he could come up with anything better. I think it was last week that James finished the registration page layout. And we had some incorporation & decision-making stuff to talk about.

When I left off, I was incorporating the mock layout into the real app. That went smoothly - I just copied over the DreamWeaver HTML, CSS, and image files, replaced the content and login boxes with template vars, and it just worked. It's horribly messy CSS - DreamWeaver uses absolute positioning for everything, so I'm eventually going to have to go through and redo the format with a sane box model. But that'll wait till after the logo and final layout, since there will likely be further tweaks. This is good enough for testing & demos.

I also had to change the formatting a little to get the login box to fit. Not entirely satisfied with it; we'll likely have a space problem if we add OpenID. But we can cross that bridge when we come to it too.

When I got to the registration page, I realized that I really should figure out internationalization issues first. So that was most of this week. Started by simply trying to setup a null translation and load the resource bundle based on a database field; I finished that on Tuesday (yay for Monday being a holiday). That didn't work when I tried to add actual messages, so I spent some time Googling around for gettext tutorials, didn't find any, and then finally looked through the Mailman source. Fixed it on Thursday, just after Grey's Anatomy (I seem to get a lot done during that show. Maybe it's because last week's episode had me wishing that they had killed Meredith.)

I started working on the validation libraries concurrently. Wrote out the basic design on the Red Line Wednesday, then came home and typed most of it in on Wednesday night. Added the unit tests on Friday, finished up the validators, then spent all day yesterday integrating it in with the registration form and debugging. Seems to be working fairly well now.

I also did some minor CSS tweaks so the registration and upload forms look relatively pretty now.

Now I'm trying to finish the game page (instead of having it link directly to the SWF file), and hopefully get to comments. Yeah, I said that last week, but i18n and validation intervened. I'm glad that we're building a really solid app first, though, and then adding features. It gives a much more realistic idea of the schedule, and we can always cut features for launch.

The current plan is to launch with basic game uploading, commenting (threaded, with Markdown formatting), rating, and nothing else. That'll hopefully be enough to keep visitors coming back, and then we can improve it rapidly, add features like studios and the game creation engine, and listen to user feedback.

I'm thinking sometime around April for the date - if we can time it for spring break, that'd be great.

Sunday, February 18, 2007

Catching up on testing....

I've been delinquent about keeping up with this. You'd think that with simple few-sentence updates, I'd remember to keep a log, but no. I'll have to reconstruct much of the past week from memory.

So, when I left off, I was just getting Emacs running again with VMWare. My next priority was testing.

I setup a MakeFile with some really simple phony targets - one to clean out all the .pyc and ~ backup files, one to run the built-in server for development, and one to run all the unit tests. I think this was Friday or Saturday a week ago. I do remember that I had no demo for last Sunday's conference call - I was still working on testing and refactoring.

Testing was a little tricky. I had to figure out twill - I think that was mostly last weekend, and the week before last. I'm beginning to love Python's dir() and help() functions - there's no complete API reference twill, but it has great docstrings. From there, I had to integrate it into doctest (I punted on unittest because I really hate xUnit-style tests; they require so much boilerplate code that I find myself ignoring the unit tests anyway). Never did get doctest.testfile() working; instead, I wrote a script to walk all the source dirs, turn the Python file into a module name, dynamically import it, get a reference to the module via globals().__dict__[modulename], and pass it to doctest.testmod(). I also wrote a twilltest helper module with some assertion functions that I wanted to be able to use for tests, and then added it to the doctest scope via extraglobs. This was done throughout most of last week; I wrote the helper functions as I needed them for specific tests.

After the meeting last Sunday, I spent the day coming up with usability personas. I think they're a good thing to have; as we design new features, it's nice to be able to say "David needs this" or "Katie won't use the site if we can't do this." They've already helped illuminate some conceptual muddiness.

Last weekend, I also moved things around so that all controllers live in one directory in the www directory, and pulled lib (helper Python files) and templates (HTML) back to the top of the trunk. The main entry point ( and the unit testing script ( were moved all the way to the top level. Still not sure if this is the right organization; there will likely be further changes as the program grows.

While I was at it, I had the request dispatcher auto-detect controller classes (through looking in www/controllers) and construct the URL list itself (through looking at the exported url_pattern global). My svn log says this was last Tuesday, 2/13. Python's dynamicity is fun.

You would've thought that with Wednesday being a snow day, I would've gotten more done, but no. I was working on stuff for my real job (from home) almost all day. And then on Thursday I had to shovel. Finally finished the unit testing framework on Thursday night, while watching Grey's Anatomy, and these last couple days have involved writing more tests for front page, logins, sessions, etc.

Am working on integrating James's rough cut at a layout now. If I get that done, I may take a crack at comments.

Friday, February 9, 2007

VMWare & Emacs

Got over my Emacs-can't-select-text-with-the-shift-key problem (I'm using CUA mode, otherwise Emacs wouldn't select text with the shift key anyway). Turned out it was this issue, and I just had to disable the ATI Radeon taskbar icon. Who'da thunk it?

Testing, testing

Didn't get nearly as much done this past couple days as I hoped. I wrote some simple Twill scripts and tried it out from the interactive interpreter. Read up some on doctest and unittest - I already use the former, but really dislike the latter because it's a jUnit-style framework (some other time, I'll write up a blog post about why that sucks). Also installed BicycleRepairMan, PyChecker, and some additional Emacs modes, though I haven't tried them out yet.

I also had to deal with some Windows idiocy and re-copy my VMWare virtual disk because VMWare has trouble when the disk file is owned by some other Windows user. I had created the VM initially as AMHERST/jdtang - yes, 2 years after graduation, my computer still thinks I was on the AMHERST domain because Windows apparently caches logins (good thing, too, otherwise it would break when I went home). After wiping my computer, no more AMHERST for me, so I created a local account that had trouble writing to the logs and virtual disks created by the domain account.

Wednesday, February 7, 2007

Intro post

[Original blog description: "For posterity's sake, this records the very early days of Diffle Inc. (or so we think it'll be called) and its Flash-based social games site. It's intended to be private, at least if/until Diffle manages to become successful."]

I want to create this blog for a couple of reasons:
  1. So I can better estimate how long new features will take. It's amazing how easily memories of implementing some feature get distorted.
  2. Because I find it fascinating reading about the early days of businesses, particularly businesses that later grow enormously successful. I can't guarantee this'll be enormously successful (I rather doubt it, actually), but just in case, I'd like to record things.
This is really more of a journal than a blog, since it's intended to be private unless Diffle (or whatever we decide to call it) gets big. I've got a bunch of reasons for that: I don't want to get in trouble with my present employer, I don't want to set up expectations that we can't meet, I don't want to give away secrets that'll help potential competitors. But mostly, I just think it's premature and a distraction from actually getting the site implemented. So this'll have entries on current events, but it's not really intended for a readership. Expect some chop.

Anyway, the story so far:

Diffle is supposed to be a website for social networking based on simple, 2D flash games. Kinda like a cross between Yahoo!Games, MySpace, and Fanfiction.Net. We've actually got two names under consideration: Diffle and GameClay. The current plan is to launch with Diffle as a pure social networking site centered around games. If it takes off, we add GameClay as an additional feature. If it doesn't, we abandon the site and rebrand as with the additional game-creation features.

My involvement is 2.5 weeks old at this point. The site initially started with Mike's summer internship, researching companies in the space, and his getting together with James. Andrew was brought on board for finance/legal, and Matt for art & graphic design. They brought Xin on board as their programmer around late October or early November.

That was the status when I saw Mike at Homecoming. We chatted a bit, he asked me if I wanted to do some Flash development or front-end work, but it would've been a contract position rather than a founder stake (with 5 co-founders, the equity is already spread pretty thinly). Besides, I don't know Flash.

Fast forward to late December. Xin's on a student visa, so he finds out that he can't co-found a startup without putting his visa status at risk. There's a mad scramble to find another programmer. As I understand it, there were a few people ahead of me on the list, but none of them wanted to do it (hey, 4 guys a year and a half out of college starting a business in a hot sector, I'd be skeptical too).

Mike contacted me over AIM on Friday, 1/19. He e-mailed me the business plan, and I took a look at it as soon as I got home from work. It looked very exciting; there's a potentially big (though risky) opportunity here, and it was exactly the sort of project that I've wanted to do since college. Mike and I had a good conversation on Saturday morning, we both were very enthusiastic, and so I was brought on board as the programmer. I spent most of Sunday setting up my development environment - Linux, Python, MySQL, assorted libraries. Luckily, I have a spare Debian VMWare image for just such purposes.

First Skype conference was on Monday night, and I got a quick introduction to what had been done already (a lot on the design/conceptual side, essentially nothing on the technical side) and where we were going. Spent most of the rest of the week learning I also got permission from Tosin (NOTE's current head at Amherst) to use one of the NOTE servers for prototyping/demo and install whatever I wanted on it. For the next week's conference (1/28), I had a really simple demo with a barebones front page and registration form up.

The week after that, I got a lot more done featurewise. Finished most of sessions and authentication during the workweek - I usually managed to put in a half hour or so before work while eating breakfast and an hour or two after work. Plus, if there are sticky spots, I write 'em out on paper and pencil on the Red Line (much of session handling was done in a day or two in this manner). The demo on 2/4 included sessions, logins, the ability to upload games, games appearing on the front page, and a simple user page. Uploading was done all on Saturday, and having them show up was Sunday morning. Still far from complete functionality, but good progress.

I said that I likely won't have as much done for next week, where "not as much" may mean "nothing" featurewise. Instead, I'm cleaning up the nascent code base and investing in some infrastructure requirements. I setup a Subversion repository on Monday night after I finished watching 24, then posted to for testing suggestions and started checking out twill yesterday. I'm hoping to write some tests tonight, establish a framework for testing, and do a one-step build process that handles pychecker and all our tests.