I think every graduating student should work on a non-trivial application in plain C for a year before moving on to another language. It makes you exceptionally paranoid about failure states and practically requires a bit of thought and planning before attempting any non-trivial change. The mindset of "it's fine to ignore all error conditions and let the default exception handler print a stack trace to the user" resu…
How can C Programs be so Reliable? (2008)
21–30 of 97 posts
Re: How can C Programs be so Reliable? (2008)
#22Earlier quoted context omitted.
That's not what the white house said and they're not an authority in software engineering anyway. Just sensationalist journalism.
This is what the White House said: https://www.whitehouse.gov/wp-content/uploads/2024/02/Final-... Interpreting this as "stop using C/C++" isn't much of a stretch. Yes, it is not a demand. Anticipating such a demand isn't a bad bet, however. Who is an authority, anyhow? The White House is citing NIST, DHS, Microsoft, Cambridge DSCT, Google and others. Whom do you offer? I don't like this myself. We're rapidly buildin…
I'd only be worried if I were in the business of selling software written in C/C++ to the government but a few campaign donations to politicians would probably get that fixed.
Re: How can C Programs be so Reliable? (2008)
#231) were C programmers "better"? In sum total, pretty much. 2) C programs, at least the ones we use now, are a product of a lot of use and debugging 3) It didn't take too many debugging sessions as a C programmer to learn to program a bit more carefully. 4) and the more it gets used, the more error codes it encounters, and the more robust the handling gets. I think a dirty secret of software engineering isn't that the…
No. Original programmers that just happened to use C were better, not the other way around.
Re: How can C Programs be so Reliable? (2008)
#24I think every graduating student should work on a non-trivial application in plain C for a year before moving on to another language. It makes you exceptionally paranoid about failure states and practically requires a bit of thought and planning before attempting any non-trivial change. The mindset of "it's fine to ignore all error conditions and let the default exception handler print a stack trace to the user" resu…
While I agree with last two paragraphs, C is not good even for that purpose because it doesn't give any tool to manage them. An effective C education should really be paired with various static analyses and formal verification strategies.
Like running in a weight vest.
Edit: ah, perhaps you meant, in addition to using raw C, one should also learn how to use such static analyzers & cie
Re: How can C Programs be so Reliable? (2008)
#25I think every graduating student should work on a non-trivial application in plain C for a year before moving on to another language. It makes you exceptionally paranoid about failure states and practically requires a bit of thought and planning before attempting any non-trivial change. The mindset of "it's fine to ignore all error conditions and let the default exception handler print a stack trace to the user" resu…
While I agree with last two paragraphs, C is not good even for that purpose because it doesn't give any tool to manage them. An effective C education should really be paired with various static analyses and formal verification strategies.
That is the reason it should be used as a learning tool. So that you know the nitty gritty details without anyone "managing" it away from you.
Re: How can C Programs be so Reliable? (2008)
#26I think every graduating student should work on a non-trivial application in plain C for a year before moving on to another language. It makes you exceptionally paranoid about failure states and practically requires a bit of thought and planning before attempting any non-trivial change. The mindset of "it's fine to ignore all error conditions and let the default exception handler print a stack trace to the user" resu…
Re: How can C Programs be so Reliable? (2008)
#27I think every graduating student should work on a non-trivial application in plain C for a year before moving on to another language. It makes you exceptionally paranoid about failure states and practically requires a bit of thought and planning before attempting any non-trivial change. The mindset of "it's fine to ignore all error conditions and let the default exception handler print a stack trace to the user" resu…
Rust is better for this since your program won’t even compile until you’ve handled those error states.
How is that better for developing a sense of paranoia around error states?
"Throw it at the wall and see what sticks" does not exactly lead to "extreme paranoia managing errors".
Re: How can C Programs be so Reliable? (2008)
#28I think every graduating student should work on a non-trivial application in plain C for a year before moving on to another language. It makes you exceptionally paranoid about failure states and practically requires a bit of thought and planning before attempting any non-trivial change. The mindset of "it's fine to ignore all error conditions and let the default exception handler print a stack trace to the user" resu…
Rust is better for this since your program won’t even compile until you’ve handled those error states.
Today developers don't build that skill, so you see applications that just fails silently everywhere or produce nonsense errors. The better developer tools you have the less your developers will need to learn UX skills to be able to do their work.
Re: How can C Programs be so Reliable? (2008)
#29Earlier quoted context omitted.
> C is horrible for exploratory programming Completely disagree. The lack of screwing around selecting abstractions forces you to make something productive right away and not stress about refactor.
Isn't "forced to make sth productive right away" the opposite of "exploratory programming"?
Re: How can C Programs be so Reliable? (2008)
#30Earlier quoted context omitted.
Rust is better for this since your program won’t even compile until you’ve handled those error states.
> Rust is better for this since your program won’t even compile until you’ve handled those error states. How is that better for developing a sense of paranoia around error states? "Throw it at the wall and see what sticks" does not exactly lead to "extreme paranoia managing errors".
For example, if I'm coding in C# it's easier for me to understand the impact of passing our resources that need to be disposed and good patterns to handle that after Rust has made me lose hairs on this concept.