Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Programming: An Art or Science?

    Greetings, all.

    I am a professor working on an article for Tony Mobily's Free Software Magazine about the "Art of Programming." The basic question I'm trying to address is whether programming or coding is better conceived as an art or a science. In other words, do programmers always think in terms of efficiency and eliminating redundancy, or more in terms of beauty of aesthetics? If you saw code and thought, "Wow, that's great code," would it because it did a lot with very little, or might there be some broader, humanistic appreciation for grace and eloquence in code?

    To put it academically, is there a "rhetoric of computer programming?" Do concerns about efficiency and optimization always trump more artistic aspirations?

    I'd appreciate any insight you all could give me on this topic. If you want me to mention you in the article, please let me know your name. You can email me off list at matt@mattbarton.net

    Thanks,

    Matt Barton

  • #2
    Registered User
    Join Date
    Jun 2002
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mattbarton.exe
    In other words, do programmers always think in terms of efficiency and eliminating redundancy, or more in terms of beauty of aesthetics? If you saw code and thought, "Wow, that's great code," would it because it did a lot with very little, or might there be some broader, humanistic appreciation for grace and eloquence in code?
    It's always been beaten into me that it's the former (efficiency and eliminating redundancy) that should be appreciated by software engineers, NOT any of that arty-farty "grace and eloquence" nonsense

  • #3
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I disagree. Readability is a very important of coding, and it could be interpreted as "grace and eloquence". And many times there just isn't a need to make a program more efficient, so it's better to just keep the code "prettier".

    But there is more to "grace and eloquence" than just the superficial "how the code looks". An algorithm can also be considered a thing of beauty, and it's beauty doesn't need to impact how good it is in more concrete terms. On the contrary, usually the simpler and more graceful algorithms can be a lot more efficient as a result.

    And finally, there is more than code and algorithms. For instance, UI design could also be considered a part of the field. And here aesthetical aspects are very important.

    So it's a science, but if looked at with the right eyes, it's also an artform.

    shmoove

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    I say beauty stems from science. Nothing mutually exclusive at all.

    An O(n^3) algorithm is always ugly, no matter how well-indented and nicely commented. An O(n log n) algorithm is intrinsically pretty compared to an equivalent O(n^2) algorithm.

    It comes from meaning, not aesthetics. If a computer scientist discovers a truly amazing algorithm, he or she will be more inclined to write beautiful code to reflect that.

  • #5
    New Coder
    Join Date
    Nov 2004
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think the art aspect of programming is a byproduct of efficient and well thought out code.

    In my honest opinion, efficiency equals beauty.

    When I first started to write code I was amazed at what was possible. Writing a program that works is like teaching a pet to do a trick, I took raw, ugly code and turned it into something beautiful, something that actually works…and that is a wonderful thing.

    As I have gotten older and programmed more the whole art aspect kind of disappears...there is nothing beautiful about a person on a 36 hour caffeine binge trying to meet a deadline.



    Quote Originally Posted by mattbarton.exe
    To put it academically, is there a "rhetoric of computer programming?" Do concerns about efficiency and optimization always trump more artistic aspirations?
    That all depends on who you are coding for...if it is for yourself and you are working on a system with a seemingly endless amount of resources than efficiency and optimized code will probably take a backseat to what you really want to do.

    Now if you are coding for a job and the code spec has to meet certain requirements with memory, length, etc...than of course you are going to tell art to piss off so you can keep your job.

    Your boss doesn't care if it's pretty...he just wants it to work.
    Last edited by abbeyroadd; 04-14-2005 at 07:10 PM.

  • #6
    New Coder
    Join Date
    Dec 2003
    Location
    At work...still
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is how my 15 years of experience boil down.

    For me eloquent code is efficient code.

    Beauty in code is maintainability.

    Coding is a science, however code design (system design) is where anything that I can call art comes into play. In that there is a balance between functionality, maintainability, efficiency and design theory. Hitting that "sweet spot" is an art form.

    In my opinion that is art in the science of code.

    Will
    Last edited by WillGibson; 04-15-2005 at 12:06 AM.
    Why?
    Ok, but Why?

  • #7
    Super Moderator sage45's Avatar
    Join Date
    May 2002
    Posts
    1,060
    Thanks
    0
    Thanked 13 Times in 13 Posts
    I would have to agree with Will abbeyroadd and JKD...

    The beauty in coding or programming is obtianable only through the simplest of means... In programming we are constantly bombarded with creating program(s) with the most effeciency using the least amount of coding... It is as JKD says, if your algorithm is efficient as a O(n log n) then why use a O(n^3) or even a O(n) for that matter...

    The art of programming comes when you are able to take a program that works and make it more efficient by "trimming the fat" so to speak...

    For me and my experiences, art imitates life in the fact that the simplest things are often the most beautiful...

    -sage-
    HTML & CSS Forum Moderator

    "If you don't know what you think you know, then what do you know."
    R.I.P. Derrick Thomas #58
    1/1/1967 - 2/8/2000

  • #8
    New Coder
    Join Date
    Sep 2004
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in my short and limited programming experience with a few diff. languages, i beleive it boils down to:

    beauty comes from efficiency
    and
    efficiency comes from beauty

    its a two way street, one spawns the other because its an artwork to be able to make something, that does something. and vice versa


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •