
Show HN: A coloring book of data structures and algorithms - frwntfwtr
I&#x27;m making a coloring book of data structures and algorithms for programmers and students. So far I have a prototype page for a sorting algorithm (albeit a rather simple one).<p>Here the Selection Sort coloring pages you can print.
<a href="https:&#x2F;&#x2F;coderscoloringbook.com&#x2F;selectionsort" rel="nofollow">https:&#x2F;&#x2F;coderscoloringbook.com&#x2F;selectionsort</a><p>And here is how I colored mine.
<a href="https:&#x2F;&#x2F;coderscoloringbook.com&#x2F;selectionsortcolored" rel="nofollow">https:&#x2F;&#x2F;coderscoloringbook.com&#x2F;selectionsortcolored</a><p>A coloring book is not quite  enough to teach algorithms on its own, but I really get a lot from visual reinforcement of what I learn from books&#x2F;lectures.<p>Do you think having coloring pages like this could be a helpful addition to the usual studying approach of textbooks, lectures and online coding practice?<p>Or is it just a fun little break from coding without too much educational value?
======
tw1010
I'm writing this off-the-cuff so don't read too much into it if you don't want
to.

I love this trend of using comics to describe technical ideas (which, as far
as I can tell, started in earnest with Julia Evans). I think it's a great way
to remove some of the scaryness-factor that more serious tomes (like Cormen et
al) are associated to. I don't think the niche is nearly reaching
oversaturation. I think there is plenty of room for these kinds of books in
this space. Personally, however, I probably wouldn't get much value from a
book on the very basic algorithms, like selection sort etc. What I really
would like is a good description of the algorithms and data structures that
are described in more advanced courses, like Fenwick trees or the stuff Erik
Demaine talks about in his more advanced presentations.

If you're not aiming for this to be a book for people who're accustomed to the
basics, however, and more a book for people who maybe know how to code but who
identify themselves more as practitioners than as theorists (meaning they're
intimidated or bored by algorithms) then my main reaction is that the thing
you've shown so far seems to (1) have a great visual appeal, but (2) suffers
in that it does not provide implementations of the algorithms in actual code.
If I think back to myself as a beginner, what I probably would have needed
help with looking at your thing would have been the translation from the
example and little pseudo-code on the left to actual code.

~~~
munificent
> I love this trend of using comics to describe technical ideas (which, as far
> as I can tell, started in earnest with Julia Evans).

Julia deserves a ton of credit, but I think it's also important to remember
whytheluckystiff's "Poignant Guide to Ruby" [1]. Going even farther back,
Forrest M Mims' electronics books [2], which I remember being sold in Radio
Shacks, get much of their fame and familiarity from being hand-written.

[1]: [https://poignant.guide/](https://poignant.guide/) [2]:
[https://www.amazon.com/Getting-Started-Electronics-
Forrest-M...](https://www.amazon.com/Getting-Started-Electronics-Forrest-
Mims/dp/0945053282)

~~~
fapjacks
Forrest Mims III taught me electronics as a teenager. Also Larry Gonick really
rounded out my rusty calculus knowledge with his "Cartoon Guide to Calculus"
[0] This is just the product page, no stupid referral on the link.

[0] [https://www.amazon.com/Cartoon-Guide-
Calculus/dp/0061689092](https://www.amazon.com/Cartoon-Guide-
Calculus/dp/0061689092)

~~~
humanrebar
I was about to post Gonick's guide to physics. Fantastic series.

~~~
smnplk
Wow, he has many cartoon guides (stats, chemistry, algebra, history..) Check
this out [https://www.amazon.com/Larry-
Gonick/e/B000AQ75IY/ref=dp_byli...](https://www.amazon.com/Larry-
Gonick/e/B000AQ75IY/ref=dp_byline_cont_book_1) Thanks!

------
tsumnia
I don't see myself coloring the pages in; primarily as I wouldn't want to use
up any resources. Granted, I'm a 30+ PhD student, so I might not be the
targeted market. The only things I have of differing colors are dry erase
markers.

For a (much) younger audience, I could see the teacher buying this, but in
that breath, they are always looking to not spend a lot (or any) money on
supplies, so a $30-40 coloring book for something that they could find a free
alternative online isn't worthwhile. But, $1-5 per concept might be
worthwhile.

I do, however, love the visualization of your coloring of the page. This could
work via writing the book in a visualized "worked example" format, which is
how I worked through the data structures course I taught over the summer.

In that light, I can see it being very similar to something like Grokking
Algorithms [1], which I did buy because I enjoyed the idea of visualizing the
algorithms (for my students and my own edification).

Final note if you went that route is be mindful of colorblind customers and
look to include something like a pattern difference as well (maybe angle of
coloring the block?).

Overall, I love the idea; my research focus in effective means of conveying
concepts to students, so I'd love to stay informed as you work through it and
might be tempted to use whatever you tricks you provide as additional
exercises when I teach again.

[1] [https://www.amazon.com/Grokking-Algorithms-illustrated-
progr...](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-
curious/dp/1617292230)

~~~
Zanni
Seconding the the notion that your colored-in example is a fantastic addition
and should be included. I had thought of this in terms of The Anatomy Coloring
Book where the coloring is mostly a way to engage with the visual material in
a physical way, which aids recall. But your specific coloring actually
highlights the algorithm in an effective way, making it more clear - and I can
see that a teacher might be able to quickly glance at a student coloring and
see that they did _not_ grasp the concept (by, say, using a distinct color for
each block number throughout, showing no progress through the algorithm). Your
annotations are excellent as well, and the whole thing serves as a great model
of how such a book should be used. Great stuff.

~~~
frwntfwtr
Wow, thanks for the praise! I hadn't heard of The Anatomy Coloring Book before
and it looks/sounds a lot like what I have in mind for this book. Thanks a lot
for mentioning it. Also, I think you nailed it with "the coloring is mostly a
way to engage with the visual material in a physical way, which aids recall."

If you have any suggestions for improvements or content feel to let me know.
And I'm always looking for "beta" testers of the book =)

------
mrexroad
another thing you may find inspiration from are algorithm visualizations
referenced or created by Edward Tufte [1]

"Excellent sparkline-like graphics from Robert Sedgewick, Algorithms in C
(1998)

Sparklines and sparkline-like graphs can also move within complex multivariate
spaces, as in these 9-step sequential results (reading down the columns) in
merge-sorting 5 different types of input files. Four variables and 18,000
numbers are depicted in these small multiples.

[https://www.edwardtufte.com/bboard/images/00027o-2539.jpg](https://www.edwardtufte.com/bboard/images/00027o-2539.jpg)

Here are the results of 7 sequential passes to sort a 200 element file in
bottom-up merge sort:

[https://www.edwardtufte.com/bboard/images/00027o-2540.jpg](https://www.edwardtufte.com/bboard/images/00027o-2540.jpg)

These merge-sort images above are a bit large in order to accommodate the
resolution of a computer screen. But this material can achieve sparkline-
resolutions when printed out on paper.

\-- Edward Tufte"

[1] [https://www.edwardtufte.com/bboard/q-and-a-fetch-
msg?msg_id=...](https://www.edwardtufte.com/bboard/q-and-a-fetch-
msg?msg_id=0001OR)

[edit: formatting]

~~~
abhirag
Agree with the advice of taking inspiration from algorithm visualizations and
would like to add the work of Mike Bostock to the list above --

[1] Article --
[https://bost.ocks.org/mike/algorithms/](https://bost.ocks.org/mike/algorithms/)
[2] Talk -- [https://vimeo.com/112319901](https://vimeo.com/112319901)

------
ijidak
This is excellent. I'm starting up a coding school and would love something
like this.

I think something like this is critical for persons learning how to code that
don't have a strong math background.

Of course they'll need to graduate to more formal methods of learning, but
this would help them to get an initial context before the more formal study
starts.

I don't think this would be an enormous money maker, just because it would
have a very niche audience.

But you might consider having it printed and distributed on Amazon and
anywhere else you can easily distribute this in formal/printed book format.

If you want to do it anyway, you might as well get some residual income from
it.

I could see people paying $30-40 for a book that teaches all of the major
algorithms and data structures in this manner.

EDIT: I'd easily pay $30-40 per student of mine for a book like this. This is
the hardest part, I think, of making the leap into programming, grasping the
abstract concepts behind algorithms and data structures. Statements,
expressions, and language syntax are much easier in comparison.

Also, if you did one that covers hashing, encryption, signing, and key
exchange algorithms. That could even be a separate book on integrity and
security concepts in programming. And I could see that being another $30-40
maybe even $50 buy.

~~~
billhathaway
you might be interested in [https://www.manning.com/books/grokking-
algorithms](https://www.manning.com/books/grokking-algorithms) it is
illustrated and very approachable

~~~
ijidak
Thank you! I'm going to read through this!

------
TuringNYC
This is really cute, and it makes sense! For a fundraising campaign for our
university, I had my kids color in neural network diagrams:
[https://www.instagram.com/p/BM5jaUxB6An/?taken-
by=saifrahmed](https://www.instagram.com/p/BM5jaUxB6An/?taken-by=saifrahmed)
It was a big hit :-)

~~~
frwntfwtr
I'm glad to hear others have used the same approach! Thanks for the
compliment. Cheers

------
DonHopkins
How about coloring in the Butterfly diagrams from the FFT or Viterbi
algorithms?

[https://en.wikipedia.org/wiki/Butterfly_diagram](https://en.wikipedia.org/wiki/Butterfly_diagram)

[http://patentimages.storage.googleapis.com/pages/US5163017-2...](http://patentimages.storage.googleapis.com/pages/US5163017-2.png)

I'd use neon black light reactive crayons, of course! ;)

[http://shop-uv.blacklight.com/ultraviolet/Neon-Crayons](http://shop-
uv.blacklight.com/ultraviolet/Neon-Crayons)

It would be kind of like those Penrose tilings coloring books:

[http://www.woodenbooks.com/altair/](http://www.woodenbooks.com/altair/)

------
iandanforth
Meta: Don't be fooled by a target audience saying "I'd buy this!" Get real
numbers with pre-orders.

~~~
billpollock
This will sell

~~~
frwntfwtr
=)

------
Teichopsia
It is neat and an added learning method. I believe it's called Visual motor
[integration]

Maybe it's just me that I haven't had my coffee yet, but with selection sort,
the part about swap needs an easier explanation.

Edit: spelling.

~~~
frwntfwtr
Just googled "visual motor integration". That definitely is right along the
lines of what I was thinking too. And yes, you're not the only one to mention
the lack of direction in the second page. I'll be updating that one in the
next iteration. Cheers!

------
pera
I would totally buy a book like this. I think if you also added some
pseudocode that would make it much more effective: you could, for instance,
have pseudocode (and maybe some complexity analysis) on the left page, and the
coloring on the right page.

Somehow it reminds me to The Little Schemer :)

~~~
frwntfwtr
Thanks for the tips! The next iteration will definitely have pseudocode, as
that is now a highly requested "feature". =)

Cheers

~~~
jnordwick
Pseudocode? I vote fairy tale description.

------
balletbalance
This sounds like a great idea. I would definitely be interest in a book of
these. You're right that it feels like something you would pair with a
textbook if you're trying to learn. But for me I would just want one as a fun
book to have on my desk at work.

~~~
frwntfwtr
Thanks for the feedback!

------
jazzex
I think this is a great idea!

In this same vein: Machine Learning Flashcards by Chris Albon [1]

[1]:
[https://machinelearningflashcards.com/](https://machinelearningflashcards.com/)

~~~
frwntfwtr
Those are cool! Thanks for the link

------
chrisweekly
Related tangent: "Unflattening" is an absolute masterpiece when it comes to
exploring the relationship between text and imagery.

~~~
frwntfwtr
Thanks for the reference !

------
tamatsyk
I love it and would buy one!

Especially using "comics" style as it was mentioned before. Not only colours
on data structures help to understand the algorithm, but also those nice tips,
lamps and stars here and there. You might call it childish, however as a
student or a child I would rather read a book like that than a typical linux
manual like book.

Here is what I would be looking for on top of this idea (which is awesome): \-
A full list of algorithms from "Introduction to Algorithms" by T. Cormen; \- A
colored mark on algorithms types depending on a problem, let's say search -
green (the greener - the more efficient it is), graphs - blue and so on. The
reason I would like to see it is that it is much easier to look for an
algorithm if I know the color, so I just match the color going through pages;

~~~
frwntfwtr
Thanks a lot for the suggestions! I'm not quite catching what you mean by
color-marking algorithm types... would you be willing to email me and chat
about it? I think it sounds cool. You can reach me at levi ..at..
coderscoloringbook.com

------
kd1
I really liked this idea as an approach to learning algorithms, and i think it
would really enhance people's understanding of an algorithm, because it's
easier when they visualize it like that. But i think this would work better
with younger people and high school students.

~~~
frwntfwtr
Thanks for the input. For more experienced folks, do you think it could be a
nice break from coding just for fun?

~~~
kd1
Yes definitely

------
HeyCholly
I am just starting My Brilliant Career in Programming by taking an intro
Python course. Data structures and alogrithms are somewhere in my close
future. Your sample page on Selection Sort was simple and immediately
understandable. More please!

~~~
frwntfwtr
I'm glad to hear it! You sound you'd make a great "beta tester" for this book.
If you want to send me some colored-in pages with feedback I'd be happy to put
you down for a free book once it's ready! Email me at levi _at_
coderscoloringbook.com and let me know =)

------
jdswain
Could be worth looking at graph theory and graph colouring algorithms. Also
maybe a Turing machine with colours instead of symbols, you could hand execute
the state machine and end up with coloured patterns or even a Lo-res picture.

~~~
frwntfwtr
Thanks for the suggestions! I've marked them in my notes. Graph coloring
algorithms seems like a no-brainer and I really like the idea of state
machines. Cheers

------
dougmccune
I love the idea and would definitely recommend you develop it further. Have
you seen the Climate Change Coloring Book? It did reasonably well on
Kickstarter (raised $24k, although after printing and shipping that might not
leave much) and I just got my copies about a week ago. I ordered 5 to give
some as gifts. I'd easily order a few of yours and give one to my dad (former
coder) and my kids.

[https://www.kickstarter.com/projects/youaremyjoy/climate-
cha...](https://www.kickstarter.com/projects/youaremyjoy/climate-change-
coloring-book)

~~~
frwntfwtr
Thanks for the encouragement. I have seen that book, and ordered one myself as
well! I would be thrilled if my book could match that success on Kickstarter.
To hear you say you'd give it as a gift is awesome, so I'll get to work =)

------
jnordwick
I was expected more comicish less bookish. Basically it looks like you could
have taken these pages from any algo book, even CLRS.

I would have liked to see things more pictorially like instead of boxes with
numbers have flowers of differing height or tortoise shells of different
sizes. Maybe hands replanting the flowers or tree turtles walking to the
correct place.

I've thought about this idea before actually but not really for pedagogical
proposes just for fun instead.

------
gicadin
I would say it depends on the age of the target audience.

I would prefer the colored version of the algorithm, however I would not spend
the time to color it myself.

This is my personal opinion.

~~~
blue1
I don't understand the coloring book concept. I wonder if it is an American
thing [I am from Europe], especially the recently successful "adult coloring
book" concept. Personally I find inconceivable that someone can spend his time
doing this. Unless, of course, it's just a pretty excuse for using B/W
printing which is cheaper than full color, or you put special meaning in the
activity -- apparently some consider it a form of meditation.

Even for kids I have doubts. I remember I once talked to an American 12-year
old that loved to color books and at that time I found incredible that too: in
my european world, coloring books are for pre-schoolers.

------
Jun8
Awesome idea, I'd totally pay for this!

I think the best way to pitch this is to seasoned programmers, who want a "fun
little break from coding" or a conversational item in their cube, etc. If you
can also add in coloring for some standard interview questions (coding or
otherwise, e.g. tree for missionaries and cannibals or the dripping two eggs
problems) it would be a great fun way to study for interviews.

~~~
frwntfwtr
Yea, I'm getting the feeling that it won't be a learning tool for everyone.
The original idea was for it to help with studying for interviews. I still
love the idea of people using them as a fun thing to do, though.

------
spraak
I think seeing how you colored it would make a great poster or book -- i.e. as
someone unfamiliar with algorithms I would buy the colored in book or set of
posters to help me understand them.

~~~
frwntfwtr
I'm hearing this quite a bit. I'm definitely considering releasing a separate
set of colored-in posters/book. Thanks!

------
cristaloleg
@frwntfwtr s/Dykstra/Dijkstra in the survey

~~~
frwntfwtr
Thanks!! Will fix that asap. Cheers

------
newman8r
Awesome idea and nice work. Personally I find these types of conceptual
exercises very useful.

------
but_why
I don't see the point of this.

Children will be better off using interactive teaching aids on a computer.

Adults are more appropriately served with the same, or a decent textbook on
the subject.

Why would anyone want to print this out and colour it? I suppose it might
appeal to immature manchildren, but hopefully that is a smallish market.

~~~
frwntfwtr
Thanks a lot for the feedback. This definitely is not meant to replace or more
appropriately serve learners than the methods you mentioned. Like I said it
would be at most an addition to more established studying approaches, and in
many cases (for mature men) just a fun thing to do/have. Cheers

------
JoshMnem
Looks great. I would buy it.

~~~
frwntfwtr
Thanks a lot! Can I ask, would you buy it for educational purposes or just to
have for fun? Thanks!

~~~
JoshMnem
Both. I'm curious to see what it's like. I organize a programming group in
Berkeley (codeselfstudy.com) and would show it to them to see if people might
be interested in working on algorithms problems during the meetings. I think
that unusual format might make a good conversation starter in the group.

~~~
frwntfwtr
Awesome, that sounds like the perfect place to share it. Would you be willing
to share the beta pages with your group and see if they have any
input/feedback? I'll be sending out more pages to the mailing list soon too so
they can have more than just Selection Sort to try out. Let me know (levi -at-
coderscoloringbook.com) Cheers!

~~~
JoshMnem
Sure, I'll send an email.

------
samstave
1\. Pick a number.

2\. ???

3\. Color the rest of the algorithm

------
anupam001
awesome, it will make understanding data structure fun.

