Near the bottom-right corner of a page of code I was reviewing, there was a regular expression application written in two dimensions, with two parallel horizontal lines crossing two parallel vertical lines so that at each intersection, a one-character variable name was shared.
% %
% %
r r
%%r e asdasd f r%%
s s
d d
f f
s s
d d
f f
%%r g asdasd h r%%
r r
% %
% %
The two-dimensionality made the relationships between the rows and columns more clear while also deduplicating instances of the variables where the lines crossed. I thought it was very clever.
The overall shape and the top/left %%r
s were pretty clear.
I don't remember exactly what was in between, if the %%r
s
were mirrored with r%%
s at the bottom and right,
or if there was something else there, maybe involving #
.