SlideShare a Scribd company logo
1 of 56
Download to read offline
How JSR 385 Could Have Saved
the Mars Climate Orbiter
Filip van Laenen, JSR 385 Contributor
Mars
Climate
Orbiter
● Launched on 11
December 1998
● 338 kilograms
● $125 million
● To study Martian
climate, atmosphere
and surface changes 2
3
4
5
Mars
Climate
Orbiter
“The problem here was not the error; it was the
failure of NASA's systems engineering, and the
checks and balances in our processes, to detect
the error. That's why we lost the spacecraft.”
—Edward Weiler,
NASA associate administrator for space science,
IEEE Spectrum: Why the Mars Probe went off
course
Other Unit
Mishaps
6
● The 12 October 1492 “mishap”
● “Gimli Glider”, 1983
○ Air Canada Flight 143
○ Received less than half the fuel
needed
● Clarence the Tortoise, 2001
● A whole set of medication
dose errors
Problem Statement
7
What Is the Fundamental Problem?
8
Primitive (Java) types
are primitive types
What Is the Fundamental Problem?
9
● Primitive (Java) types are primitive types
○ As in: building blocks to build other types
● Examples fundamentally in conflict with OOP and DDD:
○ static final double C = 1079252849;
○ static final double SPEED_OF_LIGHT = 1079252849;
○ static final double SPEED_OF_LIGHT_IN_KM_PER_H = 1079252849;
● What it should be:
○ static final Quantity<Speed> SPEED_OF_LIGHT
= Quantities.getQuantity(1079252849, Units.KILOMETRE_PER_HOUR);
Rolling Your Own Library
10
● A lot of work
○ Development
○ Maintenance
○ Upgrades and extensions
● Error-prone
● Are you a units of measurement domain expert?
○ Even of the units of measurement system you’re used to?
What is JSR 385?
https://www.slideshare.net/filipvanlaenen
11
JSR 385: Units of Measurement API 2.0
12
Description:
This JSR is a major evolution of the Unit API 1.0 (JSR 363) specification.
Focused on the SI System redefinition, modularity and support for Java
SE 8/9 and above.
JSR 363: Units of Measurement API
This JSR specifies Java packages for modeling and working with
measurement values, quantities and their corresponding units.
JSR 385 Basic Concepts
13
● Dimensions
● Units
● Quantities
JSR 385 Basic Concepts
14
● Dimensions
● Units
● Quantities
● Prefixes
● Converters
● Formats
● System of units
Quantities
15
Definition of a Physical Quantity
16
“A physical quantity is a physical property of a phenomenon, body, or
substance, that can be quantified by measurement.”
Source: Wikipedia
Definition of a Physical Quantity
17
“A physical quantity is a physical property of a phenomenon, body, or
substance, that can be quantified by measurement.”
Source: Wikipedia
“A physical quantity can be expressed as the combination of a magnitude
expressed by a number – usually a real number – and a unit.”
Ibidem
18
c = 299,792,458 m/s
Value Unit
Speed of Light
Definition of a Physical Quantity
19
“A physical quantity is a physical property of a phenomenon, body, or
substance, that can be quantified by measurement.”
Source: Wikipedia
“A physical quantity can be expressed as the combination of a magnitude
expressed by a number – usually a real number – and a unit.”
“The same physical quantity can be represented equivalently in many unit
systems.”
Ibidem
20
c = 299,792,458 m/s
= 1,079,252,849 km/h
Speed of Light
Units
21
Base Units
22
● m
● s
● kg
● A
● K
● mol
● cd
Derived Units
23
● m/s
● m/s2
● rad (= m/m)
● Hz (= s-1
)
● N (= kg·m·s-2
)
● °C (= K - 273.15)
Multiples
24
● km
● ms
● Mm?
● ks?
Dimensions
25
Dimensions
26
● L: length
● T: time
● M: mass
● I: electric current
● Θ: thermodynamic temperature
● N: amount of substance
● J: luminous intensity
● (1)
Force: L·M·T-2
Doing the Maths
27
Equality and Equivalence
28
Units:
● kΩ ≠ mHz
● kΩ ≠ mΩ
● kΩ ≡ kΩ
● N ≅ kg·m·s-2
● kg·m-2
≅ mg·mm-2
Quantities:
● 1 kΩ ≠ 1 mHz
● 1 kΩ ≠ 1 mΩ
● 1 kΩ ≡ 1 kΩ
● 1 N ≅ 1 kg·m·s-2
● 1 kg·m-2
≅ 1 mg·mm-2
● 1 kΩ ≅ 1,000 Ω
Quantity Addition
● 1 Ω + 1 Ω = 2 Ω
● 1 Ω + 1 mΩ = 1.001 Ω
● 1 Ω + 1 kΩ = 1,001 Ω
● 1 Ω + 1 m “does not compute”
29
Question: How Much is 0 °C + 0 °C?
30
Question: How Much is 0 °C + 0 °C?
● 0 °C?
31
Question: How Much is 0 °C + 0 °C?
● 0 °C?
● 0 °C?
32
Question: How Much is 0 °C + 0 °C?
● 0 °C?
● 0 °C?
● 273.15 °C?
33
Question: How Much is 0 °C + 0 °C?
● 0 °C
● 0 °C
● 273.15 °C
34
Question: How Much is 0 °C + 0 °C?
● 0 °C
● 0 °C
● 273.15 °C
Two absolute temperatures:
0 °C + 0 °C = 273.15 K + 273.15 K
= 546.30 K
= 273.15 °C
35
Question: How Much is 0 °C + 0 °C?
● 0 °C
● 0 °C
● 273.15 °C
An absolute temperature and a temperature change:
0 °C + 0 °C = 273.15 K + 0 K
= 273.15 K
= 0 °C
36
Question: How Much is 0 °C + 0 °C?
● 0 °C
● 0 °C
● 273.15 °C
Two temperature changes:
0 °C + 0 °C = 0 K + 0 K
= 0 K
= 0 °C
37
Question: How Much is 0 °C + 0 °C?
273.15 °C (546.30 K)
0 °C + 0 °C = 0 °C (273.15 K)
0 °C (0 K)
38
Multiplication
39
Units:
● kg × m = kg·m
● kg × mm = kg·mm
● g × km = g·km ≟ kg·m
● m × m = m2
● km × km = km2
● mm × km = mm·km ≟ m2
● µm × m = µm·m ≟ mm2
Quantities:
● 2 kg × 3 m = 6 kg·m
Division
40
Units:
● kg / m = kg·m-1
● kg / mm = kg·mm-1
● g / mm = g·mm-1
≟ kg·m-1
● m2
/ m = m
● m / m = 1
● km / km = 1
● km / m = km/m ≟ 1k
Quantities:
● 3 kg / 2 m = 1.5 kg·m-1
Powers
41
Units:
● (m)2
= m2
● (km)2
= km2
● (m2
)2
= m4
Quantities:
● (3 m)2
= 9 m2
Celsius Revisited
42
Units:
● (K)2
= K2
● (°C)2
≟ (K - 273.15)2
● m × °C ≟ m·(K - 273.15)
Quantities:
● 0 °C2
≟ 74,610.9225 K2
Parsing Units and
Quantities
43
Speed of Light
44
● 299,792,458 m/s
● 299792458 m/s
● 299792.458 km/s
● 299,792.458 km/s
● 299,792.458 km*s-1
● 299,792.458 km×s-1
● 299,792.458 km·s-1
● 299,792.458 km·s⁻¹
● 299,792.458 km*s^-1
● 1,079,252,849 km/h
● 1,079,252,849 km/t
● 670,616,629 mph
Systems of
Measurement
45
Systems of Measurement
46
● Metric system
○ Metre, kilogram, second, ampere, …
● Imperial system
○ Foot, ounce, pound, gallon, Fahrenheit, horsepower, …
● United States customary units
○ Foot, ounce, pound, gallon, Fahrenheit, horsepower, …
● Roman units of measurement
○ Pes, uncia, libra, …
● Norwegian units of measurement
○ Fot, favn, mål, tønne, snes, …
What Was the Fundamental Problem Again?
47
Primitive (Java) types
are primitive types
JSR 385 Status
48
JSR 385
49
● JCP page
○ https://www.jcp.org/en/jsr/detail?id=385
● GitHub repositories
○ https://github.com/unitsofmeasurement/
● Current status:
○ Early Draft Review (EDR)
○ Preparing for Public Review and Public Review Ballot
A Small Word about
JCP and JSRs…
50
The Java Community Process
51
“The JCP gives you a chance to have your own work become an official
component of the Java platform and to offer suggestions for improving
and growing the technology. Either way, everyone in the Java community
benefits from your participation. That's one of the reasons the JCP is open
to everyone.”
Source: https://www.jcp.org/en/participation/overview
Becoming a JCP Member
52
“Membership in the JCP offers you a chance to become a permanent part
of the Java platform's history by contributing your work and
recommendations to the various standard specifications, and/or a chance
of serving on the Executive Committee.”
Source: https://www.jcp.org/en/participation/membership
53
54
What I
used to
be
55
Computas about
to sign the JSPA
Questions?
Comments?
https://www.slideshare.net/filipvanlaenen
@filipvanlaenen
56

