Tuesday 20 December 2016

Which Really Useful Boxes stack?

Which Really Useful Boxes stack together?

"Really Useful Boxes" are great. They come in lots of sizes and are used everywhere. The sales literature gives examples of what you can store in them.

But which sizes stack exactly on top of each other?

The list below shows the boxes that stack, grouped by those with the most common size.
(Scroll down for the Python script that was used to group the data).


Length Width (mm)                     Box Name
----------------------------------------------
    395   255     4 litre Really Useful Box (ream of A4)
    395   255     9 litre Really Useful Box (ream of A4)
    395   255     9 litre XL Really Useful Box (7" small)
    395   255    14 litre open front Really Useful Box (shoes)
    395   255    19 litre Really Useful Box (A4 paper)
    395   255    19 litre XL Really Useful Box (LP small)
    395   255    25 litre Really Useful Box (12" x 12")
----------------------------------------------
    710   440    20 litre Really Useful Box (board games)
    710   440    33 litre Really Useful Box 
    710   440    50 litre Really Useful Box
    710   440    64 litre Really Useful Box
    710   440    64 litre open front Really Useful Box
    710   440    84 litre Really Useful Box
----------------------------------------------
    340   200     2.5 litre Really Useful Box
    340   200     5 litre Really Useful Box
    340   200     5 litre XL Really Useful Box
    340   200     8 litre open front Really Useful Box
----------------------------------------------
    480   390    18 litre Really Useful Box
    480   390    18 litre XL Really Useful Box (7" medium)
    480   390    35 litre Really Useful Box
    480   390    35 litre XL Really Useful Box (LP medium)
----------------------------------------------
    600   400    24.5 litre Really Useful Box
    600   400    48 litre Really Useful Box
    600   400    48 litre XL Really Useful Box
----------------------------------------------
    465   270     6 litre Really Useful Box
    465   270    12 litre Really Useful Box
    465   270    24 litre Really Useful Box
----------------------------------------------

The following boxes only have one 'partner in size':

Length Width (mm)                     Box Name
----------------------------------------------
    090   065    0.07 litre Really Useful Box
    090   065    0.14 litre Really Useful Box
----------------------------------------------
    120   085    0.2 litre Really Useful Box
    120   085    0.3 litre Really Useful Box
----------------------------------------------
    155   100    0.35 litre Really Useful Box
    155   100    0.7 litre Really Useful Box
----------------------------------------------
    195   135    0.75 litre Really Useful Box
    195   135    1.6 litre Really Useful Box
----------------------------------------------
    220   100    0.55 litre Really Useful Box
    220   100    0.9 litre Really Useful Box
----------------------------------------------
    245   180    1.75 litre Really Useful Box
    245   180    3 litre Really Useful Box
----------------------------------------------
    355   100    0.8 litre Really Useful Box
    355   100    1.5 litre Really Useful Box
----------------------------------------------
    450   350   21 litre Really Useful Box
    450   350   21 litre XL Really Useful Box
----------------------------------------------
    456   356   11 litre Really Useful Box
    455   356   11 litre XL Really Useful Box
----------------------------------------------
    810   620   70 litre Really Useful Box
    810   620  145 litre Really Useful Box
----------------------------------------------

The following boxes don't stack exactly with any other sized box.

    180   135    1.7 litre folding Really Useful Box
    240   130    2.1 litre Really Useful Box
    430   180    6.5 litre Really Useful Box
    400   350    7 litre Really Useful Box
    520   340   10 litre Really Useful Box
    820   255   22 litre Really Useful Box
    470   342   32 litre folding Really Useful Box
    485   390   35 litre folding Really Useful Box
    520   440   42 litre Really Useful Box
    390   570   45 litre folding Really Useful Box
   1201   270   77 litre Really Useful Box


The Python Script

This section is intended for those interested in how the data was prepared.

The data comes from the table here, and was copied-and-pasted into a text file. The top line was edited to make a tab-separated header row.

The python script was written as an exercise in using Pandas Dataframes. The goal was to read the file, parse, sort, and filter, then group the boxes on external length and width. Although this could have been done manually on this dataset (59 rows), the manual approach does not scale to larger datasets.

Here is the script.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
 Parse the sizes of ReallyUsefulBoxes and group them by external dimension.
'''

import pandas as pd

filename = 'ReallyUsefulBoxesRaw.txt'
list_data = pd.read_csv(filename, sep='\t')
# force a rename of the columns
list_data.columns = ['BoxName','Extl','Intl','Wt']

# ---extract external dimension data into 3 new DataFrame columns:
extList = list_data['Extl'].str.split(' x ')
list_data['Length'] = [row[0] for row in extList]
list_data['Width'] = [row[1] for row in extList]
list_data['Height'] = [row[2] for row in extList]

# Just use the columns of interest
trimmed_data = list_data[['Length','Width','BoxName']]
grouped_data = trimmed_data.groupby(['Length','Width'])
#print grouped_data

# Print out each group: these are the boxes that have the same width and
# height and therefore stack together.
for name, group in grouped_data:
    print '\n------------',name,'------------'
    print(group)

If you found this useful, please leave a comment or share this blog with others.








Thursday 26 May 2016

Tin Overlords are here

Yesterday I blogged about what work is going to look like in future, as robots start to take over.

I must correct myself. This isn't the state of work in the future. It is now.

Several articles in the news caught my attention: the first concerns a problem with unskilled workers who are demanding a minimum wage of $15/hr - they are pricing themselves out of the job market and are likely to be replaced by a Japanese robot. Do read the comments at the foot of the article - lots of commenters appear to have understood the real issue here.

The second relates to that popular thing of driverless vehicles. Volvo is pioneering its technology inside the mining industry - where there is the most to gain from driverless vehicles in terms of better human safety. But Volvo is also working towards driverless cars on the roads. In five years' time, we should expect every new car has some form of automated driver mode built in. And by the time I'm old and grey, my grandchildren may well say "I can't believe that people used to drive a car. It's so dangerous!" 

Tuesday 24 May 2016

Our new tin overlords


In yesterday's Guardian was an article about the impending takeover of robots, as described in a new and rather depressing book "Age of Em". I won't spoil the armageddon-scenarios for you. Curiously, I am reading another far more encouraging book on a similar subject, "The Second Machine Age" by MIT professors Brynjolfsson and McAfee.

Both books, consider the implications to us humans on the nature of our work. We are at a fascinating and scary point in history where computers are starting to do things that we previously thought they could never do: drive cars, play strategy games, write news. The latter book describes how we are at the start of a new industrial revolution: the coming years will transform our world in ways we couldn't possibly imagine. What will this do to our jobs?

Useful analogies can be learned from history, particularly the Industrial Revolution. Today we don't think much about the massive societal impact that the steam engine and the electric motor had on the jobs these machines replaced.  In the long term, our society will be better off. Yet it is clear that the digital age is threatening to replace today's jobs on an unprecedented scale. Will there be such a thing as a human taxi driver in 20 years? Will it be possible to do any shopping except online? Will the robots really do everything that humans do today, as suggested in the Guardian article and its book?

Fortunately, Brynjolfsson and McAfee quote some studies that look at the sorts of skills that are affected by computerization ... and the sorts of skills that are less likely to be replaced. Whilst the findings are scary, it is important to look for the good news rather than the bad news.

First, robots are very good at doing repetitive, mundane boring and predictable tasks repetitively, predictably and for long periods of time without complaining, without joining unions or without needing tea-breaks. The more mundane, the more suitable for automation. Already, robots have replaced many of these on the production-line.

Second, people are very good at interacting with other people. Any job that requires empathy, understanding, diplomacy, reading-between-the-lines, comforting, or training stands a good chance of being a future-proof job. Nursing and other healthcare jobs will reap massive benefits from technology (like this example), but I cannot see a day when suffering humans would prefer the care of a robot to the care of another human being. Jobs with a strong social element such as bar-tending, waitering, mentoring and hairdressing are also likely to survive.

Another area of work that is unlikely to be replaced by technology is the creative realm. Whilst technology will continue to cause big changes to these roles, they are unlikely candidates for electronic replacement. Jobs in education, the arts, and anything involving aesthetically pleasing results such as architecture, gardening, or cooking, have good long-term prospects.

Other roles may be more affected by technological change. As robotics and the technology we clumsily call "3D printing" develops (we should call it sculpting instead), so it will become possible for entire buildings to be constructed by a collection of machines. Construction sites are among the most dangerous work-places, and would therefore benefit greatly from robotics. Whilst a human-free building site is still in the realms of fiction, there are already machines making inroads into this industry.  The world of "unskilled labour" is perhaps the one where men will have to compete most aggressively with machines in the next decade. Yet with all the advances of mechanical mini-diggers and power-tools today, there are still plenty of jobs that are done by hand: the flexibility of a labourer over a machine is hard to beat.

So where does that leave us as a society of humans? Are we being replaced by our new tin overlords? No - we are far too inventive for that.  Our hope - and indeed the flavour of our future jobs - lies in the things that make us human, the things which separate us from robots: our creativity, our compassion for each other, and our ability to do things that have never been done before, like creating robots to do some of our work for us.


Thursday 21 April 2016

The First Floor (Wivenhoe House)

Americans don't share the same language as English people. A North Carolinian recently tried to explain to me what a "biscuit" is. It looks like a heart attack in a giant scone, not a biscuit.

Americans also confuse the "ground floor" with the "first floor". I would like to explain what a ground floor is, and finally settle this matter of confusion for our brothers beyond the Atlantic.

This is a picture of Wivenhoe house. You can see the ground floor, tucked under the stairs. The ground floor is where the kitchens are and where the servants work. The Englishman' castle of a home would have a ground floor, but he would rarely set foot in it.

The first floor is at the top of that magnificent flight of steps. It is the first place he will step when he
enters his castle (unless it is raining, in which case he might enter via the stables, but that is another matter). You will notice that the height of the first floor is grand. Here are the rooms vulgarly called "reception" rooms today: the smoking room (where one has a smoke whilst waiting for the ladies), the lounge, usually a dining room, and a drawing room for (withdrawing at the end of the evening).

Above that is the second floor. Here are the bedrooms for the Englishman and his guests: sizable rooms, grand decor, and with picture-windows large enough to show off the splendour of his land to his guests that they might be impressed by his grandeur.

The floor above that, the third floor, is where the children and their nanny live. In some homes some of the staff may share this floor. However most of the servants are accommodated in attic rooms above that.

The concept of a ground floor is perhaps alien to the modern American architect. However, it is not a cellar (I believe you call them "basements", to set them apart from "apartments") as it is not underground. Cellars are for coal, and for storing food and wine. Especially wine. The ground floor is not a cellar, nor is it the first floor, so it is perhaps understandable that Americans have failed to grasp why our buildings have a ground floor.


Wednesday 9 March 2016

Can I be 21 forever?

One of my colleagues celebrated a birthday yesterday. To maintain the illusion of youth, he suggested that we start counting years in hexadecimal rather than decimal.

Hexadecimal (counting in Base 16) is used a lot in computing. Hexadecimal is used to represent numbers to the programmer, which are stored internally with 4 binary bits (2 to the power of 4 is 16). Instead of decimally counting 8,9,10,11,12,13,14,15,16 etc, hexadecimal numbers increment as 8,9,A,B,C,D,E,F,10, etc. In maths terminology, we describe this as counting in base 16 (sometimes called radix 16).

Although most of the world counts in base 10 (decimal), other bases have been used historically as well: from base 12 we get the concept of dozens, 12 inches in a foot, and 12 old pennies to a shilling. 12 is very useful for trading, cooking and measuring because it can be divided by 2, by 3, by 4 and by 6 (whereas 10 can only be divided by 2 and by 5). The sexagesimal system (base 60) originates in ancient Sumeria, and is still used today on our clocks and in the way we keep time.

The most important question in the world is of course whether I can remain 21 for the rest of eternity. Can I be 21 forever just by changing the base of my counting system?

Most people are happy to use decimal until their 21st birthday. Upon reaching 22 (decimal), most people prefer not to divulge their true age in polite conversation. So, can I write my age as "21" by assuming a different base system?

In the tables below, each column represents a different base system: on the left is decimal (base 10), followed by base 11 and base 12. On each row is the same number (e.g. the same number of elapsed years) but represented in that base system.


So, I could celebrate being 21 (in decimal), then a year later I could celebrate being 20 (in base 11), then a year later I would be 21 (in base 11). I could continue doing this, being 20 then 21 in each subsquent base system ... which would confuse my friends, so it might be easier to be 21 for two years at a time.

By the time I get to my 60's I should really be counting in hexadecimal, which is quite nice really, because I'll still be in my '30s (hex) when I'm 63 (decimal).

For practical purposes, however, lying about one's age is hard work. I'm relaxed enough to tell people how old I really am, and just use decimal for everything - especially inches and minutes.*

* You will turn 11 million minutes old about 2 hours 40 minutes into the day before your 21st birthday (assuming counting in base 10).

Sunday 10 January 2016

A Christmas Present

What does one buy for the person who has everything?

My brother doesn't have everything. But he freely confesses that he has too much stuff. Like me, he is great at starting things and not finishing them off. He has a dozen kits part-built. He has a number of started projects, including various aspects of his garden railway.

In an attempt to regain control of the stuff-problem, he made a choice this Christmas not to ask for more stuff. This meant not asking for the things he wanted - because the thing he needed more than anything else was a bit of getting-on-with-it, and a bit of time.

Cuff-links make a good present for a man in his forties, because they are small. Biscuits and other edibles are good, because they can be shared, and they don't cause a storage problem. A matching pen and pencil: "just the thing I need - how nice" (Tom Lehrer). But after all the presents have been unwrapped, there is still a downer when I look to see if there are any more presents under the tree and realise, like an 8-year-old, that I didn't get that thing I had hoped for. Despite our logical reasoning, we still subconsciously set our expectations high, then we are surprised when we bump into disappointment. This is inevitable because of how we have made Christmas into a celebration of receiving gifts. Maybe we should rename it Presentsmas. I wonder if Baby Jesus (whose official birthday, just in case you hadn't worked it out, is the real reason for CHRISTmas) felt disappointed about receiving coins, incense and fragrance when what he really wanted was for people to worship him.

Back to my brother. He didn't want me to spend much money on a present, so he set the bar low: De-ionised water for his live steam locomotive. These iron Dragons are quite fussy about the sort of water they use. 5 litres of the stuff costs £3.50 in Halfords. It's even less exciting than socks. But I had a plan.

Based in the top left hand corner of Wales, Ivor the Engine was a popular children's TV series in Britain when we were kids, and similar dragons still puff and smoke around North Wales today. I stuck the above picture onto both sides of the container and wrapped it. It did the trick. His face lit up like a little boy at Christmas. Best present of the year.