João CarreiroNo boring stuff. Impossible is welcome.Whipit

Design exploration · 2025-05-28

Seven ways to turn code into an image

English translation of the Portuguese source. Original directions proposed during the session; no final poster image was recovered.

1. A “Camouflaged Code” Poster with Generative Art

  • Use generative art based on the code itself: turn the structure of its tokens or the entropy of its lines into shapes, curves or patterns.
  • Examples:
    • Different colours for def, if, else, return, etc.
    • Shapes based on indentation, such as denser shapes for deeper indentation.
    • An algorithm that turns each line into coordinates in a drawing.
  • Tools: Processing, p5.js, or Python with matplotlib.

2. Code in the Background, Visible Only Up Close

  • Make a poster with an image, such as a minimalist composition or a portrait, and use every line of code as a background texture.
  • Set the text very small (~3–5pt), in horizontal lines or curves that form the image.
  • From a distance, you see the image; up close, you read the code.

3. Mirrored or Obfuscated Code

  • Style the code so it cannot be read at first glance:
    • Use stylised monospaced fonts.
    • Reverse some sections.
    • Use rot13 or binary encoding for certain sections.
    • Alternate between readable and encoded text.
  • The result: someone familiar with code will try to decipher it and realise that it is real.

4. A Colour Map for Each Line

  • Convert each line of code into a hash value and represent it as a colour (HEX).
  • Make a poster as a colour mosaic, such as 1000 squares for 1000 lines.
  • You could include a discreet key linking line → colour → code, like a private decryption key.

5. Custom Typography

  • Use a font you have made or adapted, with unusual characters: for example, each a could be a small triangle and each b a spiral.
  • The code is there, but only you know how to read it directly.
  • Tools: FontForge, Glyphr Studio.

6. A Vertical or Spiral Codex

  • Print the code like an ancient manuscript, in vertical lines like Japanese characters, or in a concentric spiral from the centre of the poster.
  • This could create a striking, mysterious visual effect.

7. A Mix of Text and ASCII Art

  • Mix the actual code with ASCII-art figures.
  • Or create a larger figure, such as a portrait, animal or symbol, from small sections of your code.