More Related Content

What's hot

Chemial kinetic problem.
Chemial kinetic problem.Chemial kinetic problem.
Chemial kinetic problem.nysa tutorial
 
units and dimensions
units and dimensionsunits and dimensions
units and dimensionsKrishna Gali
 
Basic science
Basic scienceBasic science
Basic scienceLoki Maha
 
Standard system for weights
Standard system for weightsStandard system for weights
Standard system for weightsuog
 
Proposed experiments to prove the grid dimensions theory
Proposed experiments to prove the grid dimensions theory Proposed experiments to prove the grid dimensions theory
Proposed experiments to prove the grid dimensions theory Eran Sinbar
 
The Dark Side of the Universe
The Dark Side of the UniverseThe Dark Side of the Universe
The Dark Side of the UniverseRohanSrivastava56
 
IB Chemistry on Reaction Mechanism
IB Chemistry on Reaction MechanismIB Chemistry on Reaction Mechanism
IB Chemistry on Reaction MechanismLawrence kok
 
Structural Design Calculations of Cement Mill 4
Structural Design Calculations of Cement Mill 4 Structural Design Calculations of Cement Mill 4
Structural Design Calculations of Cement Mill 4 Benedict Banquil
 
Topic 1realm of physics
Topic 1realm of physicsTopic 1realm of physics
Topic 1realm of physicsnlahoud
 
