Funny letter puzzle comments in those codes

Funny letter puzzle comments in those codes

Diagrams are the easiest way to understand, and we use pictures to understand problems. Various mainstream programming languages, to some extent, use completely different programming concepts or data manipulation methods, leaving a huge gap in people’s cognition. This article shows some of the pattern comments embedded in the source code, spelled out using alphabetical arrangements. We admire these annotations!

Data Structure Annotation

One of the most common kinds of ASCII art in code is illustrating the shape of a data structure.

The example I started with comes from LLVM:

llvm1.jpg

The layout of a data structure in the Jikes RVM:

jikes.jpg

A tree rotate in Musl:

musl.jpg

Double-ended queue from the Rust library:

rust-deq.jpg

Swift compiler internals:

swift.jpg

Malloc header layout:

malloc.jpg

State Machine Notes

JavaScript profiling:

js-profile.jpg

RPCs in Cloud Spanner:

go-rpc.jpg

I/O stream states:

stream.jpg

Logical Structure Notes

Control flow in an NWScript program being decompiled:

decompile.png

ECC internals:

dalek.jpg

Formatting numbers:

number.jpg

A quantum circuit:

quantum.png

Balancing memory management objectives in an OS kernel:

paging.jpg

Subtyping relations (this is a very cool special case where the ASCII art is also code):

racket.jpg

The format of a DBF file:

dbf.jpg

A lookup table for image processing:

sharpen.jpg

Shape of a color function:

color.jpg

Structure of a URI:

uri.jpg

A very quick tutorial on undo systems from emacs:

undo.jpg

Geometry annotation

Attitude control in the Apollo Guidance Computer (!!!):

apollo.jpg

Image tiling:

image1.jpg

Boomerang trajectories in Nethack:

boomerang.png

Rendering CSS borders:

css.jpg

Quadtrees:

quadtrees.jpg

Speed ​​control in a milling machine:

milling.jpg

Scrolling web pages:

scrolling.jpg

Hope you enjoy these fun code comments too!

Reference comments

http://asciiflow.com/

You might be interested in stream-tree, a library I created for expressing functions as ASCII flow charts in JavaScript.

https://github.com/Widdershin/stream-tree

Here’s an example of a slides app that uses stream-tree.

https://github.com/Widdershin/how-to-write-javascript-without-going-insane/blob/ce84669d40c7109c8c10b93175f5b56bd2079a24/index.js#L55-L108

I did some animated ascii art explanations of basic algorithms a while ago

https://stackoverflow.com/questions/198199/how-do-you-reverse-a-string-in-place-in-c-or-c/21617273#21617273

https://stackoverflow.com/questions/21863609/building-a-binary-heap/43077941#43077941

https://stackoverflow.com/questions/4833423/shell-sort-java-example/22408617#22408617

One more category that seems like it would fit
is describing the hardware that will be controlled by the software.
Warren Creemers drew/gathered a collection of Arduino layouts to add as comments in Arduino scripts:

http://busyducks.com/wp_4_1/2015/11/16/ascii-art-arduino-pinouts/

(github: https://github.com/busyDuckman/ascii-art-arduinos )

This article is reprinted from https://www.techug.com/post/explaining-code-using-ascii-art/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment