SlideShare ist ein Scribd-Unternehmen logo
1 von 44
How JSR 385
Could Have Saved
the Mars Climate Orbiter
Thodoris Bais, Werner Keil, Filip Van Laenen
Who am I?
● Consultant – Coach
● Creative Cosmopolitan
● Open Source Evangelist
● Software Architect
● Spec Lead – JSR385
● Eclipse UOMo Project Lead
Twitter @wernerkeil
Mars
Climate
Orbiter
● Launched on 11
December 1998
● 338 kilograms
● $125 million
● To study Martian
climate, atmosphere
and surface changes
3
5
6
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
7
● 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
8
What Is the Fundamental Problem?
9
Primitive (Java) types
are primitive types
What Is the Fundamental Problem?
10
● 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
11
● 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?
12
JSR 385: Units of Measurement API 2.0
13
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
15
● Dimensions
● Units
● Quantities
● Prefixes
● Converters
● Formats
● System of units
Quantities
16
Definition of a Physical Quantity
18
“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
19
c = 299,792,458 m/s
Value Unit
Speed of Light
21
c = 299,792,458 m/s
= 1,079,252,849 km/h
Speed of Light
Units
22
Base Units
23
● m
● s
● kg
● A
● K
● mol
● cd
Derived Units
24
● m/s
● m/s2
● rad (= m/m)
● Hz (= s-1)
● N (= kg·m·s-2)
● °C (= K - 273.15)
Multiples
25
● km
● ms
● Mm?
● ks?
Dimensions
26
Dimensions
27
● 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 Math
28
Equality and Equivalence
29
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 Ω
Question: How Much is 0 °C + 0 °C?
31
Question: How Much is 0 °C + 0 °C?
● 0 °C?
32
Question: How Much is 0 °C + 0 °C?
● 0 °C?
● 0 °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
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 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 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 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)
39
Parsing Units and
Quantities
44
Systems of Unit
46
Systems of Unit
47
● 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, …
JSR 385 Status
49
JSR 385
50
● JCP page
○ https://www.jcp.org/en/jsr/detail?id=385
● GitHub repositories
○ https://github.com/unitsofmeasurement/
● Current status:
○ Public Review (PR)
○ Preparing for Final Release
A Small Word about JCP
and JSRs…
51
The Java Community Process
52
“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
53
“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
54
Questions?
Comments?
55

Weitere ähnliche Inhalte

Was ist angesagt?

SN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli Kasai
SN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli KasaiSN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli Kasai
SN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli Kasai
CosmoAIMS Bassett
 
Jim Metz.SAR Contour Landscapes
Jim Metz.SAR Contour LandscapesJim Metz.SAR Contour Landscapes
Jim Metz.SAR Contour Landscapes
James T. Metz
 
Physicprojectof211
Physicprojectof211Physicprojectof211
Physicprojectof211
anran chen
 

Was ist angesagt? (9)

Privilege Project Vikram Andem
Privilege Project Vikram AndemPrivilege Project Vikram Andem
Privilege Project Vikram Andem
 
How to plan and execute contractile measurements in permeabilized muscle fibe...
How to plan and execute contractile measurements in permeabilized muscle fibe...How to plan and execute contractile measurements in permeabilized muscle fibe...
How to plan and execute contractile measurements in permeabilized muscle fibe...
 
Frontiers of Science and Clouds - Tim Bell - Openstack Day Israel 2016
Frontiers of Science and Clouds - Tim Bell - Openstack Day Israel 2016Frontiers of Science and Clouds - Tim Bell - Openstack Day Israel 2016
Frontiers of Science and Clouds - Tim Bell - Openstack Day Israel 2016
 
SN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli Kasai
SN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli KasaiSN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli Kasai
SN Ia Rate in Intermediate-Redshift Galaxy Clusters - Eli Kasai
 
Science Technology Engineering Mathematics
Science Technology Engineering MathematicsScience Technology Engineering Mathematics
Science Technology Engineering Mathematics
 
Global Cyberinfrastructure to Support e-Research
Global Cyberinfrastructure to Support e-ResearchGlobal Cyberinfrastructure to Support e-Research
Global Cyberinfrastructure to Support e-Research
 
Jim Metz.SAR Contour Landscapes
Jim Metz.SAR Contour LandscapesJim Metz.SAR Contour Landscapes
Jim Metz.SAR Contour Landscapes
 
Physicprojectof211
Physicprojectof211Physicprojectof211
Physicprojectof211
 
200911 mbt-ai4_a_dintm__presentation
200911  mbt-ai4_a_dintm__presentation200911  mbt-ai4_a_dintm__presentation
200911 mbt-ai4_a_dintm__presentation
 

Ähnlich wie How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day

Chapter i quantities editing
Chapter i quantities editingChapter i quantities editing
Chapter i quantities editing
rozi arrozi
 
PHM2106-Presentation-Hubbard
PHM2106-Presentation-HubbardPHM2106-Presentation-Hubbard
PHM2106-Presentation-Hubbard
Charles Hubbard
 
Interpolating California's Temperature
Interpolating California's TemperatureInterpolating California's Temperature
Interpolating California's Temperature
Doug Callaway
 
Chapter i quantities
Chapter i quantitiesChapter i quantities
Chapter i quantities
rozi arrozi
 

Ähnlich wie How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day (20)

How JSR 385 Could have Saved the Mars Climate Orbiter DWX June 2019
How JSR 385 Could have Saved the Mars Climate Orbiter DWX June 2019How JSR 385 Could have Saved the Mars Climate Orbiter DWX June 2019
How JSR 385 Could have Saved the Mars Climate Orbiter DWX June 2019
 
How JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterHow JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate Orbiter
 
How JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterHow JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate Orbiter
 
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...
 
Scientific measurement (adapted)
Scientific measurement (adapted)Scientific measurement (adapted)
Scientific measurement (adapted)
 
Clustering Methods with R
Clustering Methods with RClustering Methods with R
Clustering Methods with R
 
Four Hats of Math: CFD
Four Hats of Math: CFDFour Hats of Math: CFD
Four Hats of Math: CFD
 
Chapter i quantities editing
Chapter i quantities editingChapter i quantities editing
Chapter i quantities editing
 
The PubChemQC Project
The PubChemQC ProjectThe PubChemQC Project
The PubChemQC Project
 
Clustering Methods with R
Clustering Methods with RClustering Methods with R
Clustering Methods with R
 
A More Scaleable Way of Making Recommendations with MLlib-(Xiangrui Meng, Dat...
A More Scaleable Way of Making Recommendations with MLlib-(Xiangrui Meng, Dat...A More Scaleable Way of Making Recommendations with MLlib-(Xiangrui Meng, Dat...
A More Scaleable Way of Making Recommendations with MLlib-(Xiangrui Meng, Dat...
 
The Dark Side of the Universe
The Dark Side of the UniverseThe Dark Side of the Universe
The Dark Side of the Universe
 
Energy saving policies final
Energy saving policies finalEnergy saving policies final
Energy saving policies final
 
TEAMCD_SDR_Briefing
TEAMCD_SDR_BriefingTEAMCD_SDR_Briefing
TEAMCD_SDR_Briefing
 
PHM2106-Presentation-Hubbard
PHM2106-Presentation-HubbardPHM2106-Presentation-Hubbard
PHM2106-Presentation-Hubbard
 
TU FINAL THE MEASURING DEVICE
TU FINAL THE MEASURING DEVICETU FINAL THE MEASURING DEVICE
TU FINAL THE MEASURING DEVICE
 
Chapter 2 unit and measurements
Chapter 2 unit and measurementsChapter 2 unit and measurements
Chapter 2 unit and measurements
 
TU FINAL THE MEASURING DEVICE 1
TU FINAL THE MEASURING DEVICE 1TU FINAL THE MEASURING DEVICE 1
TU FINAL THE MEASURING DEVICE 1
 
Interpolating California's Temperature
Interpolating California's TemperatureInterpolating California's Temperature
Interpolating California's Temperature
 
Chapter i quantities
Chapter i quantitiesChapter i quantities
Chapter i quantities
 

Mehr von Werner Keil

Mehr von Werner Keil (20)

Securing eHealth, eGovernment and eBanking with Java - DWX '21
Securing eHealth, eGovernment and eBanking with Java - DWX '21Securing eHealth, eGovernment and eBanking with Java - DWX '21
Securing eHealth, eGovernment and eBanking with Java - DWX '21
 
OpenDDR and Jakarta MVC - JavaLand 2021
OpenDDR and Jakarta MVC - JavaLand 2021OpenDDR and Jakarta MVC - JavaLand 2021
OpenDDR and Jakarta MVC - JavaLand 2021
 
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
 
OpenDDR and Jakarta MVC - Java2Days 2020 Virtual
OpenDDR and Jakarta MVC - Java2Days 2020 VirtualOpenDDR and Jakarta MVC - Java2Days 2020 Virtual
OpenDDR and Jakarta MVC - Java2Days 2020 Virtual
 
NoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 VirtualNoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 Virtual
 
JCON 2020: Mobile Java Web Applications with MVC and OpenDDR
JCON 2020: Mobile Java Web Applications with MVC and OpenDDRJCON 2020: Mobile Java Web Applications with MVC and OpenDDR
JCON 2020: Mobile Java Web Applications with MVC and OpenDDR
 
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
 
Money, Money, Money, can be funny with JSR 354 (DWX 2019)
Money, Money, Money, can be funny with JSR 354 (DWX 2019)Money, Money, Money, can be funny with JSR 354 (DWX 2019)
Money, Money, Money, can be funny with JSR 354 (DWX 2019)
 
NoSQL: The first New Jakarta EE Specification (DWX 2019)
NoSQL: The first New Jakarta EE Specification (DWX 2019)NoSQL: The first New Jakarta EE Specification (DWX 2019)
NoSQL: The first New Jakarta EE Specification (DWX 2019)
 
JNoSQL: The Definitive Solution for Java and NoSQL Databases
JNoSQL: The Definitive Solution for Java and NoSQL DatabasesJNoSQL: The Definitive Solution for Java and NoSQL Databases
JNoSQL: The Definitive Solution for Java and NoSQL Databases
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabasesEclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
 
Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017
Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017
Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017
 
Performance Monitoring for the Cloud - Java2Days 2017
Performance Monitoring for the Cloud - Java2Days 2017Performance Monitoring for the Cloud - Java2Days 2017
Performance Monitoring for the Cloud - Java2Days 2017
 
Java2Days - Security for JavaEE and the Cloud
Java2Days - Security for JavaEE and the CloudJava2Days - Security for JavaEE and the Cloud
Java2Days - Security for JavaEE and the Cloud
 
Apache DeviceMap - Web-Dev-BBQ Stuttgart
Apache DeviceMap - Web-Dev-BBQ StuttgartApache DeviceMap - Web-Dev-BBQ Stuttgart
Apache DeviceMap - Web-Dev-BBQ Stuttgart
 
JSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short OverviewJSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short Overview
 
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit AgoravaJavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
 
Enterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like AgoravaEnterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like Agorava
 
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
 
Apache DeviceMap - ApacheCon core Europe 2015
Apache DeviceMap - ApacheCon core Europe 2015Apache DeviceMap - ApacheCon core Europe 2015
Apache DeviceMap - ApacheCon core Europe 2015
 

Kürzlich hochgeladen

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Kürzlich hochgeladen (20)

%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day

  • 1. How JSR 385 Could Have Saved the Mars Climate Orbiter Thodoris Bais, Werner Keil, Filip Van Laenen
  • 2. Who am I? ● Consultant – Coach ● Creative Cosmopolitan ● Open Source Evangelist ● Software Architect ● Spec Lead – JSR385 ● Eclipse UOMo Project Lead Twitter @wernerkeil
  • 3. Mars Climate Orbiter ● Launched on 11 December 1998 ● 338 kilograms ● $125 million ● To study Martian climate, atmosphere and surface changes 3
  • 4. 5
  • 5. 6 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 7 ● 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? 9 Primitive (Java) types are primitive types
  • 9. What Is the Fundamental Problem? 10 ● 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 11 ● 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? 12
  • 12. JSR 385: Units of Measurement API 2.0 13 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 15 ● Dimensions ● Units ● Quantities ● Prefixes ● Converters ● Formats ● System of units
  • 15. Definition of a Physical Quantity 18 “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
  • 16. 19 c = 299,792,458 m/s Value Unit Speed of Light
  • 17. 21 c = 299,792,458 m/s = 1,079,252,849 km/h Speed of Light
  • 19. Base Units 23 ● m ● s ● kg ● A ● K ● mol ● cd
  • 20. Derived Units 24 ● m/s ● m/s2 ● rad (= m/m) ● Hz (= s-1) ● N (= kg·m·s-2) ● °C (= K - 273.15)
  • 23. Dimensions 27 ● L: length ● T: time ● M: mass ● I: electric current ● Θ: thermodynamic temperature ● N: amount of substance ● J: luminous intensity ● (1) Force: L·M·T-2
  • 25. Equality and Equivalence 29 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 Ω
  • 26. Question: How Much is 0 °C + 0 °C? 31
  • 27. Question: How Much is 0 °C + 0 °C? ● 0 °C? 32
  • 28. Question: How Much is 0 °C + 0 °C? ● 0 °C? ● 0 °C? 33
  • 29. Question: How Much is 0 °C + 0 °C? ● 0 °C? ● 0 °C? ● 273.15 °C? 34
  • 30. Question: How Much is 0 °C + 0 °C? ● 0 °C ● 0 °C ● 273.15 °C 35
  • 31. 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 36
  • 32. 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 37
  • 33. 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 38
  • 34. 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) 39
  • 37. Systems of Unit 47 ● 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, …
  • 39. JSR 385 50 ● JCP page ○ https://www.jcp.org/en/jsr/detail?id=385 ● GitHub repositories ○ https://github.com/unitsofmeasurement/ ● Current status: ○ Public Review (PR) ○ Preparing for Final Release
  • 40. A Small Word about JCP and JSRs… 51
  • 41. The Java Community Process 52 “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
  • 42. Becoming a JCP Member 53 “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
  • 43. 54