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.