Dinamika partikel Mata Kuliah Konsep Dasar IPA
Dinamika partikel Mata Kuliah Konsep Dasar IPADinamika partikel Mata Kuliah Konsep Dasar IPA
Dinamika partikel Mata Kuliah Konsep Dasar IPAlailam02
 
Kane’s Method for Robotic Arm Dynamics: a Novel Approach
Kane’s Method for Robotic Arm Dynamics: a Novel ApproachKane’s Method for Robotic Arm Dynamics: a Novel Approach
Kane’s Method for Robotic Arm Dynamics: a Novel ApproachIOSR Journals
 
1 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 21 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 2ffiala
 
Computational Physics - modelling the two-dimensional gravitational problem b...
Computational Physics - modelling the two-dimensional gravitational problem b...Computational Physics - modelling the two-dimensional gravitational problem b...
Computational Physics - modelling the two-dimensional gravitational problem b...slemarc
 
1 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 21 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 2ffiala
 
VIBRATIONS AND WAVES TUTORIAL#2
VIBRATIONS AND WAVES TUTORIAL#2VIBRATIONS AND WAVES TUTORIAL#2
VIBRATIONS AND WAVES TUTORIAL#2Farhan Ab Rahman
 
1 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 21 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 2ffiala
 

What's hot (20)

Chemial kinetic problem.
Chemial kinetic problem.Chemial kinetic problem.
Chemial kinetic problem.
 
units and dimensions
units and dimensionsunits and dimensions
units and dimensions
 
Basic science
Basic scienceBasic science
Basic science
 
Lo #1
Lo #1Lo #1
Lo #1
 
Standard system for weights
Standard system for weightsStandard system for weights
Standard system for weights
 
Chapter 1 Mechanics
Chapter 1 MechanicsChapter 1 Mechanics
Chapter 1 Mechanics
 
Proposed experiments to prove the grid dimensions theory
Proposed experiments to prove the grid dimensions theory Proposed experiments to prove the grid dimensions theory
Proposed experiments to prove the grid dimensions theory
 
Lecture 01: STKM3212
Lecture 01: STKM3212Lecture 01: STKM3212
Lecture 01: STKM3212
 
The Dark Side of the Universe
The Dark Side of the UniverseThe Dark Side of the Universe
The Dark Side of the Universe
 
IB Chemistry on Reaction Mechanism
IB Chemistry on Reaction MechanismIB Chemistry on Reaction Mechanism
IB Chemistry on Reaction Mechanism
 
Structural Design Calculations of Cement Mill 4
Structural Design Calculations of Cement Mill 4 Structural Design Calculations of Cement Mill 4
Structural Design Calculations of Cement Mill 4
 
Topic 1realm of physics
Topic 1realm of physicsTopic 1realm of physics
Topic 1realm of physics
 
Uslides2
Uslides2Uslides2
Uslides2
 
Dinamika partikel Mata Kuliah Konsep Dasar IPA
Dinamika partikel Mata Kuliah Konsep Dasar IPADinamika partikel Mata Kuliah Konsep Dasar IPA
Dinamika partikel Mata Kuliah Konsep Dasar IPA
 
Kane’s Method for Robotic Arm Dynamics: a Novel Approach
Kane’s Method for Robotic Arm Dynamics: a Novel ApproachKane’s Method for Robotic Arm Dynamics: a Novel Approach
Kane’s Method for Robotic Arm Dynamics: a Novel Approach
 
1 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 21 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 2
 
Computational Physics - modelling the two-dimensional gravitational problem b...
Computational Physics - modelling the two-dimensional gravitational problem b...Computational Physics - modelling the two-dimensional gravitational problem b...
Computational Physics - modelling the two-dimensional gravitational problem b...
 
1 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 21 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 2
 
VIBRATIONS AND WAVES TUTORIAL#2
VIBRATIONS AND WAVES TUTORIAL#2VIBRATIONS AND WAVES TUTORIAL#2
VIBRATIONS AND WAVES TUTORIAL#2
 
1 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 21 2012 ppt semester 1 review and tutorial 2
1 2012 ppt semester 1 review and tutorial 2
 

Similar to How JSR-385 Could Have Saved the Mars Climate Orbiter

How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR DayHow JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR DayWerner Keil
 
3-measurement-161127184347.docx
3-measurement-161127184347.docx3-measurement-161127184347.docx
3-measurement-161127184347.docxHome
 
Chapter 1 - Unit s and Measurement.pptx
Chapter 1 - Unit s and Measurement.pptxChapter 1 - Unit s and Measurement.pptx
Chapter 1 - Unit s and Measurement.pptxPooja M
 
Chapter 2 unit and measurements
Chapter 2 unit and measurementsChapter 2 unit and measurements
Chapter 2 unit and measurementsVishnu Priya
 
ScannerGo_1665225858109.pptx
ScannerGo_1665225858109.pptxScannerGo_1665225858109.pptx
ScannerGo_1665225858109.pptxItsSHUBH
 
Measurement class 11
Measurement class 11 Measurement class 11
Measurement class 11 Home
 
Units and Measurement
Units and MeasurementUnits and Measurement
Units and MeasurementKhanSaif2
 
3-measurement-161127184347.pdf
3-measurement-161127184347.pdf3-measurement-161127184347.pdf
3-measurement-161127184347.pdfRAKESH MOHAN
 
Diploma sem 2 applied science physics-unit 1-chap 1 measurements
Diploma sem 2 applied science physics-unit 1-chap 1 measurementsDiploma sem 2 applied science physics-unit 1-chap 1 measurements
Diploma sem 2 applied science physics-unit 1-chap 1 measurementsRai University
 
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Fundamentals O...
Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Fundamentals O...Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Fundamentals O...
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Fundamentals O...AIMST University
 
Ch1z5echemfnd 110115225130-phpapp02
Ch1z5echemfnd 110115225130-phpapp02Ch1z5echemfnd 110115225130-phpapp02
Ch1z5echemfnd 110115225130-phpapp02Cleophas Rwemera
 
measurement units slideshow chapter one pdf
measurement units slideshow chapter one pdfmeasurement units slideshow chapter one pdf
measurement units slideshow chapter one pdf7gxrufzxu
 
Units , Measurement and Dimensional Analysis
Units , Measurement and Dimensional AnalysisUnits , Measurement and Dimensional Analysis
Units , Measurement and Dimensional AnalysisOleepari
 
1. Units and Measurements.pptx
1. Units and Measurements.pptx1. Units and Measurements.pptx
1. Units and Measurements.pptxHillaHjtKhembo
 
Units and Measurements.pptx
Units and Measurements.pptxUnits and Measurements.pptx
Units and Measurements.pptxpavanhu
 
measurement-200427061108.pdf
measurement-200427061108.pdfmeasurement-200427061108.pdf
measurement-200427061108.pdffamilychannel7
 
Units & measurements
Units &  measurementsUnits &  measurements
Units & measurementsAmol Kumbhar
 

Similar to How JSR-385 Could Have Saved the Mars Climate Orbiter (20)

How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR DayHow JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
 
3-measurement-161127184347.docx
3-measurement-161127184347.docx3-measurement-161127184347.docx
3-measurement-161127184347.docx
 
Chapter 1 - Unit s and Measurement.pptx
Chapter 1 - Unit s and Measurement.pptxChapter 1 - Unit s and Measurement.pptx
Chapter 1 - Unit s and Measurement.pptx
 
Chapter 2 unit and measurements
Chapter 2 unit and measurementsChapter 2 unit and measurements
Chapter 2 unit and measurements
 
ScannerGo_1665225858109.pptx
ScannerGo_1665225858109.pptxScannerGo_1665225858109.pptx
ScannerGo_1665225858109.pptx
 
Pengukuran
Pengukuran Pengukuran
Pengukuran
 
Measurement class 11
Measurement class 11 Measurement class 11
Measurement class 11
 
Units and Measurement
Units and MeasurementUnits and Measurement
Units and Measurement
 
3-measurement-161127184347.pdf
3-measurement-161127184347.pdf3-measurement-161127184347.pdf
3-measurement-161127184347.pdf
 
Diploma sem 2 applied science physics-unit 1-chap 1 measurements
Diploma sem 2 applied science physics-unit 1-chap 1 measurementsDiploma sem 2 applied science physics-unit 1-chap 1 measurements
Diploma sem 2 applied science physics-unit 1-chap 1 measurements
 
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Fundamentals O...
Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Fundamentals O...Lecture Notes:  EEEC6430312 Measurements And Instrumentation - Fundamentals O...
Lecture Notes: EEEC6430312 Measurements And Instrumentation - Fundamentals O...
 
Ch1z5echemfnd 110115225130-phpapp02
Ch1z5echemfnd 110115225130-phpapp02Ch1z5echemfnd 110115225130-phpapp02
Ch1z5echemfnd 110115225130-phpapp02
 
measurement units slideshow chapter one pdf
measurement units slideshow chapter one pdfmeasurement units slideshow chapter one pdf
measurement units slideshow chapter one pdf
 
System of Units
System of UnitsSystem of Units
System of Units
 
Units , Measurement and Dimensional Analysis
Units , Measurement and Dimensional AnalysisUnits , Measurement and Dimensional Analysis
Units , Measurement and Dimensional Analysis
 
1. Units and Measurements.pptx
1. Units and Measurements.pptx1. Units and Measurements.pptx
1. Units and Measurements.pptx
 
Units and Measurements.pptx
Units and Measurements.pptxUnits and Measurements.pptx
Units and Measurements.pptx
 
