Ascii Art via the Command Line
Tags: ascii, cli, terminal, programming
Published: 2024-01-02 13:47:47

There is something truly special about creating something visually using technology. The ability to use a bunch of binary digits to make something visually appealing for us humans. It's something so far removed from the original idea behind computer systems that it reminds me of the vast and endless opportunities we have as intelligent beings. That being said, it must be pointed out, the juxtaposition between working in a command line interface, and displaying some sort of art or image by using ASCII characters in said interface that's designed to be text based. Pushing the limits of technology is how we got to this point in the first place.

The American Standard Code for Information Interchange (ASCII) is an encoding standard for communication between electronic devices. It was originally created out of a need for standardizing the communication's sent and received by our devices. It was used to encode up to 128 characters into different 7 bit integers. This was incredibly important and necessary to make our systems uniform and compatible. These days Unicode has taken the place of our standard encoding system and offers millions of code points compared to ASCII's 128, but the concept of using text characters to create art lives on.


Originally, there was an artistic use to ASCII characters that was created near it's inception. It came due to the unreliability and imprecisions of modern day printers at the time. In the 60's and 70's printer technology wasn't nearly as good as it is today, they certainly weren't able to tweet off of their dot matrix printers like we can today with certain models. The resolution for image printing was difficult to get right and often not possible. In turn the idea was born to use dot's and other ascii characters to draw a larger image, producing higher resolution images than most standard printers. 
This is an image printed in 1961 using a teleprinter
![1961 image of dag](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34ek60hju5pp70w7fgix.jpg)



These days ASCII art is much more expressive and free, often created as small ascii characters, phrases or pop culture references. The limits don't have to stop there however, as that is a great area of overlap for art and technology. Pushing the limits of what we have to create things we didn't think we could like creating art inside of our terminal! We can create something small and fun like the fortune | cowsay terminal packages that give you a "fortune" being told to you by an ascii cow.

![fortune cowsay](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99lgfbwlxhv9gdkpnmhh.png)

Alternatively, if you are a math wizard and a programming wizard (AKA knowledge of programming in C), you can make something incredibly complex, like a rotating donut. (I can only show multiple screenshots due to formatting limitations.)


![first donut](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3d98pznucikwput2di7.png)


![second donut](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yuxd560sy4zqda3bcjzm.png)


![Third Donut](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4myzfmunn40trmuez7ho.png)