Programming Language

Posted on August 9, 2011

0


The primary purpose of source code should not be expressing implementation to a computer; it should be expressing
meaning to people. Programming languages are an incredibly expressive and terse medium for the concepts programmers talk about. Proposals to make programming languages more English-like inevitably fail not because of poor implementation but because there is an inherent impedance mismatch between the domains of English language and computer programming.

Thus, computer programming languages should be compared not by their levels of raw power (any Turing-complete language trivially satisfies this requirement) or speed of execution (for most applications, speed is not critical) but by their programmer
efficiency—the speed at which a programmer can accurately translate his thoughts into code.

Closely related to programmer efficiency is maintainer efficiency: the ability of a maintainer (who may be the original developer, 12 months later) to read the code and deduce what is going on. Perl is often criticized for being “write-only”; it is easy
to write code that is nearly unreadable to future developers. Such code would have high programmer efficiency at the cost of maintainer efficiency. Ruby wins on both fronts: most Ruby code is easy to write and read, once you know the basic syntax and semantics. Still, diving into any large project such as Rails is difficult. Here, we discuss ways to begin reading a codebase.

Advertisements
Posted in: Rails app, Ruby