It’s mind boggling how much he anticipated about data management, and was absolutely accurate about. As someone who unfortunately learned databases via ORMs, I started to dive into his writing directly and learn more about the relational model itself.
It also inspired me to learn more about math, specifically set theory. Set theory is the most practically useful math you can learn as a programmer. It’s a shame that it’s not common to communicate in terms of set theory more at work, considering how much we intuitively use it. You can’t work in a complicated data model without talking about unions, and the relational model itself is just an extension of set theory, very clearly defined via set theory.
It’s funny. Almost every popular tool or technique we use has a clear and direct lineage from math, yet we have a huge anti-math sentiment in our industry at large. I mean. It’s not funny. It’s tragically ignorant.
Excerpt: "The first series of machines —that of the singletons— was mainly developed in the USA shortly after the World War II, while a ruined continental Europe had neither the technology, nor the money, to start building computers: the only thing we could do was thinking about them. Therefore it is not surprising that many US Departments of Computer Science are offsprings of Departments of Electrical Engineering, whereas those in Europe started (later) from Departments of Mathematics (of which they are often still a part). This different heritage still colours the departments, and could provide an acceptable explanation that in the USA Computing Science is viewed more operationally than in Europe."
A part of the inefficiency is that business-logic oriented applications (a) often use stateful object models to organize their code and services, which are (b) extremely difficult to reason about mathematically, both due to the pseudo-mathematical nature of mutable state, and due to no canonical formal representation of what an "object" is mathematically, nor what an "object" ought to be in software engineering.
The situation may be improving: more programming is moving over to the functional style which at the very least gets you algebraic concepts like combinators as the method for code reuse, and types + monoids as formal stand-ins for objects. In other words programming moves towards math when it makes functions really functions.
Category Theory and Linear Logic also provide models for data-transformation locales (objects) as well as resource consumption (mutation); but they are still heavyweight formalisms which have yet to make full penetration towards applications which quite frankly might not need them to do useful work.
What makes state hard to reason about mathematically? TLA+ has a very formal definition of state and time that can be model checked or used for proofs. I think the reason that this is such a common statement is exactly because people don’t even know that state can be reasoned about mathematically, they just assume that it can’t be.
The biggest thing that TLA+ showed me is that there’s no difference between functional and imperative programming from an algorithm standpoint. You can implement the exact same algorithm in both paradigms, and while the functional one has no explicit state, it can have a tremendous amount of implicit state. Recursion where a new state parameter is passed as argument to the next call is just as difficult to reason about as mutable state, it’s just less efficient from a processor standpoint.
I have no experience using TLA+, just secondhand knowledge, so you might very well be right. From my understanding, everything I said is true when restricted to classical logic. Otherwise, there are multiple approaches to objects and time, all of which are non-classical logics, and so are not commonly taught nor have they yet been embedded in many languages. TLA+ has been getting more traction, which might signal some kind of convergence since I last looked into it? I guess Rust would be another example where state is checked against using ownership signals, which uses non-classical concepts.
Defending myself against the second claim, yes these algorithms have implicit state because the machines we're operating on are fundamentally stateful. But that's meant to be abstracted away at the language level and left for the interpreter/compiler to resolve.
This still leaves problems for how to modularize code at the domain layer using functional idioms, which primarily express behavior over properties. OOP can be restricted in a way which makes this simple to bridge towards using the Actor model but that's still a step away from habitually structuring your code using modules monoids and combinators.
TLA+ doesn't quite address this, since (IIRC) you don't implement your final system in TLA+.
Apart from relational algebra, two big ones are regular expressions and diff (longest common subsequence).
However, you're saying vice versa: Almost all math we use has a clear and direct lineage from a popular tool or technique.
There's something to this - many of the well-known theorems and algorithms for regular expressions started with Ken Thompson, though of course he used Kleene algebra.
And for relational algebra in this submission, there's almost no mathematics, just a set of tuples... and make an algebra around it. That's why Codd's paper has hardly any references, he pretty much made it all up, to solve a practical problems he saw (unnecessary rewriting of code). Though he was a mathematician, so...
The limits of knowledge, of what can be proven, is to do with "computability" - sure sounds like a prpgrammer thing!
Codd (rightly) recognized two “fatal flaws” [0] in SQL: (1) permitting duplicate rows, and (2) the treatment of missing information (he also criticized the “inadequately defined kind of nesting of a query within a query”, but that addressed 80’s SQL, and I don’t think his criticisms still apply to SQL:2019).
Perhaps ironically, SQL NULLs are modelled directly after his (logically flawed) 1975/1979 proposal [1]. It must be noted, however, that he explicitly considered his proposal “as preliminary and in need of further research”. NULLs in databases are best avoided, or restricted to views (not base tables) and managed with great care (I’d say that they should be used only with the “inapplicable value” semantics [2]).
[0] Fatal Flaws in SQL, Part One and Two, 1988
[1] Extending the Database Relational Model to Capture More Meaning, 1979
[2] Franconi and Tessaris, On the Logic of SQL NULLs, 2012
I once read this story in either ACM or IEEE but failed to find the exact reference. It was an editorial relating famous papers rejected by the journal. Does anyone have this reference?
I retract my assessment. I have found what appears to be the original paper ([0], from Computer 2005), and there is no indication that the reviews are fake. On the contrary, it appears that they are brought up as striking examples of a reviewer's incompetence. Wow!
Ok, I've read everything more carefully: those are clearly hypothetical, entertaining reviews. Hints: (1) the link at the beginning; (2) no references to the sources :-)
21 comments
[ 2.9 ms ] story [ 63.4 ms ] threadIt’s mind boggling how much he anticipated about data management, and was absolutely accurate about. As someone who unfortunately learned databases via ORMs, I started to dive into his writing directly and learn more about the relational model itself.
It’s amazing how much power is in the model that I was completely unaware of, like domains: https://www.postgresql.org/docs/9.5/sql-createdomain.html.
It also inspired me to learn more about math, specifically set theory. Set theory is the most practically useful math you can learn as a programmer. It’s a shame that it’s not common to communicate in terms of set theory more at work, considering how much we intuitively use it. You can’t work in a complicated data model without talking about unions, and the relational model itself is just an extension of set theory, very clearly defined via set theory.
It’s funny. Almost every popular tool or technique we use has a clear and direct lineage from math, yet we have a huge anti-math sentiment in our industry at large. I mean. It’s not funny. It’s tragically ignorant.
I don't think that's true. It's very often the other way around.
Other ones I can think of off the top of my head:
- the DOM (an applied tree which is a graph)
- everything to do with programming language construction (compilers and interpreters use graph theory extensively)
- testing (permutations and combinations)
- static analysis (including eslint)
- abstracting logic with functions
Can you think of anything that isn’t directly derived from some math concept?
https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/E...
Excerpt: "The first series of machines —that of the singletons— was mainly developed in the USA shortly after the World War II, while a ruined continental Europe had neither the technology, nor the money, to start building computers: the only thing we could do was thinking about them. Therefore it is not surprising that many US Departments of Computer Science are offsprings of Departments of Electrical Engineering, whereas those in Europe started (later) from Departments of Mathematics (of which they are often still a part). This different heritage still colours the departments, and could provide an acceptable explanation that in the USA Computing Science is viewed more operationally than in Europe."
Turing was a mathematician focused on theoretical problems. Shannon and Bush spent several years building analog computers at MIT.
I think the difference was the way electronics and telecommunications established themselves as academic disciplines in America.
America was training tons of electrical engineers, but surprisingly few mathematicians, as early as the mid 19th century.
Look at schools like MIT - what the UK equivalent? Oxbridge is known for Classics, PPE, and Maths. There’s no “institutes of technology.”
The famous theoretical problems of fire-control systems for anti-aircraft weapons and wartime code-breaking.
The situation may be improving: more programming is moving over to the functional style which at the very least gets you algebraic concepts like combinators as the method for code reuse, and types + monoids as formal stand-ins for objects. In other words programming moves towards math when it makes functions really functions.
Category Theory and Linear Logic also provide models for data-transformation locales (objects) as well as resource consumption (mutation); but they are still heavyweight formalisms which have yet to make full penetration towards applications which quite frankly might not need them to do useful work.
The biggest thing that TLA+ showed me is that there’s no difference between functional and imperative programming from an algorithm standpoint. You can implement the exact same algorithm in both paradigms, and while the functional one has no explicit state, it can have a tremendous amount of implicit state. Recursion where a new state parameter is passed as argument to the next call is just as difficult to reason about as mutable state, it’s just less efficient from a processor standpoint.
Defending myself against the second claim, yes these algorithms have implicit state because the machines we're operating on are fundamentally stateful. But that's meant to be abstracted away at the language level and left for the interpreter/compiler to resolve.
This still leaves problems for how to modularize code at the domain layer using functional idioms, which primarily express behavior over properties. OOP can be restricted in a way which makes this simple to bridge towards using the Actor model but that's still a step away from habitually structuring your code using modules monoids and combinators.
TLA+ doesn't quite address this, since (IIRC) you don't implement your final system in TLA+.
Everything I listed is an example of applying math to a problem. The math came first.
However, you're saying vice versa: Almost all math we use has a clear and direct lineage from a popular tool or technique.
There's something to this - many of the well-known theorems and algorithms for regular expressions started with Ken Thompson, though of course he used Kleene algebra.
And for relational algebra in this submission, there's almost no mathematics, just a set of tuples... and make an algebra around it. That's why Codd's paper has hardly any references, he pretty much made it all up, to solve a practical problems he saw (unnecessary rewriting of code). Though he was a mathematician, so...
The limits of knowledge, of what can be proven, is to do with "computability" - sure sounds like a prpgrammer thing!
So maybe you have something there...
Perhaps ironically, SQL NULLs are modelled directly after his (logically flawed) 1975/1979 proposal [1]. It must be noted, however, that he explicitly considered his proposal “as preliminary and in need of further research”. NULLs in databases are best avoided, or restricted to views (not base tables) and managed with great care (I’d say that they should be used only with the “inapplicable value” semantics [2]).
[0] Fatal Flaws in SQL, Part One and Two, 1988
[1] Extending the Database Relational Model to Capture More Meaning, 1979
[2] Franconi and Tessaris, On the Logic of SQL NULLs, 2012
http://www.fang.ece.ufl.edu/reject.html
I once read this story in either ACM or IEEE but failed to find the exact reference. It was an editorial relating famous papers rejected by the journal. Does anyone have this reference?
[0] https://wp.doc.ic.ac.uk/cairesfe/wp-content/uploads/sites/80...
And yes, I have been fooled. This is a lesson to only cite (and even remember) carefully read articles!