Category Archives: Engineering

One Way to Run a Hackathon

A place that I used to work ran periodic ‘Hackathons[1]’. After trying to describe them to various people it became clear that there were a number of different definitions of what a ‘Hackathon’ could (or should) be, so here’s my description, with some thoughts as to why structuring it this way might be a good idea.

Definition?:
What is a ‘Hackathon’? It’s a lot of different things to different people. Most definitions I’ve seen see it as an opportunity to spend a day (often 24 hours, or a weekend) building something that they wouldn’t normally build. The thing built is not necessarily a ‘thing’. It could be a website, and app, some other type of computer program, it could even be an organization. The important thing here is that whatever is created/built is taken from the concept stage to working prototype with at least some useful feature(s) by the end of the hackathon.

Purpose:
Why do you want to have a Hackathon? The ones that I’ve been involved with were an opportunity for people in a software organization to try something a little different for a day. Some reasons they did it:
– Learning a new skill or programming language by building something ‘real’
– ‘Scratching that itch’, solving some problem that they never quite get the time or priority to solve in their day-to-day
– Working with people that they don’t normally work with
– Building a full product (instead of working on a tiny piece of a huge system)
– Building a visualization tool
– Doing something totally different

Those involved generally seemed to greatly enjoy the experience, the chance to work on something different, to push themselves in a new and different direction, and perhaps the chance to receive the acclaim of their peers.

How did it work?:

There was a committee formed to organize the Hackathon. They were responsible for:
– Publicity
– Getting buy-in from management (this had already happened, so this part was relatively easy)
– Convincing judges to judge the competition (These were usually senior people in the organization who were not part of a ‘hack’)
– Organizing the various parts of the event
– The ‘pitch’
– The presentations
– The prizes
– The voting for the ‘Audience Choice’
– A/V and some method for telling presenters their time was up (we used a stop light)
– Finding sponsors for any ‘Sponsored Hacks’
– All of the various other small things required to run an event like this
– Buying the pizza for the party after the presentations

How often did they happen?
– The Hackathons happened once per quarter, generally in the middle of the week

Schedule:

During the weeks before:
– Publicity, book rooms, perhaps plan food, plan A/V, location, etc.

A couple of days before:
– Run the ‘Pitch Session’
– Provide a place (usually a wiki page) for people to join groups following the pitches

The first day of the hackathon (The hackathon would run noon to noon, with presentations 3-4pm the following day):
– Start the hackathon, giving any support where necessary

The second day of the hackathon:
– Collect presentations, so they can be presented in a timely manner
– Collect the judges, so they can judge the competition
– Run the presentations
– Run the ‘Audience Choice’ vote
– Count the ‘Audience Choice’ votes
– Distract the people with pizza while the judges are deliberating
– Help the judges present prizes

Some more details:

A ‘Pitch Session’ is:
– Each person gets one minute to talk about their idea, in the hopes that they can attract a group of people to work on it with them. There was a rule that teams had to pitch something if they wanted to win ‘best hack’, to encourage them to participate in the pitches and include others

How are teams formed?
– Teams can be of any number of people, but we never saw a team of more than 12 people or fewer than 1 person[2].
– To encourage different parts of the organization to work together, each team would be awarded points for each group represented in the team. Including someone from ‘Customer Experience’ or ‘Marketing’ would be worth three points, while including people from Engineering (the expected default for a hackday) would be worth 1 point
– Teams, once formed are added to the hackday webpage, for posterity, and so people can coordinate (and so the organizers can coordinate collecting all of the presentations)

What happened during the 24-hour Hackathon period?
– During the 24 hours of ‘hacking’, people generally put their project work aside and work on their hacks. Some people were given more or less time to do so, depending on their particular management chain and the urgency of their specific work at hand. Of course, if a production issue cropped up in the middle of the day, that would have priority.

How did presentations work?
– Each team was given 3 minutes to present. Luckily, we had a traffic light that was repurposed to give an easily visible signal to presenters when they were running short of time.
– There was generally an audience, of the other people hacking, the judges, and whoever else wanted pizza later

