Andrew Cooke | Contents | Latest | RSS | Previous | Next


Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

Personal Projects

Choochoo Training Diary

Last 100 entries

[Bike] Gearing On The Back Of An Envelope; [Computing] Okular and Postscript in OpenSuse; There's a fix!; [Computing] Fail2Ban on OpenSuse Leap 15.3 (NFTables); [Cycling, Computing] Power Calculation and Brakes; [Hardware, Computing] Amazing Pockit Computer; Bullying; How I Am - 3 Years Post Accident, 8+ Years With MS; [USA Politics] In America's Uncivil War Republicans Are The Aggressors; [Programming] Selenium and Python; Better Walking Data; [Bike] How Fast Before Walking More Efficient Than Cycling?; [COVID] Coronavirus And Cycling; [Programming] Docker on OpenSuse; Cadence v Speed; [Bike] Gearing For Real Cyclists; [Programming] React plotting - visx; [Programming] React Leaflet; AliExpress Independent Sellers; Applebaum - Twilight of Democracy; [Politics] Back + US Elections; [Programming,Exercise] Simple Timer Script; [News] 2019: The year revolt went global; [Politics] The world's most-surveilled cities; [Bike] Hope Freehub; [Restaurant] Mama Chau's (Chinese, Providencia); [Politics] Brexit Podcast; [Diary] Pneumonia; [Politics] Britain's Reichstag Fire moment; install cairo; [Programming] GCC Sanitizer Flags; [GPU, Programming] Per-Thread Program Counters; My Bike Accident - Looking Back One Year; [Python] Geographic heights are incredibly easy!; [Cooking] Cookie Recipe; Efficient, Simple, Directed Maximisation of Noisy Function; And for argparse; Bash Completion in Python; [Computing] Configuring Github Jekyll Locally; [Maths, Link] The Napkin Project; You can Masquerade in Firewalld; [Bike] Servicing Budget (Spring) Forks; [Crypto] CIA Internet Comms Failure; [Python] Cute Rate Limiting API; [Causality] Judea Pearl Lecture; [Security, Computing] Chinese Hardware Hack Of Supermicro Boards; SQLAlchemy Joined Table Inheritance and Delete Cascade; [Translation] The Club; [Computing] Super Potato Bruh; [Computing] Extending Jupyter; Further HRM Details; [Computing, Bike] Activities in ch2; [Books, Link] Modern Japanese Lit; What ended up there; [Link, Book] Logic Book; Update - Garmin Express / Connect; Garmin Forerunner 35 v 230; [Link, Politics, Internet] Government Trolls; [Link, Politics] Why identity politics benefits the right more than the left; SSH Forwarding; A Specification For Repeating Events; A Fight for the Soul of Science; [Science, Book, Link] Lost In Math; OpenSuse Leap 15 Network Fixes; Update; [Book] Galileo's Middle Finger; [Bike] Chinese Carbon Rims; [Bike] Servicing Shimano XT Front Hub HB-M8010; [Bike] Aliexpress Cycling Tops; [Computing] Change to ssh handling of multiple identities?; [Bike] Endura Hummvee Lite II; [Computing] Marble Based Logic; [Link, Politics] Sanity Check For Nuclear Launch; [Link, Science] Entropy and Life; [Link, Bike] Cheap Cycling Jerseys; [Link, Music] Music To Steal 2017; [Link, Future] Simulated Brain Drives Robot; [Link, Computing] Learned Index Structures; Solo Air Equalization; Update: Higher Pressures; Psychology; [Bike] Exercise And Fuel; Continental Race King 2.2; Removing Lowers; Mnesiacs; [Maths, Link] Dividing By Zero; [Book, Review] Ray Monk - Ludwig Wittgenstein: The Duty Of Genius; [Link, Bike, Computing] Evolving Lacing Patterns; [Jam] Strawberry and Orange Jam; [Chile, Privacy] Biometric Check During Mail Delivery; [Link, Chile, Spanish] Article on the Chilean Drought; [Bike] Extended Gear Ratios, Shimano XT M8000 (24/36 Chainring); [Link, Politics, USA] The Future Of American Democracy; Mass Hysteria; [Review, Books, Links] Kazuo Ishiguro - Never Let Me Go; [Link, Books] David Mitchell's Favourite Japanese Fiction; [Link, Bike] Rear Suspension Geometry; [Link, Cycling, Art] Strava Artwork; [Link, Computing] Useful gcc flags; [Link] Voynich Manuscript Decoded; [Bike] Notes on Servicing Suspension Forks

