

How I explained MapReduce to my Wife? - shekhargulati
http://whyjava.wordpress.com/2011/08/04/how-i-explained-mapreduce-to-my-wife/
Yesterday I gave a presentation at Xebia India office on MapReduce. It really went well and audience was able to understand the concept of MapReduce (as per their feedback). So, I was happy that I did a good job in explaining MapReduce concept to a technical audience (mainly Java programmer, some Flex programmer and few testers). After all the hard work and a great dinner at Xebia India office I reached back my home. My wife (Supriya) asked me “How was your session on …” , I replied it went well. So next she asked what was your session all about (she is not in software/ programming field)?  I replied MapReduce. MapReduce !! what is it? She replied “is it something related to geographical maps?” . I replied No No.. it has nothing to do with geographical maps. So, She said what is it? .Hmmm… I said lets go to Dominos (A pizza chain)  and I will explain it over the pizza table. She said great and we went to pizza shop.
======
yummyfajitas
The explanation I gave to my mom:

We want to count all the books in the library. You count up shelf #1, I count
up shelf #2. That's map. The more people we get, the faster it goes.

Now we get together and add our individual counts. That's reduce.

[edit: created a blog post containing this explanation. Maybe it will be
useful after this HN conversation vanishes.
[http://crazybear.posterous.com/mapreduce-explained-
in-41-wor...](http://crazybear.posterous.com/mapreduce-explained-in-41-words)
]

~~~
wisty
That's the first iteration of the explanation.

Next iteration: But what if you want to count up non-fiction and fiction?
There's just a slightly different "reduce" step, because people have to add up
both of them. You could also break it down by subject, or author, or pretty
much anything else.

Next iteration: Of course, you don't have to just add. You can do anything
that has mathematical properties similar to addition (my mom teaches math at
high-school). You could add up the set of all the offense words found, since
addition and set addition have similar mathematical properties. You couldn't
take the average number of pages, because some people will find more books
than others, and you wouldn't get a fair average. But you might be able to
keep track of a couple of attributes that can be summed up, and use that to
calculate the average after the job is done (for example, total number of
pages, and total number of books).

~~~
lgarron
Why wouldn't you be able to get the average? Return page count + total pages
for each shelf and then take the ratio of "reduced" sums.

~~~
michael_dorfman
Re-read the comment. It discusses exactly what you are proposing.

~~~
lgarron
Oh, I see. I was struck by the direct phrasing of "You couldn't take the
average number of pages", which made me parse the rest of the comment
incorrectly.

------
Uchikoma
Am I the only one who thinks this is bad explanation?

~~~
nandemo
yummyfajitas' explanation is much better.

~~~
Uchikoma
Agreed.

------
yaroslavvb
Suppose you want to count number of books for each author. Mappers take books
from shelves and bring them to shufflers, shufflers make piles of books, one
pile per author, reducers compute size of each pile

------
heyrhett
I'm seeing this as a thinly veiled brag about how your wife makes an awesome
mint chutney. :)

------
lurker19
The most valuable idea in that article is to to ask for permision twice before
launching into an overcomplicated bad analogy to explain something your wife
doesn't really care about.

There is no value in explaining a solution to someone who does not yet care
about the problem.

In this case "what is mapreduce?" is looking just for an explanation of why
these words are being used without their common meaning, not the whole
algorithm.

------
clu3
For developers, this paper contains a nice diagram that explains MapReduce
better than any examples I've found
<http://labs.google.com/papers/mapreduce.html>

------
namityadav
I think the analogy was "meh" at best. For those of us who have any technical
background, the wikipedia explanation is not bad:

"Map" step: The master node takes the input, partitions it up into smaller
sub-problems, and distributes those to worker nodes. A worker node may do this
again in turn, leading to a multi-level tree structure. The worker node
processes that smaller problem, and passes the answer back to its master node.

"Reduce" step: The master node then takes the answers to all the sub-problems
and combines them in some way to get the output – the answer to the problem it
was originally trying to solve.

------
seagaia
This is nice. It's always been tough to explain quickly to friends what
MapReduce does and how it extends to things like Hadoop, without extending to
the abstractions with keys and values and the like.

------
nithyad
Like yummyfajitas's explanation. The original post is too long and
convoluted...

------
wil2k
I use an explanation using elections. Where cities, counties, states etc.
(what applies in your $country) count and aggregate their values upwards until
it's clear who has won on a national level. :)

------
sandieman
Am more surprised your wife cares about technical terms. My wife would never
be this interested along the lines of "don't bring work home".

------
Apocryphon
Why is the rating only 2.5 stars? Is there something wrong with the
explanation?

------
civild
Has it been deleted? Just get a page not found error, can't see it on the
homepage either.

------
JumpCrisscross
Link broken

------
killa_bee
sexist title (and the use of a COOKING METAPHOR for chrissakes). surely this
is why there are so few women in computer science.

~~~
dionidium
It's not notable that he was able to explain it to his wife because she's a
_woman_ , it's notable because she's _not in the field_. This is really pretty
obvious (and explicitly stated in the article).

------
pferreir
Man... seriously... such a waste of characters.

