|
Weird logic; instead of spending the time learning to write secure code, the suggestion is to learn a new language with a very iffy set of tools and which will probably die when all the cool kids move onto the next latest, greatest half-baked solution "which will solve ALL your problems."
ADDED: And after you port all of your stuff to Rust, or whatever lame language you come up with, have fun hiring people to maintain it for you.
|
|
|
|
|
But the article does say to proceed incrementally, not just rewrite everything in Rust.
Joe Woodbury wrote: instead of spending the time learning to write secure code, the suggestion is to learn a new language
Every operating system and web browser, for example, has C-derived security vulnerabilities related to buffer overruns and use-after-free errors.
But I bet these errors are caused by a mixture of two things.
- Those who don't know what they're doing and thus don't know how to write secure C.
- Those who do know how to do it but just make mistakes, because humans make mistakes all the time.
Moving to a safer language that can still do the job means that errors of these types cannot be made or are more difficult to make. But other types of errors will be made, of course.
Why does almost every new programming language abstract away memory management issues of this sort? After all, we could all just take better care and stop making mistakes right?
Kevin
|
|
|
|
|
One problem with the article is that it conflates C and C++.
Even that said, going with a new language is full of hazards, especially when that language isn't fully mature and lacks many tools and a strong user base. So, while mistakes of one kind won't be made, other mistakes will be.
Kevin McFarlane wrote: Why does almost every new programming language abstract away memory management issues of this sort?
Primarily because the inventors are obsessed with garbage collectors. Ironically, over my long career, I've rarely had issues with memory leaks in C and even more rarely in C++ (same with buffer overruns.) The bigger issue has been resource leaks (and poorly managed resources) and I've seen many more of those in .NET than in C++ code.
Plus, while buffer overruns can be a security vulnerability, the most dangerous and exploited vulnerabilities are independent of computer languages.
(The elephant in the corner is still--where are you going to get the experienced developers in these side languages? This is a major issue which is all to often ignored.)
|
|
|
|
|
Joe Woodbury wrote: Even that said, going with a new language is full of hazards, especially when that language isn't fully mature and lacks many tools and a strong user base. So, while mistakes of one kind won't be made, other mistakes will be.
But if we never try anything new because it's new and immature we'll never progress will we?
Joe Woodbury wrote: Primarily because the inventors are obsessed with garbage collectors. Ironically, over my long career, I've rarely had issues with memory leaks in C and even more rarely in C++ (same with buffer overruns.) The bigger issue has been resource leaks (and poorly managed resources) and I've seen many more of those in .NET than in C++ code.
You may be an exceptional coder. But I assume that the likes of Microsoft and Google are filled with smart developers, yet their products are riddled with C security vulnerabilities. I do almost all .NET today. But I spent many years doing C++ and in my experience almost all projects I worked on (inherited) had non-trivial memory management issues.
Anyway, memory management as I see it is about separation of concerns. Let the machine solve the problem so that the developer can focus on the business domain logic.
GC is one technique, but then C++, especially "modern C++", uses smart pointers.
I agree nothing is a magic bullet. But because a bullet doesn't solve all problems is not a reason not to use one at all.
Kevin
|
|
|
|
|
Kevin McFarlane wrote: But if we never try anything new because it's new and immature we'll never progress will we?
Don't assume a new language is progress.
Moreover, that's the argument I'm making! Why jump to something "new" because of the refusal to adopt new features of an existing technology, or to exercise discipline when dealing with old features.
Kevin McFarlane wrote: You may be an exceptional coder
Again, it isn't about being exceptional or even smart, but disciplined. At the very least, it's about not being lazy, which I've seen as one of the biggest sources of software bugs.
Kevin McFarlane wrote: Let the machine solve the problem so that the developer can focus on the business domain logic.
Which can be done with a garbage collector, up to a point, or with RAII. However, even with languages with a GC, it is incumbent on a developer to understand how that GC works. The view of the lazy that "memory isn't my concern" is ultimately what causes problems--if they are that cavalier about memory, odds are they are also cavalier about other things. Switching languages may mask this, but it doesn't solve it and, in my experience, generally causes far more problems than it's worth (especially with tools and hiring.)
|
|
|
|
|
Joe Woodbury wrote: Don't assume a new language is progress.
Moreover, that's the argument I'm making! Why jump to something "new" because of the refusal to adopt new features of an existing technology, or to exercise discipline when dealing with old features.
I was trying to make a general argument really. I certainly don't assume something is better because it's new. But I do reject the attitude of dismissing something because it's new. Even if we consider something and then conclude this doesn't get us any further then fine.
But, even without changing language, as you say, people can refuse to adopt new features or even consider them. Sometimes the new features are mere syntactic conveniences, sometimes they really are better, as in making it easier to write better code or whatever.
Kevin
|
|
|
|
|
Long live /dev/null!
It Is The Absolute Verifiable Truth & Proven Fact
That Your Belly-Button Signature Ties
To Viviparous Mama.
|
|
|
|
|
yes, i'll get right on rewriting 20 years of code in LotM*.
* - Language of the Month
|
|
|
|
|
So Windows Phone is well and truly dead (excepting a tiny handful of Windows 10 devices). There it lies, buried in the graveyard of failed smartphone platforms. Cause of death: Android. I don't know. Microsoft did a pretty good job of it themselves.
|
|
|
|
|
Count me in the tiny handful.
I have a WP 10 and I love it!
I tried an Android for about 6 months after I broke my WP 8 and needed to replace it. Within my family we have iPhones, Androids and Windows phones, so I thought I would try the Android out for a while.
I'm a fan of the live tiles and the ability to size and position them on the home screen. A significant amount of information is readily available. and when I thought about it, all the laptops at home... run windows... tablets at home... run windows the computers at work... run windows. It just made sense to have a phone that runs windows. It integrates nicely with other devices and shares settings across them.
|
|
|
|
|
I'm jealous.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
All I'm saying is what is wrong with having 3 options? That way, the tweens can have their iPhones for snapchat, the hipsters and granolas can have their droids, and business professionals can have the WP.
Additionally, I don't understand why iPhone owners are not as mad as hell? I mean Apple can't seem to get their phone right, they feel the need to release a new one every nine months.
|
|
|
|
|
New sensors are basically temporary tattoos that act as electronics interfaces. Just like the old stick-on tattoos, for the cyberpunk crowd
|
|
|
|
|
Back in 2016, when Microsoft announced that SQL Server would soon run on Linux, the news came as a major surprise to users and pundits alike. Were 'kicking' and/or 'screaming' involved?
|
|
|
|
|
We'd suggest simply calling it version 1709 instead. "The United States and Great Britain are two countries separated by a common language."
|
|
|
|
|
It's only called "fall" in North America, so technically the headline should be: "Because English isn't the same outside North America, ..."
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Autumn Update would work everywhere. Why not just one name?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Because they're Microsoft, and they have to be silly?
TTFN - Kent
|
|
|
|
|
of course. **sigh**
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Even south of the equator?
Mandatory suggestion of "Halloween Update"; it may be a treat, or a trick.
|
|
|
|
|
Then October Update...?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
How about "The October Revolution" update? That would please so many people.
|
|
|
|
|
How quaint!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Harvest Update, and confuse everyone.
"...JavaScript could teach Dyson how to suck." -- Nagy Vilmos
|
|
|
|
|
A new software system helps robots to more effectively act on instructions from people, who by nature give commands that range from simple and straightforward to those that are more complex and imply a myriad of subtasks. So, it will open the pod bay doors?
|
|
|
|