Archive

Archive for June, 2008

Rock Band progress: Medium Drums complete!

June 5th, 2008

46 songs done on Medium. The last tier I didn’t actually find that hard — although the videos of Run To The Hills on Youtube scare me deeply. The worst one was either Tom Sawyer by Rush (which a real-life drummer tells me has stretches in 7/4, which to my non-musically-trained ear translates to “why are the fucking dots all over the place now?!?” or Won’t Get Fooled Again by The Who, which did a lot of chopping and changing within the song. Nevertheless I did all five songs on the first go, which I am choosing to believe is encouraging.

I’ve done 4 on hard so far, looking forward to taking on some more of these. This really is an awesome game; terribly expensive, yes, but I’ve already had something like 5-10 hours out of the Drums solo tour and twice that out of the band world tour modes. I haven’t even touched the guitar solo tour yet.

Personal

Visual Studio essential option settings

June 5th, 2008

Settings I should make on a new Visual Studio install so it doesn’t annoy me to death:

  • Projects And Solutions | General | untick “Always Show Error List If Build Finishes With Errors”
  • Projects And Solutions | Build and Run | “On Run, when build error occurs” set to “Do not launch”
  • Projects And Solutions | Build and Run | “MSBuild project build output verbosity” to “Medium”
  • Source Control | Environment | set “Editing” to “Prompt for Check out” (I prefer to be warned)
  • Text Editor | C# | Formatting | New Lines | untick all (K&R style)
  • Debugging | untick “Break all processes when one process breaks” (needed for Edit and Continue under Vista x64)
  • Test Tools | Test Project | untick all (unless you want tons of autogenerated semi-useless tests)

Personal ,

Rock Band progress

June 4th, 2008

In the solo Drums career, I’ve done 40 on Mediuam, 3 on Hard, 1 on Expert. I’ve unlocked stuff like Highway Star (Deep Purple) and the Metallica one now, not to mention the utterly bastardly Tom Sawyer by Rush (which is apparantly in 7/4, which explains why I can’t drum it to save my life). I think I will go back down and retry some of the earlier songs and try and get 5* ratings.

Personal

Visual Studio Team Suite has no Assert.AlmostEquals

June 4th, 2008

Gah!

Say I am writing a unit test for a class that converts metres to feet. This, naturally, involves floats. Ideally my code looks like

float expected=32.91; // in feet
Distance dist = new Distance (10,”m”);
Assert.AlmostEquals(dist.convertToUnit(”ft”),expected);

where the “AlmostEquals” method does something smart like compares the first decimal place or so. I think JUnit/NUnit/etc actually allow you to spec a precision.

Microsoft haven’t managed this, so I have to write stuff like

float expected=32.91; // in feet
Distance dist = new Distance (10,”m”);
float difference = Math.abs(expected – dist.convertToUnit(ft)); // java ism, not sure of the .net Abs method offhand
Assert.IsTrue(difference<0.01);

Unit tests need to be as crystal clear in their intent and as quick to write as possible. Every little tiny rough edge will catch your project thousands of times over. So a big “bah” to Microsoft for this one.

Personal , , , ,

Hacking on the DNS-323 part 1: share names

June 2nd, 2008

The D-Link DNS-323 is a reasonably low-cost two-drive NAS (I just bought mine for £150) which allows you to set up a slice of RAIDed redundant disk storage on your network and access it from any number of different computers and devices. For example, you can back up a laptop to it and use it to stream media to a PS3. Compared to the option of leaving a PC on all the time, the DNS-323 is very small, very quiet, and consumes far less power.

It can do a lot more however. It’s actually a small solid state Linux PC, with 8Mb of flash RAM to store the OS, 64M of RAM, and a 500 Mhz ARM-based processor. As such, it is capable of quite a lot more. Even better, the nice blokes at Dlink have left a deliberate sort of back door into the system — via which you can inject extra features alongside the ones it has. This backdoor is known as funplug in the community that has grown up around the device.

An aside: this article is up to date as of 3rd June 2008, but the community moves quickly. More up to date software and instructions may be found at the community wiki.

First update the firmware

Go to the D-Link support site and get any newer firmware for the device that you can find there. Early firmware releases have improved stability and added features, so are definitely worth having, and you should do this bit first.

Better share names

Say (like me) you buy the device, bung in two hard disks, connect to its tidy but basic web interface, and tell it to make a RAID-1 (mirrored) array out of them. Give the device a name under Setup | Device (I called mine homer, which I mention as you will see it below) and immediately you can navigate (I’ll assume you have a Windows client) to \\homer\ and see the hard disk shared out there with the boring name “Volume_1″. If you tell it to format the hard disks separately you’ll also have a Volume_2, but that’s not that good — part of the point of one of these things is to get some redundancy around the disks so if you lose a disk you don’t lose any data. But I digress.

Volume_1 is a pretty crappy name but fortunately we can change it. First we need to connect to the DNS-323’s FTP server, and to do that, we need to add a new user account onto the DNS-323. In the web admin interface, select Advanced | Users/Groups. Add a new username and a password. Then select FTP Server, and fill in the first box like this:

  • Category: User
  • User: the username you created
  • Folder: root
  • Permission: Read/write

…then click Add.

Now you need an FTP client on your machine to connect to the DNS-323. If you don’t have one Filezilla is excellent and free. Fire it up and give it your DNS-323’s name, and the user name and password you created earlier. You should see something like this:

Connecting to the DNS-323 from an FTP client

Now, yours won’t look quite like that — you won’t have any folders below Volume_1. That’s why we’re doing this; you’re going to make the folders (in Filezilla, right-click and select Create Folder) for each of the shares that you want to appear. In the example above I’ve made shares for Audio, Video, Pictures, Documents, and so on.

Finally, we need to tell the DNS-323 to share these newly created folders.

Back in the admin interface, select Advanced | Network Access. Down at the bottom is the default “Volume_1″ share — you can delete that one with the little trash can icon next to it. Then you can create a bunch of new ones in the bit at the top of the page. Use settings like this:

  • Category: User
  • User: All accounts
  • Folder: click Browse and select one of the folders you made earlier
  • Permission: Read/Write
  • Leave other values at their default

Repeat for all the other folders you made. When you’re finished, reboot the DNS-323 (Tools | System) and you should end up with something like this:

A browser window on the DNS-323\'s shares, showing lots of different names

Personal ,

OM NOM NOM NOM

June 2nd, 2008

OMNOMNOMNOMNOMN

IT EATS MEEE!

Personal

Daily Mail idiocy

June 2nd, 2008

Oh noes, teh Islamic Fundamentalists have been creating “terrifying” pictures of what Washington will look like after some sort of nuclear attack. “U.S. analysts said a lot of effort had been put into the video – entitled Nuclear Jihad, The Ultimate Terror – with graphics, music, and clips of different leaders and groups. The same expertise seems to have gone into creating this image of a devastated Washington.”

See for yourself!

Except, well, no, because that’s just a widely circulated publicity picture from forthcoming post-nuclear-apocalpse RPG, Fallout 3. You can see the original pic here. I expect the Daily Mail will want to ban that now.

Personal

An article about my Xbox troubles in the Sunday Star

June 1st, 2008

Sunday Star article about my gamertag ban

Hey, they didn’t take the piss! I’m as surprised as anyone.

Personal