Sunday, October 10, 2010

Dragon test run

HelloI am testing Dragon NaturallySpeaking with the new microphone. So far it looks like it might be working okay. Although it's too soon to tell. I'm speaking particularly quickly this time. I hope that Dragon NaturallySpeaking will be able to keep up with me. There have been two errors so far. I hope this isn't a trend.

Hello (again). I'd like to talk to you today about spam. Spam is some kind of luncheon meat. I'm not entirely sure what it's composed of. I've been told it's composed of spiced ham and meat although this is only a rumor. I've only managed to taste it once and I haven't been impressed. It's not that I thought it tasted bad it's that I didn't think it tasted much like anything. I have always liked ingredients with strong taste. I like things like onions and strong cheddar and spiced turkey breast and hot pickles with maybe a gherkin as a side dish and some sour balls for dessert. I guess I like the feel of a nuclear explosion in my mouth.


While we're not on the topic I'd like to change the subject to which ingredients go best in sandwiches. My personal fav is old cheddar, mayonnaise, cucumber and tomato. If I can be bothered I sometimes chop up some onions and throw them in there as well as sometimes some spicy hot pickles. I used to make the same sort of sandwich but add in some lettuce. I've slowly been coming to the conclusion that lettuce in sandwiches is just a waste of space. It doesn't really offer much in terms of flavor and while it's true that it does create a pleasent crunchy texture you can get much the same effect with cucumbers.

One thing I can't understand is why anyone would put cheese and meat in the same sandwich. In my opinion a sandwich should based on one or the other. Tthey are both superstar ingredients. Both cheese and meat deserve their own show; they deserve to have other ingredients bask in their glory. To put both in the same sandwich is doing both a disservice. First of all they don't go particularly well together. Both meat and cheese have similar textures and basic tastes. Unless you're meat is salami and cheese is Swiss then I can see that. The worst combination is ham and mild cheddar. If you do that you might as well just shoot yourself or use spam.

The worst damage I've ever made is one that use plain white bread with butter and mild cheddar. That's absolutely completely unpleasant. I'm pretty sure that sandwiches classified as a torture device under the Geneva Convention.

Anyway, this concludes my test of Dragon NaturallySpeaking with a new microphone.

New USB microphone: Plantronics 655

Wait a moment, I never told you about which microphone I got.

So when you get Dragon NaturallySpeaking you get a free microphone in the box. I really like this microphone as it's free and I only had to pay $100 for Dragon to get it. As a rule, free stuff you get with other stuff you have to pay for is good. The best place to make use of this philosophy is at a convention where you get a whole bag of free stuff for going to the thing you had to pay for which you can then throw at people you went with and sometimes they even give it back which is all good but I digress.

After buying Dragon NaturallySpeaking I started to use Skype quite a bit. I used my Dragon NaturallySpeaking headset with Skype. If I could digress once again I'd like to point out that anyone who's not using a headset of some sort when talking with Skype is inflicting terrible pain on the other person. Whereas the person with the headset is producing beautiful, CD-quality audio without any background noise but I was not using the headset is creating an echo chamber full of background chatter, claiming pots and pans any inevitable crying baby noises.

Okay, now what was I talking about again? Oh yes, my old headset with intent to use that as a lead-in to my new headset. Well, that kind of went off the rails. Man, you'd think I'd be able to fix all this by editing it after I dictated it. Too bad Dragon is dictating this in "pen mode" and I don't want to leave any whiteout on my screen. Oh well.

So anyway, Skype got me addicted to headsets and I started to use it more and more often. Then Starcraft II came along and my life would never be the same again. You see, I play Starcraft II with a friend over Skype. This is great but the Dragon headset really isn't up to the task. For one thing it only has a speaker for one ear. For another it seems to be meant for someone with a really skinny head. After a few hours of playing it becomes extremely uncomfortable. So I went out and got myself a good, new, stereo headset.

What I got was a sort of middle middle-of-the-road Plantronics 655 USB headset. My intention was to use this headset for games and for dictating to Dragon NaturallySpeaking. Also keep in mind that my friend Guillaume had written a very nice article explaining how to purchase a headset for use with Dragon. As a result I also got a stereo, noise reducing, USB headset.

So far, it's worked quite nicely for both Starcraft II and Dragon. Having the full stereo headset makes a huge change for Starcraft II. I can hear a pin drop and can drop a siege tank on the poor SCV that dropped it. I can also dictate to Dragon NaturallySpeaking very nicely too. The headset also works nicely when listening to music and has two little buttons on the side of the earpiece that can control the sound volume.

The microphone is not bad. The recording is buzz free although it does pick up more background noise then I would like. It doesn't seem to pick up more than my old headset but I guess I was hoping that the noise cancellation feature would do miracles.

When used as a pair of headphone headphone, one thing that's so good it's almost creepy is that there's no buzzing. Usually a headset plugged into the stereo mini jack on the computer will create a tiny background hum or hiss all the time. This is typically because the audio card on the machine isn't perfectly isolated from all the electrical noise coming from inside the computer. Because this is a USB headset, however, there is none of that. It sounds as if the headphones are not plugged in if the computer is not playing any sound.

Now, if you're looking for super amazing sound quality then you might want to look elsewhere. I say "might" because I really don't know if they're any good or not. I don't have any fancy equipment at my disposal to test with and I don't have a golden ear either. All I know is pretty much matches what I've come to expect from full ear headphones.

The headphones also don't isolate you from noises in the room very much at all. It's got to be the least sound isolation I've had from a full-ear headset. I'm not sure this is a good thing or a bad thing. It would probably be a good thing if you're working in an office and somebody wanted to interrupt you. It's probably a bad thing if you're working in an office and you don't want to be interrupted. At least I'm aware of how loud I'm talking into the microphone.

The last minor quibble I have is that my standard speakers don't work with the headset plugged in. This means I'm forever unplugging the USB headset in order to switch to my regular speakers and back. My original headset used a typical stereo mini jack and I have two of those on my machine so I could keep the headset constantly plugged in and still play audio through the speakers. I just wish there was an easy way to flip the audio without unplugging the headset or going into the windows sound control panel and switching the default sound output device. Maybe some sort of keyboard shortcut? Hum, I'll have to look into that.

(OMG it works with skype!)

Friday, September 24, 2010

Links ahoy

