Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: Stosh

No this is what happens when guys whose entire professional career has been in C# and other languages that do a lot of memory work and cleanup for you get forced to program in an old language that makes the programmer handle it all themselves. I mean even the old programmers back in the day would screw this up. But “new” (people whose entire career has been in this century) programmers probably don’t even know this risk exists. The real question is why are they using C++? The product just isn’t old enough to justify that (the only justification being that was the new language when we started this app and we haven’t gotten around to rewriting it). Somebody made a dumb decision on day 1.


17 posted on 07/20/2024 9:08:54 AM PDT by discostu (like a dog being shown a card trick)
[ Post Reply | Private Reply | To 4 | View Replies ]


To: discostu

you nailed it ...


21 posted on 07/20/2024 9:26:15 AM PDT by bankwalker (Repeal the 19th ...)
[ Post Reply | Private Reply | To 17 | View Replies ]

To: discostu
You'd make a great IT manager. Always switch to newer and newer languages so you can fire the old timers who cost too much and replace them with cheaper recent grads.

The newer coders won't be able to elicit the proper requirements from the clients or know how best to implement the poor requirements they got. But hey, that's why we have beta testers.

23 posted on 07/20/2024 9:37:56 AM PDT by who_would_fardels_bear (Kafka was an optimist.)
[ Post Reply | Private Reply | To 17 | View Replies ]

To: discostu
The real question is why are they using C++?

Because that is all you have when you are working with kernel-mode and boot-time drivers in Windows.

BTW, you can make the exact same class of error in other program languages too.

Automated code inspection tools improve the odds of catching errors, but they are not foolproof.

Automated unit testing improves the odds of catching errors, but it is not foolproof either.

The big failure was not testing this update with a variety of Windows systems, and not rolling out a sample population of the user base before a general distribution.

28 posted on 07/20/2024 10:21:32 AM PDT by flamberge (A storm is coming)
[ Post Reply | Private Reply | To 17 | View Replies ]

To: discostu

“whose entire professional career has been in C#”

Doesn’t c# run slower? Also I’d say that anytime you use new or malloc, you’d better check for a null result.


29 posted on 07/20/2024 10:32:13 AM PDT by cymbeline (we saw men break out of a concentration camp.”)
[ Post Reply | Private Reply | To 17 | View Replies ]

To: discostu

It’s legacy, just like Linux there’s few options for kernel programming. For Linux, it’s straight C...with Rust becoming a recent option, nothing else.


31 posted on 07/20/2024 10:41:09 AM PDT by fuzzylogic (welfare state = sharing of poor moral choices among everybody)
[ Post Reply | Private Reply | To 17 | View Replies ]

To: discostu
Modern C++ good practices emphasizes that a minimum of pointers and manual memory management should be used in a mission critical application.

Back in the old days, like say 10 years ago and before, yes, C++ code was riddled with manual memory management bugs that caused all sorts of issues just like this. But with current C++ standards, manual memory management is minimized, and in some cases totally eliminated.

Obviously whoever maintained the driver code uses techniques that even today's C++ programmers would frown upon.

If it is a C# programmer being forced to use C++, it's time to get nervous, not because C++ is inherently dangerous, it is because the C# programmer isn't aware or was taught about the new safety features introduced to C++ over the past 10 years or so, and the C# programmer is relying on dusty old C++ books and teaching material to guide them.

52 posted on 07/20/2024 4:26:30 PM PDT by PallMal
[ Post Reply | Private Reply | To 17 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson