Greg MacLellan

August 18, 2008

Basement Layout Ideas

Filed under: Renovations — groogs @ 10:55 pm

I’ve spent the last few days (well, longer than that, really) pondering what the exact layout will be for the basement. So here is what it was when I first bought the house:

You can see some pictures of it in this post

The old kitchen cabinets, including the old sink, was moved into the laundry room at some point, in addition to the laundry sink already there. Behind the cabinet, a few inches away from the wall, is the main waste water pipe for the house.

Beside the stairs there is a central vacuum unit (marked CV). The fuse panel (ELEC) is on the wall behind that, and between the two (not shown) is a vent that comes down and goes under the stairs. At the bottom of the stairs, there is another vent that comes down and was boxed in by wood paneling (That is shown).

The water heater is offset from the furnace because the furnace filter access is on that side, and if the water heater is right beside the furnace the filter doesn’t come out (apparently it was installed that way initially, and then later the hot water tank was moved). In the middle of the basement is a support post.

I should also point out that there are two ducts running down the middle of the basement (about 6.5′ high) from post, to about 1′ from the bottom of the stairs. Because of the post and low ceiling, I didn’t really think the middle area would be useful to be part of the rec room, so that is why in all designs it is part of the laundry room.

So far I have taken down the all the paneling, the wall and all the cabinets that were in the center of the basement, and moved the duct that comes down at the bottom of the stairs.

My objectives for the basement are to have a laundry room, and a rec room area that I can put my desk in and use as an office, and also put a couch and TV in to use as a place to watch movies/TV. So my first design:

In this (and all designs), I am adding 2″ of rigid foam insulation around the whole basement, and then a 2×4 insulated frame on top of that. This means redoing most of the laundry room plumbing to bring it out from the wall, so moving things around is not a big deal. It also means moving the fuse panel for the same reason, which I don’t mind since I wanted to upgrade it to a breaker panel anyways, and add several new circuits for the basement.

I got thinking about it, and started wondering if I could add a bathroom. The house only has a single bathroom (3 bedrooms) so a second half bath could be quite appealing. I came up with a couple of designs, but I don’t know which I like better yet:

The first design moves the central vac from beside the stairs to beside the electrical panel. This shouldn’t be a big deal, and I was going to cut into the central vac lines anyways to add another outlet downstairs.

The second design involves moving the electrical panel about 8′ into the laundry room. I still need to check if this passes building code, and also what exactly I am allowed to do with the mains wiring (eg, do I need to get Hydro to come in and run new mains wires from the meter?). It would of course get boxed in.

Both designs also show an on-demand tankless hot water heater (which can be mounted on the wall, out of the way of the furnace filter door). This lets me move the wall about 2′ closer to the furnace, but I haven’t decided if it makes sense to switch to the on-demand heater yet, due to the high cost (I’m guessing ~$1200-$1500 installed). I probably wouldn’t see the energy savings but I may recoup the costs when I sell the house anyways – maybe tankless systems will be in high demand in 5 years. They’re certainly going in almost every house I’ve seen that was built in the last year or so.

In both designs, the toilet is also relatively close to the main waste line, which means minimal cutting into the concrete to run the waste line. There is also a vent line next to the waste line, which hopefully I can use for the bathroom as well (still need to check code on that).

So I’d love to hear feedback on which design is better (or if anyone has any other ideas).

Terminating Network Cables

Filed under: Renovations,Telephony — groogs @ 9:59 pm

After running network cables the next step, of course, is to terminate them.

Using one of the old cabinets that happened to be close to the right size, I built a rudimentary 19″ rack. It’s not too bad for a DIY rack, especially considering a small swing-out metal rack costs around $250.

I basically took an old cabinet, cut the middle shelf out and turned the whole thing on its side. I added another piece of wood from another cabinet on the other end as a mounting location for the rack-mount gear, and I pre-drilled several pilot holes at 1U spacing (to prevent the wood from cracking when putting in screws). I used part of the old middle shelf to build a new shelf to hold my modem, router, VoIP adapter, etc.

I terminated all the cables from the jacks throughout the house onto the back of a 1U 24-port patch panel.

On the main floor I have 12 jacks so far – 2 network + 1 cable in each of 3 bedrooms; 2 network + 1 cable in two separate locations in the living room; 2 network on a wall shared by kitchen/dining room. I probably would have put another jack (and a cable hookup) in the kitchen, except that I plan on doing some major renovations there in the next couple of years, so I’ll just wait, since I don’t need them now anyways.

There are a couple of benefits to using a patch panel for this job. Any “network” jack in the house can be made into either an Ethernet jack, or an analog phone line. Since I use a VoIP PBX at home, I can actually put analog extensions anywhere I’d like, and keep the VoIP adapter in the rack (like the Linksys PAP2 you see on the right). Additionally, I can use PoE injectors (or a PoE switch) and selectively send PoE to ports that need it (eg, have a VoIP phone plugged in).

I can also run different networks to different spots in the house. Most people probably wouldn’t use this, but my main MythTV server (currently in my living room) is also my PBX server, and it has a public IP (VoIP traffic on its own IP avoids QoS issues). I have a hub on my cable modem that splits the connection to the router, and sends another “raw internet” line up to the PBX server (red cable going into the patch panel).

The other end of every connection is pretty simple. I ordered all the keystone jacks, wall plates and patch cables from The jacks are 1/5 the price Home Depot sells them for, and the patch cables are sold for cheaper than I can buy the parts to make them myself.

August 15, 2008

The power of jQuery

Filed under: Asides,Code — groogs @ 8:22 am

Jeff Atwood made a post today talking about the benefits of coding using Javascript frameworks. It totally echos my own thoughts and experiences on it, namely that I used to hate writing client-side code because javascript was so terrible. After discovering first Prototype +, and then completely moving to jQuery, my outlook has completely changed. I really do enjoy writing client-side code now. It’s easy, and the results are among the most immediate real programming results you can get, because it runs right there in your browser. Using Firebug, you can even test code interactively while you write it.

August 13, 2008

Inheriting constructors in C#, VB.NET

Filed under: Code,Rants — groogs @ 9:24 am

Several times, I’ve come across the need for inheriting constructors in .NET, and I am constantly annoyed that it does not work. I’m writing a business objects layer, and what I’m trying to do is create some constructors in the base class that can initialize the objects in many different ways, eg:

Public Sub New() ' Create new object using default storage
Public Sub New(ByVal storage as Storage) ' Create new object using specified storage
Public Sub New(ByVal conditions as String, ByVal parameters() as Object) ' Load an object by the specified query, using default storage
Public Sub New(ByVal storage as Storage, ByVal conditions as String, ByVal parameters() as Object) ' Load an object by the specified query
Public Sub New(ByVal id as Object) ' Load an object by the specified primary key, using default storage

And so on. I like to provide many different ways in the base classes, to 1) make writing the objects that inherit from this as easy as possible, and 2) make writing client code as easy and flexible as possible.

Unfortunately, since you cannot inherit constructors (except for the default New() constructor, if that is specified in the parent..), you cannot do this. You have to define stub constructors in each inherited object which call the parent constructor, which ends up being a whole bunch of copying and pasting, and even more work if you ever change/add a constructor.

Eric Gunnerson posted a blog entry about inheriting constructors, and there is a good discussion on it in the comments. I completely agree with Darren Oakey who suggests that constructors should be inherited if and only if no constructors are defined.

This fits in with the default behaviour of inheriting the empty constructor, and generally is compatible with existing code. The only time it would break existing code is if you have an object with no constructors that inherits from another with a non-default constructor, and you specifically want your inherited object to have the default constructor.

Public Class A
Public Sub New(ByVal value as Integer)
End Class

Public Class B
Inherits A
End Class

In the implementation right now, B only has the default (no parameters) constructor. If this change is made, B will have New(ByVal value as Integer), so existing code that assumes it has no parameters will fail. The fix for this is to explicitly define a constructor for B as:

Public Class B
Inherits A

Public Sub New()
End Sub
End Class

One of the arguments against inheriting constructors seem to be that implicit operations are bad and confusing – however, in my view, having the default constructor implicitly added in the above case is exactly the same thing. Additionally, as is pointed out in the comment thread in Eric’s post, this is also how methods behave. Why should constructors be different?

Another option is to add a class attribute that would allow constructors to be inherited, eg:

<InheritConstructors(true)> _
Class B
Inherits A
End Class

It would really make the language more powerful, and allow writing simpler and nicer code. In a simple example:

Dim cust as Customer = Customer.Load("id = {0}", 123)


Dim cust as New Customer("id = {0}", 123)

August 10, 2008

Running network cables

Filed under: Renovations — groogs @ 1:44 am

With the basement torn out, and access to all of the main floor, I started running wiring for network and video. I’m running two network cables and one cable to each of the bedrooms, two spots in the family room, and one spot in the dining room.

Since the upstairs is finished, I wanted to disrupt it the least amount possible, so I purchased a 54″ flexible installer’s drill bit. It’s 9/16″ which is big enough for all the cables I’m running. The basic process is to cut out the hole in the wall where the wall plate will go, stick the bit in and drill a hole from inside the wall to the floor below, and then pull the wires back up through.

Picture of drill from inside the wall

The bit came with a special tool that goes inside the wall and directs the bit straight down. I had to use this a couple of times when a joist was directly below part of the wall. It also came with a special sleeve that clips onto a hole in the drill bit, grabs the wire, and lets the drill bit act like a fish to pull the wires back up through – very convenient.

I used a low-voltage plastic retrofit box to finish it off. This is easier than a metal retrofit box simply because I’m using keystone jacks and quite a few wires. The retrofit boxes are typically not that big, so trying to terminate several wires, including RG6 coaxial (which is not really that flexible), is easier.

I’m still waiting for all the plates and keystone jacks to arrive, so I haven’t terminated too many of these yet (just a couple to get phones and my media server going). I’ll follow up with a post about the termination later.

August 7, 2008

Starting to renovate the basement

Filed under: Renovations — groogs @ 9:49 pm

My girlfriend and I just bought a house. It’s a bit older – 32 years old, to be exact – and it shows, in a few places. My first big project is to renovate the basement and turn it into an office / rec-room area, and a laundry room. I figured it would be interesting to some people if I blogged, plus it is some extra motivation for me to get it done in a timely basis.

The basement is not really finished. In the main area, there is wood paneling, acoustic tile ceiling, and painted cement floor. The laundry area is just bare concrete walls, and has all the old cabinets from the original kitchen.

So the first thing I did was rip the ceiling, panels and most of the old cabinets down.

There is a crawlspace under half of the house, and the only paneling I left was for the door to the crawlspace, as I believe the door will fall apart without it. I will eventually figure out something better.

There was some kind of flower wallpaper paneling around the stairs (think wood paneling, but flower wallpaper instead of the faux-wood). This was glued to the drywall, so removing it left chunks of glue, and missing sections of drywall. There’s probably a way to remove it that wouldn’t have done this, but too late now. I just have to decide if it’s easier to sand and plaster, or just put up new drywall..

I also started taking down the wall between the main area and the laundry room, but ran into a bit of an issue with a cold-air return vent. It goes up beside the main beam, runs through the joists over top of the main air duct, and then down into the main cold air return duct. I think I’m just going to try capping it off, and then adding a new cold-air return on the other side of the basement.