| « The Russian Plan | Bad Code Offsets: Open Web Innovation » |
One mistake that rookie carpenters will often make is to measure for trim molding – baseboard, casing, crown, etc – by the linear foot. Take the casing on a 7’ door, for example. Each leg of the door requires 84” of trim and the header needs 32”. If your house has 16 doors, and each side of the door needs 200” of trim, then that adds up to 533’ 4” (16 x 2 x 200”). And since you can get casing in 16’ boards, you’d need to order 34 boards to get the job done, right?
Not quite. You’d actually need 38 of those 16’ boards. Although each 16’ board can easily fit two 7’ door legs, the remaining 24” should be scrapped, as a splice in a header casing is about as professional as modHmm. And while door casings are relatively easy to measure for, baseboard and crown molding can get trickier.
A general rule of thumb – especially for stained wood – is that splices should be avoided at all (reasonable) costs. While it’s unreasonable to expect an extra-long board to be made for rooms longer than 16’, there’s no reason to splice a 7’ and 4’ section together. Actually, there is a reason, but that has less to do with materials cost and more to do with a lazy carpenter who estimated incorrectly.
Your exercise for the day: write a function that calculates the number of boards needed to trim out a house.
For bonus points, have your program print the cuts needed on each board.
Special thanks to the lazy carpenter that I hired (and all his spliced moldings) for inspiring this BYOC, and to Todd Lewis for encouraging me to finally write it up. If you have your own fun coding exercise, don’t hesitate to contact me!
Re: Avoiding the Splice
2010-01-20 09:22
•
by
Anonymous
(unregistered)
|
It's just referring to a join in the wood. Header casings should be a single bit of wood, not two bits of wood joined (spliced) together. Hence the task is to figure out how many bits of wood you would need to deck out a home without any splices. I must admit, I'm having trouble summoning the enthusiasm for this one. It's far more of a maths challenge than a coding challenge. |
Re: Avoiding the Splice
2010-01-20 09:36
•
by
Ramses So let it be written so let it be done
(unregistered)
|
|
Solution used in most American produced housing: Don't give the customer stained wood trim or charge them way extra so they don't want to pay for it. Force painted wood on them because most carpenters can't afford a computer and are too dumb to figure it out manually and rely on the lumber yard to figure it out for them and the lumber yard is usually wrong. You see, with painted wood trim you can splice whereever you want and hide it by caulking the joint in the wood and painting over it so the customer will never see it. In a past life I was a construction manager and these were the tricks of the trade.
|
|
If the goal is to minimise the number of boards, then you'll never use a board other than of the maximum length! What's should we be optimising for in the Medium and Hard case?
-- Note from Alex: Longer boards are usually cheaper by the foot; a 16' length might cost $30, while a 8' could be $16. But if you only need a 8', then no sense in buying a 16'. |
| « The Russian Plan | Bad Code Offsets: Open Web Innovation » |