Web

Mouse Potato

Mouse Potato lets you track what TV shows you’ve watched, and tells you what episodes to watch next.”

I spent a couple of days making a website for tracking what TV episodes you’ve watched. It’s live at mousepotato.org, free for anyone to use. It’ll stay that way unless it somehow gets popular and I have to figure out better hosting. Not that there’s anything wrong with Dreamhost, I’m happy with them, but it’s running on the same VM as this blog and @lnorigb’s blog and other stuff.

From the about page:

Other sites concentrate on telling you what episode is going to air next. At Mouse Potato, we don’t care. We watch shows on DVRs, on Blu-Ray, and on the internet. We just want to remember where WE left off, not where the network left off.

Mouse Potato remembers what episodes you’ve watched, and tells you what the next one is. That’s all there is to it. Sign up and get started today!

Tags: , ,

Sunday, September 18th, 2011 Uncategorized No Comments

How do I love thee? Let me count the days.

Lnorigb‘s been bugging me to give her a thing in her calendar that tells her what day number each of her projects is on, so that her blog entries can be accurate. I finally wrote up this crappy little python script to do it. Requires the icalendar python package (easy_install icalendar). I just set up a file like:

Towner
90
2009/11/18
2009/12/25
2010/01/01

Which tells my script to create an iCal event every day for 90 work days named “Towner, Day ##”, and don’t count Christmas or New Year’s day as work days.

Not shown is the bit at the end that uploads the resulting .ics file to a web server, which then allows Lnorigb to simply subscribe to it in iCal. So if I make any changes in the output, like skipped days, increasing or decreasing the total count, or just general improvements, her calendar will automatically reflect the changes.

This is isn’t the best code I ever wrote, but it gave me an excuse to put a syntax highlighting plugin on the blog. And it’s not like I’m expecting to have to do a lot of maintenance work on it. Of course now that I’ve said that, it’s obviously going to cause me grief for many years. Eventually I suppose it will need a full fledged scheduling application, complete with payment calculators for her workers based on facial recogonition of the posted pictures on her blog, auto-blog posting, twitter updates, a related facebook application, and RSS feed generators. All of the above will be driven by the nine million state version of the stupid little state machine parser at the top of the script.

Yeah, don’t write code you’re not willing to maintain.

(Code follows after the break.)

› Continue reading

Tags: , , , ,

Monday, February 8th, 2010 Uncategorized No Comments

I Made Asteroids

AsteroidI stayed home sick today, and made a little browser asteroids game on my laptop.  The cool part is, it doesn’t need Flash or any other plugin.  It’s all JavaScript.  The even cooler part is, I am still blissfully ignorant about JavaScript, I wrote the whole thing in Python, using Pyjamas.  I’ve tested it on Firefox and Safari, works great on both, and runs super smooth even with lots of asteroids.

It’s not much of a game, really, just classic Asteroids without even scores or keeping track of ships or much of anything but the basics.  But it’s only about 300 lines of Python, and it runs in any off the shelf browser.

I’ll try to add some polish to it and get the source up somewhere soon for anyone interested.  I’m pretty happy I managed to do all that in a day, plus a few hours on previous days getting Pyjamas set up.

Update (11/19): I uploaded the source code. It’s not the best code I’ve ever written, and it’s not commented at all, but now it’s a real project!  Sort of.

Update (11/20): Version 0.2 is now live, with sound effects, a score, and a different Canvas object that allows it to run in IE6.  It’s too slow to be playable in IE6, but at least it runs.

Tags: , , ,

Wednesday, November 18th, 2009 Uncategorized 13 Comments

Language Benchmarks: Why Ruby Won’t Win

Benchmarking programming language performance is an imprecise exercise, but the Computer Language Benchmarks Game makes a pretty good go at it.  Ruby is next to last on the overall scores, and loses on pretty much every test to Python and Lua, the current kings of game scripting in general.  I still think Ruby is a fantastic language and wholly appropriate for a lot of tasks.  But general performance is a major consideration for use as an embedded game scripting language.  Until they get Ruby into the same performance class as Python and Lua, it’s not going to be a viable option for what I’ve been looking at it for.

Tags: ,

Thursday, June 21st, 2007 Uncategorized No Comments

Late to the party

I wrote a little program in Ruby (and I do mean little, Ruby continues to impress me with ease of getting things done) to get a semi-random picture from Flickr (checks for anything new from Stuck in Customs first, then gets a random picture tagged with “landscape” if there aren’t any), then set it as my desktop.  I set it to run every half hour as a cron job.  Then I set up GeekTool to get the current picture displayed (the ruby program writes it to a log file, I have GeekTool get the last line of that file) and display the title and user at the lower right of my desktop.

I figured there would already be several other programs way cooler than mine, but if there weren’t I figured I’d package it up with a few more options and release it.  Turns out, you can already do most of that without downloading any software at all.  You can subscribe to photo RSS feeds in iPhoto (news to me!) and you can then use photos from those feeds as desktop backgrounds directly from the Desktop preferences panel.  OS X and its packaged applications are just really impressive sometimes.

On the other hand, the randomly select a picture every X minutes feature doesn’t work with photo RSS feeds, so it doesn’t actually do everything my little program does.  I bet Leopard will.  But I’ve got at least a narrow window where I can release an app that does it and maybe someone will actually want it 🙂   Plus I can be a little more flexible – I don’t think you can do the trick I’m doing where a particular user’s pictures always go up when there’s a new one, but that depends more on how sophisticated you can get with Flickr’s RSS feeds.  I haven’t really looked at that.

It’s all mainly for my own education anyway, and I think I’m going to use it as an excuse to learn about RubyCocoa  and then maybe release something when I have a “real” standalone Mac app that normal Mac users can use.  (IE Requiring crontab editing is RIGHT OUT.) But if anyone reads this and wants the ruby script sooner than that, send me a note.  It was fun to write and fun to get all these great pictures on my desktop all the time!

Tags: , , ,

Monday, June 4th, 2007 Uncategorized 2 Comments