Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A coloring book of data structures and algorithms
523 points by frwntfwtr on Sept 8, 2017 | hide | past | favorite | 105 comments
I'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).

Here the Selection Sort coloring pages you can print. https://coderscoloringbook.com/selectionsort

And here is how I colored mine. https://coderscoloringbook.com/selectionsortcolored

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/lectures.

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?

Or is it just a fun little break from coding without too much educational value?




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.


> 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/ [2]: https://www.amazon.com/Getting-Started-Electronics-Forrest-M...


Also, "Starting Forth" by Leo Brodie is the earliest computer-related version of teaching with comics I can remember reading. It came out around 1981 and you can find an online version (including most of the original illustrations) here: https://www.forth.com/starting-forth/0-starting-forth/


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


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


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


I remember this going back at least to The Little Lisper, though they more accompany the text than serve as explanations themselves. The aesthetic certainly leaks into the lessons.


Another, from 1978: 'A Fortran Coloring Book' https://archive.org/details/9780262610261



There's also the SELinux Colouring Book by Dan Walsh and Mairin Duffy.


To expand on this from the perspective of a student, I primarily study mathematics but will be pursing a double in math and cs, and I actually enjoy very rigorous (what some people may call dry or intimidating) textbooks in both fields because I am generally quite pedantic. However, that being said, I would love a book like this not necessarily as a main source of the actual information I am learning, but rather as a fun visual aid or activity because I like coloring and actually do it rather often. Further, I think active engagement could provide other kinds of benefits. As the parent comment noted, pictures themselves may not teach you the algorithm in its entirety from scratch, but in interview situations, I can see the possibility of getting tripped up on things that you maybe "kind of" know the answer to, and having vivid diagrams or models in mind that you can jump to (e.g. these pictures) may help with things like recall. I actually find things like this to be immensely helpful in every class, from using mnemonics for memorizing Hiragana, Katakana, and Kanji to breaking down complex proofs of math theorems into discrete memorable steps to give me an intuition for why and how things work, etc. I think this could both be a great supplemental tool for certain kinds of students as well as a very fun book to color in! I will certainly buy one if this idea comes to fruition.


Oh, forgot to mention if you want me to notify you when the book comes out, I put together a simple mailing list at coderscoloringbook.com. Thanks


Specifically with calculus, I found "The Cartoon Guide to Calculus" by Larry Gonick [0] to be quite memorable and fun! Note: There is no stupid referral on this link.

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


I agree on all counts. Thanks for the support!


When it comes to comics, No Starch Press (https://www.nostarch.com/catalog/manga) has manga/comics that describes advanced ideas in a fun way. A Manga Guide to Algorithms and Data Structures sounds like a great addition to the collection


Actually the founder of No Starch reached out to me about publishing this book. Will definitely be following up with him =)


I'll buy it. Please do! I really like the idea of being able to share this with people just getting started who find algorithms intimidating (we're not all math double majors :P). It probably can't serve as a primary source of material but is a great supplement.

Grokking Algorithms by Aditya Bhargava is something I skim for fun occasionally and this seems like a great complement!


Awesome! If you want me to notify you when the book comes out, I put together a simple mailing list at coderscoloringbook.com. Thanks


Thanks! I already signed up!


I second this. Love the idea.


Yes, please do :)


Sorry for the radio silence, Bill. Let's sync up once I have more content and am starting to think about production!


I think it started earlier (around 2008) with Scott McCloud doing a comic describing the architecture of the (then newly introduced) Chrome browser, especially the innovation of running each tab in a separate process - http://www.scottmccloud.com/googlechrome/


Scott McCloud is the Marshall McLuhan of Comic Art!

"McCloud" is congruent with "McLuhan", as "Understanding Comics" is congruent with "Understanding Media".

https://en.wikipedia.org/wiki/Understanding_Comics


glad to learn about him! i appreciate the artistically inclined visually explaining technical things. i also love randall munroe (xkcd author)'s thing explainer.


How DNS works is a favorite of mine: https://howdns.works/


There's another — extremely NSFW — version on Encyclopedia Dramatica. "DNS comic" should find it...


Roger Kaufman's FORTRAN Coloring Book was published by MIT press in 1978.


Yes! Touted on the cover as the "1st & last edition".

There are two versions of page 111, with an apology (and an apology for the apology) if you thought the first was offensive.

There is also Illustrating Basic (1977) and Illustrating FORTRAN (1982) by Donald Alcock from Cambridge University Press. [edited to fix publishing dates]


Thanks so much for the feedback! I think you're right that something like this would be a better learning tool for someone who is new to the fundamentals, rather than experienced software professionals. And I've heard from a few people now about adding code/pseudocode to match the visuals. I'll have to give that a try in the next iteration!


I prefer the visual representation. I find algorithms very hard to read as code, but I'm fascinated by the concepts.


