Category Archives: Woodworking

Simple S3 Log Archival

UPDATE: if anyone knows of a non-broken syntax highlighting plugin for wordpress that supports bash or some other shell syntax, let me know :-/

Apache logs, database backups, etc., on busy web sites, can get large. If you rotate logs or perform backups regularly, they can get large and numerous, and as we all know, large * numerous = expensive, or rapidly filling disk partitions, or both.

Amazon’s S3 service, along with a simple downloadable suite of tools, and a shell script or two can ease your life considerably. Here’s one way to do it:

  1. Get an Amazon Web Services account by going to the AWS website.
  2. Download the ‘aws’ command line tool from here and install it.
  3. Write a couple of shell scripts, and schedule them using cron.

Once you have your Amazon account, you’ll be able to get an access key and secret key. You can copy these to a file and aws will use them to authenticate operations against S3. The aws utility’s web site (in #2 above) has good documentation on how to get set up in a flash.

With items 1 and 2 out of the way, you’re just left with writing a shell script (or two) and scheduling them via cron. Here are some simple example scripts I used to get started (you can add more complex/site-specific stuff once you know it’s working).

The first one is just a simple log compression script that gzips the log files and moves them out of the directory where the active log files are. It has nothing to do with Amazon web services. You can use it on its own if you want:

#!/bin/bash

LOGDIR='/mnt/fs/logs/httplogs'
ARCHIVE='/mnt/fs/logs/httplogs/archive'
cd $LOGDIR
if [ $? -eq 0 ]; then
for i in `find . -maxdepth 1 -name "*_log.*" -mtime +1`; do
gzip $i
done

mv $LOGDIR/*.gz $ARCHIVE/.
else
echo "Failed to cd to log directory"
fi

Before launching this in any kind of production environment, you might want to add some more features, like checking to make sure the archive partition has enough space before trying to copy things to it and stuff like that, but this is a decent start.

The second one is a wrapper around the aws ‘s3put’ command, and it moves stuff from the archive location to S3. It checks a return code, and then if things went ok, it deletes the local gzip files.

#!/bin/bash

cd /mnt/fs/logs/httplogs/archive
for i in `ls *.gz`; do
s3put addthis-logs/ $i
if [ $? -eq 0 ]; then
echo "Moved $i to s3"
rm -f $i
continue
else
echo "Failed to move $i to s3... Continuing"
fi
done

I wish there was a way in aws to check for the existence of an object in a bucket without it trying to cat the file to stdout, but I don’t think there is. This would be a more reliable check than just checking the return code. I’ll work on that at some point.

Scheduling all of this in cron is an exercise for the user. I purposely created two scripts to do this work, so I could run the compression script every day, but the archival script once every week or something. You could also write a third script that checks your disk space in your log partition and runs either or both of these other scripts if it gets too high.

I used ‘aws’ because it was the first tool I found, by the way. I have only recently found ‘boto‘, a Python-based utility that looks like it’s probably the equivalent of the Perl-based ‘aws’. I’m happy to have found that and look forward to giving it a shot!

Heartbreaking screwup. Don’t do this :-(

What a dope I can be.

So I have this board. It’s like, 9″x23″. I need to cut it to two boards, each 9″x10 5/8″. That’s *almost* in half. So, what I did is measured out the 10 5/8, drew a line, lined up the crosscut, and ran it across the table saw. Sounds simple, but there’s a big screwup in what I just said. Do you know what it is?

I didn’t mark the “waste” side of the cut. As a result, I made an absolutely *perfect* cut…. on the wrong side of the line. I’m exactly 1/8″ shy.

Always mark the waste side of your cut. What makes this heartbreaking is that instead of having one cut left to make (on the same board – I need two 10 5/8″ pieces), I now have to do a glue-up of *another* set of 1/2″x6″ boards, trim it so that the resulting 9″ board has the glued seam in the middle, square it up, and cut my 10 5/8″ piece. It causes more waste as well.

Woodworking Progress, and why I hate plywood and woodworking books

So first, the progress report:

I’ve had a few days off due to the holidays, and I got a $100 Lowe’s gift certificate for Christmas. I requested Lowe’s because they have a nicer, and wider selection of wood there for me to use in my small projects. When I get to the larger projects or nicer woods, there’s a great mill nearby that I’ll get to when I can afford it.

So, I went and bought enough poplar to build a bookcase that is sized nicely to double as a sofa table, which is great. Even after adding a couple of other essentials I still didn’t even use my whole $100 allotment. Of course, I haven’t actually *started* on the bookcase yet, but this leaves me in a good position. Namely, it puts me in a place where I am actually working on three projects simultaneously. This sounds like nothing until you realize that I am starting with *zero* jigs in my shop, so really, when you factor in the building of the jigs and the fact that I’m still pretty new to woodworking, it’s kinda like I’m working on about 5 or 6 projects.

The first project is the oak medicine cabinet from the New Yankee Workshop book. This involves building a box-joint jig. I’m sorta saving this one for later because I have only today found a dado set for my table saw that got good reviews and isn’t $300. Once I get that, I’ll be on my way. In the meantime, there are still some pieces I can cut to length and stuff.

The second project is the one that has most of my focus right now. It’s the desk organizer from the book “Furniture you can build” which is a fantastic book. Buy it if you haven’t already. The main reason this one is taking so much time is lack of clampage. I have to make bigger boards from smaller ones, which involves, at a minimum, 4 clamps. Preferably 6. I’m using 4 because the rest are too big for the job and I don’t have any of the bessey-style ones that can go *under* the panel being glued. This has been a decent learning experience, though. I’ve learned to make better use of my block plane, my old Stanley No. 5, and my shiny new card scraper, which I also learned how to sharpen.

The last project is the bookcase, which is from the same book, “Furniture you can build”. They built it from white oak I think. I’m using poplar because it’s probably 1/3 the cost of white oak. If it works out, I can always give this one away as a gift and, wife willing, build another one from white oak.

Doing a few projects at once is kinda nice, because it means there’s no downtime in the shop. If things for one project are at a standstill because of a pending glue-up or something, I can cut pieces for another project to size. Things still take me long enough that I don’t get a whole lot done in any kind of a hurry. Everything is still extremely slow and deliberate. I’m still often referring to books to see the best way to do just about anything. By the time I futz around with stuff and finally get stuff cut to size, my glue-up (with 30-minute glue) is ready to be unclamped. If I really have nothing to do, I can sharpen my plane blades.

Side project No. 1 is a crosscut sled, which brings us to why I hate plywood. I can’t seem to touch it without getting splinters. This, if you don’t already know, sucks. From now on I need to remember to just break down and wear gloves when I have to carry it anywhere. This is the cheap plywood. I don’t seem to have the problem with the oak veneered plywood I bought. The crosscut sled is an enormous pain in the buttocks, because it seems just about impossible to get the rails to the point where they a) allow smooth movement on the table saw, and b) *don’t* allow any side play in the sled base, which will screw up your accuracy.

As for woodworking books, I own many of them, and they all have the same problem, and it’s pissing me off because the problem is so basic and easy to fix, and yet nobody does anything about it: NOT A SINGLE ONE shows a “materials list”. They *call* what they show a materials list sometimes, but it’s not. It’s a ‘parts’ list. This list shows the dimensions of the parts of a project. It does *NOT* show a list of stuff you need to *buy*. This leaves me in the position of having to go through the parts list and figure out what size boards I need and how many I need. This, if you don’t already know, sucks. I think it’s ShopNotes magazine where I’ve seen a real “this is what you need to shop for” guide in the projects, and they even lay out diagrams of which parts will be cut from each board you buy. This is invaluable to newbies.

So, this is where I’m at. I have the vertical dividers for my organizer cut to rough size, to be planed-to-fit later. I have my panels glued up from which my sides, bottom, and back will be cut. This last glue-up went badly, and I learned that you shouldn’t do a glue-up on top of a plastic bag that has red ink on it, because the glue soaks up that red stuff… so my card scraper and plane are gonna get a little extra workout tomorrow. Once that’s all ready to go, which should be tomorrow morning, I should be able to get *ALL* of the pieces for the desk organizer cut to size by tomorrow afternoon some time. I’ll still need to cut dadoes for the project, but these pieces are small enough to just run across my router, since there’s no special joinery involved like box joints.

Wish me luck!

It’s a Woodworking Christmas

This year, just about everything I got for christmas was woodworking-related, which is wonderful. After a couple of years of mucking with my tools and making a couple of small projects, I’m ready to move on to projects that are still small, but are made of real wood, instead of plywood or 2×4 lumber.

I received two excellent DVDs. David Charlesworth on Planing Techniques, and another on Sharpening Planes. Both very good. There’s no old wiseman in my life, like a woodworking grampa or something to show me how these things are done, so it does wonders for a newbie like me to see someone use a plane (for one example) who you know *knows* how to use a plane properly. David Charlesworth, therefore, is sort of an adopted grampa. :-)

To go with the sharpening DVD, I also received (from my saint of a wife) a set of Arkansas sharpening stones. It’s the Woodcraft boxed set. The only thing it didn’t come with was any indication of the grit for each stone, which I must say is pretty annoying. In addition, I can’t find any indication on the woodcraft site – so if anyone knows the grit of the three stones, it would help me figure out how to use them most effectively.

I also received a set of card scrapers. Can you tell I hate sanding? :-) I dislike it for a number of reasons, but the biggest one is dust. I can’t stand the dust that sanding creates. I also don’t like the idea of coming to the end of a project, getting to where I need to sand things out, and then realizing I have no sandpaper and having to run out to get some. Card scrapers and planes are always around. They aren’t really “consumables” like sandpaper. You can resharpen them (with your wonderful new stones) and get back to work.

Finally, I got two books that I had read glowing reviews about. One is a book about nothing but how to build beds, and the other is about how to build nothing but tables. It’ll take some time before I’m ready to take on the risk of building a bed (the risk is that you buy a good bit of expensive wood and then mess up something critical… and big), but I’m confident enough to go for a small nightstand, which, as it turns out, I need. We only have one right now.

Another thing I’m thinking is that there might be people who need some small project built, but don’t have a woodshop and don’t want to buy particleboard. I wonder if I couldn’t get those people to buy the wood, and I’d then build it for free or, if the project requires stuff I don’t have, a small fee just to subsidize (not completely pay for) the missing bit. This would work for me, because, while I can’t take the risk of buying top-notch wood to build a bed, I *can* afford to replace one or two boards in the project if I mess it up, and I get experience from it, and someone else gets something useful from it, for the cost of the wood.

My current projects are the medicine cabinet from the New Yankee Workshop book and the desk organizer from a great book called “Furniture you can build”. Get this book if you’ve mucked around but haven’t built anything worthy of leaving the shop yet. So far, it’s fantastic. I can’t praise it enough.

Actually, those project are sort of not my real projects. Sure, I’m gluing up panels for the desk organizers, and I’m squaring up stock and cutting a few boards to length for the medicine cabinet, but the real projects right now are building the jigs I’ll need to complete these and other projects. I’m about 3/4 the way through building a crosscut sled for my table saw, and I need to find decent plans for a box-joint jig for a router. I’ve sketched out an idea of my own, but I’m sure someone could come up with a more clever plan that would create one that is adjustable for the size of the fingers, for example.

As always, the biggest challenge is finding the time to spend in the shop at a time when noise won’t shake the house awake. You just can’t wrap up some time and shove it in a stocking :-)

Happy holidays.

Growing Affinity for Hand Tools

I bought some kind of special edition magazine about using hand tools in the shop. As usual, I read it cover-to-cover in about an hour, and I’ve a few articles over since then. I also purchased a really cool book called “Choosing & Using Hand Tools”, which just completely rocked my world. I also have been checking out articles on the internet and some newsgroup/mailing list postings, and the more I read, and the more pictures of old tools I see, the more I like the idea of focusing on using hand tools. Not to the complete exclusion of power tools, of course, but I’d like to *not* be dependent on these machines to do my work, for the most part.

There are a couple of reasons for this, some good, some completely stupid. One good reason for using hand tools is that a lot of them are nearly silent, or at least much quieter than their powered counterparts.  This is important because most of my work is done after my wife, Natasha, goes to bed. Quiet is a requirement. It’s also nice to have quiet tools anyway so you can listen to the radio while you’re working, and you don’t have to wear hearing protection. The second good reason to use hand tools is to reduce (if not eliminate) airborne dust clouds. Hand tools produce a negligible amount of dust, saving me from having to wear any kind of breathing apparatus, which is key because I wear glasses, and they fog up if I wear a mask, which sucks when you’re working wood and really need to see.

There are a host of other decent reasons that people have cited for using hand tools, but the only other one that matters to me is described a million different ways. I’ll just say that it’s a more organic craft using hand tools. Maybe I feel closer to the wood or something. Maybe it’s a Zen thing with me. I don’t know. But I like using hand tools.

The rest of the reasons are stupid. The first one is that I just think hand tools are really cool-looking. Some of the really old tools look like they were forged by hand. They’re crafted pieces themselves, nevermind what you’ll create with them. The second stupid reason is because it would be really, truly hardcore to point to a piece of furniture and say (even if it’s to myself) that I made it without plugging anything into a wall.

Woodworking Lessons 4: Use more than one source of information

This rule of thumb comes from just my experiences in the past couple of weeks. It applies to a number of things, actually, but the first things that come to mind are your wood measurements, and your step-by-step guides.

I bought a book put out by the publishers of a popular woodworking magazine, in which they show a picture of a bevel cut being done on a table saw with the blade tilted *toward* the rip fence. DO NOT DO THIS! I’ve read in several other places, and heard from experienced woodworkers’ first hand experience that this is absolutely the *wrong* way to set up a bevel cut on a table saw, not because of accuracy issues, but from a safety perspective. If you perform a cut this way, you *will* have a piece of wood flung at you at high speed sooner than later. When learning the basics, USE MORE THAN ONE SOURCE to learn how to perform the basics like bevel cuts. A terriffic source is google groups. Do a google search for something like “bevel cuts on a table saw”, then click on the “Groups” link on the top of the Google page. You’ll see results from woodworking usenet groups where people will share their experiences. Good stuff. Another good source is Wood magazine’s online forums. Look around, I’m sure there are plenty of other good sources of information.

Besides educational sources, there are informational sources on your wood. Take more than one measurement for everything you do. If you can figure out how to take three or four measurements to “prove” that something is absolutely correct, do it. If you have tools around that can aid you in this (like a square or combination square or protractor or caliper or bevel gauge), use them as more proof that what you’re looking at is how it’s supposed to be. This is how I learned my earlier lesson about not trusting wood to be milled perfectly square. I measured out some cuts, then realized they were off because the boards weren’t perfectly cut. I measured with two different rulers, used a combination square, and a bevel gauge to figure out that my board’s edges were the problem. Once I drew my cuts without using the edges (ie, I drew all four sides of the cuts), everything was fine, and I knew that because I used two rulers and a bevel gauge to prove it. I measured the diagonals of the square I drew, and measured the length and width at various places along the sides of my cut. When I was confident it was perfect, I cut it out (and screwed it up, but that’s another story – at least my drawings were good!)

Woodworking Lessons 3: Do the stupid beginner projects

Oh man, am I ever glad that I’m doing those really stupid beginner projects. Stuff that looks like it would be super easy to do (and probably is for an experienced woodworker) takes me forever to figure out, and then I still get things wrong.

Right now, I’m working on a simple SIMPLE simple box. I measured out my sides, cut them out at 90 degrees, and then went back to put 45 degree bevels on all of the sides. My first attempt, I spent so much time measuring out the cut on the table saw that I forgot to pay attention to which side of my board was facing up as it went across the saw. As a result, I cut bevels on opposing faces of the board (so from a cross section view, it’s a parallellogram). Ugh!

Then, I apparently measured my bevel cut wrong, because when I was done, my board was shy of its original size. How exactly do you measure this out, anyway? When the blade is perpendicular to the table, it’s easy — just use the ruler on your saw’s rails to measure your cut. When the blade is tilted, how do you measure *exactly* where the blade enters the wood? For 45 degree cuts, I figured out that you can just use the pythagorean theorem to figure out how to draw the leg opposite the cut, and that can help a bit. It’s really easy for 45 degree cuts because you just mark at the length the board needs to be, measure back from that by the thickness of the board, and there are the two legs of your right triangle. When the bevel is 45 degrees, those legs are the same length.

So do all the stupid beginner projects you can, and do them with the cheapest wood you can find. You’re going to screw up what looks like the easiest stuff ever. Learn to laugh at yourself. Patience is a virtue. Enjoy.

Woodworking Lessons 2: Table saw safety is in the details

I have a rather large, hulking, bulky, heavy table saw. It’s one that real men generally like to have, because it’s big, and it’s heavy, and it cuts stuff. However, cutting safely on a table saw apparently is a more detailed operation than I thought.

I had a problem where every time I’d rip a piece of wood, I couldn’t seem to really push it all the way across the blade. I’d hit a point where it just became impossible. Forcing it through seemed like a lost limb waiting to happen, so I just got some scrap wood and started trying to figure out where the problem was. I also had some help from a few books that told me what to look for, and (of course) I had the table saw manual. The problem was the splitter (or, spreader, as I’ve also seen it called).

The spreader is a piece of metal that is aligned with the blade on the outfeed side of the blade. The spreader is there just to keep wood on the outfeed side from turning back in on the blade and causing problems. Trouble is, if your spreader is misaligned, like mine was, it can really cause more problems than it solves. It needs to be perfectly perpendicular to the table *top*, perfectly perpendicular to the table *edge* (looking down on it), and perfectly aligned with the blade (ie, not to the left or right of the kerf – it should sit wholly inside the kerf).

Mine was none of these things. I was faced with being macho and just removing the whole thing, or spending some time to get it aligned. Since all the macho woodworkers I know are missing digits, I figured I’d spend the time. Your table saw manual will have some information on how your spreader is attached, and mine had information on getting it aligned as well. General woodworking books also have tips on maintaining your equipment, so check those out – they have some shortcuts that’ll really save you some time and frustration.

My table saw is (now) a pleasure to use.

Woodworking Lessons 1: A matter of trust

I decided to start a little series based on the lessons I’m learning in woodworking. I’m a total newbie, but if I can help other newbies, hey, I’m all for it. So here’s the conclusion I’ve come to after doing just a couple of small projects: it’s all just a matter of trust.

It seems clear to me that the success achieved in a lot of things has something to do with decisions you make with regard to what you’re willing to take on faith. I’ve recently learned NOT to trust two things by experience: project plans, and sawmills.

Project plans are sometimes wrong from beginning to end, or they’re incomplete, leaving out key pieces of the puzzle. Don’t trust that everything is there – go over the project plan in detail before you find yourself in the middle of a project without a clue how to make the next (undocumented) step. Also, don’t trust that the way they’re showing you to do something is *the* way to do it – I had a heck of a time clamping up 15-degree angled sawhorse legs because I assumed the picture in the book was the way to do it. On my second saw horse leg I relied on my own logic to figure out a clamping system, and it took about 1/3 of the time and about 1/20th of the headache. A project plan is a blueprint, not a bible.

As for sawmills, I no longer trust them either. I had a board that was allegedly “ready for use” (it was smoothed on all 4 sides – aka ‘S4S’). I had to cut out what would become the side of a box. I drew three lines, and let the edge of the board be the fourth side. Bad move. When I went to make sure my cutting lines were perfectly square, I found they were a little out of wack, and the culprit turned out to be that the board wasn’t perfectly square. Check your boards before you measure and cut!

In general, you should probably question everything all the time anyway. Is your table saw blade *really* perpendicular to the table top? Just because it was 3 or 4 cuts ago is no guarantee that it is now. How about your splitter? Is it aligned? I’ve had some trouble with misaligned splitters and a full-length fence pushing boards back toward the blade and smoking up on me. Not nice.

Question it. It’ll save you time, headache, and waste.

Woodworking 101

In the world of computer programming, there’s a sort of tradition which dictates that the first program you ever write in a new language does nothing but print out “Hello World!”. Usually, the program can be written in seconds, in only a couple of lines of code. Even this small a program is encouraging to new programmers, because once they run it, it’s an indication that everything is working properly, so that nothing stands in the way of programming greatness.

In woodworking, the “Hello World!” appears to be making sawhorses. Completing this project gets the new builder familiar with the tools and techniques needed to go further, like clamping, drilling, and making cross cuts and angled cuts. It gets them more comfortable with their tools in the process. What’s great about a project like this is that you don’t get too stressed out over screw ups, because it’s all just 2×4 lumber from a home center – not $50/bf Cocaboca! Also, it’s just a shop project, for use in the shop only, so nobody is likely to ever see it.

Unfortunately, I had a somewhat incomplete set of directions that failed to mention measurements for a couple of the parts. No big deal, I fudged it and things are fine with my first sawhorse, and I’ll make corrections on the second one. But it was frustrating, to be sure, not to have complete instructions.

The most annoying part, however, wasn’t the missing measurements. There was a part where you had to clamp two opposing legs together to a subtop that was sandwiched between them. The legs were cut 15 degrees on the floor side, and then 15 degrees leading to the top, so that when the legs were flat on the floor, the top part of the leg tapered to be perpendicular to the floor, and that part screwed into the subtop. Well, they tell you “just clamp it up”, like it’s no big deal. What they don’t tell you is that it’s just about impossible to do.

Clamps really like things to be square. Needless to say, that makes it challenging to clamp together things that are at an angle. So you make a little block to put on the leg to fool the clamps. But when pressure is applied, the blocks slide all over the place, and nothing gets done. I’m pretty sure it took me the same amount of time to get the legs clamped as it did to do the rest of the measuring and cutting and such. In the end, I do admit, I have a pretty solid sawhorse, and I also admit I’m now a bit more comfortable with my bevel gauge, combination square, and my shop in general.