Presentation1.pdf
Presentation1.pdfPresentation1.pdf
Presentation1.pdf
 
measurement-200427061108.pdf
measurement-200427061108.pdfmeasurement-200427061108.pdf
measurement-200427061108.pdf
 
Units & measurements
Units &  measurementsUnits &  measurements
Units & measurements
 

More from Filip Van Laenen

Clouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesClouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesFilip Van Laenen
 
Become an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectBecome an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectFilip Van Laenen
 
Mutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeMutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeFilip Van Laenen
 
Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Filip Van Laenen
 
Five Inconvenient Truths about REST
Five Inconvenient Truths about RESTFive Inconvenient Truths about REST
Five Inconvenient Truths about RESTFilip Van Laenen
 
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...Filip Van Laenen
 
Oop 2015 – Mutation Testing
Oop 2015 – Mutation TestingOop 2015 – Mutation Testing
Oop 2015 – Mutation TestingFilip Van Laenen
 
#NoEstimates – Smidig 2014
 #NoEstimates – Smidig 2014 #NoEstimates – Smidig 2014
#NoEstimates – Smidig 2014Filip Van Laenen
 
#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014Filip Van Laenen
 
Tre ubeleilige sannheter om REST
Tre ubeleilige sannheter om RESTTre ubeleilige sannheter om REST
Tre ubeleilige sannheter om RESTFilip Van Laenen
 
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Filip Van Laenen
 
Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Filip Van Laenen
 
Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Filip Van Laenen
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)Filip Van Laenen
 
SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)Filip Van Laenen
 

More from Filip Van Laenen (18)

Drawing for IT Architects
Drawing for IT ArchitectsDrawing for IT Architects
Drawing for IT Architects
 
Clouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesClouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp Edges
 
Become an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectBecome an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint Architect
 
Dial M for Mutation
Dial M for MutationDial M for Mutation
Dial M for Mutation
 
Mutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeMutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kode
 
Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?
 
Five Inconvenient Truths about REST
Five Inconvenient Truths about RESTFive Inconvenient Truths about REST
Five Inconvenient Truths about REST
 
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
 
Oop 2015 – Mutation Testing
Oop 2015 – Mutation TestingOop 2015 – Mutation Testing
Oop 2015 – Mutation Testing
 
#NoEstimates – Smidig 2014
 #NoEstimates – Smidig 2014 #NoEstimates – Smidig 2014
#NoEstimates – Smidig 2014
 
#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014
 
Tre ubeleilige sannheter om REST
Tre ubeleilige sannheter om RESTTre ubeleilige sannheter om REST
Tre ubeleilige sannheter om REST
 
What Architects Really Do
What Architects Really DoWhat Architects Really Do
What Architects Really Do
 
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
 
Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?
 
Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)
 
SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)
 

Recently uploaded

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

