Archive for January, 2007

Old School Virtualization

January 30th, 2007
[ Geek ]

In case it hasn’t become clear, I’m on the virtualization bandwagon. At least when it comes to my desktop. In terms of server based stuff, no clue.

Back in my mks days, we used removable harddrive chassis to mimick virtualization. So my desktop had a removable drive as it’s primary drive. Depending on what was happening I’d have three or four physical drives in my office. My two core environments were a Red Hat drive and a Windows 2000 drive. There’d be a few extras depending on the projects at the time. Anytime I wanted a new environment, get a clean drive, plug it in and install the OS.

Looking back at it now this was just a virtualization hack. It was a lot better than dual boots which were clumsy. This setup was a complete pain if you didn’t have network file storage available as you could only have one drive active at a time. Obviously you’d also be stuck booting and rebooting your machine all day long.

Time to move on……

Water Bridge

January 29th, 2007
[ General ]

My father sent me this picture. A kilometer long water bridge? Umm…I’m no expert but I think that’s cool. More details here.

Majeen/OS Update

January 29th, 2007
[ Geek ]

In case anyone’s paying attention, here’s where I’m at in my attempt to be a computer geek.

I’ve ordered up a new desktop after having been running laptop only for over two years. Quickly, it’s details are:

  • 2 GB fast RAM.
  • 2 x 320 GB drives.
  • Intel board and processor.
  • nVidia video card with dual heads.

All parts are fancy pants parts, ie respected brands, so it’s not cheap but it’s still a great deal, especially compared to a laptop.

I’m now planning to start with fedora 6 and try Xen and VMWare to virtualize a windows desktop for development purposes. I’m going to start with xen as it’s built into the kernal and uses paravirtualization. Certainly, I’ll use xen for any linux based virtualization but I don’t see doing much of that. Hopefully windows will work nicely as well, if not I’ll move to vmware.

Other stuff, I want to setup a software based RAID-1 array. My plan, at this point, is to use this desktop as my workstation when at my desk. As well, it will be used for some file serving purposes on our home network. When I need to be remote, including within my house, I will do one of the following:

  • ssh into the desktop.
  • remote desktop into my virtualized windows machine on the desktop.
  • bring a copy of my virtualized windows machine with me for use on my laptop.

I intend to quickly move my laptop to fedora as well. As well, I’m going to give Mono a serious look for windows development in fedora. In terms of databases, I may just run a small virtualized windows machine on my network for sql only. Or I’ll just use MySQL, code primarily in fedora, and do all my final testing in windows.

So basically, still a lot of crap to test.

Good ideas

January 24th, 2007
[ General ]

Some entrepreneur advice from a non-entrepreneur.

We all get excited about cool tools or ideas for cool tools. You don’t want to be so emotionally attached to an idea that you make excuses for it and blind yourself to reality. On the other hand, you need to be emotionally attached enough to see it through. It’s a tricky balance.

My take? I’ll take a clear problem and an unknown, or challenging, solution any day over a cool solution in need of a real problem. The worst situation is when you dream up a cool product and then start searching around for a problem to solve with it just because you think it’s cool.

Solve real problems. Don’t create products or businesses and then search for problems to solve with them. Find the problems real humans are experiencing, get excited about them, then solve them. Get excited about the real problems missing sound solutions instead of solutions missing real problems.

It’s a far more sustainable business model as well as it allows you to outgrow the solution you find today. As opposed to desperately clinging to that cool whatchamajig you dreamed up years ago while your market’s long gone.

Okay, how many different ways can I say that…..Oh, and having said all this, I’ve never done either so I wouldn’t listen to me.

Skins

January 18th, 2007
[ Geek ]

It’s a lesson I learned the expensive way. The first thing I do with a new piece of mobile electronics that has a screen I care about is put a screen skin on it. It’s a simple, unobtrusive way to protect your screens, especially if you plan to throw devices into purses, pockets and backpacks.

I have a pack I purchased for a Palm pilot years ago that I just cut to size and use. These guys appear to have a good product but I’ve never used theirs.

Using App.Config files in class libraries

January 17th, 2007
[ Geek ]

Apologies upfront, this is nerdspeak, specifically C# nerdspeak, however, it’s something I’ve bumped into enough times that I felt it worth putting up. At least I’ll be able to find the answer easily next time I run into this.

Can you use an App.config file in a class library? Technically the answer is no, however, it’s not as limiting as it sounds. You can read an App.config file from an assembly, however, it must be in the context of the running assembly.

In the case of a large project with multiple assemblies, I typically want to have a single class that’s responsible for reading the configuration settings and making them available to other assemblies. So, is this even possible if you’d like that class to be in a library? Yes, however, you need to do some post-build work to make that happen.

Looking at a specific example, let’s say we have a console application named TheApp. That console app is only responsible for rendering it’s UI and all other work is done by multiple class libraries. We don’t want this assembly to contain the business logic related to reading configuration settings.

So we have another library, named Server. It has a static class named ConfigReader which reads the App.config file and makes settings available as discussed above. This can be done, however, the Server library will always look for and read the App.config file based on the running assembly, which in this case in the console application.

