lardbucket: programming

6/29/2010

Leaderboard with Movement Tracking

Filed under: Hacks,Programming — Andy @ 9:00 pm

In putting together SLV Scav with Dan Meyer, I ended up writing a (relatively) simple script for generating a scoreboard with rankings, as well as the amount the rankings had changed. It looks something like this: (picture from Dan Meyer, names blurred to protect the innocent)

Dylan Faullin asked for more information, so I’m posting most of the relevant code here.

(more…)

5/19/2010

VP8, WebM, and FFmpeg

Filed under: Programming,Technology — Andy @ 8:06 pm

So, today at Google I/O 2010, Google announced that, along with a number of other groups, they were releasing WebM, a video container and codec. (WebM itself specifies the container, which is a variation of Matroska, as well as the video format, the newly-released VP8, and the audio format, Ogg Vorbis.) I won’t get into the technical details of the codec, as I’m not really qualified to do so, but a developer for x264 has a reasonably thorough review of a prerelease version of the code here.

The interesting part of VP8 / WebM is that it is a reasonably good video standard that may be theoretically free to use. (The currently popular “best” video format, H.264, is riddled with patents and requires licensing for most uses, although encoding video that’s available for free doesn’t require payments until at least 20151.) It doesn’t appear as though anybody is claiming that WebM is the best video format available, but it’s reasonably good, and potentially free to use. (It’s impossible to know whether someone else has patented parts of the standard, because that would require examining every software patent ever granted, which is not going to happen.) For some background, the video codec, VP8, was produced by a company named On2 before Google bought them last year. Its predecessors, VP6 and VP7 were used for video in Flash2 and the video in Skype3, respectively.

Most of this will be fairly boring to anyone who normally reads this blog, but if you’re interested in a way to encode WebM videos yourself in Ubuntu, read on.

(more…)

  1. The press release PDF from MPEG LA, the group licensing the patents for H.264
  2. An Adobe article on encoding video for Flash using VP6. An earlier version of this post claimed VP6 was the original codec for Flash, which is false.
  3. A press release

10/3/2009

GraphSketch: 30,000 Graphs, and Parametric

Filed under: Ego,Hacks,Programming — Andy @ 9:41 am

Yesterday, GraphSketch passed over 30,000 graphs rendered. That’s quite a few. Thanks to everyone for making it so popular.

It also seemed like a good time to release something I’ve been working on smoothing out for the past few weeks:

GraphSketch ParametricYep, you can now graph parametric equations. Just head over to http://graphsketch.com/parametric (or click the “Parametric”mode just above the equations on the main GraphSketch page).

To keep things simple, you can only graph three parametric sets of equations at the same time. You can choose the range for t, and it defaults to a reasonable -10 to 10.

Also, while I was updating the website, I made the text a bit smaller (about the difference of going from a 12pt font to a 10pt font) and added a (hopefully unobtrusive) section pointing out the availability of posters, should anyone be interested. Polar graphing should come soon, hopefully, but it is somewhat possible using parametric equations by setting x=r*cos(t) and y=r*sin(t), too.

Andy Schmitz

7/7/2009

PvPGN for a Private LAN

Filed under: Hacks,Programming,Technology — Andy @ 10:43 pm

A few notes on setting up PvPGN (the continuation of bnetd) for a private LAN. (The reason I’m setting it up is that I don’t expect to have an Internet connection for connecting to Battle.net proper, and would like to have the capabilities it provides, especially ladder games.) This post is generally much more technical than most of my previous posts, so you may want to skip it if you’re not really sure what’s going on. You won’t miss much.

So, my setup involves a router with DD-WRT, and an OLPC XO. The XO is set up using Ubuntu Intrepid on an SD card.

(more…)

5/12/2009

GraphSketch: Ten Thousand

Filed under: Ego,Hacks,Programming,Technology — Andy @ 2:24 pm

In under three weeks since it was launched, GraphSketch has now been used to create (over) 10,000 graphs. It also has had over 3,500 visitors, coming from every continent except Antarctica, though many visitors haven’t graphed anything (and many visitors have graphed far more than average). Work on new features (parametric and polar graphing, among others) will likely resume after school is over, as I still have three finals remaining, and am now off to continue studying for a math final.

At any rate, thanks to everyone who has promoted GraphSketch in one place or another for making it so successful.

Andy Schmitz

P.S. If you have any suggestions for GraphSketch itself, the original post on it is still probably the best place to leave them, as I’ll check back there for ideas when I’m working on it. Thanks!

7/7/2008

Launching Recycling Reminder

Filed under: General,Hacks,Programming,Technology — Andy @ 10:37 am

Well, this was written way back when it seemed like a good idea, and it’s finally polished enough to actually release. Yay, something I actually finished!

On the off chance you might have some recycling that needs to be taken out (and you should..), this random little tool will let you set up a weekly reminder (an SMS message, actually) to actually get it out to the curb. It’s been working for me (and a few others) for several months now, so I’m fairly sure it’s stable.

So, if you’re (partially) responsible for getting your recycling out, go head over and sign up right now at Recycling Reminder. You’ll need a standard cellphone of some sort. It’s completely free, though clicking the ads now and then gets me a few pennies, if you’d like.

Please email me or leave a comment (or something) if you happen to find it useful, have a problem, or anything else. Thanks!

Andy

11/30/2007

Other Regressions

Filed under: Programming — Andy @ 10:10 pm

The line shortly before Staples opened on Black Friday 2007

(picture: The line at Staples shortly before it opened on Black Friday, it extended further than you can see here)

“Regression” is a term for a specific type of programming bug: A bug that is introduced into something that had previously worked. It’s also apparently a pretty popular type of bug, because even large, well-maintained projects have them: the OLPC software has a long list of regressions (and they’re shipping anyway – most of them aren’t big problems), and Firefox just released version 2.0.0.11 to fix a (cosmetic) regression in 2.0.0.10 (a security patch release which you should already have if you use Firefox).

Most of the time, regressions should be caught by unit testing, but for some reason weren’t. (This is one reason I don’t like unit tests much at the moment: if you know about a problem enough to test for it, you should be able to avoid it in your code.) But to me, regressions are pretty much a major reason for code segmentation: write one function that does one thing, and combine them to do other things. It should be reasonably easy to determine what inputs and outputs each function gives, and if it isn’t, that’s what JavaDoc, JSDoc, and others are for.

Overall, I really have to think that most regressions could be avoided by having enough simple functions doing well-defined things. However, that isn’t always possible or feasible, which leads to problems. Because the regressions that could easily be tested for usually are, that makes new regressions even harder to nail down, which is one of the reasons they’re so hard to fix. My only bit of advice if you’re trying to fix them is to nail down which changeset caused the problem, and investigate every part of that for how it affects other things.

Andy Schmitz

My Stuff
Blog Stuff
Categories
Archives