Hacker News new | ask | show | jobs
by qznc 2602 days ago
There is no other useful meaning of "correct code" apart from "matches specification/design". There is no notion of correctness for design. The design may not be consistent with safety requirements for example.
1 comments

Of course there is correctness for design!

When reviewing a design, the first thing to verify is if it can satisfy its input requirements. In your example, a design that has to satisfy a safety requirement but doesn't is not correct and must be rejected.

My comment tried to use the same words as its parent:

> Somebody at Boeing specified the software design to be "1 sensor and 2.5 degrees"

What is called a "software design" there, you would probably call a "requirement".

I agree with you. Your meaning of "design" has a notion of correctness.

The safety requirements are one of the design decisions that have to be made, not a separate thing that exists outside design space.
No!

Requirements are product features that must be present. A Design is one of many potential ways to satisfy that set of Requirements.

For example, a requirement might be "the user shall not be exposed to hazardous voltages (defined elsewhere) when servicing the equipment."

A possible Design solution might be "provide cover interlock switches so when the covers are opened, all voltage supplies are disconnected." or "software monitors a cover switch, and when that particular cover is opened, a command is sent to the power controller to disconnect power to anything that is reachable from that opening."

Which of the two (or other) design options is chosen, is a Design Decision, but they are means to an end, that end being Satisfying The Requirement.