Skins

18 years, 1 month ago
[ 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

18 years, 1 month ago
[ 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

18 years, 1 month ago
[ 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

18 years, 1 month ago
[ 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)

18 years, 1 month ago
[ 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?

18 years, 1 month ago
[ 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.

Beats in the Office

18 years, 1 month ago
[ General ]

DSC00073.JPGThanks for a surprising Christmas gift I received, things sound significantly different in the office this year.

Oh how this will change the conference calls…..

Office Christmas Party

18 years, 2 months ago
[ Office Gossip ]

drunkSanta.jpgSo the one thing I certainly do miss about not working in a big office is that last week before Christmas when, let’s face it, productivity is almost non-existent. Oh, and that last day before the holiday break when productivity may actually total up to a negative value, I do miss that.

In honor of that maybe I’ll try to incorporate some of the usual trappings of the day around the house today. I’ll get on the bad santa hat, have a few naughty nogs this afternoon, corner the chooch and bore him with some disorganized non-sensical stories only to eventually pass out in my cubicle and hope an office mate can give me a lift home.

On man I miss the office.

One Percent

18 years, 2 months ago
[ General ]

Jamie Johnson is an incredibly rich kid. He’s heir to the Johnson & Johnson vault of cash. He’s in his mid twenties and makes movies, primarily about being rich and what it’s like in the inner circle of the obscenely rich. His current project is titled “The One Percent“.

Jamie’s a trust fund kid. He’s part of a family of people who spent a large part of their energies coming up with ways to keep the money they have. Trust funds, off shore accounts, whatever it is they do. People this rich are less concerned about earning money then about keeping the airplane hangers full of cash they already have.

Contrast the Johnson family with Warren Buffett, Warren not Jimmy, currently the second richest man on the planet. While I haven’t heard this first hand, the rumour is that Warren’s stated he will NOT leave his money to his family.

What’s the point? Both Warren and the Johnson’s are part of that infamous one percent who possess 99% of the world’s wealth. In the case of the Johnson’s, they have every intention of keeping it in the brood.

I find it fascinating that Mr Buffet is planning the exact opposite. People like Robert Reich will tell you how the former can impact a society. Societies who feel they can never access that 99% of wealth are ripe for anarchy and literally ripping themselves apart at the seams.

I think I had a point but I’d rather leave it at that…So, no point, or it’s your turn to come up with the point….Any point I find seems to make me feel like either a capitalist or a communist, neither of which I consider myself….

Kids in the Office

18 years, 2 months ago
[ General ]

322481060_3e326799ec_b.jpgI don’t recall being told NOT to draw on the children.

Hey, whiteboard’s aren’t cheap.