So, in order to make this work you have a few options, one of which is to simply have a nant task, or a post-build task, that copies the App.config file from your Server library into the console application’s bin directory, making sure to rename it based on the name of the console application, TheApp.exe.config. You can also generate this file, create from scratch, or simply keep it in the TheApp project itself.

If you grab the source code below and run it you’ll get an exception and it will appear as though it can’t read the App.config. That’s because one doesn’t exist in the bin directory you’re running in. Copy Server/App.config into TheApp bin directory and rename it to TheApp.exe.config and try again:

cp ../../../Server/App.config ./TheApp.exe.config

Again, another option would be to cut the App.config from the Server project and paste it into TheApp project. Build and you should be good. Now you have a class library reading your App.config file.

C# source in zip format

I’m not recommending you actually do any of this, just making sure you know it is an option. I find when you look around for information related to this, people often land on the conclusion that your only option is to read the App.config file in the console application (TheApp) which is not the case.

RAID Support in FreeBSD

January 16th, 2007
[ Linux ]

So I think I’ve answered one of my outstanding questions. It looks as though I can have a software based RAID 1 support in FreeBSD using Vinum Volume Manager.

“The Vinum Volume Manager is a block device driver which implements virtual disk drives. It isolates disk hardware from the block device interface and maps data in ways which result in an increase in flexibility, performance and reliability compared to the traditional slice view of disk storage. Vinum implements the RAID-0, RAID-1 and RAID-5 models, both individually and in combination.”

Based on what I’ve read, starting with a software based RAID makes the most sense. If it works then I save the cost of extra hardware.

“With present CPU speeds, software RAID can be faster than hardware RAID, though at the cost of using CPU power which might be best used for other tasks.”, link.

As well, if you’re interested in performance and failure rates related to RAID 1 you can check here.

PCBSD Remaining Questions

January 13th, 2007
[ Linux ]

I still have a few outstanding questions related to running a FreeBSD variant on my new desktop. I haven’t found clear answers and I’m sure I’ll just have to try. If anyone has any advice, please let me know:

  1. Can I use the hybrid RAID/SATA support included on the Intel motherboards? As far as I can tell it’s only supported with windows so I may need to buy a separate RAID controller ($150 to $200). This isn’t a big deal as buying the card will get me true hardware RAID instead of this hybrid. If it’s an option though then I’d rather try it out and see if it’s adequate before buying the card.
  2. How difficult will it be to configure and run a dual monitor setup?

Climbing Out the Window(s)

January 12th, 2007
[ Geek ]

I’ve been reluctantly using windows as a development environment for the past couple of years. Prior to that, being that I was working primarily in java enterprise, I split my time between red hat linux and windows. I much prefer a *nix variant to windows as a development environment and have always pined for a return. Well it seems like I no longer have any excuse not to with the explosion of workable virtualization software.

I know of several developers who’ve are successfully doing windows development in OSX. The key is a commercial product named Parallels which allows you to create virtualized OS’s. So instead of having to dual boot, you can run an entire OS within a window in OSX. So now you can use OSX for everything except your windows development work, which you simply fire up you virtualized windows OS for.

A major feature in this setup is the protection this offers you from viruses etc. All a windows virus can harm now is your virtualized instance, in which case you should be able to easily return to a previous instance in time. As well, as you’re using windows in a far simpler fashion, only development tasks, it will tend to be a cleaner instance of windows which we all know is a good thing when it comes to windows.

So am I getting a mac? Well I’d love to, however, I can’t get over the price shock. As well, while I’d love to get at that slick gui and some of those applications, I’m not sure I’m willing to do that at the expense of having access to a pure shell environment. Using a shell in OSX means running it on top of a bulky windows manager. As well, I’d rather have hardware options instead of being a slave to whatever Apple chooses to offer me.

In the end, I would much rather give a BSD variant a try. With a BSD variant, I have control over the kernel if I need that, can run whatever windows manager I like when I need it, and can run a shell without a windows manager.

So, here’s my current plan. I’m going to try a bsd variant, pcbsd or desktopbsd. At this point my plan is to give pcbsd a try along with the virtualization product win4bsd to run windows. I’m contemplating building a new desktop to test this on. Building my own allows me to get exactly what I need, two drives in a RAID array etc at a reasonable cost.

If things work out then I’ll run primarily on the desktop and move my existing laptop to pcbsd using it primarily for browsing, email, etc.

Health Coverage and Independents?

January 8th, 2007
[ General ]

To be clear, I don’t know the answer or I wouldn’t be asking. Does buying health coverage make sense if you work for yourself and live in Canada? It’s the math I have trouble with. Let’s say it costs you $300 a month to buy health coverage for yourself and your family.

Unless you’re having a particularly ill month, rarely will you ever draw $300 out in using it. My guess is that we have drawn maybe $1000 a year out in health expenses.

So, wouldn’t it make much more sense for our family to be placing $300 a month into a high interest account to use for health expenses? Obviously this means we’re gambling we’ll be healthy enough over the short term to build a health ‘nest egg’.

It just seems like, based on the averages, even a year into it we could realistically have over $2000 saved for health expenses. In a healthy year, that could be closer to $3000. Again, that’s gambling I don’t need a few crowns this year.