Daily Archives: July 22, 2013

Scientist, Engineer, Artist, Professional?

                  Where I live.

Living in the Silicon Valley means that I’m around a lot of scientists and engineers. But what exactly is the difference between a scientist and an engineer? The difference is that scientists are more interested in the theory behind something, and engineers prefer to actually build it. You could say that scientists like to learn new concepts while engineers like to apply them.

Artists are obviously different from scientists and engineers. Professionals, on the other hand, may not be so obvious. Professionals are educators who share knowledge, instead of dedicating their time to gathering or applying it.

Simple Lisp Program

( defun add (x y)
(+ x y))

( defun subtract (x y)
(- x y))

( defun multiply (x y)
(* x y))

( defun divide (x y)
(/ x y))

( defun factorial (x)
(if (eq x 0)
1
(* x (factorial(- x 1)))))

(print ( add 3 4 ))
(print ( subtract 5 3 ))
(print ( multiply 2 4 ))
(print ( divide 2 5 ))
(print ( factorial 5 ))

This is a program in Lisp that lets you add, subtract, multiply, divide, and find the factorial of a number. Unlike Java, which is imperative, Lisp is a functional programming language, which is why it looks so different. Imperative programming languages tell the computer what to do and how to achieve it. On the other hand, declarative languages (which include functional languages) tell the computer what should be accomplished without describing exactly how to do so.

Lisp was specified in 1958, making it one of the oldest programming languages still being widely used. It originated from Alonzo Church’s lambda calculus and has become the most popular language for AI research.