Yeah, I haven't said anything in a while. The reason: Starcraft II. It's highly addictive. So, while I'm playing my way through the campaign here are a few web pages I've found interesting:


Jeef Atwood's posted on the latest developments when it comes to SSDs. Apparently, they've gotten cheaper and faster. Ah but who's the fastest?
http://www.codinghorror.com/blog/2010/09/revisiting-solid-state-hard-drives.html

xkcd's worried that the windmills will kill us all.
http://xkcd.com/556/

.. and my good buddy Guillaume's posted his take on how to get the most out of Dragon Naturally speaking. You don't have dragon? You should. :-)
http://blog.gmarceau.qc.ca/2010/09/dictate-to-your-computer-like-pro.html

Also... did I mention starcraft II?

Tuesday, September 7, 2010

Dialog Boxes

Dialogs suck. They rudely jump in your face, block you from doing anything else, can be cryptic and are often just plain pointless. When a dialog comes up users (that includes myself) want to make it go away as fast as possible. It is the computer equivalent to wack-a-mole. As a result nobody is really interested in what the dialog is trying to say.

When a dialog pops up in front of a typical user they will start looking for the fastest way of making the dialog go away. The easiest thing to do is look at the buttons first. If the buttons are labeled "Save", "Don't Save" and "Cancel" then you really don't need to read the rest. It's a save confirmation dialog so press save if you need to do that, "don't save" if you don't and cancel if you were really trying to do something else. Labeling dialog buttons with what they do is excellent practice.


