Live data from Hacker News

Is Uncle Bob serious?

dev.to

131–140 of 181 posts

Re: Is Uncle Bob serious?

#131
post #116
post #91

Earlier quoted context omitted.

So where does it fall down? Excluding the social ones I mentioned.

Can you prove the correctness of a sort function in the type system? I don't know any mainstream language where you can do that. You'd have to go to something like Agda, Idris, Coq or F* which are hardly practical languages (currently). Beyond that there's an entire universe of complexity that we have no idea how to prove (practically) in the type system. Haskell types encode simple properties. They're extremely usef…

What do you think about clojure.spec approach?

Re: Is Uncle Bob serious?

#132
post #117

Earlier quoted context omitted.

> I think the reason for the fact, that it hasn't been formalized and regulated like, for example, building cars, is simply that it can't be. NASA writes highly reliable software, as do the organizations producing the software for fly-by-wire airplanes, so your assertion is empirically false. You are extrapolating too far from your personal level of knowledge and experience.

> NASA writes highly reliable software, as do the organizations producing the software for fly-by-wire airplanes, so your assertion is empirically false. What I find interesting is that both of your examples (and many others) are for software which controls physical systems, i.e. which is pretty well defined due to the nature of the machines it controls. Do you have comparable examples which aren't defined by the phy…

Operating systems/kernels as a whole largely deal with abstractions, and some are built to incredibly high, and in some cases mathematically proven, standards. seL4 is an example of a formally verified kernel.

Re: Is Uncle Bob serious?

#133
post #81

Earlier quoted context omitted.

>Yes, but they increase delivery time problems and developer time problems. That's purely guesswork. Seriously! My observation is that as the size of the project grows, type system switches from hindrances to actually speed up development and save developer time. Ever try to grep weakly typed system for name definition? Yeah, you don't have that problem in strongly typed system. Lots of other reasoning are easier to…

> Ever try to grep weakly typed system for name definition? For what purpose?

To understand a codebase?

Re: Is Uncle Bob serious?

#134
post #8

Earlier quoted context omitted.

> Embracing agile (as his ThoughtWorks contract requires him to do) while lamenting quality and lack of professionalism, as Mr Martin does, is extremely dishonest. Why exactly? I fail to see the connection between lack of quality and embracing agile.

Civil engineers don't I suppose agree to build a bridge before they've surveyed the land and then begin construction before knowing the loads. Contrast that to software engineering, where beginning before you have requirements is seen as a requirement of being agile.

> Contrast that to software engineering, where beginning before you have requirements is seen as a requirement of being agile.

Not that I agree with all the agile ideas, but if I remember correctly we had a process already which was supposed to start with "gather all requirements" and then the rest follows. It was called waterfall development and didn't work so great either, mostly due to the 'all' part in requirements being violated all the time in practice.

Re: Is Uncle Bob serious?

#135
post #129

Earlier quoted context omitted.

So are you arguing that very well-defined and carefully thought-out requirements are, in practice, essential to the development of high-quality software?

That would be quite the no-brainer, wouldn't it be? All the dancing around waterfall, agile or what ever turns around the problem that people usually don't know what their requirements are, are not able to formulate what their requirements are, but hopefully know when they see something it if something helps them or not. If we could just get people to define their requirements in all the detail needed we would take a…

I.e. Let's avoid the question of quality altogether by declaring it an unsolvable problem in the limit.

Re: Is Uncle Bob serious?

#136
post #116

Earlier quoted context omitted.

Can you prove the correctness of a sort function in the type system? I don't know any mainstream language where you can do that. You'd have to go to something like Agda, Idris, Coq or F* which are hardly practical languages (currently). Beyond that there's an entire universe of complexity that we have no idea how to prove (practically) in the type system. Haskell types encode simple properties. They're extremely usef…

What do you think about clojure.spec approach?

Those aren't proofs at all, and the docs even say so.

Re: Is Uncle Bob serious?

#137
post #74

The current state of software safety discussion resembles the state of medical safety discussion 2, 3 decades ago (yeah, software is really really behind time). Back then, too, the thoughts on medical safety also were divided into 2 schools: the professionalism and the process oriented. The former school argues more or less what Uncle Bob argues: blame the damned and * who made the mistakes; be more careful, damn it.…

So basically work is safer when done by robots

Or if you spend a lot of resources in training people to robotize them

I prefer real robots

Re: Is Uncle Bob serious?

#138
post #37

Earlier quoted context omitted.

> Type systems to me seem to be (I'm not exaggerating) the answer to all software reliability problems (barring social ones). That's the thing though, the "social problems" are the important problems. I think it's a given you should use strong type systems in safety critical software — Haskell, for instance. But look at the quote from Dr Nancy Leveson: I've been doing this for thirty-six years. I've read hundreds of…

> That's the thing though, the "social problems" are the important problems. And yet, we still seem bogged down with bugs and vulnerabilities caused by non-social problems. So use types to get rid of those problems, and then we can worry about the social problems. > Lack of strong typing does not seem to be the issue. Lacking domain understanding/logical errors is the problem. Types help with this too. Formalizing a…

So formalizing things with type systems is great. In fact, I'm a huge proponent of it.

The problem still remains, you may not have a sufficiently well developed requirement set to be able to specify things in your type system.

I'll give an example: It's possible in Haskell (really many languages) to create a type SafeString which can be constructed from a standard String and does all the necessary escaping for the target (let's say it takes in a username and works to prevent sql injection attempts, or removes HTML tags, or whatever might be appropriate). And for all practical purposes it behaves exactly like a string otherwise. Any time you want to make a SQL query or generate some HTML you know that you can use a SafeString and it'll (barring errors in implementation) work without causing you either security risks or producing incorrect outputs.

That's fine that we can do this, if it doesn't make it into your system design you won't know that you need to do this.

The type system itself doesn't tell you that your types are underspecified. It needs to come from the requirements analysis (in this case, requirements as viewed through a security-oriented perspective). But type systems allow you to encode that specification once it's been made.

Re: Is Uncle Bob serious?

#139

Earlier quoted context omitted.

> My take: give it a few more years, and software, too, probably will follow the same path. I doubt it. The stakes are much lower than people's lives and health.

The Atlantic article that Uncle Bob was writing in response to lists several specific examples of software failures that did, or could have, resulted in loss of life: a failure of the 911 system; air traffic control systems; medical devices.

But then these scenarios already have the required incentives. Even software has liability issues if the stakes are this high.

Re: Is Uncle Bob serious?

#140

Earlier quoted context omitted.

> I don't think you can compare software to other disciplines like medical, air transportation or architecture. These areas are well understood and pretty mature and move pretty slowly. Architecture maybe. Air transportation is barely a century old, though you could make the argument that it's a offshoot of other industrial engineering disciplines. When it comes to medicine however, while modern medicine is older tha…

I still would argue that medical is moving much slower than software. I work in medical devices and simple experiments can take years to get done once humans are involved. In software we would get the result in a few days or weeks. I am not advocating easing the restrictions in human experimentation but these rules definitely slow down progress.

I am not advocating easing the restrictions in human experimentation but these rules definitely slow down progress.

They surely slow down the work, but whether they slow down useful progress is a different question. Given the amount of time and money that depend on software systems today, as well as the more general effect of software on our quality of life, poor quality software costs society as a whole a great deal. If we built our software more slowly and carefully but also with higher reliability and fewer issues with security, privacy and so on, would we really be worse off?

Post reply on HN