How JSR-385 Could Have Saved the Mars Climate Orbiter

  • 1. How JSR 385 Could Have Saved the Mars Climate Orbiter Filip van Laenen, JSR 385 Contributor
  • 2. Mars Climate Orbiter ● Launched on 11 December 1998 ● 338 kilograms ● $125 million ● To study Martian climate, atmosphere and surface changes 2
  • 3. 3
  • 4. 4
  • 5. 5 Mars Climate Orbiter “The problem here was not the error; it was the failure of NASA's systems engineering, and the checks and balances in our processes, to detect the error. That's why we lost the spacecraft.” —Edward Weiler, NASA associate administrator for space science, IEEE Spectrum: Why the Mars Probe went off course
  • 6. Other Unit Mishaps 6 ● The 12 October 1492 “mishap” ● “Gimli Glider”, 1983 ○ Air Canada Flight 143 ○ Received less than half the fuel needed ● Clarence the Tortoise, 2001 ● A whole set of medication dose errors
  • 8. What Is the Fundamental Problem? 8 Primitive (Java) types are primitive types
  • 9. What Is the Fundamental Problem? 9 ● Primitive (Java) types are primitive types ○ As in: building blocks to build other types ● Examples fundamentally in conflict with OOP and DDD: ○ static final double C = 1079252849; ○ static final double SPEED_OF_LIGHT = 1079252849; ○ static final double SPEED_OF_LIGHT_IN_KM_PER_H = 1079252849; ● What it should be: ○ static final Quantity<Speed> SPEED_OF_LIGHT = Quantities.getQuantity(1079252849, Units.KILOMETRE_PER_HOUR);
  • 10. Rolling Your Own Library 10 ● A lot of work ○ Development ○ Maintenance ○ Upgrades and extensions ● Error-prone ● Are you a units of measurement domain expert? ○ Even of the units of measurement system you’re used to?
  • 11. What is JSR 385? https://www.slideshare.net/filipvanlaenen 11
  • 12. JSR 385: Units of Measurement API 2.0 12 Description: This JSR is a major evolution of the Unit API 1.0 (JSR 363) specification. Focused on the SI System redefinition, modularity and support for Java SE 8/9 and above. JSR 363: Units of Measurement API This JSR specifies Java packages for modeling and working with measurement values, quantities and their corresponding units.
  • 13. JSR 385 Basic Concepts 13 ● Dimensions ● Units ● Quantities
  • 14. JSR 385 Basic Concepts 14 ● Dimensions ● Units ● Quantities ● Prefixes ● Converters ● Formats ● System of units
  • 16. Definition of a Physical Quantity 16 “A physical quantity is a physical property of a phenomenon, body, or substance, that can be quantified by measurement.” Source: Wikipedia
  • 17. Definition of a Physical Quantity 17 “A physical quantity is a physical property of a phenomenon, body, or substance, that can be quantified by measurement.” Source: Wikipedia “A physical quantity can be expressed as the combination of a magnitude expressed by a number – usually a real number – and a unit.” Ibidem
  • 18. 18 c = 299,792,458 m/s Value Unit Speed of Light
  • 19. Definition of a Physical Quantity 19 “A physical quantity is a physical property of a phenomenon, body, or substance, that can be quantified by measurement.” Source: Wikipedia “A physical quantity can be expressed as the combination of a magnitude expressed by a number – usually a real number – and a unit.” “The same physical quantity can be represented equivalently in many unit systems.” Ibidem
  • 20. 20 c = 299,792,458 m/s = 1,079,252,849 km/h Speed of Light
  • 22. Base Units 22 ● m ● s ● kg ● A ● K ● mol ● cd
  • 23. Derived Units 23 ● m/s ● m/s2 ● rad (= m/m) ● Hz (= s-1 ) ● N (= kg·m·s-2 ) ● °C (= K - 273.15)
  • 26. Dimensions 26 ● L: length ● T: time ● M: mass ● I: electric current ● Θ: thermodynamic temperature ● N: amount of substance ● J: luminous intensity ● (1) Force: L·M·T-2
  • 28. Equality and Equivalence 28 Units: ● kΩ ≠ mHz ● kΩ ≠ mΩ ● kΩ ≡ kΩ ● N ≅ kg·m·s-2 ● kg·m-2 ≅ mg·mm-2 Quantities: ● 1 kΩ ≠ 1 mHz ● 1 kΩ ≠ 1 mΩ ● 1 kΩ ≡ 1 kΩ ● 1 N ≅ 1 kg·m·s-2 ● 1 kg·m-2 ≅ 1 mg·mm-2 ● 1 kΩ ≅ 1,000 Ω
  • 29. Quantity Addition ● 1 Ω + 1 Ω = 2 Ω ● 1 Ω + 1 mΩ = 1.001 Ω ● 1 Ω + 1 kΩ = 1,001 Ω ● 1 Ω + 1 m “does not compute” 29
  • 30. Question: How Much is 0 °C + 0 °C? 30
  • 31. Question: How Much is 0 °C + 0 °C? ● 0 °C? 31
  • 32. Question: How Much is 0 °C + 0 °C? ● 0 °C? ● 0 °C? 32
  • 33. Question: How Much is 0 °C + 0 °C? ● 0 °C? ● 0 °C? ● 273.15 °C? 33
  • 34. Question: How Much is 0 °C + 0 °C? ● 0 °C ● 0 °C ● 273.15 °C 34
  • 35. Question: How Much is 0 °C + 0 °C? ● 0 °C ● 0 °C ● 273.15 °C Two absolute temperatures: 0 °C + 0 °C = 273.15 K + 273.15 K = 546.30 K = 273.15 °C 35
  • 36. Question: How Much is 0 °C + 0 °C? ● 0 °C ● 0 °C ● 273.15 °C An absolute temperature and a temperature change: 0 °C + 0 °C = 273.15 K + 0 K = 273.15 K = 0 °C 36
  • 37. Question: How Much is 0 °C + 0 °C? ● 0 °C ● 0 °C ● 273.15 °C Two temperature changes: 0 °C + 0 °C = 0 K + 0 K = 0 K = 0 °C 37
  • 38. Question: How Much is 0 °C + 0 °C? 273.15 °C (546.30 K) 0 °C + 0 °C = 0 °C (273.15 K) 0 °C (0 K) 38
  • 39. Multiplication 39 Units: ● kg × m = kg·m ● kg × mm = kg·mm ● g × km = g·km ≟ kg·m ● m × m = m2 ● km × km = km2 ● mm × km = mm·km ≟ m2 ● µm × m = µm·m ≟ mm2 Quantities: ● 2 kg × 3 m = 6 kg·m
  • 40. Division 40 Units: ● kg / m = kg·m-1 ● kg / mm = kg·mm-1 ● g / mm = g·mm-1 ≟ kg·m-1 ● m2 / m = m ● m / m = 1 ● km / km = 1 ● km / m = km/m ≟ 1k Quantities: ● 3 kg / 2 m = 1.5 kg·m-1
  • 41. Powers 41 Units: ● (m)2 = m2 ● (km)2 = km2 ● (m2 )2 = m4 Quantities: ● (3 m)2 = 9 m2
  • 42. Celsius Revisited 42 Units: ● (K)2 = K2 ● (°C)2 ≟ (K - 273.15)2 ● m × °C ≟ m·(K - 273.15) Quantities: ● 0 °C2 ≟ 74,610.9225 K2
  • 44. Speed of Light 44 ● 299,792,458 m/s ● 299792458 m/s ● 299792.458 km/s ● 299,792.458 km/s ● 299,792.458 km*s-1 ● 299,792.458 km×s-1 ● 299,792.458 km·s-1 ● 299,792.458 km·s⁻¹ ● 299,792.458 km*s^-1 ● 1,079,252,849 km/h ● 1,079,252,849 km/t ● 670,616,629 mph
  • 46. Systems of Measurement 46 ● Metric system ○ Metre, kilogram, second, ampere, … ● Imperial system ○ Foot, ounce, pound, gallon, Fahrenheit, horsepower, … ● United States customary units ○ Foot, ounce, pound, gallon, Fahrenheit, horsepower, … ● Roman units of measurement ○ Pes, uncia, libra, … ● Norwegian units of measurement ○ Fot, favn, mål, tønne, snes, …
  • 47. What Was the Fundamental Problem Again? 47 Primitive (Java) types are primitive types
  • 49. JSR 385 49 ● JCP page ○ https://www.jcp.org/en/jsr/detail?id=385 ● GitHub repositories ○ https://github.com/unitsofmeasurement/ ● Current status: ○ Early Draft Review (EDR) ○ Preparing for Public Review and Public Review Ballot
  • 50. A Small Word about JCP and JSRs… 50
  • 51. The Java Community Process 51 “The JCP gives you a chance to have your own work become an official component of the Java platform and to offer suggestions for improving and growing the technology. Either way, everyone in the Java community benefits from your participation. That's one of the reasons the JCP is open to everyone.” Source: https://www.jcp.org/en/participation/overview
  • 52. Becoming a JCP Member 52 “Membership in the JCP offers you a chance to become a permanent part of the Java platform's history by contributing your work and recommendations to the various standard specifications, and/or a chance of serving on the Executive Committee.” Source: https://www.jcp.org/en/participation/membership
  • 53. 53