7 ms·
An alternative viewpoint on software: https://www4.di.uminho.pt/~jno/ps/pdbc.pdf https://www4.di.uminho.pt/~jno/ps/pdbc.pdf Rather then using blurry fuzzy con
by corethree 3y ago
An alternative viewpoint on software:
https://www4.di.uminho.pt/~jno/ps/pdbc.pdf https://www4.di.uminho.pt/~jno/ps/pdbc.pdf
Rather then using blurry fuzzy concepts about software. This book is called "Program design by calculation".
Which is to view software through the theoretical lens of math, science and engineering rather then "philosophy".
Should software design be interpreted using the blurry and hand wavy concepts of philosophy and literature? or should it be theoretically laid out completely with all primitives formally specified like newtons laws of motion? Can we model software in a very formal way and come to make EXACT statements and conclusions about program design rather then a bunch of opinionated takes?
Unfortunately, like all hard sciences pdbc is much harder to understand then a "philosophy" so most people end up switching majors to philosophy.
Or Perhaps it's not about the challenge... you just prefer the philosophical approach over the theoretical one. Your preference is very valid.
But to you I would ask: can you build a bridge, a car, or an airliner with philosophy? Or do you need hard formal theory and sciences? If we don't have hard and formal theory about software design are we being limited in what we can build?
- lvturner 3y agoDo the business requirements (fundamental assumptions around design to be more generic) of a bridge, car or airliner change dramatically over time? I'd argue not. Software design, in my opinion, is both a science and an art so my stance is that we need both the formal theory and science as well as the philosophy and that they shouldn't be viewed as mutually exclusive.
- corethree 3y ago>Software design, in my opinion, is both a science and an art so my stance is that we need both the formal theory and science as well as the philosophy and that they shouldn't be viewed as mutually exclusive. What formal theory have you ever used for designing your software? I would argue you've never used anything. Every abstraction you've ever made was likely a gut feeling, an instinct or following some vague hand wavy rule of thumb. At best we use type theory for type correctness and complexity theory to calculate efficiency. That's basically as far as it goes with "theory" and these two things aren't even about "software design". Software design in practice as most engineers use it today is, practically speaking (key phrase), 100% art. Sometimes people come up with big fancy words like "dependency injection" or stupid Acronyms like SOLID to create the illusion of formal theory, but these things are nothing of the sort. It's just tips and tricks. The plane, the car, the bridge? Those things use both design and formal theory... software design as most engineers use it, again, does not use ANY formal theory, it's almost just purely design all the way down.
- lvturner 3y agoJust because it doesn't use formal theory now --- does not mean it/we shouldn't use it. I'm talking about needs, not haves.
- corethree 3y agoWell in all other engineering fields although they are used in conjunction. The two concepts are practically more or less mutually exclusive. There's no room for "design" when finding the shortest distance between two points because the shortest distance between two points is done via calculation using formal theory. Things like user-friendliness can be "philosophical". You can separately and selectively apply theory and design where applicable, but they cannot in actuality be unionized in some unholy grafting. I would say for the topic at hand; Of how to organize and abstract your code, if we ever find a complete formal theory for that, much of design will go out the window and what's left is mostly a calculation.
- lvturner 3y agoI see what you are driving at and I think we are looking at the problem from slightly different lenses yet still drawing much the same conclusions. There's no room for design in finding the shortest distance between two points, but there is room for design in picking which points you wish to find the distance on -- I think perhaps for meaningful discussion on this specific topic my definition of "Software Design" is too broad-scope ;)
- corethree 3y agoSort of but I think you're too limiting on the scope of what theory can do. Usually in engineering you can't just design anything in your imagination. You have a limited set. A domain. Which to continue the theme of the example, I have a set of points. I rarely have all the points on the face of the earth. How do I pick the point such that it minimizes a specification constraint? Let's say that constraint is the shortest distance. This is design by calculation. Then design is out of the equation. But if the specification constrains is "The two points most pleasing to the user" Then you can "design" those points. If I had access to every neuron and had a exact fully realized mathematical model of the general human brain, even this constraint of "pleasing" and "usability", in theory could be met with a calculation. Largely anything that leans more towards "design" means we don't know shit about what's going on so we hire philosophers and artists to make wild guesses. That is essentially what design is: a wild guess. The more of software we can model in a theory, the less wild guesses we need.
- ludston 3y agoMathematics and science can both be viewed as very fleshed out and practical branches philosophy, so they certainly aren't mutually exclusive.
- corethree 3y agoEverything on the face of the earth falls under philosophy. It's the biggest non-category ever. I'm basically talking about "philosophy" the way the book uses the word. Which in short is just the authors opinionated take on software masquerading as something a bit more "official" then just an opinion. I mean would you call your own opinions on software design a "philosophy"?
- ludston 3y agoYes probably. The only real difference between an opinion and a philosophy are the number of people that believe it.
- corethree 3y agoRight, what about "formal theory"? Let's say number theory? That's a concept independent of belief. And that's the difference I'm getting at here.
- ludston 3y agoFormal theories are not independent of belief at all! They are based upon axioms, which are the beliefs that must be true in order for the formal theory to be useful.
- corethree 3y agoI agree. But then what is the difference between religion and an axiom? Both are beliefs. Are you saying there is no difference? Maybe technically there is no difference. But clearly from the practical perspective there's a huge mutually exclusive difference. We should not merge GOF design patterns and SOLID or any other made up "software religion" with a formal theory. That's what I mean by "belief"
- auggierose 3y agoThat book has its very own philosophy, in particular that "pointfree" (pointless?) programming is a good thing. No, it isn't.
- corethree 3y agoYou think it's not good because that's just your particular philosophy. Pointfree programming allows for theory. It allows for algebraic composition of functions which in turn allows application of algebraic theory. I mean in the end what is a computer program? A set of functions. Wouldn't you build a program by composing functions together to form bigger functions? It makes sense for this to be the fundamental theory of program organization. Of course IO and mutation aren't initially included in this theory but that's a different aspect of the theory once you get more advanced. So basically you're just saying something along the lines that in your opinion you don't like the theory of algebra or geometry or some such. It's not invalid, but like the philosophy book, just another opinionated take.
- auggierose 3y agoThere is nothing wrong with functions. But forcing yourself to think exclusively in functions doesn't make much sense, and that is what pointfree is all about. It's basically a fetish. After all, functions have a domain, and the domain consists of objects that are often not functions.
- corethree 3y agoWell once you introduce points into the theoretical world of functions, composition no longer fully works. It doesn't make sense. While a program in practice can have "points" an algebra of functions should be a theory like number theory. Number theory deals with numbers only, function theory deals with functions only. I'm not so strict on this in practice, the function must eventually be called and in the end the compositions converge into a point. But if you want to apply algebraic theory to the functions, they need to be point free.
- xoac 3y agoYou seem to think that this is some sort of battle between the wordcels and the shape rotators or whatever, it's not. Extremely smart people have been in these fields for thousands of years and they didn't think that math and philosophy are opposites or in some tension. Even a cursory familiarity with the history of math and philo will reveal this.
- corethree 3y ago>Extremely smart people have been in these fields for thousands of years and they didn't think that math and philosophy are opposites or in some tension. Even a cursory familiarity with the history of math and philo will reveal this. Yeah it was actually progress when the field largely separated the philosophical mumbo jumbo away from the pure math. In the past math text books were littered with this mumbo jumbo because people couldn't separate the philosophy away from the axiomatic logic. Textbooks were just a mess. Nowadays there's a clear delineation. I believe it was Newton who started this separation trend with his laws of motion. Mathematics is an entirely separate department that is NOT under philosophy in most schools because of this.
- xoac 3y agoI studied philosophy at a department with an analytic slant. So essentially with philosophers who have a hardon for math and science. Still, even there people were not talking nonsense like this. Pure math is really nice, but there are so many aspects of human activity where this math is just totally useless. This is where we have to use the fuzzy words and stuff and where rigorous interpretation that you get trained in philosophy and other wordcel departments comes useful. I really encourage you to engage with some history of philosophy. You'll probably enjoy it and maybe change some of your views. Maybe try some history of science?
- corethree 3y agoI'm well versed in the "philosophy" of science. Personally though because philosophy encompasses stuff like animism I don't give the entire field much weight. Aspects of it are interesting but the entire field as a whole is a category error that encompasses everything on the face of the earth. What is not philosophy? I mean it sounds like philosophy is the study of anything and everything. Anyway to your point physics supposedly is a mathematical model that can model everything down to the tiniest atom. There are holes where not everything can be calculated in a closed form equation and there are holes where the fundamental primitive is true randomness which is something hard to replicate or define. In this sense physics can model almost (key adjective) everything in the the universe. Including most of all human activity. Because in the end that's of what's going on. Atoms.
- AnimalMuppet 3y agoCalculate ease-of-use of a GUI. Yes, you can, to some degree. You also can't, to some other degrees. Calculate correctness of some business logic, when part of "correctness" is correspondence to some badly-written procedures, and another part is correspondence to some regulations that are spread across ten thousand pages. Calculate correctness of an OS scheduling algorithm that has to work against a (not precisely known) variety of task mixes. And so on. There are parts of the requirements that are blurry and hand-wavy. That makes the "calculation" approach hard. At least, you have to translate the hand-wavy stuff into precise things that you can calculate. And you can't calculate that translation process, because the inputs are hand-wavy.
- corethree 3y agoGiven a formal specification the idea is that a theory should be in place to calculate the design. We don't fully have this yet. Given a hand wavy blurry specification, well... of course the implementation will be blurry and hand wavy as well.
- AnimalMuppet 3y agoWell... given a hand wavy blurry specification, you can create a formal specification - just not by formal means.
- corethree 3y agoChanging the specification is fine.