8
uuid
3y

Do you believe that code is inherently hard to read?

Comments
  • 3
    Is English hard to read?
    Code is just an abstract form of poetry.
  • 1
    Inherently, no

    When you strip it down to its fundamentals, any given programming language is just comprised of a grammar, like any natural language

    In fact, by their very nature, they are far more easy to understand than natural languages, due to their formal structure and lack of irregular patterns (e.g. Irregular verbs in Latin-based languages)

    I think the reason that some people find them difficult to understand is purely because they are used to using natural languages. If you were to teach an infant a programming language as it's primary form of communication (instead of a natural language), then I imagine they would be just as competent with it as they would have been with a natural language
  • 2
    If you understand the language, you may understand what the code does, depending upon your ability level and knowledge of solutions/algorithms.

    Eg:

    A = 1
    B = 2
    C = A + B

    Easy to understand.

    But if you looked at code to work out say, how to draw a 3D shape in a convex or concave manner, you might struggle to understand how it works.

    Related links:

    http://rustycode.com/tutorials/...

    This is why for example, the game Elite, only had one type of shapes, as its a lot easier to just draw lines if you know whether you are drawing a convex or concave 3D model.

    I remember it took me 10 years to find out how to do both, and its quite complicated !

    For example, if you have three points:

    X1,Y1
    X2,Y2
    X3,Y3

    And you draw a line from one lot to the second lot, to the third lot.

    Now, you are either drawing in a clockwise direction, or an anti-clockwise direction.

    Now, how do you figure that out in a program. :-)

    I couldn't for the life of me figure out how to !
  • 2
    No, unless it's poorly written.
Add Comment