Turn Your Code Into Pixel Art
05-Jan-2024 715
The plan is very simple: I’ll parse a Ruby file to collect all token types, assign each token a color, and then render each one as a pixel in a grid. Sounds like a plan, right?If you’re only interested in the script, here it goes. Just run ruby code_picture.rb your-file.rb, and you’ll get your abstract pixel art. I’ll be going over some of the most interesting parts of that code. Stick around, and you might learn something cool.
Turn Your Code Into Pixel Art #ruby #rubydeveloper #rubyonrails #Pixel #code https://rubyonrails.ba/link/turn-your-code-into-pixel-art