Ask HN: What's your favorite illustration in computer science?

461 points by gnull ↗ HN
I'm curious to see some examples of what people consider good visual illustrations of CS concepts, from both usefulness and aesthetics perspectives.

315 comments

[ 3.3 ms ] story [ 285 ms ] thread
https://paleofuture.com/blog/2009/3/23/computer-criminals-of...

  "The 1981 book School, Work and Play (World of Tomorrow) features this beautiful two-page spread. Apparently, thanks to computers, there's no crime in the future outside of the computerized variety. The "computer criminal" pictured really doesn't appear to be running very fast. Maybe they're playing a game of freeze-tag. Or maybe that policeman's gun has special settings the author didn't tell us about. I like to believe the former, but that's just me."
The book is full of really cool images like that one of "The Future" as seen from '81
> Computers will make the world of tomorrow a much safe place. They will do away with cash, so that you need no longer fear being attacked for your money.

Hahaha

It's not wrong. You no longer have to be physically present to have your money stolen. It's safer for everyone.
Yeah it's an interesting thought. Credit card scams, phishing, etc. have made new ways of stealing possible.

It's 'safer' as in I think you can claim muggings or burglaries (or losses to these) have reduced because people just don't carry as much cash anymore.

There is even a song written about that :)

> You don't have to rob me

> It's not really worth it

> I only have credit cards

> And I can just cancel them

> Know that you needed cash

> But what the fuck's up with that?

(DOMi & JD BECK - U DON'T HAVE TO ROB ME)

The growing use of Debit and Credit Cards eliminating the need to carry a hundred or so with you at all times for spending/errand purposes without requiring the merchant to take the risk of taking personal cheques was a huge revolution made possible by mass computerisation in the finance industry. This includes the current discussions many governments are currently having about simply not issuing cash money any longer.
Cash money still has its uses. I always carry some for tips and for when a business's payment card reader goes down and nobody knows how to process a card without it.
> when a business's payment card reader goes down and nobody knows how to process a card without it.

Online fraud prevention is the most important part of online card processing, and can't be done offline.

I was paying for services rendered at the optician, and luckily had a wad of cash, but what's the user story there other than wait while they call support? I guess they could have invoiced me.
Online fraud prevention is the most important part of online card processing, and can't be done offline

It was done offline for decades.

All the world's computers talking to one another is far more recent than credit cards.

You are completely right but the core issue is that they don’t want to process credit cards or avoid fees.

Having money with you though is good in emergencies. Carrying a one dollar, five dollar and or a ten / twenty though is always a good idea.

Since the pandemic especially, a number of businesses don't take cash, only cards, particularly some small breweries and independent fast food places in our area (Silicon Valley). I guess if the card readers all go down they are out of business until they fix it.
what a horrible website. Takes over my trackpad so I cannot zoom in on the image.

Where did we go so wrong? as to literally remove UX for no benefit

Youtube user Musicombo has plenty of videos showing different sorting algorithms in action and their runtime behavior under different (pathological) cases:

e.g.: https://youtu.be/vr5dCRHAgb0

I don't remember the original source of this image but it's a comical take on the SDLC, showing how different roles / teams understand what the customer wanted versus needed when building a tree swing:

https://www.amarkota.com/Content/images/portfolio/trees.jpg

I worked in many companies that had it at the door to the Dev department.
In a similar vein, I thought of the comic on how software companies are organized.

https://bonkersworld.net/organizational-charts

is there much truth to these patterns? I've never worked for FAANG so am unaware of their structures.
It was probably very true 10 years ago, for some of them it has become less true
The Microsoft one was VERY true, at least until the mid 2K's. Small groups with lots of middle managers, bad communication, and hatred towards the other small groups.

Dunno how it is now though.

For MS, it was definitely true when there was the policy of firing the bottom 10% every year or something like that.

It created extremely perverse incentives where nobody wanted to help each other or would even go as far as to sabotage other people's work in order to make sure they're not on the bottom. Some managers would hire people with the intent to fire them later.

Apple these days is very traditional with the SLT comprising the various VPs and everyone reporting to them via middle management layers.

In the period where Steve Jobs was not CEO it was a lot more like Microsoft with the various geographical divisions e.g. EMEA, AMR in particular having their own fiefdoms and starting wars with each other. And then of course the ridiculous number of skunkworks projects that would compete with other teams.

Looks about right for Google, but then which software company doesn't look like that?
Honest question for those who have worked at several software companies: What works best? The chart displayed with Google with lots of connections but also a lot of complexity, or the "traditional" Amazon chart?
This is exactly what I thought of coming into this post! I think I actually saw this first nearly 20 years ago and boy oh boy things don't change much (or should I say, people don't change much)
Interesting that what operations supposedly installed was closest to what was actually needed, and only an additional binding away from a complete solution.
Completely orthogonal to yours, but the undergraduate text "Operating Systems Concepts" by Silberschatz et al. has always been good.

Every edition features dinosaurs, which totally relate to the concepts of CPU scheduling, IPC, memory management, etc.

The seventh edition is the absolute pinnacle, as the sauropod family on the front cover enjoy a host of electronic devices from the 80's and 90's:

https://i.imgur.com/5U87Pgt.png

Most of the covers are great.

The list of linux distributions on Wikipedia: https://upload.wikimedia.org/wikipedia/commons/b/b5/Linux_Di...
This is awesome! Man, really amazing to see how linux has spawned an entire forest of different lineages. Wow!
This makes me wonder: 1) Does Wikipedia / Wiki* not have a JS pan & zoom tool for graphics like these and 2) Has no one else made something like that just for this graphic?

Asking because the graphical linux genealogy concept / this illustration have been around for a while, as have JS pan & zoom plugins, and it's totally worth having something like this in that format.[1]

Edit: OK, there is Gadget-ZoomViewer (below), but maybe it doesn't work for SVGs? I don't see the option to open ZoomViewer from the Commons image page for this image.

https://zoomviewer.toolforge.org/index.php?f=Quaternary_Geol...

https://commons.wikimedia.org/wiki/Help:Gadget-ZoomViewer

1. See "Expand" tool here: https://digitalcollections.lib.washington.edu/digital/collec...

What you're asking for should ideally be supplied by your Web browser, not by Wikipedia.
Right, I had no problem zooming and panning on Firefox.
Next you’re going to ask for JS scroll bars…
After looking at git commit trees for a while It seems clear to me that there is a glaring deficiency with this linux distros. No Merges!
I have one of these hanging in my living room, they're beautiful!
I like your retro battlestation.

How did you hook your c64 up to an LCD?

Not the GP, but I have a composite / s-video to hdmi converter from ebay. You can get DIN to RCA or S-video (the C64 exposes seperate luma and chroma signals) cables for the C64 fairly easily as well. Picture quality is... fine.
Variations on mean time between failure curves: https://hpreliability.com/wp-content/uploads/2015/09/Failure...

Comparing solutions based on the perceived reliability curves of their lifecycles is useful.

May I add one that I made?

Illustration of QuickSort and MergeSort as two sides of the same coin: http://lkozma.net/images/sort/duality.pdf

I find this somehow both obvious and counter-intuitive, and usually the two algorithms are not presented in this way, as duals of each other.

I wrote up this view in more detail, but the figure above should be self-explanatory: http://lkozma.net/blog/a-dual-view-of-sorting-algorithms/

That is great and should be in every textbook!
There's an important distinction that your explanation glosses over, which is that MergeSort is an out-of-place sort while QuickSort is in-place. As a practical matter, this distinction is important and it makes the two algorithms not quite duals. Your explanation of why we can assume that QuickSort pivots are medians makes sense, but it also glosses over one of the deep insights about why QuickSort works at all, which is that with unsorted data, the choice of pivot will rarely be bad (it will be "near the middle on average.")
Yes, this efficiency-aspect is not captured in the illustration -- while splitting perfectly _by index_ comes for free, splitting perfectly _by value_ needs nontrivial work (median-finding).
Yes and with naïve median-finding comes pathological inputs that hit the worst case O(n^2). Something to watch out for if you’re sorting user-provided input as that could open you up to some silly denial of service attacks!
This is awesome. I think ppl should def share anything they made. As long as its not low-effort shilling... and your contributions are anything but!
QuickSort should be called PartitionSort - it would make this duality more obvious.
How do we understand, inside this model, that merge sort is easily stable but quicksort is not a stable sort?
I worked at several companies that had this poster hanging on the wall back in the day and spent a lot of time staring at it while on the phone. It comes immediately to mind.

https://www.scribd.com/doc/223671868/Poster-Protocolos-1

I have no clue what's going on here. Context?
It’s based off a 1941 short story in which there’s a library of books which hold every possible combination of letters.

The idea is that every story, song, piece of knowledge, etc are in there if you know where to find them.

(And also, every erroneous fact, false story, etc)

De gustibus non est disputandum, but I find these ugly. The icons draw too much attention, and (IMO) are incomprehensible.

They have zillions of products, so I understand that not all their icons can be immediately recognizable, but is there meaning to the colors of icons? I can’t think of, for example, a reason why “Batch”, “CloudFront” and “Glacier” have the same color.

Similarly, is there a language for recognizing icons? I don’t understand why EFS and CloudFront both are stacks of cubes, for example.

I think I would choose the same colour and/or similar shapes for all icons that denote data stores (examples: S3, Glacier, RDS), for example, a different one for compute (examples: Lambda, EC2, Batch), and a third one for connections (load balancer, Route 53, CloudFront)

Also, why are there such subtle differences in some of the colors? Do they mean something?

Finally, if one of your 100+ products is called “S3” and you have to design a recognizable icon for it, how on earth can you not put a big “S” and a big “3” in that icon? It can’t be that they want to avoid text at all cost, as they wrote “Aurora” in an other icon.

100% agree with you. The AWS icon/drawing design kit is just rubbish. It's super hard to read.
I, unfortunately, cannot find an online copy currently.

Knuth's TAOCP's latest published part, Volume 4 Fascicle 6, on Satisfiability contains a number of visualizations that really are amazing and worth just buying a copy of the book for, just to ponder over these images.

The satisfiability problem of whether there exists an assignment of boolean values that makes a given boolean formula evaluate to TRUE is, IMO, truly a fundamental problem in computer science.

Any piece of code with some inputs and outputs can be transformed into a boolean formula (albeit a huge one). This process feels akin to expressing molecules, from simple ones like H2O, to the highly complex proteins that make up much of our Cells, in their constituent atoms and more importantly the atom interactions.

Knuth (EDIT: Actually, Carsten Sinz) takes this concept one step further and produces visualizations of non-trivial boolean formulas that clearly show the regular, both symmetrical and asymmetrical, sometimes fractal-like nature of these formulas.

In my mind, these visualizations are quite powerful and strikingly show the fundamental building blocks of (digital) computation.

Also 4B (1st ed) pp. 300-301.

ProTip: Order the 5 vol set directly from Addison-Wesley, it's much cheaper than anywhere else.

> Knuth takes this concept one step further and produces visualizations of non-trivial boolean formulas that clearly show the regular, both symmetrical and asymmetrical, sometimes fractal-like nature of these formulas.

The visualizations were done by Carsten Sinz.

This is his paper describing the technique:

Carsten Sinz. Visualizing SAT Instances and Runs of the DPLL Algorithm. J. Automated Reasoning, 39(2):219-243, 2007.

https://www.carstensinz.de/papers/JAR-2007-Visualization.pdf

https://doi.org/10.1007/s10817-007-9074-1

Aha! I have edited my post. Thanks for the correction! Beautiful work, looks like something I'd like to play around with as well :)
And that's why I love HN! (sorry for a non-contributing post).
I am lucky to be paid to work on SAT. I wouldn't yet say I am an expert, yet, but it is really a pleasure to do so. Trying to improve on algorithms to solve these problems is truly humbling.

Edit: Fixed a typo.

Im jealous! To me, from the sidelines, people working on SAT are like the experimentally-focused particle physicists of computer science.
Wow, you weren't kidding about those images.

What I found particularly striking about them was how much they reminded me of both neurons and larger brain structures, as well as some of those newer, ML-assisted FMRI imagery.

Probably just coincidence and wishful thinking, but it instills a sense of daydream-like wonder all the same.