(^88) 97 Things Every Programmer Should Know
Know Well More Than
TYCHOLOGYHE PS OF PROGRAMMiNG: people have known for a long time
now that programming expertise is related directly to the number of different
programming paradigms that a programmer is comfortable with—that is, not
that he just knows about or knows a bit of, but that he can genuinely program
Every programmer starts with one programming language. That language
has a dominating effect on the way that programmer thinks about software.
No matter how many years of experience the programmer gets using that
language, if she stays with that language, she will know only that language.
A one-language programmer is constrained in her thinking by that language.
A programmer who learns a second language will be challenged, especially if that
language has a different computational model than the first. C, Pascal, Fortran—
all have the same fundamental computational model. Switching from Fortran
to C introduces a few, but not many, challenges. Moving from C or Fortran to
C++ or Ada introduces fundamental challenges in the way programs behave.
Moving from C++ to Haskell is a significant change and hence a significant
challenge. Moving from C to Prolog is a very definite challenge.
We can enumerate a number of paradigms of computation: procedural, object-
oriented, functional, logic, dataflow, etc. Moving among these paradigms creates
the greatest challenges.
Why are these challenges good? That has to do with the way we think about
the implementation of algorithms and the idioms and patterns of implemen-
tation that apply. In particular, cross-fertilization is at the core of expertise.
Idioms for problem solutions that apply in one language may not be possible
in another language. Trying to port the idioms from one language to another
teaches us about both languages and about the problem being solved.