Playstation 3 Media Server on Gentoo

2009-01-01 12:18 - Tech

As I said recently, I've just gotten an Playstation 3. It's not only a gaming console, but also a respectable home theater component. I've got archives of various material that I would burn to DVD-RW disks, to watch in my DivX capable DVD box. Things are even easier now, the PS3 will play them directly over the network (from my already always-on linux server).

I googled a while, to find various possible solutions. The programs ushare and fuppes are mentioned quite often. Unfortunately, neither of them compile easily with portage, even after manually adding ebuilds to a local overlay, or adding the sunrise overlay. Continuing my search, I found a forum post which recommended MediaTomb, which is in portage, and compiles with no trouble. I found a guide to make MediaTomb work well with the PS3, and some further tweaks in their documentation, and voila! Video streaming straight from my server to my big TV, in wonderful quality.

It's got a simple daemon, which serves the videos over UPnP, and a straightforward web interface for controlling it with. I'd recommend MediaTomb to anyone with a PS3 and a Gentoo server.

Video Game Rentals

2008-12-31 14:41 - General

Over this rather nice holiday season, I got in the gift-buying mood, and got myself a Playstation 3, not to mention a nice new TV to use it with. I have already switched my Netflix account to start sending me Blu-Ray instead of standard DVDs now that I can handle them. I'm having a good time playing GTA IV, to boot. I got that, plus MGS4, along with the (used) Playstation. But I'm wondering how I should go about obtaining other games. Buying used is relatively safe and cheap, and the cost can be mostly recouped by selling them again. You can also rent, of course. Since games are more expensive than movies (I guess) though, the game rental services are much more expensive than the movie renting services. How much? For one-at-a-time plans:

GameFly$16.95
GottaPlay$12.95
Gamerang$17.95
RentZero$13.95 (Yearly: $9.95)
GameMine$14.95 (Yearly: $11.95)

Or basically $15/mo, for just one at a time. Plus, from a quick review, they generally seem to provide lesser service than I'm used to from Netflix. I'll probably hold off for at least a little while.

Tools I Want To Use

2008-12-02 22:05 - Programming

There's a bunch of things out there that I've heard of, but I've never been able to apply practically. Usually for lack of motivation, in the form of something "real" to do, while using them. Without a clear goal, it's hard to make progress. In no particular order:

I'm sure there's more. But, I just realized that this whole list exists, and right at the forefront of my mind, about now. Now it's recorded forever, in case I forget it!

Censorship By Glut

2008-12-02 12:57 - Links

In a country where you're free to say almost anything in the political arena, I think the only real censorship of good ideas is what you could call "censorship by glut". If you had a brilliant, absolutely airtight argument ... how much of a chance do you think [it] would have against the glut of Web rants and other pieces of writing out there?

A why-didn't-I-think-of-it idea, if there ever was one. In a super connected, internet driven world, where everyone can communicate effectively, and everyone from Netflix to Amazon to iTunes is dying to let us all know what everyone else things, groupthink is inevitable. It's too much work to sift through all the possibilities, no matter how good some of the overlooked ones may be. We gravitate naturally towards what other people have liked, or decided for. Is there any practical way to solve this?

pytemper: Read USB TEMPer in Python

2008-11-27 17:49 - Programming

Based partially on the C program from Tollef Fog Heen, which I described my discovery of a few weeks back, but mostly on reverse engineering from the software included with the device, I now have a Python script capable of reading temperatures from the USB TEMPer device.

My intent is to build the thermostat system I've been talking about in Python. Removing the requirement to repeatedly shell out to a C executable is quite nice. You can download the raw source (MOVED, see below). It relies on pySerial to control the serial port. Right now I've just got what appear to be TEMPer "v2" devices, so that is all it's expected to work with at the moment.

More Temperature Data

2008-11-16 19:22 - Tech

As I've said before, I love graphs. After I got my temperature data graphs, I couldn't help myself. I got a second unit, spliced together a long USB extension cable, and parked it outside.

Graph of temperature data.

It's pretty clear that we've had a few unseasonably warm days, recently. I've also spent the time to figure out how to get rrdtool to put some text data on the graphs. That's all I've got!

Giving Python Another Shot

2008-11-11 15:59 - Programming

I've been introduced to and worked with Python in dribs and drabs in the past. I've read plenty about it, or that mentioned it. I'm somewhat (and growing more, by the day) familiar with its advantages. And I'm interested.

Thing is, I'm a web developer. The vast majority (though definitely not all) of things I program are web pages. For a web page, 99% of the input comes from a database or form submission, and 99% of the output goes to a database or HTML page. And it's all just strings. In PHP, the type conversion is handled automatically for you, and there's thousands of times I find that very useful for each time I have even a minor issue with it. In Python, not so. Thus:

$ php -r 'print "5"+4; print "\n";'
9
$ python -c 'print "5"+4'
Traceback (most recent call last):
  File "", line 1, in 
TypeError: cannot concatenate 'str' and 'int' objects

This was one of the big things that put me off, when last I tried to get in bed with Python. It truly is the little things. The other is the module system. While I can easily find every function defined in the PHP manual, that's much less true with Python.

I am working on the Project Euler problems, as a tangible thing to "do" as I give learning Python another shot. I'm reading Dive Into Python and Thinking In Python (among others), but I learn by doing much better.

So I got to a question asking to count the first-of-the-month days that fell on a Sunday in the 1900s. I decided to "cheat" by simply construction date objects, and checking their day-of-week property. I managed to google up the Python date reference and write the code in a flash. But when I tried it:

Traceback (most recent call last):
  File "scratch.py", line 4, in 
    d=date(year, month, 1)
NameError: name 'date' is not defined

I'm pretty sure I need to import something, but it's not at all clear what. If I look hard enough, I see that the section of the manual that contains this one is talking about "the datetime module", so from that I managed to figure it out. But this is another annoying step. One of the things that turned me off, the first time. I've hit it again, but I'm doing my best to really give it the old college try, and see where it gets me.

I Was Right About the Election

2008-11-05 12:43 - Opinion

As I mentioned earlier, I didn't vote. As I predicted, New York voted Democrat by a 62/36% ratio. Almost two to one.

In other words, a full quarter of the New Yorkers who did turn out to vote (and all of them Obama-voters) would have had to been no-shows in order to change anything one whit. The electoral college destroys my faith in (US-based) democracy.

Halloween 2008: Marvin The Martian

2008-10-31 15:56 - General

The first, and most important, part of the costume is the helmet, broom and all.

Next, and still very important is the "skirt".

The distinctive shoes complete the package.

Finally a close up of the shoes, a very nice finishing touch.

My office runs a Halloween costume contest each year. Last year was my first, and I had little to no advance notice. This year, I brought the heat. I planned ahead, and spent a few weekends working on the costume, all home made by the way, to come up with something pretty awesome. I've been very lax in posting recently because I haven't seen or done much of note. Hopefully the wait will be worth it. Click the thumbnails to the left for the full shots.

I decided to do Marvin the Martian, one of my favorite cartoon characters. (Probably second only to Wile E. Coyote.) As an extra bonus, he's pretty easy to make. There's only two major components: the helmet, and the skirt. He's got very distinctive shoes as well, which help to add to the allure of the whole package.

The helmet is a paper maché base for the sphere. The "sideburns" that stick off are cardboard, wrapped to meet around in the back as the collar. The visor is also cardboard, with an unfortunate but still not prominent seam in the middle. The eyes are just a shape cut out of the black area, with a white stocking stretched behind them, to let me see out (at least, enough to not walk into walls) without letting you see in.

A pair of work gloves, with my pinky and ring fingers smashed together, and the gloves' pinky fingers cut and seamed off, add to the "cartoon-ness". I also spent quite a bit of time (and more money than the rest put together) on the shoes. He's got a very distinctive pair of shoes, with the black stripes and red areas.

I did quite a bit of research before I started putting this costume together. I searched all over the 'net and found somewhere around a dozen different costumes that people have made in the past: 1, 2, 3, 4, 5 (scroll down), 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19

They gave me an idea of what not to do much more than ideas of what to do. Besides one which I'm convinced was professionally made (showing up only at theme parks and conventions), I'd hardly be caught dead in most of them. A couple resort to blackface, which I find especially displeasing. And none of the "skirts" stuck out like they do in the cartoons.

Next, I turned to online videos. I found a list of every cartoon Marvin has been in, and turned to Google Video. I'll spare you the links, but a search for the name of each of these cartoons will find it visible for you, immediately. It's surprising how much variation Marvin has seen. Sometimes he's red with a green helmet, sometimes he's green with a brown helmet, and there's a few other variations in there as well. But all the merchandising (the actual source of his name, he was never named in the cartoons) agrees on the red-and-green scheme, so that's what I chose.

The best news of all: I won first place in the office contest! There was some good competition, but I managed to edge them all out. You can see me and my office mates' costumes on Flickr.