Click here to Skip to main content
15,891,607 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralStroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
raddevus16-Jan-18 2:28
mvaraddevus16-Jan-18 2:28 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
OriginalGriff16-Jan-18 2:43
mveOriginalGriff16-Jan-18 2:43 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
raddevus16-Jan-18 2:47
mvaraddevus16-Jan-18 2:47 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
BGArts17-Jan-18 5:54
BGArts17-Jan-18 5:54 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Mike Hankey16-Jan-18 3:06
mveMike Hankey16-Jan-18 3:06 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Gary Huck17-Jan-18 3:04
Gary Huck17-Jan-18 3:04 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
KarstenK16-Jan-18 3:14
mveKarstenK16-Jan-18 3:14 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
wout de zeeuw16-Jan-18 3:54
wout de zeeuw16-Jan-18 3:54 
In theory you could specify that all internal units are SI (e.g. meter for distance), and then you just need to deal with unit conversions on the software interface to stored data or user interface.

But even if you handle everything in (value, unit) tuples, there could be an error in data entry that would go undetected by the software.

Alternative solution: have a debug mode where you use (value, unit), and have extra asserts to make sure your code is correct and in the release mode the unit checks would be removed so there's no overhead in production.
Wout

GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
ddt_tdd16-Jan-18 21:28
ddt_tdd16-Jan-18 21:28 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Gary Wheeler17-Jan-18 2:09
Gary Wheeler17-Jan-18 2:09 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
raddevus17-Jan-18 3:08
mvaraddevus17-Jan-18 3:08 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Abbas A. Ali18-Jan-18 1:04
professionalAbbas A. Ali18-Jan-18 1:04 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
raddevus18-Jan-18 1:55
mvaraddevus18-Jan-18 1:55 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Stuart Dootson16-Jan-18 23:50
professionalStuart Dootson16-Jan-18 23:50 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
molesworth17-Jan-18 1:53
molesworth17-Jan-18 1:53 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
raddevus17-Jan-18 2:49
mvaraddevus17-Jan-18 2:49 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
James Lonero17-Jan-18 6:18
James Lonero17-Jan-18 6:18 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
firegryphon17-Jan-18 9:41
firegryphon17-Jan-18 9:41 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
BryanFazekas17-Jan-18 2:16
BryanFazekas17-Jan-18 2:16 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
raddevus17-Jan-18 2:38
mvaraddevus17-Jan-18 2:38 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Dale Margel17-Jan-18 4:11
professionalDale Margel17-Jan-18 4:11 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
James Lonero17-Jan-18 6:05
James Lonero17-Jan-18 6:05 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
Gerry Schmitz17-Jan-18 9:08
mveGerry Schmitz17-Jan-18 9:08 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
firegryphon17-Jan-18 9:34
firegryphon17-Jan-18 9:34 
GeneralRe: Stroustrup on NASA's loss of $654 million Mars Climate Orbiter Pin
kalberts17-Jan-18 10:06
kalberts17-Jan-18 10:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.