Programming

After a long time, I have finally started programming in my spare time again. This required finishing setting up my source control and getting my Visual Studio just right. It also required resurrecting the long dead code section of this website.

More updates to come soon.

Tamanator Online

Forgot to post pictures, but earlier this month I put a new computer together.

It has since been dubbed the Tamanator, for it runs its predecessor’s mind (former system disk) as a Virtual Box. This task was made all the more convoluted because I didn’t consider that I might want to do this in the first place. If I did, I would have pre-removed all the special hardware drivers first before I disassembled it and gutted it for parts. As a result, I had a physical hard drive containing the old computer’s OS that would not boot on my new hardware, so virtualizing it seemed the best way to go.

Creating a VHD image was the easy part, for Sysinternals has a disk2vhd utility for this express purpose. Mounting the drive in Windows Virtual PC was another issue altogether, for it has a 127 GiB physical size limit for whatever reason. The system partition is only 80 GiB, but the actual disk itself is 200, and the disk2vhd utility creates the same structure in the VHD file, even if it only has the one partition worth of data.

After much consternation, coffee, and research, I worked out a procedure that doesn’t involve paid-for partition utilities. First, get rid of that secondary partition. Move the data elsewhere if you need it, then delete that entire partition. Now, image the disk again using disk2vhd. The new file still represents a 127+ GiB disk, but at least now the file considers the unpartitioned space, well, unpartitioned. Now use the VHD Resizer tool from vmToolkit to drop the size of the VHD down to something manageable, like the actual size of the sole partition. Voila, the disk is now mountable.

And if you’re paranoid about losing data in the process like I was, note that Windows 7 has built-in support for mounting VHD images via Disk Management – so you can create the first VHD directly from your physical drive, mount it (taking care to physically disconnect your physical drive first, as Windows will not like does not like hates will choke and die if it sees two drives with the same ID). Once you’ve mounted the VHD (not in read-only mode!!), delete that partition, create a new VHD without the second partition, resize it, and you’ll still have the original disk if something horrible went wrong with the image.

All this was for naught, of course, as the my lack of foresight regarding drivers came back to haunt me. The original hardware included an AMD 64-bit X2 4200 processor. Who would’ve thought that Windows does not like going to sleep in one hardware configuration, and waking up in another? Fortunately, the solution here is easy – don’t use Virtual PC. VirtualBox has a free edition and allows you to customize the hardware setup more than the meager options in VPC, thus allowing you to mimic the original hardware more, right down to the number of cores it gets to use. With any luck, you can at least boot it up, then rip out all the old hardware drivers and utilities like my AMD Dual Core Optimizer.

Octopus 1, Germany 0

http://news.bbc.co.uk/2/hi/world/europe/10521867.stm

In entirely unrelated news, Germany to serve up free cuttlefish in the streets tomorrow.

Toronto’s Kobayashi Maru

There are no winners when a protest goes violent.

The protesters’ message isn’t just aimed at the G20 leaders – we’d be lucky if more than a few politicians actually pay attention to and act on the concerns brought on by protests. The message is more directed to the ordinary citizen, because they have the power to convince the elected leaders (or the power to elect a convinced leader) to do something about X.

Unfortunately, that message is lost really quickly when the militants overrun the protest to cause random destruction. Just look at the evening news: On Wednesday and Thursday, the protests were large and loud, but were also peaceful – and the news reporters reported on the causes that the protesters represent. On Friday, it was a bit rowdier apparently, but still the message was getting across. On Saturday, Hell overran Toronto and the only thing on the news is the destruction – the local storefronts that were ransacked, the banks that were damaged, the police cars that were torched, the number of people arrested.

This is hardly the way to rally the average (unconcerned) citizen to a cause. All people hear is the destruction, because they are the same people who own, work and shop at the same places that were destroyed. It is very sad, because there the large majority of protesters there support good causes upon which action should be taken.

A few notes:

  • Police State: This is not a police state. This is a police state.
  • Vindicated: Police have made arrests of people with weapons at UofT, seemingly validating the university’s concern and subsequent closure of the downtown campus. The question about the $1B spent on security, unfortunately, is still up the air. Torontonians thought that was overkill before, but after hearing about the destruction, we’re now thinking what happened to that money? Presumably a lot of it were one time costs to try and get our police up to speed with handling large scale riots, because apparently we’ve never used tear gas before this weekend.
  • Teamkillers: Sadly, vandalizing local franchises/branches of large corporations does not achieve the stated goal of “sticking it to The Man”, as the repair bill will likely affect the insurance premiums of the local owner/operator. Unless you count ordinary citizens in “The Man”, in which case we’re all screwed.
  • Fail Troll is Fail: Even during the peaceful protests, there are people working the crowds trying to incite a riot. On Wednesday, there was a woman with unkempt hair dressed in a suit making “small talk” with onlookers – “look at all the police. f—ing hate them. doesn’t that just make you want to grab a stick and fight them.” The office building crowd wasn’t particularly receptive to her remarks, and she had to keep moving down the line.
  • Earthquake: The earthquake just barely registered about the threshold for “did you feel that?” for us (19th floor). I noticed a perceivable bouncing in my chair, but I would have shook it off as just strong winds buffeting the building (despite it being a calm day without a breeze at street level, I have felt strong winds in the building before) if it weren’t for other people also remarking about the motion. Earlier in the day, there had been a suspicious package scare at Queen’s Park Station, so we were thinking along those lines. We went downstairs to check with security, and learned that people in adjacent buildings had felt it as well – whereupon we joined the crowd amassing outside and ended up learning that it was an earthquake. At this time, police had cordoned off the street because a protest was moving through – and this was where I met the aforementioned Troll who probably didn’t realize we were outside because of an earthquake.
  • Back to the Future: I’ve heard that some of the more violent rioters (face it, they’re not protesters) want to break down the governments and the corporations and revert to a self-sufficient lifestyle without taxation or something. There’s only a slight problem with that: been there, done that. Purse-thieving greedy politicians aside, governments exist to identify major goals and spend money for the common good, because otherwise the spending would be spread out over many individual goals (and some wouldn’t even contribute towards any common good). Sure, you house can now be a homestead, defended by a chain link fence and a gun, but you’ll also grow your own food, get your own water, make your own clothes… And shortly after some people realize that they could be more effective by specializing their skills and forming a collective (an advancement first discovered by humans sometime in the caveman days), you will have nation states and corporations rising up again. Oh, you can hold out. But when you see how the grass is greener on the other side…
  • Thus: Those rioters aren’t accomplishing anything productive with their wanton destruction in favour of the Wild Wild West. In fact, all they’re doing is making everyone sad. We have a word for them. Griefers.

Some photos from the June 23 Earthquake and the first couple days of G20 protests.

Re: Lost

I miss it already.