Skip to main content

Code as an Art

There are many different topics that I could use as my first topic but I think I'll start with expressing how code is actually an art form.

Woah what?

Yes. Code == Art. In Merriam Webster, Art is described as:

"Something that is created with imagination and skill and that is beautiful or that expresses important ideas or feelings"

This could very easily apply to code. Programmers, like artists use their own distinct patterns and styles when it comes to writing code. To create something with code is no simple task. No matter what language you are using there are many different aspects you have to consider. From what framework to use, to how to optimize it/make it faster. A programmer needs to be able to see the beauty of the program beyond its user interface. They should be able to take pride in knowing that what they have created, is a distinct form of creation that stemmed from their brain. A fully formed program represents a beautiful combination of imagination and skill that could not be possible without the right tools.

To draw out the analogy further, if I were to draw a picture of a man driving a car, I would have several things to consider:

  • Paper or canvas?
  • Pencil, pen, charcoal, pastel?
  • Should the man be happy and looking at us or angry and looking away?
  • Do I need to add detail to the flowers in the background or are they fine as they are?

Very similar questions are asked when starting out writing a program:

  • Sublime Text or Atom?
  • Python, Java, Rust, Go?
  • Should it be built as a web app or as a native application?
  • Should I move that subroutine to a new file or keep it in the main program folder?

There are many parallels between the two and the connections continue to grow as the two fields expand over time. Both fields have a full communities filled with devoted members who are adamant about polishing what they've created and putting it on display for the world. From a museum to Github.

Code like art is several little pieces put together. Just as several thousand strokes of a paint brush created the Mona Lisa, several thousand strokes make up Unix. Both are monuments of their time that helped to push an era of a new form of art.

Also, Code reflects on oneself. It is distinct and reflects the programmer's ideas through how it was written. While many conform to the style guides, a programmer has the option of deviating from the beaten path and having their own code style.

In addition, code is designed to be interpreted (no pun intended) just like a painting. You can look at it for hours and still not understand its meaning. One has to be in the right mindset to fully grasp what the code is trying to achieve. 

Lastly, if you're still not convinced, take a look at the Source code poetry challenge.

Popular posts from this blog

Compiled vs Interpreted

Do you program? Do you write code? Depending on what you're programming or trying to create, you'll need a programming language and depending on the task at hand the decision will need to be made of using an interpreted or compiled language.

What's the difference?

Think about it like this, when you read a book, you read it line by line. An interpreted language does the same kind of thing. It reads the code in a file line by line. Immediately after that line is read, the program reading the code (the interpreter) runs that line of code then moves on to the next one. This is typically done for platforms such as the web.

A compiled language is slightly different. A compiled language would read the entire file of code, and translate it to another format (ex. machine code or another language). This is done by a compiler. Once the code is in another format it can be run. These types of languages are usually used for native desktop or mobile applications.

There is a mix of interprete…

So what is Machine Learning?

It’s mentioned all the time in the news and companies are constantly touting how enhanced their applications are with learning machines. But what does that really mean?
To put it simply, its teaching a machine how to do something. There’s more than one way to do this but most models follow the same method of “Practice makes perfect”.
For example, if I wanted to learn how to draw, I would start with the basics and do simple things. I would practice the motions and gestures that I wanted to get the desired effect. The more I practice, the better (in most cases) I would get. My skill would improve over time. However I could be learning the wrong way and actually be making my drawing ability worse.
Teaching machines is the same way. A machine is given a data set (ex. a series of images it wants to learn how to draw) and it runs a loop that practices its skill at finding patterns amongst the data set (ex. a flower petal is more curves than straight lines, while a sidewalk is mostly straig…

Basics of Graph Theory

Graph Theory is the study of relationships in graphs along with graphs in general. A graph is made up of nodes (points on the graph) and edges (connections between those nodes). Graphs are abstract data types used from making maps to social networks, to finding an actor's bacon number. In the example of Facebook, the nodes would be the users on the network and when two users become friends, a connection (edge) is formed.

A graph can be a simple graph or a multigraph. A simple graph has one type of edge while a multigraph can multiple types of edges.

For example consider the graph below which shows the bike paths between of paths between buildings.

This would be a simple graph because the only type of edge would be the bike paths. However, imagine if we also wanted to consider skateboard paths.

Some paths may be bike paths, some may be skateboard paths and some may be both! In the multigraph above we can represent all 3 types.

Graphs are resourceful in that they can represent diffe…