Rob's blog
Sound Quirk with the Nvidia nForce 430 and Asus M2NPV-VM
As I mentioned the other day, I've just put togeter my new Athlon 64 X2 Linux system. The install went okay, but when I got around to connecting speakers I didn't hear anything. I ran in to this before and it was just a muted sound channel. So I ran alsamixer and made sure everything was turned up to around 70%. Nothing. Someone on a forum said they had the same chipset and their problem went away with a reboot. I don't believe in rebooting to fix things on Linux, but I was busy having a conversation at the same time so I tried it. I noticed that there was a sound played when I logged in to KDE. The thing is, there was also a high-pitched, shrill screeching noise at the same time. I tested the speakers on another computer and they were fine. I tried tweaking the volume in KMix and after that no sounds played for anything. I got it working in the end, for the short answer just skip to the end.
Building my new Linux Box with the AMD X2 4200+ and Asus M2NPV-VM
I got a new desktop computer the other day. Actually I got the parts to build my new desktop the other day. I ordered online from Canada Computers in Toronto. I bought the parts to build my mom's computer there a couple years ago and that worked out well so I trust them. They're kind of small compared to some online retailers so I wasn't sure how well they'd handle shipping the parts but I ordered Wednesday after midnight and things showed up on Tuesday so that was fine with me. They were out of the hard drive I originally asked for so they emailed me & I specified a better Seagate Barracuda drive. They gave it to me at the same price and got things underway. Here's what I ordered from Canada Computers and why.
    • AMD Athlon 64 X2 CPU
    • Details: AMD Athlon 64 X2 4200+ Dual Core Socket AM2 Windsor 2.2GHZ, 2000FSB, 2X512KB Cache, 90NM process, 89W
    • $214.19
    • I've been using AMD ever since Intel tried that thing with Rambus years ago. Now I just have too many parts to switch. As far as the specific CPU choice, I like to get the latest big features - 64 bit instructions and a dual core CPU - but every feature has a price. So I look for the major features then go for the model with a price that's in the sweet spot. The "sweet spot" is the price point where you start seeing a big price increase for minor speed or benchmark improvements. I looked at prices at several places and the price of the 4400+ seemed to be significantly more than the 4200+, but the 4200+ was just a little (around $10) more than the next lower speed model. The same logic applies to hard drive sizes and RAM prices with price per gigabyte of memory. The only thing about this CPU that I would've liked better is if they'd had the 65 Watt version available for nearly the same price like Newegg does.
    • Socket AM2 Motherboard
    • Details: Asus M2NPV-VM Socket AM2 nVidia GeForce 6150 + nForce 430 Chipset Dual Channal DDR2, Integrated GeForce6 GPU, DVI-D & RGB Output, 4x SATA connectors, Gigabit Lan, HD Audio, Firewire, micro-ATX form factor
    • $107.09
    • I knew I'd need a socket AM2 motherboard and I knew I'd want onboard graphics, sound, and LAN this time around. The M2NPV-VM also includes my other critical features: SATA2 (300GB/s with NCQ), and PCI Express x16 for future graphics improvement. I also wanted expansion slots for PCI cards to do video capture and plug in a couple phones (there's a Digium card people use with Asterisk). I don't have those cards today or know for sure what's eventually in store, but I like to have room. There are two PCI expansion slots on this motherboard, I'd have liked four PCI slots, but it seems that all the motherboards with four slots were lacking on-board graphics. I guess that's just because of my price range (if I were willing to spend more I could've bought a graphics card now). I picked the Asus M2NPV-VM because it also includes some other niceties: two 1394a Firewire ports, RAID support, HDTV video output, and even headers for 2 COM ports (if I ever connect them).
    • SATA2 Hard Drive
    • Details: Seagate Barracuda 7200.10 320GB SATA with NCQ, 3.0Gb/s, 16MB Cache (ST3320620AS) (link is a PDF - sorry)
    • It looks like 320GB is the best place for price per GB today when you're shopping online. This Seagate hard drive also supports the faster SATA 2 and native command queuing that I was looking for. According to the specs at Seagate, it's pretty quiet too. Some drives still include only 8MB for cache memory, so 16MB is a feature. The access times for this drive aren't listed at some of the sites I was shopping at, so I assumed the worst when I first looked at it. Checking Seagate's site showed that the drive access times are actually very good.
    • 2GB of DDR2-800 Dual Channel RAM
    • Details: OCZ (OCZ2G8002GK) DDR2-800, PC2-6400 Gold XTC 2GB (2x1024MB) Dual Channel Kit
    • $305.99
    • When it comes to RAM I'm normally downright stingy. I won't pay more for a name, for pretty gold wrappers or for camo spray paint. A chip is a chip. I also usually go for quantity at the cost of speed. I think the fact that my old computer seems to be bottlenecked somewhere between the CPU and hard drive made me decide to look for the fastest RAM that the motherboard will support. I noticed after receiving the parts that OCZ isn't in the Asus "Qualified Vendors List" but I call BS. OCZ is one of the few names I've heard as being consistently high quality. They were also the cheapest for my combination of requirements. I installed one 1GB RAM DIMM in each of the two black slots on the Asus M2NPV-VM and when it boots they're recognized at full capacity, full speed in a dual channel configuration. I haven't benchmarked but I see no issues. Hopefully when I come up to a point where 2GB of RAM doesn't cut it anymore (I guess just a few years from now) I'll be able to pick up a couple of 2GB sticks at the same speed. I'd have more issues doing that when the time comes if I'd chosen a slower speed.
    • Minimum 450W Power Supply
    • Details: Thermaltake TR2 470W Power Supply (W0090RU) ATX 12V 2.0, PCI-Express, SATA, Low Noise 12cm Fan
    • $76.49
    • I've learned the hard way not to skimp on the power supply. I tend to keep my computers for a long time and upgrade over time. Upgrades generally use more power. I had a 250W power supply in an old system with two ATA drives and two optical drives. I didn't realize the power supply was so small (it came with the case) and eventually I just started having stability issues, especially when burning CDs. My old desktop is also really loud, so I hoped the 120mm fan would reduce the noise.
    • Keyboard and mouse
    • Details: Logitech (967398) Premium Desktop - Corded PS2 Keybaord & Cordless Optical Mouse, Black, (OEM)
    • $25.49
    • One of the things that sucks about building a whole new computer and keeping your old one up is that you have to really have all the parts. I don't keep a lot of new keyboards and mice around that I'd actually want to use. Sure I have some that I use for testing on client's computers, but nobody actually uses them for any length of time. It's surprisingly hard to find a normal keyboard these days. I'm happy with this Logitech combo (I'm typing on it now) but I wouldn't call it perfect. Absolutely nothing I touched in Best Buy the other day felt decent, so I'm not going to complain much about this one. Oh, and thankfully it doesn't have a F-Lock button. Those things drive me insane.
    I picked up the case locally at Orange PC Tuesday morning. It's their standard black case with a pile of drive bays and two case fans. The case fans are 80mm, don't believe anyone that tells you a cheap 80mm fan is quiet. I'm thinking of just unplugging the case fans for a while. The case suits my needs, I'm not in to case-modding or blinking lights. Then the parts showed up around 2:30 so spent the afternoon building. I love putting stuff together. I'm just a constructive person. This is also one of the higher end systems I've built for myself so I'm pretty geeked about loading up some stuff and putting it through the paces. By the end of the night I had OpenSUSE 10.1 installed and running on it. I partitioned the drive to allow room for two more concurrent OS installs. One I'm thinking of is an Ubuntu (or Kubuntu) install and the other will be my next OS upgrade or beta test (after all OpenSUSE 10.2 is planned for next month). I've been doing some playing around on it so far, but nothing major. I'll make some notes as I go on installing my software and dealing with my network of two Linux desktops and a Windows XP laptop.
