For the meetup #51, the Amsterdam Clojure meetup together with Elmar Reizen hosted a Clojure Dojo. The proposed problem was to write a nonogram solver. This is the presentation I used to introduce the problem to the developers.
2. Rules of engagement
1/2
-‐ We
split
in
pairs
-‐ We
receive
the
problem
to
solve
-‐ We
use
pair
programming
to
solve
the
problem
3. Rules of engagement
2/2
-‐ We
use
the
pomodoro
technique
-‐ After
a
pomodoro,
you
can
switch
pairs
-‐ After
the
3rd
pomodoro,
every
pair
shows
the
code
on
screen
4. Rules of engagement
2/2
-‐ The
goal
is
-‐ To
have
fun
-‐ To
see
different
approaches
-‐ To
exercise
our
Clojure
kung
fu
-‐ The
goal
is
NOT
-‐ To
be
the
best
-‐ To
be
an
a$$
with
the
others
in
any
possible
way
7. Nonograms solver
2/4
A
nonogram
is
a
Japanese
puzzle
where
cells
in
a
grid
must
be
colored
or
left
blank
according
to
the
numbers
appearing
at
the
side
of
the
grid:
9. Nonograms solver
4/4
Your
program
can
read
nonogram
puzzles
from
files
with
the
following
syntax
(EDN):
{
:size [10 10]
:rows [[] [1 1] [1] [2 1 1] [1 1 1] [1 2 1 1] [1] [1] [] []]
:cols [[] [1] [] [3] [1 1] [] [5] [1] [1 4] []]
}
10. Nonograms solver
4/4
The
program
then
prints
out
the
solution.
You
will
use
“_”
to
mark
empty
cells
and
“X”
to
mark
colored
cells:
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ X _ X _
_ _ _ _ _ _ X _ _ _
_ _ _ X X _ X _ X _
_ _ _ X _ _ X _ X _
_ X _ X X _ X _ X _
_ _ _ _ _ _ _ _ X _
_ _ _ _ _ _ _ X _ _
_ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _