View Single Post
Old 01 August 2015, 18:43   #163
son of 68k
meynaf's Avatar
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 2,893
Originally Posted by Mrs Beanbag View Post
Not necessarily. I think a system with no security at all would be unpopular, i think a system where it was switchable would be pointless.
It is the ability to do bare metal banging. It is not pointless, or if it is, just don't use it. After all, how many features in windows are pointless for most users ?

Originally Posted by Mrs Beanbag View Post
But you won't be able to switch between the two modes without a reboot, and you wouldn't be able to run some things in one mode and some things in the other.
And ? It's no problem for me. Most programs won't care, only low-level system ones - and they could eventually adapt.

Originally Posted by Mrs Beanbag View Post
of course I do you cheeky imp, but you can never test absolutely every possible way your code might run! we've been through this already.

There are companies who have a policy not to use version n.0 of any software because they know it will be unstable until n.1. The first release is really the last stage of testing, simply because *you don't know what users are going to try doing until you give it to the users*. There might be bugs that only manifest in very rare circumstances you never thought of, and the only way to discover them is through thousands of user-hours of real world use. Sometimes they are not easily reproducible even when you do know about them. Sometimes they only happen with certain hardware configurations that the user happened to have, or with certain OS-level settings. We get bug reports like, it crashed when a Chinese person tried to save a file with a Chinese filename. Or it crashes only after 12 hours of continuous usage. Or it crashed when there was an R in the month and it was a blue moon and Venus was in conjunction with Mercury. Automatic tests can't find these things, and neither can we programmers.
Good programmers are careful. They know that if something _can_ go wrong, then something _will_ go wrong.
Arrange so that you verify all data and input that comes from the outside, no matter how stupid it looks like.
You DO know what users are going to do : it's "everything". Never rule out something because it looks insane, as fools are so ingenious.
Never copy something to a buffer without checking its size.
Always check return values, even if you think the callee will never return an error.
If you do things well, if unplanned bad things happen, the user will get a friendly error message - not a random crash and it's a lot easier to debug.
And by doing so you will remove many, many problems.
Btw. there was a smiley in my comment, don't take me too serious
meynaf is offline  
Page generated in 0.03957 seconds with 10 queries