(This isn't the standard windows buttons order but otherwise a fine example)

Even if you don't buy the speed argument, putting the actions on the buttons themselves can help the user decode the rest of the dialog text. Example: A dialog with the text "The pliny has splonged the wirly. A momi is required." with "Get Moni Now" and "Get Moni Later" buttons is probably asking whether we'd like to do something now or a delay it until a little later. This isn't the best dialog because it's not clear what the consequences of the actions are but it's nice to see we can continue our work without getting a moni right away. Hopefully the pliny can limp along with a splonged wirly until then.

If the dialog has two buttons "Yes" and "No" then the user has to read the dialog text to find out what to do next. You can make this even worse by asking the user a question in the dialog text that doesn't require a yes/no answer. "Do you want to save or discard?" with "Yes" and "No" buttons, for example. That is not a yes or no question! You forfeit the rest of your questions! Again, labeling the buttons with the actions the user can take can avoid this class of error.

(Consider which options to put in a dialog carefully. 3 buttons is plenty. Don't be WinSCP.)

If the dialog text is incomprehensible the user starts to cast about looking for clues. This includes reading your dialog's title. Most of the time a dialog boxes' title is not that informative so the next thing the user tries to do is close the dialog with the close box. The idea here is the the close box essentially maps to cancel and so "canceling" whatever the dialog box is talking about is usually a safe action. Knowing this don't go and disable the close box action. That's like removing a panic button and replacing it with a profiterole.

So there you have it: a user will tend to look at the buttons first, then read the text then start looking for clues in the dialog title. They read them backwards I tells ya!

Friday, August 27, 2010

Undefined C programs and Game Loops

If you're in the habit of using C (and who isn't), you'll want to read this. It's a fantastic description of all sorts of way you can write programs with undefined behaviours in C. It also goes over the horrible and unintuitive things that can happen when you do.
http://blog.regehr.org/archives/213

I've also been looking at tweaking the game loop inside space smilies and found an excellent article on how to write game loops. If you've ever want to write a game, read this first!
http://dev.koonsolo.com/7/dewitters-gameloop/

Saturday, August 21, 2010

My Clock

One day I woke up and was surprised to see I had time traveled to the year 2108. Then I realized it was only the 21rst of August and went back to sleep much relieved.

Thursday, August 19, 2010

Scroll-wheel follows mouse

One of the few things I like about using the Gnome based system at work is that it scrolls the widget your mouse cursor is pointing it. It doesn't matter if the thing in question has the focus or not. It doesn't matter if it's in another window that doesn't have the focus it just scrolls whatever is under the mouse cursor. It's really nice.

Windows 7 doesn't do this. I miss this behavior.In Windows 7 you have to click on whatever you want to scroll to make sure it has the focus. Sometimes you don't want to click because it's hard to find something "safe" to click on. That is, something that won't screw up what you're doing. Using the window explorer/file manager is a good example. The way I use it, there's a pane on the left hand side that shows me the list of folders and where I am in the file hierarchy. Clicking just about anywhere in that pane changes the selected folder and moves you around in the hierarchy. If I want to scroll this pane I have trouble finding a place where I can give it focus while not getting myself lost in a sea of folders. Having the mouse cursor determine which scroll pane is scrolled, rather than the focus solves this problem nicely.

I've managed to find a utility that enables this behaviour. It's called WizMouse. Give WizMouse and the scroll-wheel follows mouse a try. In a little while you'll wonder how you lived with it any other way.

2012-11-08 - There are a few other products like this and I've tried a few of them. They all seem to have the problem of causing pauses/freezes. The pauses are so bad that even the mouse cursor will stutter its way across the screen. I've had to uninstall these utilities because the pausing has been more annoying than the default windows scrollwheel behaviour. Oh, and don't think I didn't notice that Chrome supports the gnome model.. at least within Chrome windows.

Saturday, August 14, 2010

Doodling


You know how it goes. Someone is talking about.. something.. Your mind starts to wander and you start to doodle in your notebook.

This one made me laugh so I thought I'd share it.







Saturday, August 7, 2010

History of the SSD

As some of you may know I'm a big SSD fan. For those who are worried about the negative reputation that SSDs have gotten you should check out an article pointed out to me by our chief architect.

History of the SSD courtesy of AnandTech:

http://www.anandtech.com/show/2738/1

Thursday, August 5, 2010

Light Text on a Mixed Background

Let's say you wake up one morning and find you're the guy responsible for deciding what colour the subtitle text should be. After overcoming the initial shock of having slept through a major career change, you'd come realize what a difficult problem this is. If you make the text white it'll show up fine on a dark background as you would find in a horror movie or Tim Burton film. On the other hand it will leave the audience puzzled at on a white background like the snowy battle of Hoth. If you give in to the star wars fans and make the text black the Tim Burton fans will grab their pitchforks and head up to your spooky castle during a midnight thunderstorm. Things get even more embarrassing if half the screen is white and half the screen is black. The audience will be able to read half the sentence and no doubt fill in the rest with whatever their dirty minds come up with. This, of course, will lead to many viewer complaints about how smutty modern films have become. What are you to do?

I've run into this problem a couple of times during my programming career. In my case it was adding text overlays to images to show additional image meta data... while fighting the Sith with Jonny Depp! It's actually surprisingly easy to get text to show up nicely on almost any background. All you need to do is have lightly coloured text with a shadow effect.

The simplest way to do this is to simply paint a copy of the text in question one pixel down and one to the right in black. For added readability add another copy one pixel to the right.

Here's some sample code:
g.setColor(Color.BLACK);
g.drawString(TEXT, 10 + 1, 10 + 1); //second shadow
g.drawString(TEXT, 10 + 1, 10); //first shadow

g.setColor(Color.WHITE);
g.drawString(TEXT, 10, 10);


Nice, large, translucent drop shadows can also increase the readability of text. In my case, though, I only want the shadow effect to increase the readability of the text. The simplicity and subtlety of the shadow effect above is a feature.

I've included a real time java demo of just how amazing this effect can be.

Shadowed text demo!

(Requires java. Open the file with the "java web start" application)

Source code is here!

For those without java this is what the incredibly light pink text looks like on a pure white background:


(The application isn't this blurry when you run it :-) )

Google makes use of a subtle and more fancy shadow effects if you select a background for you Google homepage. You can use any photo for the background. In this image I've selected a plain, white background:

(The Google homepage slightly cropped.)

Sunday, August 1, 2010

Booting XP with the new motherboard

You may remember how I recently got a new motherboard.. and then I changed the CPU. I thought I'd get my motherboard to boot Windows XP.

When I upgraded to Windows 7 from Windows XP I installed Windows 7 on a brand-new solid state drive (remember when I got one of those?). This left me with the original installation of Windows XP on the existing hard drive. This is a sweet arrangement as it meant I could boot up with Windows XP if I discovered of applications that can't run in Windows 7. It's also useful to have your old Windows XP around if you want to look up some setting or bookmark or something that won't transfer over to Windows 7.

When I changed the motherboard I could no longer boot into Windows XP. I'm not entirely sure why that happened. My suspicion, at the time, was the drive numbers changed around. Windows XP keeps track of which drive number it's booted from in the boot.ini file. I went into the boot any file and tried changing the numbers to my best guess as to what what they should be but for some reason it wasn't working. I'm still not sure why it didn't work, actually. I think it may have had something to do with me screwing up the file format a little. I thought the '#' symbol was used to denote comments when in reality it's the ';'. Oh dear.. a little too much Linux shell scripting.

In any case, it wasn't working so I tried to use the utility EasyBCD to re-create the Windows XP boot option. This failed as well. I'm not sure why this failed either. I'm not sure what EasyBCD was trying to do but my booting arrangement is a bit unusual in that my old Windows XP drive contains the boot loader which then boots Windows 7 on my new solid-state drive. I think EasyBCD was a bit confused by this. When I would launch Easy BCD, it couldn't find the BCD file, for instance. I think it was setting everything up thinking the boot loader was being run from the solid-state drive. In any case, it I was left pretty much where I started except that now I kept getting messages about NTDETECT failing.

I noticed that EasyBCD had messed with files that Windows XP uses to boot. I tried to repair the Windows XP installation by running a few commands off the Windows XP repair CD. Many of the Windows XP commands were throwing errors and clearly had no idea what Windows 7 and easy BCD had done to the installation.

(The BIOS bone's connected to the MBR record. The MBR's connected to the PBR. The PBR points the BCD file.. but not on my system 'cause it's b0rked. yeah!)

I tried rebooting and was surprised to find I couldn't even boot Windows 7 now. After much swearing I used the Windows 7 repair CD to try and repair the installation. The Windows 7 installation CD had no idea what I'd done. I had no idea what I'd done. Things were going from bad to worse. I knew that the Windows 7 repair CD (or at very least the Windows 7 installation itself) would have the tools I needed to repair the Windows 7 installation. Theoretically, all I would need to do is generate a new BCD file that would point to the already installed Windows 7 installation. The thing was, I didn't know what the damn commands were that did that.

I tried to use EasyBCD but that didn't work as it needed the full Windows 7 to run; the repair CD didn't cut it. I couldn't even run the command line versions of EasyBCD. After a further sampling of four letter expletives, I started up the old Dell netbook and poked around the Internet looking for a solution. It turns out that, in the Windows\System32 directory, you can find two commands that will allow you to manipulate the BCD file. "bcdboot.exe" allows you to build a new BCD file and "bcdedit.exe" allows you to edit said file to add additional boot options. Sweet.

To make a long story short I used bcdboot.exe to make a new BCD file on the solid-state drive. I then switched the solid-state drive to my primary boot drive in the BIOS. With that I could boot into Window 7. yay! I then added the Windows XP installation as an option with EasyBCD. I now had a choice between the two operating systems when I booted. This all went so well that I also took a stab at repairing the BCD file on the Windows XP installation just in case my solid-state drive (containing the all important BCD file and Windows 7 installation) died. If the solid-state drive died I could boot directly to Windows XP on my other hard drive. I haven't actually tested it yet. I think it might boot Windows 7 but I don't hold out much hope that it's going to actually boot Windows XP. To do that I would need to use that BCD file to boot into Windows 7 and then used it two commands to add a second entry for Windows XP. This is precisely what I couldn't figure out how to do the first time. Oh well, maybe I'll try it again.. A bit later...

Now that Windows XP is booting all I need to do is install the drivers and get ACHI working again. Weeeeeeeeeeeeeeeeeeeeee......

IM IN UR BOXEN MESIN WIF UR BOOT DRIV

Saturday, July 31, 2010

CPU heat sink woes

Okay so here's the story of what happened to my CPU after I installed the new motherboard.

When you install a new motherboard you need to take the CPU off the old motherboard and put the CPU onto the new motherboard. This is a bit involved but not as difficult as dealing with the heatsink. The standard heatsink for the socket 775 series CPU is absolutely silly. Essentially, it's held on with some pushpins. It's a bit difficult to describe exactly how this works but basically you have two plastic flaps being held open with a sort of wedge. The wedge is on the head of this pin. The wedge is flattened so that as you twist the pin can wedge open the two plastic flaps or not as you wish.

I didn't know any of this when I started and the manual wasn't exactly helpful. After a while I managed to get the heatsink off but I would definitely suggest reading a handful of tutorials on the Internet on how to do it before you start. The way I did it was wrong. I actually twisted some of the pins in the wrong direction. They eventually turned but they weren't too happy about it. If you do it the right way it's much easier.

So anyway, I successfully got the heatsink off and transfered the CPU over to the new motherboard. There were no bent pins on the motherboard when I bought it. The guy at the computer shop was really eager to show me this. "You see" he said. "No bent pins". Mmm kay. I'm guessing that some motherboards have bent pins or some people bring motherboards back in with bent pins because they put too much pressure on the CPU when they installed it or something. I can definitely see how that could happen but if you're carefully following the instructions (which is actually well explained in the motherboard user manual at least in my case) you shouldn't screw anything up.

Once the CPU was on the new motherboard all that remained was to replace the heatsink. At this point I felt like a bit of a fool as I had completely forgotten about the thermal paste. You see, when you move a CPU like this you typically have to reapply the thermal paste (sometimes called thermal grease). In my case I didn't have any thermal paste. Nor did I have the isoproterenol you need in order to clean off the old thermal paste. Cunningly, I took advantage of both these situations and simply reused the existing paste. This was okay because it would still work, just not very well. Even if it didn't work Intel CPUs have little thermometers in them which stop you from damaging the CPU if they get too hot. It also stops them from bursting into flames if the heat sink falls off which is handy.



Intel CPUs (and modern AMD CPUs) do this by under clocking themselves until they cool down. So a 3Ghz chip might run at 1 Ghz or even lower if it gets too hot. The general rule is the higher the Mhz/Ghz the more heat is produced so lower Ghz means less heat. When this feature was introduced people accused Intel of crippling their CPUs because they would under clocked themselves when after you've installed them.. umm... wrongly... I still don't fully understand that attitude. I am quite thankful for this feature because I much prefer a slow CPU to a burning CPU.

When I got my system running I checked to see what the temperature on the CPU was. The temperature was about 75°C which is not that hot. Under load it went up to 80°C. These numbers didn't seem that high to me but I knew that different CPUs have different operating temperatures. Some Pentium 4 chips used to get very hot indeed. This being a Core 2 Duo (E6400) and not a Pentium 4 it might have a lower operating temperature. After some research it turned out that it was only supposed to run at 61°C maximum. Dang.

So I went down to the computer store and picked up some thermal grease and went to the drugstore and picked up some extremely pure isopropanol. I then took off my heat sink (with minimal swearing this time), used some cotton swabs and isopropanol to take off the old thermal paste and replaced it with the new thermal grease in the usual way. I then booted up my machine to check the temperature.

At idle the temperature was 65°C and under full load the temperature was 80°C. This annoyed me. I hadn't even finished overclocking the CPU. It was a 2.1 GHz CPU that I wanted to run at 3.2 GHz. I already knew that the chip could run at that speed just fine. My guess was that the thermal grease I installed was crap. The other possibility was that I had installed the heat sink slightly wrong... I made the decision that I wasn't going to reinstall the heat sink again as I was no longer on speaking terms with it. I wanted to run my system overclocked so I figured that I should get something better then the stock cooler anyway. With any luck it would be quieter and come with its own (better) thermal paste too.

I went down to the local computer shop and got an Arctic Freezer 7 ver 2. I did this because it had some good reviews on the web. It was also in stock at the local computer store. At only 35$ dollars it was a good deal too. Yeah, it included the thermal paste.

Installation was shockingly easy although I must confess that I had to read the instructions (Well, look at the instruction pictures really. There were no words.). I was also worried about over tightening the screws that held the heat sink onto the black, plastic mounting bracket. The 775 socket is made to take a lot of pressure but I didn't want to overdo it. I had visions of going back to the computer store. I'd have to get another replacement motherboard because I'd bent the pins! I couldn't even claim they were bent to begin with. :-)

In the end I installed the cooler, booted up and checked the temperature. Idle temperature was now 40°C. Temperature under full load was 60°C. Woohoo! What made it even nicer was that the fan wasn't even going at full speed like the old heat sink fan was. This meant I had some headroom to work with. It also meant I wasn't going to go deaf from the fan noise. Going deaf sucks. Especially if you don't want to.

I was very happy with all this and so tried overclocking it to the full 3.2 GHz. Idle temperature was still 40°C temperature and under full load it was still 60°C. I was very, very happy. I did notice something weird though. The the CPU seemed to be operating only at 2.4 GHz when the CPU was idle but when the CPU is under full load it was operating at 3.2 GHz. I'm guessing this has something to do with saving energy. If the CPU is not doing anything then there's no point in running it at the full 3.2 GHz. It just wastes energy. I'm still investigating exactly which feature that I inadvertently installed that is causing this to happen. When I find out I'll be sure to tell mention it.

Now all I had to do was get my second hard drive (with Windows XP) booting again.

Friday, July 30, 2010

Why the U2211-H panel?

Why did I get this relatively small 21.5 inch panel (note that I paid 219$ CAD not the 319 it is normally) instead of, say this much larger, comparably priced panel.

Doesn't go into portrait mode.. Doesn't have a display port.. is too big 4 me (24 inches yipes! 3 of those won't fit on my desk) and it's a TN panel..

from
http://www.pchardwarehelp.com/guides/lcd-panel-types.php


"TN (Twisted Nematic) panels are the most widely used panel type in the manufacture of LCD monitors. TN panels are cheap and offer excellent response times, making them perfect for fast paced gaming. The response times of current TN panels range from 2ms to 5ms. However, color reproduction, viewing angles and contrast ratios of TN panels are the worst of any current LCD panel technology. Unlike most 8-bit IPS/VA based panels, TN is only 6-bit and unable to display the full 16.7 million colors available in 24-bit true color. They can mimick the 16.7 million colors of 8-bit panels using a technique called dithering, but the results are unimpressive. TN panels have become popular with the average computer user because they are very inexpensive and currently dominate the LCD display market in availability."


The "ultra" panels from Dell are the latest generation of ISP panels:

"S-IPS/H-IPS (In Plane Switching) panels are generally considered the best overall LCD technology for image quality, color accuracy and viewing angles, but this comes at a price. They are well suited for graphics design and other applications which require accurate and consistent color reproduction. S-IPS panels offer the best viewing angles of any current LCD technology, with wide viewing angles up to 178 degress. The response time of S-IPS is adequate, ranging from 6ms to 16ms with current panels. This is only slightly slower than TN panels. However, gamers should take this into consideration. Fast paced games may suffer from motion blur or ghosting with S-IPS panels that have a response time higher than 8ms."



Wikipedia also has a good article on the topic of panel types:
https://secure.wikimedia.org/wikipedia/en/wiki/TFT_LCD

Wednesday, July 28, 2010

Dell monitor for cheap U2211H - 100$ off

Well, in the end I couldn't find a good 4:3 aspect ratio monitor at a price that made sense. Instead I got 3 U2211H monitors. Dell is selling them at a 100$ CAD discount each so that's not bad. They are full 1920x1080 monitors with tilt and swivel bases so you can use them in portrait mode. I'm not sure how long the 100$ deal lasts. Check it out:

<
http://accessories.dell.com/sna/products/Displays/productdetail.aspx?c=ca&l=en&cs=cadhs1&sku=320-9271>

Price with discount is
$219.00 CAD

Friday, July 23, 2010

My broken motherboard

I hate bad capacitors.

I got back from vacation, sat down at my computer, hit the "on" switch, all the fans would spin up but then nothing. The screens wouldn't turn on and I couldn't even get access to the BIOS. It was dead!

Don't you hate it when that happens? It could be almost anything. Before leaving on vacation I had added brand-new RAM. I figured it was worth tinkering with RAM to see if that was the problem. No, removing new RAM didn't help.

The next suspect was my power supply. I had already had a computer die in a similar fashion due to a funky power supply. What can happen is the power supply still provides power but doesn't provide it at the right voltage or at a steady voltage. If you stick a voltage meter onto the power supply you may get the right voltage displayed but as soon as you start to draw any amps you can get sudden voltage drops which cause the computer to crash. So I went out to my friendly, neighborhood computer store and got a new power supply. When I got home I hooked everything up turn it on and it still didn't work.

If it wasn't the power supply, the next logical thing would be the motherboard. This filled me with dread. While I often brag to my friends and colleagues that I had built my computers from scratch, in truth the man from the computer store had built it. All I had done was chosen the components. Changing the motherboard wasn't something I looked forward to. If I was going to do this, I might as well make damn sure that it was the motherboard that had died and not something else.

If you take a modern computer and remove everything from the motherboard you should still get a beep when you turn on. Well, you should still get a beep if you hadn't been stupid enough to remove the PC speaker when you'd removed everything else. I had arranged things so that this was impossible as I had never bought a PC speaker for the new PC in the first place. I had an old computer, however, which had a PC speaker. This was convenient. I plugged in the PC speaker (which is quite an adventure in old-school, giant pin array connectors) and turned on the computer to see if I could get it to beep. The PC didn't beep. This made me very unhappy and I decided to go onto the Internet to see if anyone had similar symptoms.

I found a note in one of the forums that someone had a similar issue with their machine and had left it off overnight and turned it on in the morning and it booted up. I also remembered that I had a similar issue with my Macintosh G4 computer and the problem had turned out to be a flat battery. I tried removing and re-setting the battery but that didn't help. So I left it for a few hours while I went out to collect some lunch and go talk to the man at the computer store about motherboard warranty replacements.

After lunch I was quite surprised when I turned on the machine and it beeped at me. After connecting a few more components and restarting the machine it beeped at me again although it sounded distinctly sick. Instead of a short, sharp beep it was just a long, droning tone. This isn't how a computer is supposed to sound when you start it up. I decided to leave it until the morning.

The next day I suspected that I would probably only get one good boot out of the machine, assuming I would do anything at all, so I decided to hook up as many components as I needed to use it and then try to boot. To my shock it actually worked and I managed to get into the BIOS and browser around BIOS menus. It then promptly crashed and all subsequent attempts to reboot it failed with the symptoms I had originally. I couldn't even get it to beep anymore with nothing connected. This was definitely a motherboard issue. A working motherboard should beep when you turn it on!

My old motherboard was a P5B Deluxe. It is super awesome when it's not broken and I wasn't looking forward to trying to find a replacement. Luckily, Asus was making a motherboard that is practically a drop-in replacement except that instead of using three and a half year old technology (older actually) it used state-of-the-art two year old technology. Well actually, this isn't fair. The motherboard uses components that are brand-new and the board was only released last fall. It just uses a design that's based on a chipset that's about two years old. It also works with just about every type of 775 socket CPU and DDR two RAM which is good because that's what I have.

The motherboard has the rather ridiculous name of P5Q Turbo Pro. There's something very interesting in the motherboard's description on the Asus website that might not jump out at you. Here's the list of features for motherboard:

  • ASUS 8-Phase Power Design
  • TurboV / Turbo Key
  • ASUS EPU
  • ASUS Drive Xpert
  • 100% All High-quality Conductive Polymer Capacitors! (VRM 5000hrs lifespan @105°C, 500,000hrs @65°C)

The important line there is the last one. "100% all high-quality conductive polymer capacitors!". Now, if you want to sell a motherboard to somebody you need to know what the important selling points are. Given that people's attention span is limited you can really only give the top five features of the motherboard before people lose interest. It's very telling that Asus has, as one of its five most important features, that it has "high-quality conductive polymer capacitors". The reason it's very important that this board has high-quality capacitors is because the board I have doesn't. That's the reason it broke. Probably....

It's been called the capacitor plague. Essentially, some Chinese company stole a secret formula for making capacitors from IBM. Unfortunately the formula wasn't finished. If you actually built a capacitor using this formula they would tend to fall apart after about three years. Since computer manufacturers generally don't care where they get capacitors from, or perhaps I should say they *didn't* use the care where they get capacitors from, just about every manufacturer had at least one batch of these bad capacitors in their products. This means that their products died after about three years. Add to this the fact that the standard industry warranty is three years and you have a big mess. Ask Dell.

Did I mention I hate bad capacitors that? Yeah, I'm pretty sure I have.

So anyway, my three and a half year old motherboard (out of warranty) was dead and I needed to get a new one. In the end I bought the Asus P5Q PRO Turbo. It works! My computer is back. I'm quite happy with it. It's essentially my old motherboard but better in lots of little ways. For example, it's more power efficient and faster. It's also not as expensive as the original motherboard. It turned out to be about 50% more expensive than the power supply. I didn't even need to reinstall Windows. How cool is that?

So that's the story of my motherboard. Maybe later I'll tell you the story of what happened to my CPU later that week.

Monday, June 21, 2010

Canadian unemployment rate

Annoyingly, the old Canadian economy site is gone. I was use it to keep track of what was happening with the unemployment rate. The responsibility appears to now fall to stats-can.

You can quickly find out what the unemployment rate is by going here:

http://www.statcan.gc.ca/subjects-sujets/labour-travail/lfs-epa/lfs-epa-eng.htm

You can even find out what the historical unemployment rate was and it's conveniently presented as a little graph.

I've also blogged about it a few times.

Monday, May 24, 2010

Facebook Privacy Roundup

If you're trying to follow what this whole facebook-privacy here's what's been going down.

The biggest story is that Facebook has been loosening the default privacy settings for all of the information it contains. Here's a nice visual history:

http://mattmckeon.com/facebook-privacy/

If you're worried about your privacy settings you can use this tool:

http://www.reclaimprivacy.org/

Or you can do it all manually. Facebook settings can be confusing to navigate so you can use these links to jump to all the different privacy panels in Facebook without having to hunt for them one at a time.



A second, unrelated issue is that Facebook is sharing who you are when you click on one of the advertisements that appear in Facebook.

I'm not too worried about advertisers, though because I'm more worried about the amount of information third party Facebook applications get. Even if you trust facebook with your data, do you trust every single facebook application maker?

Bizarrely, Facebook has threatened to sue a researcher that crawled through all the publicly available data on facebook as part of his research. Oh sure, you make the information public but they get annoyed when someone collects it. The researcher has made a map of how people connect to one another to see if there are groups of highly connected people in the US. It turns out there are. It's quite fascinating. It's a good thing he made his crawling public or else facebook would never have known they needed to sue him.

The CEO of Facebook has made some worrying statements about how he thinks that privacy is no longer a social norm. My blogging buddy Guillaume has detected this attitude in Facebook's options to turn off their instant personalization feature.

Then there's the instant personalization feature itself which "personalizes" other web sites with Facebook information. I'm not sure how much it's leaking because I haven't worked through all the security implications yet but it's creeping me out. :-)

Oh, Guillaume's just pointed out this link to me:
Facebook runs afoul of privacy watchdog again
Apparently Facebook's got into legal trouble in Canada over its behaviour... And the fun continues..

Three Monitors are Better Than One

Well, that'll teach me to procrastinate. Jeff Atwood has recently posted a blog posting that pretty much echoes everything I'm about to say. If you need more convincing then go check it out.

I'd like to talk to you today about computer monitors. The computer monitor is one of the most important things to consider when buying a computer. Most parts on a computer make the computer faster or able to load bigger programs but a computer screen actually goes beyond that. A computer screen actually dictates how you interact with your computer. If you have a very large screen you can see more information at the same time so there's less scrolling. If you've ever had a large, wide screen and work with spreadsheets you know how positively awesome this can be. It can also allow you to track multiple things at the same time. As a programmer I often have to have my editor, the program I'm working on and the log file that program all open at one time. Big screens let you get more work done.

With modern PCs and their modern graphics cards you can usually attach at least two monitors to your machine. Two monitors really are double the fun. What tends to happen is one of these screens becomes the main screen and the other becomes the auxiliary screen. Two screen can often be even better than 1 large screen because the two screens natural segment your workspace. You put your e-mail, tool palettes, log files, desktop widgets, Skype and all that sort of thing on a second monitor and keep the first one for working with. Two, monitors works great but you know what works better than two monitors? Three monitors.

Three monitors have recently become a real possibility thanks to the new series of ATI cards which all out you to attach three monitors. Here's the list that I know have three monitor output.

* Radeon 5670 (~$120)
* Radeon 5770 (~$180)
* Radeon 5830 (~$230)
* Radeon 5850 (~$310)
* Radeon 5870 (~$410)

I personally have the Radeon 5770. It has a respectable 3-D performance while drawing only moderate amounts of power and at a good price too. If you're only going for three monitors though you can use the cheapest since the cheapest card in a modern series will handily beat whatever graphics card you have when it comes to 3-D performance unless you're one of these guys who upgrades their video card every year.

Currently I'm using three old 19 inch CRT screens with my card. The Radeon 5770 has two DVI outputs and one display port output. It also has an HDMI output but in order to use three screens you need to use the display port output. Since my old CRTs are all VGA I needed to get a few DVI converters. It was surprisingly easy because every video card I card I every motherboard I bought as come with a DVI to VGA converter. The display port is more of a problem. Display port seems to be more complicated than DVI and so converting between its VGA or DVI requires a pretty fancy converter. Even with one of these fancy converters it's not guaranteed to work. ATI has published a list of dongles that it knows work.

http://support.amd.com/us/eyefinity/Pages/eyefinity-dongles.aspx

I didn't know about that list at the time and bought an adapter by StarTech. It works in the sense that it will display a picture on third screen but it doesn't work in the sense that the picture will wobble about once a minute and every once in a while I'll have to unplug and re-plug adapter to get the video card to recognize it. It also won't drop into the special eyefinity gaming mode most of the time.

The CRTs are starting to get a bit old. No, scratch that the CRTs are very old and in desperate need of being replaced. I've been trying to find a monitor with a display port that I could buy three of. Annoyingly every manufacturer seems to be selling the exact same monitor in the exact same configurations. They are all 20 to 24 inch and come in wide screen format of 1980X1080 and 1600X900. The only exception is that there's a 24 inch screen with a resolution of 1980X1200.

I've never tried three widescreen displays. I would expect that it's probably a bit too wide. Three normal aspect ratio screens arranged horizontally work quite well because they fill in your peripheral vision. With three wide screens I suspect it would just be overkill. The only alternative is to get an older screen that doesn't have a display port on it and then get an expensive, hard to find adapter. This is what Jeff Atwood did. If I was to do this I already know which one I would get. It would probably be an UltraSharp 2007FP 20-inch. This is the kind of monitor I use at work where I have two of them. I have found them to be quite good. The high-resolution, small physical size and ability to set them up in portrait mode make them ideal for programming.

I think that most manufacturers have stopped designing new 4:3 aspect ratio monitors. They work very nicely in three monitor configurations but they also work very nicely in portrait mode too. As someone who works on long documents all the time viewing them in absolutely fantastic. Widescreen monitors used in portrait mode are, I suspect, a bit ridiculous.

Oh well, I'm going to actually go out and buy three monitors some point soon. One of my CRTs has just broken. If I leave it on too long the image would grow really large and turn purple. I've been keeping it turned off because at this point I'm scared it will catch fire or explode or something. Another monitor makes a buzzing noise whenever I display certain webpages. I'll be sure to tell you what I eventually bought and how it's worked out for me. Until then see you. Bye.

Thursday, April 15, 2010

Why you should get a high end PC - RAM

This is part 2. Part 1 is here.

RAM is good. The more RAM the better.

RAM is so important that most of the time we just call it memory. There's lots of different types of memory attached to modern computers. There's hard disk, flash, buffer and cache memories to choose from. The thing is, when you just say “memory” and don't bother to qualify it, you mean RAM. That's how important it is. It doesn't even need the word “the” in front. It's implicit. That's how friggin' important it is.

The main benefits of having more memory is that allows you to use applications that manipulate huge chunks of data all at once.. Programs like this include games, photo editing applications, video editing applications and medical imaging viewers.

Generally you don't need to make the decision to buy more RAM. The applications you're using will do it for you. Essentially, one day you'll see a new, shiny application available for download that you just have to have. You'll download the application, try to run it and and suddenly realize you need more memory.



Windows 7 is the first consumer 64-bit OS from Microsoft that you'd actually want to run and unlike windows XP, it's not limited to 2 (ish) gigs of memory. Expect software developers to take advantage of the new memory situation by making their apps take up more memory (or should I say, "make their apps do something cool". No. No, I shouldn't.)

Curiously, modern operating systems don't just give up or complain when they run out of memory. Instead they will simply cram as much into memory as possible and stick the rest in the pretender-to-the-throne-memory – hard disk. In this case, you know you've run out of memory when your hard drive starts going bonkers and your PC slows down to a crawl. If you're not saving something or loading something your hard drive shouldn't be doing anything. If it is, you may need more memory.

Having more RAM than you need for the applications you run can also speed up the computer. If you have more RAM available than your computer is actually using, the machine will allocate the extra RAM to a disk cache. This is good because it means that even when you're loading something, it won't read it from the hard disk it will just use the copy already in memory. As a result, it loads incredibly fast. In my first article about storage I mentioned that before my solid state drive I used to get more RAM than I really needed. The disk cache is why. If you're too cheap to get an SSD at least max out your system memory. A run of the mill 7200RPM consumer grade hard drive will see huge gains. With a laptop's slow 4200RPM hard disk it's even more important.

(Cute girls know your laptop needs more RAM)

Note that caches work by keeping a copy of the data in memory after it's been read the first time from a hard disk. PCs often read the same things off the hard drive repeatedly due to the way programmers build their applications. The net result of this is that having a disk cache can make a surprising number of things faster.

One last thing, make sure you get your RAM from a reputable brand. Cheap, no name memory may seem like a good deal but there are quite a few bad RAM chips out there. Bad RAM can be a huge pain to diagnose since it just shows up as random crashing - which could be symptoms of almost any problem. A few good brands are Corsair, Kensington and OCZ. There are others..

So, in conclusion: RAM is good. The more RAM the better.

.. and, might I add: get more.

Next up: monitors. Why only having one is so old school.


Part 1

Sunday, April 11, 2010

Why you should get a high end PC - storage

I've noticed a recent article that said that Apple has a 90% share in the computer is over a thousand dollars category. I think this is rather sad.

I don't think it's sad that Apple is doing well, this is actually quite nice. What I find sad is that people aren't buying PCs over a thousand dollars. There are some excellent reasons why you'd want a PCs over a thousand dollars.

Let's start with the hard drive. Most PCs come with a relatively small hard drive. This is silly because coming with a small hard drive means you're actually paying a lot per megabyte. It also means your PCs that run very slowly because smaller hard drives have a smaller information density which means the drive has to spin faster to achieve the same data transfer rates. Every generation there's an optimum price point for megabytes per dollar. It's not that expensive either. Last time I check this optimal point was for hard drives costing about 100$. Getting a hard drive outside this range is just throwing money away in my opinion because you always need more hard drive space.

Hard drives are otherwise my mortal enemy. Hard drives have gotten tremendously large but they haven't gotten that much faster. While the transfer rate of the drive tends to be proportional to the size of the drive the access time is proportional to the rotation rate, the speed the head can move and physical size platter size of the drive. These factors haven't really changed. The rotational speed has only gone from 4200RPM to 7200RPM but the drive size has gone from 20 MB to being 1 TB in size. That's 1 000 000 MBs! Every time the system has to retrieve a byte from the hard disk it has to wait an eternity. I hate the stupid things! I've even gone so far as to add much more RAM to my system than usual to have a huge disk cache so my machine doesn't need to access the hard disk. Have you considered a solid state drive recently?

I've recently bought an OCZ Vertex solid-state drive for use with Windows 7 on my machine and it is completely awesome. To put the speed difference in perspective consider this: good hard drives have access times of around 18 milliseconds. Good solid-state drives have an access time of about an 0.18 of a millisecond. That's a hundred times faster. Additionally, they can have transfer rates of over 200 MB a second. Hard drives have a transfer rate of 50 MB a second. In practice the performance is extremely noticeable. I'll say it again, they are super awesome.

They only downside to a solid state drive is that it doesn't hold a great deal of data for the price. My OCZ Vertex cost around 400$ and only holds 120 GB. This isn't as much of a problem as you might think though because you just have to put all your data – music, video other data, on a standard hard drive and use your SSD for windows, the swap file and most of the applications. Your system will still fly and you can store all the data you want. I recommend getting a drive slightly bigger then you think you'll need. Getting too much space is a bit embarrassing, getting too little space is a time consuming disaster.

If you've bought a netbook with a solid-state drive and haven't really been impressed by the performance we're not really talking about the same things here.

(The difference in speed amongst SSDs is huge. It's worth reading up on why that is and which drives are really worth buying.)

The technology has come along way since those early drives. The software has also been improved. Windows XP will fight with a solid-state drive but Windows 7 includes optimizations to maximize the performance you get out of the drive. This means you don't have problems like, for example, the performance of the solid-state drive degrade over time. Modern drives also don't freeze the entire computer whenever you write lots of pieces of data to them at the same time. Early and current netbooks sometimes use out of date drive controllers that still have this problem.


Another thing that useful on the higher end PC is more memory. But I'll talk about that next time.

Part 2

Thursday, April 8, 2010

Space Smilies - a technological demonstration in one lvl

In 1999 I was first introduced to Java. I quite liked it. It was the first language that I'd come across in which it was possible to write your own draw routines while simultaneously being comprehensible. Sure, I already knew C and to a lesser extent C++ but to me it had always seemed like doing anything in those languages was incredibly painful. In Java it was relatively easy. The best thing about Java, though, was its runtime and draw routines were fast enough to write a small video game in. That March break I decided to write a video game. I called it Space Smilies after the placeholder smiley face icons I was using at the time.

Ever since then I've occasionally revisited code to see if I can figure out, using my newly acquired X years of experience, why somethings never quite worked right. I also spent some time to try and take advantage of the new abilities of the latest Java virtual machine (not to mention the processor power of the newest machines). I've just completed my latest batch of fixes and enhancements and am ready to release them to the world. Let me give you a rundown of what's been enhanced recently.

First off, I've corrected all those dang threading bugs. While I understood what threads were I wrote the original application I didn't really understand all the different ways in which you can screw up using threads. Since then I've learned a great deal about threads and, in fact, have become quite familiar with them. As a result of this, the newest version of Space Smilies draws the back buffer to the component on the event thread. It used to draw back buffer to the component on the thread I was using for the game engine. This doesn't really work well because AWT and swing aren't thread safe.


I'm also using a sort of triple buffering. The game engine draws to a back buffer. This back buffer is then given to the event thread on a sort of back buffer queue. The event thread then takes the latest back buffer and draws it to the component. After drawing to the component the back buffer is put into a free pool. When the game engine needs a new back buffer for the next frame, it looks in the free pool to see if one is available. The upshot of all this is that the final blitting is done on a different thread than the game engine which is doing the compositing.

Additionally, I'm using volatile buffers wherever possible to let the video card do most of the blitting and compositing. For whatever reason I can't get bit masked volatile buffers to be accelerated. This means that the bulk of the compositing is done on the CPU although the star-field (which is the biggest blob of pixels by far) is composited all on the video card.

(This is all on windows, your millage may vary on other operating systems)

Finally, I got the resolution of the game up from postage stamp sized to 1000 x 700. The old game used to remain fixed at that resolution but the new game will scale itself to take up as much area on the screen as it can.

I'm quite interested to know whether it works for everyone. You'll need Java 6 though. With any luck you actually have that but don't know it. Try it out either way.

Monday, March 22, 2010

Is it a bug or a feature?

If you do development for long enough large enough team you will find yourself asking this question. It matters because you need to make decisions about what gets fixed in the current release and what only gets fixed in the next release. In other words, what should be part of version 1.0.1 and what should in version 2.0. Additionally, there is also a school of thought which says that bugs should always be fixed before new features are added. Which is great, but this assumes you actually know what a bug is.

So what is a bug and how does it differ from a feature?

What is a bug depends on who you talk to. To a developer, a bug is a mistake. To tell a developer that there is a bug in their code is to tell the developer that he be screwed up. This can lead to all sorts of unfortunate confusion between end users, QA and the developer. In reality no one (except possibly the developer) actually cares whether or not it's a particular individual's a mistake. What people care about is whether or not the program is working in a way that makes sense. For example, if an application gets out of large knife and stabs the user in the eye when they select "Copy" from the "Edit" menu it doesn't really matter if the developer intentionally programmed it to do that. What matters is the behavior is undesirable. Well, I presume the behavior is undesirable. You might actually be trying to create an application that stabs the user in the eye whenever they select Copy from the Edit menu. I don't presume to know what crazy project you're actually working on.

QA, for instance, will tend to think of any stupid behavior as a bug. For example, let's say that QA files a bug that the font sizes too small to be readable. The developer takes a look at what font size should be, double checks to see that he's using the right size and then simply claim that it's not a bug. Presumably he then goes on to stab QA in the eye.

Sale and marketing are even more out there. They have no idea how anything actually works and as a result can consider six man years worth of work to be a bug. For example, if the email client you're building doesn't do SMTP autentication then that's a bug. It's a bug because it doesn't work with this particular SMTP server. I mean come on! What were you thinking?

At Intelerad, we've gotten fed up with discussions on whether something is a bug or a feature and started thinking about everything as change requests. Once you're looking at everything as a bunch of change requests you can start focusing on the things that actually matter about those change requests and use that criteria to make decisions.

What are we trying to encapsulate when we ask if something is a bug or feature? It may matter because you made a policy that says that bugs can get fixed on existing branches or releases would features will always be fixed along the trunk. Okay, but why did you make the decision that only bugs get fixed along batches? Did you make the assumption that bugs would simply be things that were easy and quick to fix? If that's the case then why don't you say that only change requests that are easy and quick to fix get fixed along branches. Did you make the assumption that bugs would be severe; that they would stop the user from being able to use some feature of the application? If that's the case then why don't you say that only change requests that affect critical functionality will get fixed along branches. Did you make the assumption that feature work would be too destabilizing along the stable branch? If that's the case then why don't you say that only change requests that are not destabilizing will get fixed along branches. Don't say that he will only fix bugs be precise about which aspects of the change requests will allow you to fix an issue along an existing branch.

Here are the things we typically consider:

How bad is the problem?
Would the fix destabilize the old version?
How long does it take to fix?

The first two questions are the most important. The last question is more of a sanity check. If the answer to the last question is anything more than about a day, then you're probably lying to yourself about it not destabilizing anything. It should also go on the trunk because it represents significant development.

I'm making the assumption that you've already discovered that you should be working along the trunk by default. Ideally you shouldn't be back porting anything. You should be releasing major versions often enough that your clients (or users) can wait until the next major version. If they can't wait until the next version you're not releasing often enough. That's pretty much a golden rule. The length of your release cycles should be matched with the expectations and demands of your client base.