- 15,524
- 769
d-h submitted a new PF Insights post
Your Software is Never Perfect
Continue reading the Original PF Insights Post.
Your Software is Never Perfect
Continue reading the Original PF Insights Post.
In my experience, there is rarely a case of not being able to do the job within the alloted time. If a developer gets sidetracked by other priorities, then the deadline is extended or someone else picks up the slack. Quite often, when I hear this excuse, it's from someone who isn't doing their job correctly - either they're goofing off and not doing their job or they're stuck and are too afraid (or too proud) to ask for help. I have no pity for the goof-offs and the prideful can be their own worst enemy. For everyone else, a simple five minute discussion of how to tackle a problem can make all the difference. I have no problem asking a junior developer how something works if I think that he has a better insight into it.eltodesukane said:"It’s your name that will be on the code, so take full responsibility for it."
Good advice, but usually this can not be done.
How many times does a programmer says the code is not ready, but the employer says we release it now anyway?
Who's setting this allotted time? The two main issues I've seen are overly optimistic schedules set by management, or unexpected technology issues, usually related to hardware.Borg said:In my experience, there is rarely a case of not being able to do the job within the allotted time.
I've been on projects where management set the time and where the developers were asked to provide an estimate. I've never felt that I couldn't question an estimate even if I was the provided it in the first place. I haven't had to deal with technology issues with respect to my estimates.rcgldr said:Who's setting this allotted time?
Thanks, and thanks to everyone else who liked my article.anorlunda said:Wow. that was a fun read.@D-H. That's one Insights article that is really insightful.
That was my first job out of college. That's to be expected for a freshout. My career has evolved since then. I've learned that "debugging the blank sheet of paper" is my personal briar patch. (Debugging the blank sheet of paper: "There's supposed to be a design or an architecture for X on this blank sheet of paper. Fix it!")A couple of random thoughts I did not put in my Insights article:Life isn't fair. Most developers are forced to follow orders and meet the requirements handed down, as you were.
eltodesukane said:"It’s your name that will be on the code, so take full responsibility for it."
Good advice, but usually this can not be done.
How many times does a programmer says the code is not ready, but the employer says we release it now anyway?
Same problem in design, architecture or else..
If an architect is hired to replace a wonderful bay windows with a concrete wall, then the architect will do that.
If this concrete wall is viewed as an ugly abomination, the decision maker has to be blamed, not the architect or designer hired to do it.
How is that littering? It's providing insight to the next programmer who either has to troubleshoot or fix code that was untested. Would you rather look for a needle in a haystack, or have some guidance to help you fix troubled code?Sherwood Botsford said:So you litter the code with comments like,
/* Somewhere in this block is a bug that bites when processing partial data segments */
/* Untested code: proceed at own risk */
elusiveshame said:How is that littering? It's providing insight to the next programmer who either has to troubleshoot or fix code that was untested. Would you rather look for a needle in a haystack, or have some guidance to help you fix troubled code?
Putting a chunk of code in a separate method to keep the code clean isn't the worst thing in the world. 8 space tabs is pretty excessive though.Sherwood Botsford said:I knew a programmer who kept his tabs set at 8 characters, but used a 132 character window. If he found that his code was wandering off the right edge, he'd abstract a chunk of it out. His claim was that you could only understand so many levels deep.
Doing it only after ~8-15 indentation steps (not sure how to interpret the statement) is way too late, however.You can certainly overdo it with making new classes and functions for everything, of course - a function that does nothing but calling a different function can be useful, but if you do that 5 layers deep something could be wrong.Borg said:Putting a chunk of code in a separate method to keep the code clean isn't the worst thing in the world. 8 space tabs is pretty excessive though.Sherwood Botsford said:I knew a programmer who kept his tabs set at 8 characters, but used a 132 character window. If he found that his code was wandering off the right edge, he'd abstract a chunk of it out. His claim was that you could only understand so many levels deep.
Definitely agree. There is seldom a reason for code to be nested so deep. Usually when I see something like that, the person should have written a recursive function.mfb said:You can certainly overdo it with making new classes and functions for everything, of course - a function that does nothing but calling a different function can be useful, but if you do that 5 layers deep something could be wrong.
By working very carefully, by using thorough testing, by using processes that reduce the number of bugs that arise, by having a top-to-bottom attitude toward quickly stomping those few bugs that do arise, and by having others check everything.StatGuy2000 said:This raises a question for me. Software plays a critical importance in systems where safety and/or reliability is of critical importance (e.g. nuclear power plants, electric grids, air-traffic control, medical equipment, etc.) Under those circumstances, the threshold for tolerance of bugs in software would be extremely low (if not close to non-existent). Under these circumstances, how could engineers or software developers ensure that the system would be as close to "perfect" as possible?
Yes, and that is a specialist area all by itself. I am not going to list all the standards that must be met, but you can get an overview here: https://en.wikipedia.org/wiki/Functional_safety .StatGuy2000 said:Software plays a critical importance in systems where safety and/or reliability is of critical importance
anorlunda said:Often neglected is the fact that many (perhaps most?) bugs are benign. They may never get triggered, or their negative effect not noticeable.
An interesting example came up during the Y2K remediation. Some software in nuclear power plants had operated successfully for 35 years or more. Presumably, software standards were much better in 1999 than in 1965, so new software is expected to have many fewer bugs. On the other hand, the old software had amply demonstrated that any bugs remaining must be benign. New software may have few bugs (never say zero), but they may not be benign.
So which is safer, the old or new software? That question should not be answered flippantly.
That same question arose in many critical applications in many industries during the Y2K years. It is the age old debate between new and better versus proven.
QuantumQuest said:In the present days on the other hand, there are huge demands for software to solve way more difficult/demanding problems, operate on a lot of newer domains, ...a
anorlunda said:Where it comes to embedded real time control software, I dispute that so much has really changed. In a few cases, modern software may have difficulty doing as well as some of the vintage stuff.
In the military aerospace application, the control law software of 30 years ago can not be compared with current software. A control law diagram from 30 years ago would fit on a single sheet of paper. Modern control law software is on hundreds of pages of diagrams. The requirements have exploded 1000 fold along with the associated SW complexity.anorlunda said:Where it comes to embedded real time control software, I dispute that so much has really changed. In a few cases, modern software may have difficulty doing as well as some of the vintage stuff.
The Space Shuttle flight software was written at a rate of about two or three lines of production code per person per month. The people behind that code weren't twiddling their thumbs for 159 working hours and then writing two or three lines of code. They were instead attending meetings (NASA loves meetings), writing requirements and specifications, critiquing the production code, writing and critiquing test code, evaluating test results, and tracing requirements to sub-requirements to specifications to code to tests, backwards and forwards. This was largely done by hand (the automated tools didn't exist), and of course was done without modern software development techniques such as Agile. While still very expensive, development of critical software has come a long ways since then.anorlunda said:Where it comes to embedded real time control software, I dispute that so much has really changed. In a few cases, modern software may have difficulty doing as well as some of the vintage stuff.
The things they were able to do with such tiny (capability-wise) computers back then is amazing to me. And they are still doing great things communicating with vehicles that were launched decades ago.D H said:The Space Shuttle flight software was written at a rate of about two or three lines of production code per person per month. The people behind that code weren't twiddling their thumbs for 159 working hours and then writing two or three lines of code. They were instead attending meetings (NASA loves meetings), writing requirements and specifications, critiquing the production code, writing and critiquing test code, evaluating test results, and tracing requirements to sub-requirements to specifications to code to tests, backwards and forwards. This was largely done by hand (the automated tools didn't exist), and of course was done without modern software development techniques such as Agile. While still very expensive, development of critical software has come a long ways since then.
Hear, hear!anorlunda said:Now you can fairly call me old fashioned, but I find it hard to imagine how the world's best quality control procedures, and software standards could ever make the "modern" implementation as risk free or reliable as the "old" 200 byte version. Worse, the modern standards probably prohibit the "old" version because it can't be verifiabull, auditabull, updatabull, securabull, or lots of other bulls. I argue that we are abandoning the KISS principle.
Yes. When hardware is the subject, people adhere to the KISS principle, but for software they abandon it.Svein said:Hear, hear!
FactChecker said:But I have one argument. I think that the old software would be very easy to apply new software processes to. The problem is that hundreds of new requirements are piled on. Many of the new requirements are good ideas, but there is a tendency to go overboard. They are trying to anticipate the needs of the next 30 years, which is very difficult if not impossible.
That is the million dollar question that I can't answer. Even trying to isolate a part like a MOV controller gets complicated when issues like redundancy, failure modes, communication standards, customer preferences, etc. come into play. It is often hard for technical software people to communicate (or even anticipate) the risk / cost / schedule consequences of decisions.anorlunda said:I'm sure that you're right. But let me ask you two questions.
1. How do you draw the line between necessary requirements and bloat? (Focusing first on a simple app like the MOV controller helps clarify.)
It is somewhat mysterious to me, but here is what I think. In military contracts top level requirements are initially set very optimistically by the military so that they can see how much different contractors can propose. As the contract winner is selected and development proceeds, they see that some requirements were unrealistic. They try to find some "low hanging fruit" that they did not think of before and can be done in place of the reduced / modified initial requirements. It's a negotiation.2. Who has the responsibility and authority to draw that line?
That is where the paperwork comes in. Done correctly, it is of vital importance.anorlunda said:I'm sure that you're right. But let me ask you two questions.
- How do you draw the line between necessary requirements and bloat? (Focusing first on a simple app like the MOV controller helps clarify.)
- Who has the responsibility and authority to draw that line?
Svein said:That is where the paperwork comes in. Done correctly, it is of vital importance.
I have used that model several times.
- The Requirement Specification is the responsibility of the customer. ...
- The Functional Specification is the responsibility of the developer. ...
- Ideally: Revised Req. Spec., revised Func. Spec., ...
- Hopefully: A Req. spec. that is reasonably clear and realistic and a Func. Spec. that is realistic.
Yes - but not all things are that simple.anorlunda said:My argument in #39 is that we are delivering lower quality software today than in the past because we don't follow the KISS principle. Refute that if you will. To prevent muddling the point being argued, please stick to the MOV app as the benchmark,(because to apply KISS, we must start with something simple.)
Svein said:Yes - but not all things are that simple.