r/learnprogramming • • 28d ago

Why was programming so quick to accept and adopt AI?

What I mean is, say, in writing or music or video/film, there is a ton of pushback on AI usage, but it seems like programming just kind of accepted and quickly began integrating it. Why is that, exactly? To be clear, this isn't me bashing the use of AI by programmers. I'm just genuinely curious.

One thought I had is that programming seems to have always been much more democratized than other fields, so using AI trained on others' code isn't seen as stealing the way it is in the arts. I'm not an experienced programmer, I'm a hobbyist, but I always see experienced programmers talk about how they sometimes just Google code and copy it when they get stuck. And, as someone who isn't skilled in it, the programming community has always seemed very willing to help. I was in a beginner-friendly programming channel on Discord and I actually asked why these experienced programmers take the time to help out people like me who are just doing it for fun, and the answer I got was basically, "because I remember being a beginner." Do you think that attitude is what made programming so open to AI?

ETA: Wow, I was not expecting this post to get anywhere near this much attention. I'm just some dope who makes games in Godot as a hobby and generally sucks at programming. 😂

547 Upvotes

830 comments sorted by

View all comments

Show parent comment

5

u/mikekchar 27d ago

I'm a person who treats programming like poetry. To me it is a literary art. However, I put it into the category of "can be an art" in the same way that painting "can be an art" even though usually when you paint a fence, it isn't art.

Programming where your goal is to produce an artefact (rather than the goal of simply writing code) is, at its highest levels, a craft. But, again, not everybody does that. Is a craft art? I think it can be, but it also doesn't have to be.

I find it funny that "artisanal" is spelled "art is anal". It always makes me laugh. Artisanal crafts have enormous attention to detail. I don't think this is quite enough to propel it to the lofty heights of "art", though. IMHO, with art, there is an effort to communicate something to the person experiencing the art. This is one of the problems I have with programming as an art. Often there is no viewer. You write code, but nobody reads it.

I am unapologetically an "artsy fartsy" programmer and I get very frustrated if I write code at work and for one reason or another, nobody reviews it. I don't care if you don't like it. I don't care if you want me to change it, ultimately. I just want someone to read my code at least once. To me, that's the essence of programming as an art.

Having said that, there are artistic expressions that use the programming language as the tool, rather than the expression itself. There are lots of "art games", for example. However, this doesn't usually translate well to the commercial world of building endless web apps, for example. Again, this lends itself better to being a craft.

With AI, it becomes problematic. The code that AI writes is, by definition, not an artefact (something which a human has produced). I think AI can be used effectively as a tool to enhance the process of the creation of art, but you must put yourself, as the programmer, in the center of the production. I think of it similarly to the difference between using a paint brush to paint a picture and using a camera to take a photograph. Both can be art, but with the latter, it isn't art if you simply take random photographs. The art is in the appropriate use of the tool to communicate to the audience.

Aside: To be fair, randomly splattering paint on a canvas with a paint brush is also not artistic in my opinion... The extent to which it is art depends on the intentionality... but I suspect this would be a point of contention for many famous modern artists ;-). I will admit to enjoying the strategic use of chaos in some media, so perhaps I could even be convinced for some situations.

I think of "engineering" as an activity that builds withing constraints in order to hit specific safety or performance targets. Engineering requires understanding the behaviour of the properties of the materials you are using, measuring your application of those materials and being able to quantify the extent to which your artefact will hit the targets. To me, this is completely disjoint from art. While it will often use science to achieve its goal, engineering is mostly an application of design within measurable constraints. For programming, the best examples of engineering are real time systems that guarantee specific performance, or embedded systems that guarantee memory usage, etc. These days engineering is getting more and more important, but back when I was starting out as a programmer, almost nobody did any actual engineering. I will say that the average programmer still does absolutely no engineering at all. They neither know their performance targets, nor understand how to apply constraints in their programming to hit them.

Looping back to the top of this exceptionally long comment, I admit that poetry is really just prose with constraints (something this comment could certainly benefit from). Artistic programming often imposes constraints for artistic reasons. I think that well engineered solutions can often be artistic. However, I'm not sure that I agree that the arrow points from art to engineering. My experience has been that the opposite is more often true. A person who works hard at their engineering can sometimes find themselve producing a work of art.

Yes, I think about this stuff far too much :-D I hope you found it entertaining, even if you don't agree.

2

u/Neither_Berry_100 27d ago

I also really care about the quality of my code. I don't necessarily look at it as art the same way you do. But I clean up AI code heavily. And that is after very detailed prompts and such. Heck just now I noticed it was casting a variable every loop (processing pixels in an image). I pointed it out and suggested fixing it by using better types and it gave me the solution. Most AI coders wouldn't bother with this level of detail. And that was only one thing I fixed.