Dijkstra originally studied theoretical physics before becoming a computer scientist.
“The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.”
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
“[Java is] embarrassing, because it is so bad. [...]
A good language, like a tool, is just a joy. But industry doesn't want that. Probably because decisions are made by technically incompetent people.”
“Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians.”
Formal reasoning proves correctness.
Formal reasoning means maths.
Informal reasoning means
thinking about your code.
Debugging is a process of informal reasoning.
Whatever the path to great code might be, it doesn't go through project management.
The enthusiasm is genuine.
People are different.
We have no idea what we're doing.
Agile is not Science.
Try it anyway. Some of it could work.
There is no Truth out there.
Agile sees programming as a matter of process, not tools.
“Bad programmers can write
bad code in any language.”
“Those who want really reliable software will discover that they must find means of avoiding the majority of bugs to start with.”
Testing leads to more errors being detected.
Informal reasoning leads to less errors being created.
“testing is hopelessly inadequate … it can be used very effectively to show the presence of bugs but never to show their absence.”
class Fac { public static long fac(long n) { return (n == 0) ? 1 : n * fac(n - 1); } } Fac.fac(5); Fac.fac(10);
Testing a component with one input also tells you nothing about the same component with another input.
Generative testing is a thing.
Control is about the order in which things happen.
var a = 2; var b = a + 3; var c = b * 2; c;
“Many of the classic problems of developing software products derive from this essential complexity and its nonlinear increase with size.”
“It has been suggested that there is some kind of law of nature telling us that the amount of intellectual effort needed grows with the square of program length. But, thank goodness, no one has been able to prove this law.”
class Number { private long value; public Number(long value) { this.value = value; } public long get() { return this.value; } public void inc() { this.value = this.value + 1; } } Number n = new Number(0); n.inc(); n.get();
(def number {:value 0}) (defn succ [number] (assoc number :value (+ (:value number) 1))) (succ number)
datatype number = number of int; val n = number 0; fun inc (number n) = number (n+1); inc n;
class Number { private long number; public Number(long number) { this.number = number; } public void set(long n) { this.number = n; } public static void mutableStateIsBad(Number n) { n.set(666); } public long fac() { return (this.number == 0) ? 1 : this.number * new Number(this.number-1).fac(); } }
function fac(n) { if (n === 0) { return 1; } else { return n * fac(n - 1); } }
let fac 0 = 1 fac n = n * fac (n-1) fac 5 fac 10
let inclist :: [Int] -> [Int] inclist [] = [] inclist (head:tail) = (head+1) : inclist tail
var a = 2; var b = a + 3; var c = b * 2; c;
(let [a 2 b (+ a 3) c (* b 2)] c)
val a = 2; val b = a + 3; val c = b * 2; c;
(use 'clojure.core.logic) (require '[clojure.core.logic.fd :refer [in interval + * != distinct eq]])
(run* [a b c] )
An ideal language eliminates control.
It only has to deal with essential state.
You tell it what you want,
it figures out how to get there.
(use 'clojure.core.logic) (require '[clojure.core.logic.fd :refer [in interval + != distinct eq]])
(run* [a b] )