06 August 2008

Radiohead rules

Like many other people, I saw that Radiohead had created an interesting music video for House of Cards with all sorts of visualizations. From what I read, they had sampled visual data using Lidar. Substantial portions of the data used in constructing the video are available (as is the music) to the general public. The House of Cards group on YouTube showcases how a number of people have re-run the data through various visual engines.



As you may notice, most of the videos on YouTube use some form of 3D engine to visualize the data. The data is structured fairly simply in the CSV files with x, y, and z coordinates, as well as an intensity level for each point.



Problem: I'm not adept (at all) with anything 3D based. So, I decided to see if I could kludge my way into trying to create a visualization of my own using what I know. Er.. All I know is Java and Graphics2D.



For rendering data, I just used a simple linear scale to position the x and y points. Each point was merely a filled circle. I plotted all points in white. The intensity value on each point drove the alpha values on each point. Lastly, I used the z value to control the size of the point- closer z values got larger points. Here's what I got for starters:





Some tuning in point size, and changes in colors to prevent it from looking too scary:





Anyone know an easy way to sequence some 1000 images into a decent video? I can't seem to get iMovie to have a delay between images of less than .3s, and the actual frames need to be rendered out at 30 frames per second.



*Follow up:* Meant the attach a larger copy that shows the patterns generated by the circle size and alpha variations:



04 August 2008

Broader thinking

Steph decided to take a horizontal sequence of pictures on her camera when we were up in the Rocky Mountain National Park. The goal was to stitch the images into a panorama. The last time I did this, was back in 2001, gluing together the Manhattan skyline (World Trade Center buildings included). That was done mostly with gimp, if I recall right.



Meet Hugin- a gem of a tool that does all the hard work needed to assemble a panoramic blend of pictures. The image below, cobbled from some 7 shots took around 3 minutes. Just be sure to preserve your Exif information as you get your pictures together since Hugin can use them to drive a massive amount of automation.





Hugin is an open source application, and it leverages the libpano suite. The value it provides is really outstanding. Moreover, the community behind Hugin seems to be adding value in raw photographic know-how on their blog: panospace. Kudos to a great app, and the community that powers it.

13 July 2008

Need bicycle porn?

Or a house? Look no further.

Lightning and a Moth

Some of the storms in early June had such a high density of lightning strikes that it turned out to be easy enough to catch a couple of strikes. My location left a lot to be desired, and I kind lacked the courage (or funds) to subject myself and the camera to the worst of the storm. Here's what I got:





Towards the latter part of June, Steph saw this moth and took some photos of it. Note the fur all over it, and the fern like antennae. Does anyone know kind of moth it is?



08 June 2008

Java 6 on OS X

This almost sneaked past me.. The most recent update humbly drops in Java SE 6:






It doesn't seem to replace Java 1.5 right away. You've got to fire up the Java Preferences app and fiddle with a few switches.





And then, presto:





And in case you need to add the new VM to some app (like Eclipse), the goldmine is at: /System/Library/Frameworks/JavaVM.framework/Versions.

24 April 2008

21 April 2008

Pulling data out of the air



About a month ago, I bought a real small weather station from AAG Electronica. The unit I got has three sensors: temperature, wind speed and wind direction. Data is transmitted from the station using the 1-Wire protocol. The transport that this runs on is merely a phone line, within which only two of the wires are put to use.



The first major challenge was finding a good place to install the station. I wasn't keen on running reams of phone line around the countryside, so I compromised on location. It turned out that the tripod on which the (absolutely detestable farce of a connectivity solution) DirecWay dish was installed would work nicely. (Also, considering that we'd long since stopped using the hideous service, it seemed like the dish installation might be able to redeem itself in some mechanical way). Perhaps most nifty: the dish accidentally manages to serve as a direct sun shield, preventing the unit from getting cooked.





With the station installed, I had to start collecting data. The One-Wire Weather project proved quite easy. In addition to a gtk UI that's useful to detect and configure a setup file, there's a no-gui program that can be configured to scrape readings from the station. Wrap that in a bit of perl, add a database, write code code with JFreeChart and presto:





For for now, I get up to the 5-minute interval readings of temperature posted on recursed.org.

25 March 2008

sizzle

Back when I was thinner, and had a sense of humor. Perhaps more peculiar than normal.













08 March 2008

Slow SSH Login

The SSH daemon appears to execute a reverse lookup on inbound IPs to map them to a DNS address. My symptoms were authentication attempts that took a long time to return a password prompt, but thereafter performed as normal.



It seems like the key is to get the server to "know" the host attempting to authenticate, and so tweaking with /etc/hosts is pretty much a quick way to fix the issue.




ssh user@server
... takes forever to get password challenge


Within the /etc/hosts on server, add:


#IP.Of.Connecting.Client hostNameOfConnectingComputer
192.168.1.100 kitchenLaptop


That seems to have fixed things. The password challenges flash up immediately. Of course, it might be prudent to set up an internal DNS so each machine doesn't have to have a cobbled host file.

28 February 2008

Online

We got broadband to our house today.



Our local technician, Kerry, is the hero of the neighborhood. Without his involvement in the process, I doubt we would have got this connectivity. He's my hero.


That said, I've got my Dynamic DNS back on line. If you do need one, try zonedit. It is free, and the site instills confidence with its lack of sexy, and focus on the job. Another plus, it works with ddclient. My real simple /etc/ddclient.conf:




syslog=yes
pid=/var/run/ddclient.pid
ssl=yes # use ssl

use=web, web=checkip.dyndns.org/, web-skip='IP Address: '

server=www.zoneedit.com, \
protocol=zoneedit1, \
login=username, \
password=password \
comma-separated-list-of-domains


If you're running a Debian flavor, the sleep time and such is at /etc/default/ddclient, which seems to override any sleep times set in the ddclient.conf file.

04 February 2008

Waiting


A few days ago, we got a note from our power company indicating that they were going to upgrade the metering equipment that they use to estimate and bill us on consumption for. The new equipment will be wireless- a passing by truck will be able to scan readings without having the driver exit, or even stop the vehicle. This probably saves the power company a lot of money- the time expended in measuring how much power I'm consuming drops down dramatically, leading to a higher productivity level for this job through automation. There's probably a savings in energy expended since the vehicles moving people to these metering locations will be using a lot less gas- no more start/rev up/stop/start/rev up/stop, but probably a leisurely drive through the neighborhood. Multiply that by thousands of starts and stops and vehicles, and you've got a lot coin in the bank.



If my house, and everyone else's house had an assumed internet connection, the power company might approach this problem differently. Say that everyone's house had some sort of assumed internet connectivity (like a 110 Volt three-prong outlet, or some wireless capacity). In that case, the power company would probably have left me a note indicating that the new metering equipment would serve their data on demand, or maybe periodically, or maybe even constantly, via a secure connection to the internet.



This letter, and others like it cry out for moving us into an age where reasonable connectivity is deemed an infrastructural necessity. This might seem like a reach, but in a world where data points tend to be of immense value, surely an assumed infrastructure for moving data is of value too?



Urban areas seem to be benefiting from the prevalence of broadband infrastructure. Still, there aren't too many manufacturers that can assume that a data connection exists as simply as say a socket to a bulb. Most of the products that make this assumption are purely internet related. Still, some newer ones are setting precedent (Blu-Ray devices, Digital Photo Frames, and the like). Not too many that resemble a power consumption meter though. Do you know of any that break the mold?



Perhaps the advent of these sorts of devices will spur the adoption of an assumed connected infrastructure. Perhaps the assumed infrastructure will spur the growth of those devices? Maybe seeing them crop up in urban areas will show people what sort of innovation lies in store for us if we can let manufacturers assume an internet connection as easily as they assume a power plug.



Meanwhile, I wait for my ISP to figure out when it would like to provide me with broadband access. The strange reality is that I'm only 20 miles away from my ISPs headquarters.

12 November 2007

Ford GT

At the McMullen Ford Dealership in Council Bluffs, I happened to see this machine. No one near it, no one drooling over it, just the car, right there.





The Ford GT

05 November 2007

The good shepherd


That's Leela (again). This is the sight that anyone opening the garage door would be greeted with. It also happens to be the first thing the cats see in the morning.

24 October 2007

1000 words


Compare tobacco packaging warnings across the globe.




The ceiling at the Orpheum.



Lego people, made of lego blocks. Would have been a recursive trip if they were made of lego people though..



Leela the lap dog.

02 August 2007

Golf: day 1



The morning started off damp and soggy, but improved to become a crisp sunny day. My game started crisp and went soggy. Two rounds in the bag.

01 August 2007

Halfway there

I'm halfway done and I've made two observations:



  • Blogger seems to perform IP based i18n

  • Windows CE is shit (ok fine- I didn't need to go halfway around the world to figure this one)



I'm in Frankfurt, or more specifically the Frankfurt airport. It doesn't have free wireless internet access. Neither did Chicago. But both had T-Mobile deals. But then my Chicago T-Mobile account didn't seem to take in Frankfurt. Anyway, whatever. Here's the fun part:





Our friends here (in the context of the site you are reading) seem to have a mechanism to convert my IP address into a geographical location. In turn, they've defaulted my language/locale over automatically. Nifty. But after a few minutes of thinking, perhaps a little irritating too. Really- the last time I was at the site, I did everything in English, so why the switcheroo? It wasn't like I was an anonymous user either.. Anyway, +1 on pulling the IP based i18n.



Bullet point number two (the Windows CE being given excrement status), is evidenced by this, in mid-flight (and more irritatingly, mid-movie):





Needless to say, the powers that be at MS were looking down upon me since my particular console (embedded into the back of the seat in front of me) took about a thousand times longer to start than any of the other ones of the plane.

18 July 2007

java final vars != magic constant creator

In general, a lot of us tend to use the final keyword alongside public and static. Quite often too, we use it to declare a constant, perhaps a String, or int value. But, does the final keyword cause the variable to become a constant?

public class FinalExample {

public static final String CONSTANT =
"I can never change!";

}


Alright. We've got a constant. Let's try and make it not so constant:



public class FinalExample {

public static final String CONSTANT =
"I can never change!";

public static void main (String[] args) {
CONSTANT = "I can always change";
}

}

$ javac *.java
FinalExample.java:7: cannot assign a value to final variable CONSTANT
CONSTANT = "I can always change";
^
1 error

So the compiler enforces that you can't try to assign a value to a final variable. It didn't say anything about keeping it constant (that was the variable name). So, let's try and switch this up:

public class FinalExample {

public static final String[] CONSTANT_ARRAY =
{"I", "can", "never", "change"};

public static void main (String[] args) {
for (int x=0; x<CONSTANT_ARRAY.length; x++)
System.out.print(CONSTANT_ARRAY[x] + " ");
System.out.println();
}

}

$ java FinalExample
I can never change


This compiles and runs fine with the output as above. Let's try and break this.


public class FinalExample {

public static final String[] CONSTANT_ARRAY =
{"I", "can", "never", "change"};

public static void main (String[] args) {
CONSTANT_ARRAY[2] = "always";
for (int x=0; x<CONSTANT_ARRAY.length; x++)
System.out.print(CONSTANT_ARRAY[x] + " ");
System.out.println();
}

}

$ java FinalExample
I can always change


So, we just changed a final declared variable. Ok, let's try and change it a little differently.

public class FinalExample {

public static final String[] CONSTANT_ARRAY =
{"I", "can", "never", "change"};

public static void main (String[] args) {
CONSTANT_ARRAY =
{"I", "can", "always", "change"};
}

}

$ javac *.java
FinalExample.java:6: illegal start of expression
CONSTANT_ARRAY = {"I", "can", "always", "change"};
^
1 error


So, what gives?

  • Final declarations ensure that a declared variable is never re-assigned to something else. Once you go: final something = something, you don't get to say something = something_else later on.

  • In the event that your object is mutable- ie: can be changed, you are out of luck in trying to make it a constant using final. So, something like a Calendar object which has setters on it to change its value won't hold some magical constantness by being declared as final. This applies to array elements too, as demonstrated above.

15 May 2007

The Gentoo experiment

Podunk said:
<arnold>Gentoo iss fo getting you pumped uuuup!<arnold>

Well, that an for agonizing over which CFLAGS to use to make programs that already complete in milliseconds do so 3% faster.


My experiment with Gentoo is complete. As it so happens, a coworker got the same hardware that I did, at the same time. He installed Ubuntu 7.04. It turns out that the compile times, and some other benchmarks really were around 0.1% (if that at times) between the two different installs.

I know a learned a huge amount of information about how a Linux install works under the hood. Much props to any Linux distro that moves you through it painlessly. There was also some strange fascination that I derived in watching source get downloaded and compiled so effortlessly. Perhaps its that same feeling you got when you used to see a kernel compile; you're really not that smart- you didn't write the code after all, but compiling it sure feels cool- especially when the screen is dumping debug like there's no tomorrow.

But, back to the point- why is it that there's no real performance difference between an Ubuntu and a Gentoo- one compiled for my machine, and another based off pre-compiled binaries? Maybe that's the beauty of the operating system. Maybe I'm just an ass. I don't know.

I do know this- I like my Debain based distros, and I've switched back to one.

apt-get install happiness

07 May 2007

Idiots

How can it be so difficult to legally buy a song online?



Here's the challenge- find a service to download a song. It has to be adhere to the following standards:



  • Encoded in a standard format (no iTunes m4p), and works on a music player (xmms/vlc/banshee), so music should be a legit (read: standard) sound format

  • Doesn't need an application to interface with the service. (Haven't we been using a browser to search/sort/browse/download fairly well?)

  • Gives me the same flexibility as a CD would: I can back it up, rip to my computer, make copies for my use.



After a day or two of fruitless searching, I found a couple of candidates: mp3tunes, and maybe emusic. But, both seem to be indie-label oriented.



Maybe I'm missing something obvious here, and there really is an easy way to do what I want to do: get music legally without being encumbered by some third party software. At the moment, the only viable avenues I seem to have are:


  • hit the P2P clouds and "acquire" my music

  • buy a CD and be legal, but land up paying extra for tracks I don't want



I'm not going to hit the P2P could (I have a wife and dog to think about), but perhaps it answers why so many people do lean that way. I know I'd gladly pay a buck a song if I could get it on my terms- but alas, that seems impossible at the moment.



Perhaps the RIAA won't issue a license to someone that wants to provide music in a fairly open way. Perhaps no one has thought of that yet? Is it illegal? I don't know. Have you had better luck finding music online?