Turn Your Code Into Pixel Art

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 #code https://www.rubyonrails.ba/single/turn-your-code-into-pixel-art

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles