Adirondak Chair Optimizer

Here's a fun thing to do on the weekend. Instead of spending $150/ea. on Wayfair, you can build essentially the same chair yourself using 2x4 framing lumber from Home Depot or Lowes. After you buy a cordless drill, mitre saw, and some sawhorses, you can have a pleasant afternoon cutting, clamping, drilling, and screwing. That's what my friend Jeremy decided to do in Jan. 2021, so I brought over my saw and helped out (with the promise of beer).


The only trouble is, how do you know how much lumber to buy?? The plans for the chair give you the length of cuts, but once you get to the store, they have all these different lengths of 2x4s that they sell: 92 inch, 96 inch, 10ft, 12ft, 16ft... on and on.



Well fear not, because Python is able to save you from your woes. With a little brute force calculations, you can easily find the optimal combination of lumber to buy which will minimize your cost (and waste wood).


This being a quick and dirty coding project, you just open up the Python file in your favorite text editor and at the top you'll find where you can enter the current prices of various cuts of 2x4 wood, the qty and length of each cut needed for one chair, and the number of chairs your intend to build.


Next, go to the command line (or terminal), type python adiondack.py and viola... the code runs 99,999 different random combinations of cuts to find the one that minimizes the cost of lumber. You will get some output like this:




You may have noticed that the chair in the picture uses "one-by" lumber for the seat and the back, so why haven't I included those in my calculations? It's because Home Depot and Lowes typically don't sell too many different lengths of that kind of wood. Where you have five or six different sizes of framing lumber, 1x12s might only be available in 8ft lengths.


Here's a link to the code: https://github.com/hochh1707/adirondack/blob/main/adirondack.py>