Code as Art
The article explores computer programming as an art form, emphasizing its aesthetic potential alongside functionality, highlighting examples like generative AI, esoteric languages, and contests celebrating unreadable code.
Read original articleThe article discusses the concept of computer programming as an art form, highlighting how code can be used not just for functional purposes but also for aesthetic expression. While programming typically serves practical tasks, there are instances where the primary goal is to create visually or conceptually appealing works. Examples include generative AI applications and platforms like dwitter.net, where short JavaScript programs generate intricate visual art. The piece also touches on the readability of code, emphasizing that while functionality is crucial, the aesthetics and elegance of code are increasingly valued. It mentions the International Obfuscated C Code Contest, where programmers intentionally create unreadable code, and explores esoteric programming languages that prioritize aesthetic qualities over traditional programming norms. The article concludes that programming can be both a medium for artistic expression and an art form in itself, reflecting the creativity and individuality of programmers.
- Computer programming can serve both functional and aesthetic purposes.
- Readability and elegance in code are important, alongside functionality.
- Esoteric programming languages often prioritize aesthetics over practicality.
- The International Obfuscated C Code Contest celebrates unreadable code as a form of art.
- Code can be considered a medium for artistic expression, similar to traditional art forms.
Related
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
Where should visual programming go?
Visual programming enhances software development by integrating graphics with traditional code syntax. Advocates suggest using diagrams alongside code to improve understanding and maintain cleaner code, aiming for a harmonious coexistence of text and visuals. Luna explores a dual representation system where diagrams complement textual coding, similar to game engine scene management.
Beyond Clean Code
The article explores software optimization and "clean code," emphasizing readability versus performance. It critiques the belief that clean code equals bad code, highlighting the balance needed in software development.
Why Does Everyone Hate Haskell, Jazz, and Pure Math?
The article argues that Haskell, jazz, and pure mathematics, often seen as elitist, are crucial for innovation, leading to practical advancements in programming and music, benefiting society overall.
We need visual programming. No, not like that
Visual programming struggles to gain traction as it attempts to replace code syntax instead of focusing on developers' actual visualizations, such as state transitions and memory layouts, requiring better integration and usability.
When I have thought long and hard and really truly understand how to implement a solution to some tricky problem, I have often broken it down in my head into conceptual functions that make it easy to understand how it works. These conceptual functions often map on to functions in the code. Physically writing out the code is equivalent to saying to someone (and the computer!) "hey, you can think about this problem like this".
It's similar in nature to a mathematical proof. Sometimes when I'm reading someone's code, I see a seemingly difficult task accomplished in a few simple lines. When I pore over those lines, I have a lightbulb moment. The same can happen when reading a mathematical proof. In Lockhart's brilliant essay A Mathematician's Lament[0], the author talks about teaching the formula for the area of a triangle to school students. There is a brilliantly simple and pretty proof of the formula (in the case of unslanted triangles) on p.3. Looking at this diagram is like looking at the code implementing an ingenious short algorithm for solving a thorny problem.
I see a lot of discussion about readability in the sense of making the code as easy as possible for another person to understand with as little thought as possible. And that's very valuable. But I think there's also a lot of value in occasionally encouraging the reader to think in a new way.
[0] https://worrydream.com/refs/Lockhart_2002_-_A_Mathematician%...
┬──────────
┼─────┬────
┼─────┼─┬──
│ ──┬─┼ ┼ ┬
│ ┬─┼─┼ │ │
│ │ ├─┘ │ │
│ ├─┘ │ │
└─┤ │ │
└─────┤ │
└─┘
graphical notation for the predecessor function λn.λf.λx.n(λg.λh.h(g f))(λu.x)(λu.u) on Church numerals. The others use the freedom in formatting of regular C code to depict a (binary) lambda calculus interpreter shaped like a greek letter lambda, or a Hilbert curve generator shaped like a Hilbert curve.For example this program, which approximates the decimal digits of pi while having source code formatted to look like a circle:
Making something that really works in this form both involves a creative insight (What's the story that makes this format shine? What's the code that our characters are building?) and some technical nuggets (writing scripts+tools that generate git history and/or github/gitlab/whatever API calls, acting as multiple parties).
I love programming. But I'm a CTO. My job is to make sure business goals are met through tech - not the other way around. I'm OK with this, but part of me always found it sad.
Now, if you add the possibility that AI will replace programmers at some point in the future (I'm not on the hype train, but I definitely acknowledge the technical possibility that this could happen at some point in the future), and if I think a bit further and assume humanity will figure it all out and we'll all have more time for our hobbies, even then, what use is my hobby of programming? When all it was ever good for was to achieve business goals?
It's refreshing to think it's really not. That it can be art, human self expression, the exchange of ideas, experiences and feelings, a source of joy for me and others. I feel more OK about the future than before I read this, even though the notion wasn't entirely new to me.
Some interesting parts were about the metaphors that people use to make sense of 'pretty' code (is code like prose? like poetry? like maths? like architecture? are any of those craft activities?), and about the role of tools (from IDEs to languages) in affecting what we consider to be nice or not.
Not aesthetically, visually.
Article has some pretty great links.
Programming and aesthetics (Art) are probably the two things that itch my mind the most.
There's a certain type of mindset that people that do and participate in creative programming/digital art have in common with other passionate/creative types. Part of it is the discovery, the inquisitiveness, the plasticity, and the unexpected.
In general sarcastic prose. When you focus more on the creative side you get the general purpose dynamic, memory managed languages. Just make something cool. When you focus more on the comp sci side you get the strongly functional languages, Haskell, Ocaml. And if you mix them together you get lisp.
Visual text part is something a linter should take care of for practical reasons.
One thing I touched on in my talk was the idea that code is an art form that expresses the values of the artist by making something new possible in the world. The artist is saying "this should be possible for people to do" and then makes it so. I think that's really cool.
[1]: https://istigkeit.xyz/static/writing/essays/hello_artworld.p...
Code can be beautiful in its own right, regardless of syntax. "clean" and/or well-formatted code is nice, but the real beauty comes from the algorithmic logic and structure.
1. I read code, understand logic and appreciate it like an art and
2. I read code, try to understand the logic and move on
One thing is crystal clear, those who love coding do not consider it less than an art.
P.S. There is no need for dark mode feature on the website
>What does an algorithm look like?
I like to at least pretend that I'm a visual person (have to justify my BFA in graphic design _somehow_), and usually reach for:
- https://www.blockscad3d.com/editor/ (a Blockly version (think Scratch) of the 3D programming system OpenSCAD)
or
- https://github.com/derkork/openscad-graph-editor
and have been funding the guy behind http://nodezator.com/ for a while now. I suppose I should try https://ryven.org/ again...
The thing is, the ability to express complexity is sharply bounded by display size (and maybe some aspect of human cognition such as the gestalt theory about the number of objects which may be perceived at a glance) --- for a textual program, one has an essentially infinite 2D canvas which scrolls up/down --- for a visual program questions of which direction one moves and how much arise. Literate Programming as advocated by Donald E. Knuth at least allows one to add a TOC, Index, and suitable hyperlinks and so forth:
https://terrastruct.com/blog/post/draw-software-architecture...
If one tries to manage complexity by using modules, then one gets back to the textual representation one is trying to escape from --- it's just wrapped up in pretty coloured blocks and/or connected with lines.
And of course, there are the cautionary collections such as:
https://blueprintsfromhell.tumblr.com/
https://scriptsofanotherdimension.tumblr.com/
and one wonders if principles such as: https://terrastruct.com/blog/post/draw-software-architecture... would help.
I really wish that there was a desktop version of Blockly which could import arbitrary Python libraries....
Related
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
Where should visual programming go?
Visual programming enhances software development by integrating graphics with traditional code syntax. Advocates suggest using diagrams alongside code to improve understanding and maintain cleaner code, aiming for a harmonious coexistence of text and visuals. Luna explores a dual representation system where diagrams complement textual coding, similar to game engine scene management.
Beyond Clean Code
The article explores software optimization and "clean code," emphasizing readability versus performance. It critiques the belief that clean code equals bad code, highlighting the balance needed in software development.
Why Does Everyone Hate Haskell, Jazz, and Pure Math?
The article argues that Haskell, jazz, and pure mathematics, often seen as elitist, are crucial for innovation, leading to practical advancements in programming and music, benefiting society overall.
We need visual programming. No, not like that
Visual programming struggles to gain traction as it attempts to replace code syntax instead of focusing on developers' actual visualizations, such as state transitions and memory layouts, requiring better integration and usability.