> which, as far as I can tell, started in earnest with Julia Evans

Sacha Chua <http://sachachua.com/blog/> used to do this way earlier than Julia Evans.

No flame though, just wanted to point this out.


I remember really loving Oreilly's "Head First" series of intro web programming books [0]. The way they laid things out in a relatable fashion really stuck with me as a beginner programmer. There's definitely a lot to be said for losing the ego and "dumbing" things down to easily digested formats so long as it's being done by an expert.

https://www.amazon.com/Head-First-JavaScript-Programming-Bra... [0]


YES!!!

I was playing Human Resource Machine and implemented a linked list in assembly without even realising it. Once I did, I first felt so smart that I had to brag about it, and I also thought, "that wasn't so scary..."


I recently started a web comic series on my personal site that covers all sorts of technical topics. I'm having a blast creating it and one my favorites so far is http://randomlyunique.com/plancky/2017/what-makes-a-clock-ti... I wished more content existed between "nova special" and "advanced textbook"


Do you have a link to Julia's stuff?



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...


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.


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 =)


Thanks a lot for the input. It's super useful to hear a different perspective on the idea. I have no clue how much something like this should cost and will probably wait until it's closer to finished before deciding.

I think your idea about providing colored examples is good and have heard it from a few people now so that's definitely worth looking into.

Also I am red green colorblind so thanks for keeping people like me in mind! I'll have to remember to stay mindful of that.

Cheers


Not problem! In my first programming class years ago, I made an assignment about probability with colored cards; one of my students told me he had to cheat because he was colorblind and since then I've done my best to think about those aspects.

Plus a good friend of mine has written numerous books on educational materials for deaf child, so whenever I talk about CS education, she reminds me to keep these types of disabilities in mind whenever I design new material

> I think your idea about providing colored examples is good and have heard it from a few people now so that's definitely worth looking into

It's something I don't think we have a lot of in CS education currently; a current platform I'm building is solely to provide almost a dozen types of exercises (fill in the blank, explain the code, hell even typing exercises) to give students the practice (I feel) they miss out on.

Coming from a martial art background, any technique we learn, we get to drill more than once and we aren't expected to beat MMA fighters after 1 lesson. I view the brain like any other muscle, in that with practice, you get better. My job as an instructor is to make sure you stay motivated and don't learn the wrong way.


You're so right with the analogy to physical training. Practice makes perfect. Also, I don't think its any coincidence that trainers of professional athletes often vary up their regimens with mental exercises. I think both types of people should diversify their training.

Could you expand on what you mean by "make sure you... don't learn the wrong way"? If you'd rather email me, I'm at levi -at- coderscoloringbook.com.

Cheers!


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

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

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=...

[edit: formatting]


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/ [2] Talk -- https://vimeo.com/112319901


Wow, thanks for the references. They definitely lend themselves coloring, that's for sure. I'm always interested in seeing new visualizations of common algorithms.


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.


I'm really glad to hear you like the idea! Thanks for the tips on getting it distributed, too. For now I should probably concentrate on making the right book =). Your suggestions for content are super helpful, too. Will definitely put those on the to-do list. Would you be interested in having the students at your coding school try out some test pages? Cheers!


Absolutely. As I get the school together, I'll reach out to you once I have students. :)


Sounds great! And I'm going to be looking for "beta testers" in exchange for free books as well so let me know if you or any friends are interested. =)


you might be interested in https://www.manning.com/books/grokking-algorithms it is illustrated and very approachable


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


I just ordered this as well, thanks!


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 It was a big hit :-)


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


Roll on you Bears! That's awesome.


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

https://en.wikipedia.org/wiki/Butterfly_diagram

http://patentimages.storage.googleapis.com/pages/US5163017-2...

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

http://shop-uv.blacklight.com/ultraviolet/Neon-Crayons

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

http://www.woodenbooks.com/altair/


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


This will sell


=)


Makes sense. Thanks for the heads up.


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.


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!


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 :)


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

Cheers


Pseudocode? I vote fairy tale description.


Forgot to mention! if you want me to notify you when the book comes out, I put together a simple mailing list at coderscoloringbook.com. Thanks


Already subscribed, thanks!


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.


Thanks for the feedback!


I think this is a great idea!

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

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


Those are cool! Thanks for the link


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


Thanks for the reference !


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;


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


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.


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


Yes definitely


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!


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 =)


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.


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


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...


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 =)


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.


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.


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.


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.


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.


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.


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


@frwntfwtr s/Dykstra/Dijkstra in the survey


Thanks!! Will fix that asap. Cheers


Isn't this just a modernization of old Dutch spelling of "ij"?


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


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.


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


Looks great. I would buy it.


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


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.


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!


Sure, I'll send an email.


1. Pick a number.

2. ???

3. Color the rest of the algorithm


awesome, it will make understanding data structure fun.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: