Categories
Programming

The Game Of Life

The new banner is Conway’s Game Of Life. To quote Wikipedia:

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970

This version is in a small playing space for speed, and is lightly mouse interactive (try moving the mouse over the banner).

I started with an example found by Google, which I then adjusted for visual style, speed, and to add the interactivity.

Categories
Other

I went downstairs and found the cat stretched out on the sofa and the Deb stretched out on the floor. #somethingsbackwards

Categories
Programming

Remeber: When you need to serve simple content for testing (say because of AJAX restrictions on file:///), do: python -m SimpleHTTPServer

Categories
Cooking

Smoked Chuck

  • 2-4 pound chuck roast
  • 1/4 c. rum
  • 3/4 c. soy sauce
  • 1 c. beef stock
  • 2 T. Worstershire sauce
  • 1/2 diced onion
  • 2 gloves garlic

Poke the meat a bit. I think doing so might help the marinade get in. Then stick the meat in a plastic bag, dump the other ingredients in, and close the bag, trying to get as much air out as possible. Let sit for a few hours (I did 6 this particular time).

Remove the meat from bag, and save a few table spoons of the marinade.

Smoke the meat until the internal temp is 140 degrees (F). I did this with wood chips soaked in water, place in a disposable pan on the left burner of a gas grill with the meat placed on the right side (burner off). This took about 90 minutes.

At this point, you want to tightly wrap the meat in aluminum foil along with a bit more marinade. This will make sure the end result is moist.

Return the meat to a low heat (grill or oven) and leave until tender (probably well more than 2 hours).

Remove and let rest 15 minutes, then cut and serve.

Categories
Programming

Change of Theme

I like the basic design of TwentyTen (the WordPress default), but I didn’t like the stock header choices. After some time thinking about it, I decided that there should be something dynamic up there. Dynamic is more invasive than just an image swap, and thus some theme customization is required.

I didn’t want to deal with a completely custom theme, nor with being able to update WordPress if I hacked on TwentyTen directly. A bit of Google querying turned up the idea of Child Themes. WordPress allows you to make a new theme that starts by inheriting from an existing one (see http://codex.wordpress.org/Child_Themes).

So, I made the directory for my new theme, set it to inherit from TwentyTen, then started digging around for how to control the header. The header is pretty tied to just supplying an image referred to by the database (with all sorts of logic for changing the image based on the post/page being viewed), with no hooks for writing your own header HTML code, so I just copied the entire header.php, and whacked out the image.

Now, the question is what to use for the new banner. I ended up deciding to use Processing.js for the banner. This has the advantage of being fairly easy to program. The downside is that it uses the canvas element, and so some web browsers won’t be supported now, and it probably won’t run as fast as limiting myself to div/img sprites would. However, on the upside, I don’t have to reconsider the choice every time or limit myself only to simple sprites.

My goal is to periodically change the banner now. The first program running up there is taken from the header of the Processing.js web site. I changed the canvas size to match WordPress header sizes, and I made some minor graphical changes. The original source code is here. My modified source code is here. At some point, I’m going to move the header above the Processing.js app into the Processing.js app to save some space, but I haven’t gotten there yet.

At this point, I hope to periodically (maybe monthly) write new banners to go up there.

Categories
Family

David on Easter

Categories
Reviews System Administration

HTPC

Back in September, I posted about evaluating an Intel D510MO board for HTPC applications, and determined that it wasn’t good enough.

Now, I am trying again with an Atom 330 / ION motherboard. This is a slower CPU, but a faster Nvida graphics chipset. Last September it still wouldn’t have done the job, but as of a few weeks ago it comes closer. The key change is Adobe’s Flash 10.2, which finally supports hardware assisted video decoding.

With this new box, I first tried XBMCLive. My plan was to use the launcher feature to launch Hulu Desktop as well. After the install, things somewhat worked. It took some fiddling to make HDMI audio work, but it turned out that the answer was on the XBMC faq. However, it used a lot of the CPU power, all the time, and I could never get Hulu desktop working acceptably.

Yesterday, I reloaded with Ubuntu 10.10, then installed the current Nvidia drivers, Hulu Desktop, and XBMC. Things are much closer to just working. It took me a little to figure out how to enable HDMI audio, but I found the setting in Sound Preferences. On the Hardware tab, there is a drop-down labeled “Profile:”. From there, I just had to select “Digital Stereo (HDMI) Output”.

Hulu Desktop is usable, but it still under performs. I have to keep the video quality set to low to prevent dropped frames. When I flip through the menus performance suffers and frames are dropped, but when I just leave it be, it behaves. This is when the display resolution is set to 720p though. When I had the display set to 1080p, it still dropped frames in low quality mode.

I think that Flash is still inefficient and that it just is running out of power. I have to say that I would probably recommend someone trying to duplicate this should use a good Core 2 Duo or better, along with 9400 or better Nvidia graphics to get more satisfactory results.

To control the system I am using a semi-generic Adesso USB remote. It uses IR to a receiver dongle. It acts like a keyboard and mouse, so no messing with LIRC is required. I am having trouble with Wake On USB. When I enable that, the computer won’t stay off. I have no way of knowing if Linux, the computer, or the remote are to blame. With that caveat, I would recommend this remote. I think it cost $25. Sometimes you want a real keyboard though, so I am going to have to look into getting a small wireless keyboard to use with this system.

Things I still want to explore is setting XBMC to launch Hulu desktop. Also, can I find another remote friendly launcher program to have Ubuntu auto-run on startup? I would like to try adding Boxee to the list. And I would like to find something better for image viewing, either a sepe

Categories
Reviews

OCZ SSD in my Toshiba laptop.

I put a OCZ Vertex 2 60 Gig SSD in my Toshiba laptop.

It really is fast. Booting is pretty quick, although I don’t do much of that. Chrome and Thunderbird launch quickly although, again, I mostly just leave them running all the time.

Beyond that, I hope it helps battery life, but since I took the machine from Windows 7 to Ubuntu 10.10, I suppose I will never know which change it was that made the difference.

Still, while I have little to no hard evidence to support it, I feel fairly happy with the choice.

Categories
System Administration

How I Setup Ubuntu 10.10

I’ve found myself doing this 3 times in the last month. I thought I would write up what I do so that I don’t have to try to remember the next time I need to do this (which probably won’t be all that soon).

First, I do a basic install from the live CD.

Then I open Gnome-Terminal and do:
sudo apt-get install rxvt-unicode thunderbird git python-virtualenv build-essential emacs23

Then I install Chrome from the web.

That takes care of basic software installs. What remains is what I consider to be the essential customization.

First, move the Workplace switcher and Window list to top panel. Second, delete the bottom panel.

Add Gnome-Terminal, Thunderbird, and Chrome to the panel (select them in the Applications menu, right-click, and select “Add this launcher to panel”. Use the preferences (right-click on the terminal icon on the panel) for gnome-terminal to change the launch command it to rxvt -rv -sl 2000. Remove Firefox from the panel.

Finally, use the Keyboard system preference (Layouts tab, Options button, Ctrl Key position submenu) to make CapsLock a second control key. Then use the Windows system preference to select windows when the mouse moves over them.

Categories
Programming

Progress

I’ve been working on two projects. Well, one project with a sub project. And I switched jobs (more soon).

I have a web app that I’ve been working on updating to be ajax’y. It is a feed reader (think Google Reader). I originally forked feedonfeeds when it was going through a period of being abandoned. It was originally written in PHP. First I made some small work flow tweaks. Then, I got sick of the feed downloader code getting stuck, so I rewrote the backend cron job in Python. I think that feedparser is more reliable than whatever the original used. I know forget what it was since I’ve since deleted it. Then I ran into issues with badly formatted HTML in the feeds causing the HTML display to go crazy, so I added in BeautifulSoup to cleanup the HTML. That fixed it for formatting, but I’m still having some issues with forms (yes, people embed those in feeds, irritatingly) interfering with each other, so there is obviously more work to be done there.

My more recent focus was replacing the frames based front-end (still PHP on the server) with more AJAX style code. That is going well, and picking up speed as I learn jQuery more, but there are plenty of rough spots, and some functionality isn’t quite on par with the frames. I’m forcing myself to use the ajax version though.

I don’t know if I will ever share the project. Currently, it is written to be single user and still has a lot of rough edges, as mentioned, so I can’t easily just make it multi-user with me hosting. I could post it for download, but it depends on postgresql, php, python, and quite a few other libraries for both so and I doubt that I’d attract anyone to try to install it. So, for the near future, it will continue to be a private project.

Perhaps once I get the UI more polished, I will replace all the PHP with Python and the CherryPy framework. Then it might start to become distributable at least.

The sub project is that I’m working on a jQuery sliding divider plugin. You can follow that here:
https://github.com/jd-boyd/jsplitdiv

The relationship to the feed reader is that frames are resizable, but divs aren’t, at least not without help. There is no reason for this not to be used plenty of places, so I put it on github.

I’m happy that when I spot check it, it pretty much works on IE 8, even though I’m not doing anything to specifically target it. I am using jQuery though, which I’m sure hides some of the possibly troublesome parts.

Anyway, since it is a project that can’t easily be shared, it is hard to write about.