How were they judged?
– ‘Best Pitch’ (a friend of mine routinely won this part, due to his uniquely hilarious presentation style)
– This was generally awarded based on presentation originality and style
– ‘Most Productizeable’ (Which hack was easiest to productize for customers, either internal or external?)
– ‘Best Hack’ (this is the ‘best overall’ category)
– Not necessarily the one that won any other category, but the best overall
– ‘Best Presentation’
– Similar to ‘Best Pitch’, but generally a higher level of polish (and humour) is expected
– ‘Best Sponsored Hack’
– This is like ‘Best Hack’, but restricted to the specific sponsored category
– Hacks would be graded on the criteria above by the judges, IIRC on a 1-10 scale. (There may have been other criteria which were then rolled up into the categories above. That would be up to any event organizers, should someone wish to take these instructions and run with them.)

How did ‘Sponsored Hack’ work?
– This was a later innovation after some people saw the power of the various hacks that had taken place.
– A person or persons within the company would put up money for prize(s) for the best hack that would fulfill certain criteria. There was one hack to link a system to a particular enterprise solution, and one hack to use a new internal API that had been developed
– There was generally only one ‘Sponsored Hack’ per hackathon, and it was a bidding contest to determine which one would be the official ‘Sponsored Hack
– We found that having super-clear criteria about what constituted a ‘successful hack’ was extra important when the prize money for ‘Sponsored Hack’ greatly outweighed the prize money for ‘Best Hack’

What were the prizes?
– Generally gift cards of some type, glory, and a trophy
– The gift cards would be in the $50-100 range for first place. The glory was the really important part.
– Part of the trophy process was the expectation that each group would modify the trophy in some way before presenting it to the next team at the next hackaton
– We had some issues with one of the sponsored hacks when the prize money reached into the hundreds of dollars, because we had not clearly defined ‘When is a hack good enough to be considered a successful hack?’, and the difficulty of the particular hack

What types of ‘hacks’ did you see?
– There were a number of visualizations of various parts of the system
– There were a number of creative front-end interfaces for various parts of the system
– There was a one-line fix to a bug, in a effort to win ‘most productizeable’ by already being in production
– There was a musical number
– Once, the entire team of interns worked together on a hack
– We had an issue with not being able to tell whether our non-bookable meeting rooms were occupied, so one group made some lights with door sensors to quickly communicate down the hall that a room was occupied or not
– And many others…

Pleaes drop me a line if you want to run one of these. They’re a lot of fun, and can really help people get to know others and build an ‘esprit do corps’ in an organization.

[1]Unrelated: ‘Stupid Hackathons‘, which have a *totally* different ethos…

[2]Even the ‘Automated PowerPoint Presentation’ hack required someone to give the presentation.

Energy Efficiency and the ‘Rosenfeld Effect’

Art Rosenfeld passed away two weeks ago. Most people would not remember him, but they have been affected by his simple observation in 1976 that a “proposed nuclear power plant would not be needed if refrigerators were required to be more efficient.”

Here you can see the effects on the energy efficiency in the state of California:

"The Rosenfeld Effect."
“The Rosenfeld Effect.”

Note how the energy expenditure per capita flatlines from the time he made the observation above. It was never one thing, but a lot of little things Turning off lights at night, higher efficiency furnaces and fridges and stoves. Higher efficiency lighting. Better windows.

These are the kinds of things which make a huge difference in aggregate (and he was a master at expressing how much of a difference each of them would make singularly, such as spending 20mins with light switches saves 100 gallons of gas over the weekend). These are the kinds of incremental changes which are slowly reducing the scourge of cancer[1]. These are the kinds of things which can reduce changes to the climate.

Thanks, Art. Let’s keep working and doing things a little more intelligently every day.

Art Rosenfeld, California’s Godfather of Energy Efficiency, Dies at 90

[1]This is a fascinating topic. Check out these graphs: https://www.google.ca/search?q=cancer+mortality+rate+historical

1997: The year they made Contact

20 years ago, I watched Contact in the theater with my family[1]. Tonight, I watched it again, with S.

To me, it held up well as a movie. All the characters were believable, and the science and the effects were well within the normal parameters of suspension of disbelief.

What struck me[2] was how hopeful a movie it was, that our better natures would win out, that our endless curiosity would take us places we’ve never imagined.

[Note that spoilers follow]

It’s always interesting the things you remember 20 years later. “Why not make two, at twice the price?” The destruction scene. The prime numbers sounding so ominously alien from the aether. The speaking through her father. The 18 hours of static[3].

Interestingly, I had remembered that 18 hours of static as being the vindication at the end of the movie, that she was not crazy, that something had indeed happened, but I had forgotten how much it was covered up.

The one (gaping) plot hole I had missed the first time around was the absence of study and testing before a human was sent through the machine. If you look at the history of the Apollo program, you see that it was preceded by Mercury and Gemini, with dozens of sequential missions, each testing new parts, to make sure that each part of the system and plan were well-enough understood to ensure successful missions. The idea that they would build a half-trillion-dollar system in Contact and not fully study it (especially if it’s generating strange EM radiation) before sending a human through it ‘strains credulity’. Even the EM it’s radiating would be a fantastic discovery for humans.

But I can understand how they would cut out things to make a move that was watchable, and which was able to spend its time focusing on the humans in the story.

The alternative view of events that the NSA directory was trying to convince people of at the end of the movie was reminiscent (for me) of the big con[4] at the end of ‘Watchmen’, albeit at the opposite end of the hope-fear axis.

Apparently, like Bladerunner, the ending was supposed to keep your doubt alive as to whether the events she experienced had actually happened. To me, it didn’t, as 18 hours of static (and whatever metallurgical data they could get from the sphere) would be enough to prove the story.

I laughed, I cried, I am full of hope. A new year dawns. Time to use that hope to build something meaningful, starting with some words.

[1]We immediately followed it with Men In Black. I’ll leave it to you to enjoy this juxtaposition.

[2]If you’d read or watched any Carl Sagan, this would probably not be surprising. “The sky calls to us. If we do not destroy ourselves, we will one day venture to the stars.”

[3]I had remembered it as 18 minutes.

[4]In ‘Contact’, it was posited that a billionaire had faked first contact to inspire humans to push themselves outwards. In ‘Watchmen’ (the graphic novel[5]), Adrian Veidt fakes an alien invasion to scare humans into working together against a common foe.

[5]’Watchmen’ the movie simplified the plot to have Doctor Manhattan be the scapegoat. this lead to a much tighter movie, but slightly less appropriate for my analogy, however much he played with space and time.

Why the Headphone Jack Must Stay

Yesterday, we had a date night, and over dinner, we thought “Wouldn’t it be nice to watch Contact? Neither of us have seen it since it came out, almost 20 years ago.”

First, we opened up Netflix, and searched for ‘Contact’. It wasn’t available there, but Netflix said it could show us movies similar to it. (It also showed us ‘Star Trek: First Contact” as an option, more on that later.)

So, we try iTunes. We’re trying it on my computer, because S’s Mac has mysteriously stopped talking to our USB speakers. Fast-forwarding through the standard iTunes bad user experience[1], we eventually figure out how to rent ‘Contact’, the movie, in HD for $4.99. It starts downloading. We hook up the projector, start the movie, and we see the following screen:

This is what happens when you try to use iTunes with your projector.  (Not shown: Our USB speakers stopped working just then, too.)
This is what happens when you try to use iTunes with your projector. (Not shown: Our USB speakers stopped working just then, too.)

The movie that we just paid money to rent will not play on a display that iTunes was more than happy to play on just a couple of years ago.

Think about what just happened here. We went to the extra effort of purchasing a movie rental, and it is treating us like we’re trying to pirate it.

Doing some quick googling, we determine that we might be able to get the SD version to work with our setup, but iTunes won’t let us change from HD to SD (and keeps trying to download the HD version, despite the fact that this will overfill the hard drive).

So, back to Netflix. We eventually settle on Firefly (a really interesting concept, more on this in a later post). Netflix just works.

Or at least Netflix tries to work. Somewhere during this process, my Mac has silently decided that it should no longer talk to the USB speakers. There being no useful way to debug this in the ‘System Preferences’ menu, we end up lugging my sound system from my computer, which has a headphone jack connector like so:

Headphone jack to RCA adapter.  The best way to get sound from your computer to serious speakers.
Headphone jack to RCA adapter. The best way to get sound from your computer to serious speakers.

The headphone jack connect works. We finally start to relax, I start watching Firefly for the first time, then we watch the masterpiece which is Star Trek: First Contact, and go to sleep happy.

Apple has a lot of power, through its massive market share and avid user base. This power can be used for good, such as when it is used to push for selling DRM-free music, but it can also be used for evil, such as when Apple Music deletes music that you have composed.

With the iPhone 7, Apple is using this power to no longer include a standard headphone jack. Now all music, audio, Stripe payments, what have you, will be streamed digitally. It will probably work, it might even work perfectly and for a long time. But at some point, someone will decide to add DRM to that stream, and all of a sudden your music will stop working.

All because Apple decided to remove your headphone jack.

Cory Doctorow also has some thoughts about this.

[1]iTunes standard bad experience:
– You have to search twice in the search bar for it to actually search
– The search function has a pre-defined list of types of media, and it will always show them to you in that order. Compare with the Google search for ‘Contact’.
– If you start downloading a rented HD movie, you can’t switch to the SD version, even if you realize you don’t have enough hard drive space, or the HD movie won’t play because of the HDCP DRM.
– And don’t get me started on how slow it always is.

Burning Man in Pictures 2015 XLVIII: ‘Edal Bump’

When we last saw our heroes, they were flying towards their fiery demise and keeping Curiosity company.

Today, we follow them on their random-walk journey through an eclectic assortment of things that Burning Man has to offer.

First, the (slightly creepy) dancing bears! They seemed just a little *too* happy…:

The (slightly creepy) dancing bears!
The (slightly creepy) dancing bears!

Found! A public service for all of those lost items. Remember, only MOOP[1] is truly lost (and all lost items are MOOP):

Found!  (Only MOOP is truly lost at Burning Man.)
Found! (Only MOOP is truly lost at Burning Man.)

As you may guess, Mad Max is a common decorative theme:

Another example of Mad Max-like architecture.
Another example of Mad Max-like architecture.

This structure seemed to serve as a warning. Our heroes shied away, after being burned by objects like this in the past[2]:

But what it trying to warn you about?
But what it trying to warn you about?

Needing a breather, they stopped at the Steampunk Saloon:

Steampunk Saloon!  (Tents like this are marvelous shade structures.)
Steampunk Saloon! (Tents like this are marvelous shade structures.)

On their way again, they biked along the Esplanade, marveling in the experience:

Riding along the Esplanade, trying to capture the feeling.  (Also, wide 'playa tires' in the foreground.)
Riding along the Esplanade, trying to capture the feeling. (Also, wide ‘playa tires’ in the foreground.)

Along the way, they passed a strangely-named structure, ‘Edal Bump’:

'Edal Bump'.  'What does "Edal Bump" mean?'
‘Edal Bump’. ‘What does “Edal Bump” mean?’

Going slightly further, it made much more sense[3]:

'Ah.  "P-Edal Bump".'
‘Ah. “P-Edal Bump”.’

“Bad Advice”, or “Really Bad Advice”? Which would you choose? Which one would you be more likely to follow? Which would be worse?

Stay clbutty, Burning Man.
Stay clbutty, Burning Man.

And then, in the distance, our heroes spot the destination they didn’t even know they were heading towards, The THUNDERDOME!:

Like a rain god, S spots the Thunderdome off in the distance!
Like a rain god, S spots the Thunderdome off in the distance!

Next time, THE THUNDERDOME! Also, up close and personal with Serpent Mother! Stay tuned!

[1]’Matter Out Of Place’, the reduction of which is central to the ethos of ‘Leave No Trace’, a fundamental ethos of Burning Man. Painstaking inch-by-inch MOOP search and removal is a part of every camp’s responsibility. (Another important part of the ethos is avoiding MOOP, and picking it up anywhere you see it during the festival.)

[2]It does bear an uncanny resemblance to the ‘nuclear waste spike field‘, a hypothetical structure to deal with the very real problem of warning future generations about the problems of nuclear waste.

"‘Spike field’: An early idea from the US Department of Energy in the 1990s. The spikes and their shadows would communicate danger, as would warning signs bearing Edward Munch’s 'The Scream' scattered across the site" - http://www.ft.com/cms/s/2/db87c16c-4947-11e6-b387-64ab0a67014c.html
“‘Spike field’: An early idea from the US Department of Energy in the 1990s. The spikes and their shadows would communicate danger, as would warning signs bearing Edward Munch’s ‘The Scream’ scattered across the site” – http://www.ft.com/cms/s/2/db87c16c-4947-11e6-b387-64ab0a67014c.html

[3]Not to mention why there were so many bicycles in the area (although there could be many reasons for that at the Burn).

Trolley Problem Memes

Trigger warning: Conversation and possibly dark humour about fictional (and possibly not-so-fictional) people dying in car and train accidents.

How do you design a self-driving car to appropriately value human life? Can you use a Facebook group to speed the development of philosophical discourse?

The ‘Trolley Problem‘ is a problem in ethics, first known to be described in its modern form in the early 1950s. Basically, it boils down to the question:

If you have a choice between action and inaction, where both will cause harm, but your action will harm fewer people, is it moral to perform that action?

Interestingly, people answer this question differently, based on how active the action of harm is, the ratio of people hurt between the choices of action and inaction, and other reasons.

The astute will notice that this type of decision problem is a very common one, the most obvious being in military applications, but also vaccines (and invasive health procedures in general), firebreaks, and perhaps the canonical example, automobile design and manufacturing.

This type of decision making has become even more important with the advent of self-driving cars:

Would you drive a car that would choose to drive you into a brick wall rather than run over five pedestrians?

Overall, you would think that this would reduce your risk of fatality, but few people would choose that car, likely because it is a classic prisoner’s dilemma[1][2].

What is your self-driving car's ethical system?
What is your self-driving car’s ethical system?

Personally, I think that much of this conversation is sophistry[3]. If one is truly interested in preserving life, the solution is not to convince self-driving cars to kill different people, but perhaps to have more stringent driving training requirements, to invest in fixing known problem intersections, to invest in better public transit.

So, if these conversations are not useful for anything else, they must be useful in and of themselves, and therefore must be Philosophy[4]!

One of the places that these conversations are occurring is the ‘Trolley Problems Memes Facebook page‘[5].

Now, you can argue that this page is purely for entertainment, but I think there’s a lot more hidden there. There is a fomenting and interchange of ideas, much faster and more fluidly than at any time in history. The person who writes the next book[6] on the ethics of decision making could well be influenced by or be an avid user of a site such as this one.

They may have started with Rick-rolling, but image macros are helping the advancement of human knowledge. Stew on that one for a while.

And while you’re thinking about that, something which ties it all together[7]:

"The creator might argue that his robot is an 'individual', capable of his own decisions, while the opposition would say that he (the creator) is responsible for the algorithm that led to the action. Imagine this happening - it would give birth to one of the greatest on-court debates ever." From Patrice Leiteritz via Trolley Problem Memes
“The creator might argue that his robot is an ‘individual’, capable of his own decisions, while the opposition would say that he (the creator) is responsible for the algorithm that led to the action. Imagine this happening – it would give birth to one of the greatest on-court debates ever.” From Patrice Leiteritz via Trolley Problem Memes

[1]If everyone cooperates, overall they will receive a better result, but if any one of them betrays the others, they get an even better result, but everyone else’s result is much worse. This theoretically leads everyone to betray everyone else, leading to everyone having a worse overall outcome.

[2]People also like the feeling of control.

[3]Check out the article. Apparently, the Sophists were the first (recorded) right-wing think tanks.

[4]My undergrad Philosophy 101 prof. made the argument that because philosophy was not useful for anything else, it must be inherently be useful (and that that was better).

[5]Dark humour. You have been warned.

[6]And it might not even be a book! A blog post, even! 😀

[7]Not a deliberate pun.

How do You Think Before You Speak?

I’ve talked a lot about the speed involved and possibly required for retorts and humour, but not all conversation is retorts and counter-retorts[1].

For example, you’re giving a speech or lesson, and someone asks you a question. Many of the same tactics are helpful. It’s helpful to know your audience, to have an idea of their background(s), which types of words will work best for explaining things, and to have an idea of what they perceive the relative level of hierarchy is between you and them.

But once you have an idea of these things, what do you do?

This trigger for this post was an article reporting on Jon Stewart talking about how Hillary Clinton pauses for a few seconds between a question and when she answers[2]:


…“It’s — look, there are politicians who are either rendering their inauthenticity in real enough time to appear authentic, and then their are politicians who render their inauthenticity through — it’s like, when your computer … if you have a Mac and you want to play a Microsoft game on it …”

AXELROD: Yes, yes.

STEWART: … and there’s that weird lag.

AXELROD: Yes. No, I mean …

STEWART: That’s Hillary Clinton.

AXELROD: … that’s a big problem. There’s like a seven-second delay and all the words come out in a perfectly …

STEWART: Right.

AXELROD: … politically calibrated sentence.

STEWART: Right. Now, what gives me hope in that is that there’s a delay, which means she’s somehow fighting something. I’ve seen politicians who don’t have that delay and render their inauthenticity in real time, and that’s when you go, ‘That’s a sociopath.’

So, when you’re answering a difficult question, do you pause? Why? For how long?

For me, it depends on the type of question. For emotionally difficult questions, some of it is finding a neutral[3] perspective from which to address the question, to speak to the person(s) asking the question in a positive and useful way. Sometimes it’s choosing the appropriate emotional outlet[4] for whatever I’m feeling at the time.

For technically difficult questions, it feels much more like assembling a mental model in my head, or choosing between different visualizations/places to start. Parts of this can feel similar to emotionally difficult questions (perspectives vs. visualizations), but to me they feel quite different[5].

So, how does this work for you?

[1]No matter how much bash.org would want you to think so. (Note that outside that page, bash.org is quite unfiltered internet. You have been warned.)

[2] Article is here. In a footnote because the editorializing in the article is outside the scope of this post.

[3]In the emotional perspective sense.

[4]This is often laughter for later when I’m alone. I mean, really, we’re just ape-like creatures who don’t know the first thing about ourselves. Why are we getting all angry about minutiae? This can only be funny.

[5]Now that I say this, I’ll have to watch next time. But something getting my back[6] up really feels different from trying to focus and assemble a visualization. Maybe being able to relax for all types of questions would make them more similar.

[6]Back hackles?

Slide Rule Accuracy and F=ma

Earlier this week, we were talking about drawing a Large diagram as one of the lasting and important things I learned in Prof. Collins’ Structure & Materials course.

Here are some of the others:

‘Slide Rule Accuracy’

This is the idea that in the real world[1], you’re never going to use more than three digits of accuracy (or four if your number starts with a ‘1’)[2]. Beyond that, things will get lost in the noise, or other inaccuracies, whether it’s budget contingencies, manufacturing defects, or whatever. (It would be interesting to see whether this has changed for manufactured parts with increased automation.)

The ‘3 laws of engineering'[3]:

1) F=ma

Simple, yet profound. When you’re dealing with non-relativistic systems (pretty much all of them), you push on something, it will move or react proportionally. This is not limited to physical systems.

2) You can’t push on a rope.

Also simple, has a number of applications for mechanical systems, but is probably the most ‘Engineer-y’ useful statement for dealing with other people.

3) In order to solve an engineering problem, you must first know the solution.

This one doesn’t really make sense on first blush, but I’ve experienced it. I mentioned earlier that the brain is often a structure that problems flow through, and in a sense this is a statement of that. You’re going to try to fit a new problem you’re looking at into the structure(s) of all the problems that you’ve seen before, and you have a huge advantage if you’ve seen similar problems before, or seen other problems you can apply by analogy.

We also had a ‘notebook’ that we put all of our class notes in, including cut and pasting from technical sheets, and this ‘notebook’ was our open book for the exam. It was a great exercise in focusing note-taking and coalescing your thoughts onto a medium-small piece of paper.

“When someone is paying you $100 for an hour of work, it’s worth paying a few extra cents for a good sheet of paper to give it to them on.”

The course had special ‘engineering notepaper’ that they wanted us to hand problem sets in on. There wasn’t any penalty for not doing so, but the lesson was that a little bit of professional presentation went a long way.

[1]This is when you’re dealing with things of reasonable size. I’m guessing when you’re looking at gravity waves or Higgs bosons, you might be using somewhat more accuracy. But at the same time, you’re probably not really looking at more than the last few digits…

[2]This is one of those subtle things which is actually quite important and powerful. On a slide rule, the portion which starts with a ‘1’ is fully 30% of the length (log10(2) ~=0.301), so unless you use the fourth digit here, you’re losing a substantial portion of your accuracy. There is a better explanation of this here:

[3]For a slightly different set of three Engineering laws, look here:

Draw a LARGE Diagram

Draw a LARGE diagram. When you start, you have no idea which part you’ll be focusing on, so draw it large to start.

In undergrad, we had a Structures and Materials course with Prof. Collins. I owe a lot to that class. It was first year, first term, and it was our first experience with ‘real Engineering’ (with a capital ‘E’).

Collins talked about (along with how to build bridges and other structures) a number of things which you would actually use every day, no matter what types of things you were designing or calculating or planning.

The biggest[1] one is indubitably ‘draw a Large diagram’. Every time I do this, whether it’s on a whiteboard at work, or in my journal[2] at home, it helps far more often than I expect, especially when you’re drawing a teaching diagram, and people are asking questions.

It helps when you’re drawing a semicircle intersected by many lines, with some angles known, some angles not known, and you need to do a bunch of fancy figuring to get the answer[3].

Next time, we’ll talk about some other useful tidbits I learned in that class. Stay tuned!

[1]Ha!

[2]I use notebooks with blank pages. It helps me draw diagrams without extraneous lines, feels freer for thinking.

[3]I think this was a GRE question.

Which ‘Magic Numbers’ do You Use?

I was talking with S earlier this week, and the idea came up for a post about the numbers that I remember and use for estimation. I enjoy the sobriquet ‘Magic Numbers’.

‘Magic Numbers’. They’re considered bad practice[1] in programming, but are such a useful and helpful part of human ‘back of the envelope‘ problem solving[2].

Water:

The ‘Magic Number’ which precipitated this post was the fact that one tonne[3] of water is one cubic meter in volume. Interestingly, this is actually a number of interlocking ‘Magic Numbers’, including: One tonne is one thousand kilograms, water has a density of 1 gram per cubic centimetre (‘density of 1’), one thousand is 10x10x10, one tonne is one thousand liters of water, one liter is one kilogram, etc, etc…

I mostly enjoy using this to respond to ‘I could eat a tonne of this’, or to estimate whether you could fit a tankerfull of oil in an office.

It is commonly known that ice will float on water, because the hydrogen bonds give the water molecules a structure which is more spaced out and less dense than close packed[4]. Also, water has its greatest density of about one at about 4 degrees C.

Density:

Incidentally, hydrocarbons have a density of about 0.7, so the tankerful of oil mentioned above would rather difficult to swim in. This 0.7 is close enough to 1.0 so as to make no difference for most back of the envelope questions. Strong acids are known to have densities greater than one[5], but that’s not really that useful most of the time.

The Earth has a density of on the order of five. Interestingly, while reading this, I learned that granite and quartz have a density of about three, much less than I had been assuming. No wonder pumice can float.

Gold has a density of about 20 (19 and change, when that matters). Osmium and Iridium are the densest, at around 22 and change.

On the list of interesting curiosities, Saturn is the only planet in the solar system known to have a density less than one, about 0.7! This was only useful in winning a scientific trivia contest with TJFN when I was young.

Scientific Constants:

Avogadro’s number is 6e23, Coulomb’s constant is 9e9, the ideal gas constant is 8.314 (I remember that one because it includes pi), G is 6.67e-11, the Planck constant is 6.63e-34. Most of these are useless without things like the mass or charge of an electron or proton. The only one I use is Avogadro’s number, and that’s largely to calculate how much of your body is made up of atoms which were once part of a particular famous person[7].

For atoms, what I’ve found useful is the fact that a proton is about 2000 times heavier than an electron, and that chemical bond distances are measured in Angstroms (1e-10m).

c is 3e8m/s, which is useful for Star Trek and Star Wars-type arguments. One atmosphere is 101.325kPa, or about 30 feet of water (which is important for divers).

Math constants:

Pi is 3.14159, or 22/7[6] to its friends. Pi comes up a lot.

e is about 2.718. e doesn’t come up very often.

log10(1) = 0
log10(2) ~= 0.301
log10(3) ~= 0.477
log10(7) ~= 0.845
log10(10) = 1

With these three, you can calculate all of the logarithms from one to ten, and much of everything else. In high school, we memorized all of the perfect squares up to 100^2, but most of those have fled from memory.

The (x+y)(x-y) = x^2 – y^2 trick still comes in handy, though.

Large Things:

The CN Tower is 553m tall, really only useful in Toronto.

The Earth has a radius of about 6380m, has an orbit of 93e6 miles (150e6km), useful for things like Dyson Sphere and Red Giant arguments.

The Earth is about 6e24kg, has a diameter of about 40,000km (at the equator), axial tilt of about 23.5 degrees (Uranus is the only planet with an axial tilt significantly greater, almost sideways!).

The sun is about 400x larger than the moon, and is about 400x further away, and this is why solar eclipses work.

Conversions:

1.609 km/mi (0.621 mi/km), 2.54 cm/in (by law!), 9/5+32 degrees C-> degrees F.

SGD, AUD, CAD, USD, EUR, GBP are pretty close in value, and are in that approximate order with only a factor of about 2 separating them. HKD has maybe 6-8 times per unit, CNY is in that general ballpark, and JPY has about 100 times per unit.

Miscellany:

My handspan is about 10″, which is very useful for measuring things.

Stories are about 2m tall.

3600s/hour, 86400 seconds per day, the Unix epoch started 1970-01-01, useful if you spend any time coding, or want to know how long something will take at ‘x per second’. (100k seconds per day is a useful gross approximation for many applications.)

And I would be remiss if I left out my favourite physics approximation (from the same class where I learned about Stirling’s approximation):

sqrt(10) ~= pi.

Thank you and good night.

[1]Although, compare some cases where they are considered not quite so bad practice.

[2]They are also almost essential for proper answering of ‘Fermi Questions‘.

[3]’Tonne’ means metric tonne, or 1000 kg. You can tell because it’s spelled in the French way, and SI (Systeme Internationale) was brought in while France was a preeminent country.

[4]I didn’t know what the actual structure of ice was before looking it up. Apparently, it’s tessellating hexagonal rings.

[5]’Add acid to water, like you oughta’, else you may melt the top of your beaker off.

[6]Really, it isn’t, but it’s a useful approximation sometimes.

[7]With some reasonable approximations, I remember it being billions of atoms with each breath.