Credit where it’s due - Yes Google, I do like my data
I criticize them for locking it up, so I have to give props to Google when they talk about letting users take their own data. I realize it's only a speech and nothing specific about their own plans, but the fact that the people at the top are talking about giving data back is great. Vendor lock-in sucks. I realize more and more just how much different things could be every time I pick up a new Open Source project. From Linux to Firefox to Asterisk, every one has opened my eyes to what can be done when people are free to choose. And talk like this makes me believe there's room left before this whole Internet boat sails on over that crapwave. So thanks for the sentiment Mr. Schmidt, I look forward to seeing how you follow through on it.
Quick Guide to Getting Cheap Calls with Asterisk 1.2 on SuSE 10.1
Let me start out with a warning, in case you don't know me, I'm really good with computers and pretty good with Linux. I'm a first-rate amateur with the telephony side of things, so my terminology may be off and there may be some concepts that I just don't get yet. Before you agree to pay for anything, my advice is to get an idea of the rough costs of the service. I asked about my plans on the Toronto Asterisk Users Group mailing list and received some great pointers. The latest version of Asterisk at the time I'm writing this is 1.2.13. I had some success experimenting with VoIP on FC4, so I want to install Asterisk on my current SuSE 10.1 and see if I can get any further with it. Unfortuanately the package offered to me is 1.2.5. I wouldn't normally care about being a few minor versions behind but the last update was for a security fix for a pretty popular device - there could be modules I'd be running that would be vulnerable.
Chmod a+x

Just a quick note for subversion. I was working on a shell script and my first check-in was from the Windows machine I'm working on. My target is the Bash shell in Linux though. When I checked the file out on the target, I had to do a chmod a+x myscript.sh every time I checked out. A little googling and I found that Subversion knows about the executable attribute. I don't know how exactly it interprets the attribute internally, but what worked for me was setting the svn:executable property for the file in the working directory. I don't know how to do this with the command-line client, but in Tortoise SVN it was pretty easy. On my Windows machine I right-clicked the file, picked "Properties" and selected the "Subversion" tab.

Browsing Code with Google Code Search
There's been a lot of talk of all the hacks & odd searches you can do on Google Code Search. Interesting, amusing and maybe a little scary. All of it clever. Clever is the first pass at a new tool, let's get on to the boring stuff! (Why does that interest me so much?) I've wanted more times than I can count to tell Google that I mean to search for source. It's not as if you can add the name of the language - "C" or "C++" - to a normal search query and get anything meaningful. The obvious and canonical use of a tool like this is to find an example of code that does what you're trying to do. The simplest thing would be examples of a particular function or class in use. Maybe you want to see a JTable instantiated and used. Maybe you need to know more about using the PCMCIA bus in Windows drivers. Okay, that search doesn't work so well for closed source...
Running an SSH Server on Multiple Ports

There are a lot of reasons you could need to run sshd (the ssh server) on a port other than the standard port 22. These days the Internet is pretty convoluted. Sometimes you have too many hack attempts on port 22, sometimes you're trying to work through a restrictive or oppressive proxy/firewall. I moved my sshd to a high port number on one server for the first reason.

This Just In: Eat Food for Breakfast
I heard a story on NPR this morning about the importance not only of breakfast but of the right breakfast. Of course this is one of those seasonally relevent pieces that's timed to go with kids returning to school, but there was an angle I'm personally interested in. The upshot was that oatmeal improved academic performance in one recent study. It sounds like it relates back to the glycemic index of the food. The lower glycemic index of oatmeal seems to be more common in foods that have less processing after they're pulled out of the ground.
What's more, oatmeal eaters don't experience a steep drop in blood-sugar levels, and that's a good thing. A dip in blood sugar can bring with it a release of hormones that affect mood. In some children, the hormones seem to affect concentration and memory.
When I was a kid, I used to eat cereal for breakfast every day: Frosted Flakes, Froot Loops, Captain Crunch and what-have-you. I'd always notice that i was starving an hour later.
An Economy of Time
I actively avoided using any form of todo list for about the past year or so until just a couple weeks ago. The problem I kept running in to is that every time i started a to do list it would immediately grow overwhelmingly large. At that point things start falling off the end of the list - some things lose their relevence and others just don't matter anymore. Should "send a birthday card to an old friend" become "send a belated birthday card" or just get scratched out (not crossed off like those good tasks that got done but scribbled on until it's illegible so you can't be reminded how calous you could've been)? Jeff and I were chatting about this just now and I realized that this is a subject that I've really built some strong feelings about. My latest return to the todo is in the form of another ugly text file called "big todo.txt" wherein I've resigned to note things I have to do or want to get done but i can't hold myself accountable for the results or expect their won't be overlap, discontinuity or redundancy. I've thought a lot about this and my fundamental belief is this: the creation of a todo list implies that we expect ourselves to be able to complete all of these items. There is no guard to prevent me from putting any thing at all on the list. I could say:
  • clean hall closet
  • do laundry
  • cure cancer
  • wash car
  • buy groveries
I think the key to success here is not to expect success. Take what you can get and don't beat yourself up when something sits on the todo for too long. Allow yourself a do-over. Don't set yourself up to beat yourself up. How else can I say this in a more clichéd way? The list is there to remind you: when it reminds you of something you can't do just ignore it like your mom nagging you to take out the trash. Those things you couldn't get done aren't going to get reversed and you're not going to make things better by doting on what you should've done. If the time is passed then it must have been filled. Enjoy the results of doing something that was more important or enjoy the memories of doing something that was more compelling but don't waste your time regretting what's passed. Think of your todo list like a credit card where the balance is measured in time. If you had the time to do the job, you'd do it now. If you write something on the list it's because you don't have the time to do it now. You've borrowed some time from your future self, just as a credit card allows you to borrow money from your future self. At some point you've got to pay that time back by doing whatever it was you had to put off. If you don't look at the cost before you start piling stuff on to that list then you're bound to have a list that you can't complete. The cost in time isn't as clear as a price tag in a store, but the only one that can estimate it is you. The better you get at estimating and the more attention you give to what you allow to go on your list, the better you can do at bringing that time credit back down to zero. If your estimates are off then you're always going to carry some time debt forward. At some point you have to clear that off either by doing what's on the list (which may not even be doable) or clearing your list and dealing with the consequences of whatever you didn't get done (namely: a messy closet, wearing your boxers inside-out, some cancer, a dirty car and a bright fridge). The consequences are the same consequences you had when you put that job on your todo list but now you've got to accept them as a fact of life since they're not something you're "going to get to soon." Thinking in terms of time economy, my "big todo.txt" is bound to fail. What a list like that produces is a huge catalog of things I could do, not a list of things that I really intend to do. Maybe I'll take my own advice here and only keep track of tasks I really think I can get done. At the same time it's important to remember that there are many times before that I've thought I could get those things on the list done and failure is not the end of me. Failure is just feedback for the next try.
Getting Last Month’s Date in Bash

This one just blew me away: I spent a while trying to figure out how to turn this month's date into last month's date in a Bash script. In the script (okay, it drives AWStats reporting) I want to make a summary file for last month. To do this I want to check if a file exists with last month in it's name and if it doesn't exist I want to create it.

Syndicate content