© 2006-2017 Andrew Cooke (site) / post authors (content).

Modular Shelves

From: andrew cooke <andrew@...>

Date: Thu, 29 May 2014 18:22:34 -0400

Over the last few weekends I made these -

I didn't take photos of the intermediate steps because really, they weren't
interesting.  The ideas behind the design are more important.  And that's what
I want to describe here.

So, the first thing to note is that for simplicity I will ignore the offset of
the two boxes on the left.  That is easy to add - you just bolt the "front"
holes on the left to the "back" holes on the right (and you can skip drilling
the holes that are not used).

General Design

The general design is based on a grid.  A bit like Tetris pieces can be made
by joining squares together, so all the boxes here are based on a 20cm x 20cm
square, which I will call 1x1.  There's only one 1x1 box (on the left, second
row up).  There are three 2x2 boxes (the "square" ones), two 3x1 boxes (top
left and right) and two 1x2 boxes.

There's no need to choose that combination.  You can have whatever combination
you like.  I used squared papaer to sketch lots of designs until I found an
arrangement that seemed right for me.

I left some "gaps", but I also found (when I was playing around with the boxes
I had before I bolted them together) that a design without gaps looks good
too.  There's something very satisfying about the regularity of it.

Each box is 30cm deep.  You could change that.  30cm just seemed the right
depth for the space I had.

Finally (for the basic design), the wood is 1.2cm (12mm) ply, and the spacing
between boxes is also 1.2cm.

Calculating Sizes

Given the above, you can work out what sizes of wood you need.

Everything is on a 20cm x 20cm grid and is 30cm deep.  So if the wood had no
thickness then the square boxes (middle bottom for example) would be made from
a piece 40cm x 40cm (the back) and 4 x 30cm x 40cm (the sides).

But then you need to subtract the thickness of the wood (1.2cm on each edge),
so the back becomes 37.6cm x 37.6cm and the sides are 2 x 30cm x 40cm
(top/bottom) and 2 x 30cm x 37.6cm (left/right).

And you also need to subtract the gap, which is another 1.2cm total (0.6cm
each side), so the back becomes 36.4cm x 36.4cm and the sides are 2 x 30cm x
38.8cm and 2 x 30cm x 36.4cm.

     1.2cm <>
             <-             38.8cm                  ->
  --------+  +---------------------------------------+  ^ 1.2cm
  ------+-+  +-+-----------------------------------+-+  v
        | |  | |    ^                              | |
        | |  | |    |               all 30cm deep  | |
        | |  | |                                   | |
        | |  | |                                   | |
        | |  | |                                   | |
        | |  | |                                   | |
        | |  | |                                   | |
  ------+-+  | |                                   | |<> 1.2cm
  --------+  | |                                   | |
  --------+  | |                                   | |  +-+-----
  ------+-+  | |<-                      36.4cm   ->| |  | +-----
        | |  | |                                   | |  | |
        | |  | |                                   | |  | |
        | |  | |                                   | |  | |
        | |  | |   36.4cm                          | |  | |
        | |  | |                                   | |  | |
        | |  | |    |                              | |  | |
        | |  | |    v                              | |  | |
        | |  +-+-----------------------------------+-+  | |
        | |  +---------------------------------------+  | |

Picture of the top right "cube" (a 2x2 box).

All Sizes

Here is a list of the pieces needed for ONE box of each size:

 1x1   1 x 16.4cm x 16.4cm  back
       2 x 30.0cm x 18.8cm  top/bottom
       2 x 30.0cm x 16.4cm  sides

 1x2   1 x 16.4cm x 36.4cm  back
       2 x 30.0cm x 38.8cm  top/bottom
       2 x 30.0cm x 16.4cm  sides

 2x2   1 x 36.4cm x 36.4cm  back
       2 x 30.0cm x 38.8cm  top/bottom
       2 x 30.0cm x 36.4cm  sides

 1x3   1 x 16.4cm x 56.4cm  back
       2 x 30.0cm x 58.8cm  top/bottom  (if the box is horizontal)
       2 x 30.0cm x 16.4cm  sides

 2x3   1 x 36.4cm x 56.4cm  back
       2 x 30.0cm x 58.8cm  top/bottom
       2 x 30.0cm x 36.4cm  sides

Cutting The Wood

I don't have a workshop or bench saw, so this design is driven by the need to
get the wood cut at the local DIY supplies shop.

The advantages of doing this are:

  * You don't need to cut the wood yourself

  * The cutting is very precise (less than 1mm error)

  * The cutting is actually free - you only pay for the wood

The disadvantages are:

  * No control over the quality of the wood, or what cuts are made where
    (eg to avoid knots or shakes)

  * Sometimes they cut completely the wrong size, or do the wrong number
    of pieces at a particular size

  * No control over which way the grain goes

To work around the problems I did everything in two iterations.

First, I got exactly what I needed cut.  That requried two 4'x8' sheets of
plywood (12mm ply for furniture, which has a smoother side, which I put on the
outside of the boxes).  Then I went home and measured and checked everything,
collecting together the pieces for each box.  I made a list of what needed
repeating (because it was the wrong size or poor quality wood).

Second, I used a third sheet to repeat the pieces I was missing, and added
some extra ones to fill up the sheet.  From those I could assemble all the

Box Assembly

The boxes are simple butt-joints, glued and pinned.

The simplest way I found to make a box was to first assemble one using masking
tape along each edge.  That was rigid enough to allow me to "untape" the top
and then glue and nail that to the back.  Next, I did one side at a time,
gluing and nailing it to the top and back (you can rotate the whole box as you
work, because the masking tape keeps everything else fastened together).
Finally, I glued and nailed the bottom.

During assembly think about how thing will look at the end.  It's important
that the edges between top/bottom and sides line up exactly.  It's much less
critical that the back line up exactly (because you can't see that when in
use).  This lets you correct for any small errors in size.

Also, check for warped ply.  That may need extra nails to hold in place.


Use filler to fill holes (imperfections and nails) and then sand.

Because I was working indoors, I tried to find the "least smelly" finish
possible.  I finally went with a water-soluble stain (which had some solvent,
but dried very quickly) and a "green" linseed-based treatment (which also
drived very quickly).

After the treatment I did an additional very light sanding.

The end result looks very "raw".  You might prefer to use varnish for a more
polished look.

I drilled holes *after* finishing.  The washers covered any rough edges.  But
it might be better to do the drilling first (less risk of damaging the finish
as you work).

Connecting Boxes

The bolts that connect the boxes are 2" long, 3/8" diameter.  They need 1cm
holes which should be drilled with a wood bit (one with a "point" so that you
can position it exactly - it's important that the holes line up correctly).

I used two kinds of washers - larger ones either side of the wood, and then
smaller ones to "pad" the gap between boxes to exactly 1.2cm.  You could try
using a nut instead of some washers for spacing (I couldn't because my bolts
only had threads for half the length).

The bolts are spaced so that they are in the "middle" of a 20cm x 20cm grid.

That means that, ignoring spacing, the holes should 10cm from each side, and
5cm from front/back, and then spaced every 20cm (where needed).  But we need
to include a correction for teh gap, which means that 10cm changes to 9.4cm
(subtracting half of the space of 1.2cm).

Since that's a bit complicated, here's a picture of the top right cube, again:

  --------+  +------^--------------------------------+ 
  ------+ +  | +--- | -----------------------------+ |
        | |  | |                                   | |
        | |  | |   9.4cm                           | |
        | |  | |    |                              | |
       #| |##| |#   X          holes at a "depth"  | |
        | |  | |    |          of 5cm and 25cm     | |
        | |  | |               relative to the     | |
        | |  | |               front / back        | |
  ------+ |  | |                                   | |
  --------+  | |   20cm                            | |
  --------+  | |                                   | |  +-------  ^
  ------+ |  | |                                   | |  | +-----  |
        | |  | |                                   | |  | |
        | |  | |                                   | |  | |      9.4cm
        | |  | |    |                              | |  | |       |
       #| |##| |#   X                             #| |##| |#      v
        | |  | |    |                              | |  | |
        | |  | |   9.4cm                           | |  | |
        | |  | |                                   | |  | |
        | |  | +--- | -----------------------------+ |  | |
        | |  +------v--------------------------------+  | |

IMPORTANT: measure the hole positions AFTER assembling the boxes.  That way
you don't need to worry about subtracting the thickness of the wood in certain

To locate the holes I used masking tape on top of the finished wood, marking
the locations carefully with a pencil, then drilling with a wood drill whose
"point" fixes the location.

That's it.  Hope this helps someone else!


PS Sorry for the mix of metric and imperial sizes.  I used the "natural" sizes
for Chile (where the cutter wants measurements in cm, but bolts are sized in

Comment on this post