SlideShare a Scribd company logo
How JSR 385 could have
Saved the Mars Climate
Orbiter
Werner Keil
@wernerkeil @UnitAPI
@wernerkeil
https://hobbylark.com/party-games/1999-Fun-Facts-Trivia-and-News
@UnitAPI
https://memegenerator.https://eu.usatoday.com/story/money/markets/2016/08/11/stocks-dow--sp500-thursday-wall-street/88557406/et/instance/78251780/party-like-its-1999-prince-reboot-like-its-1999
Party like it's 1999
@wernerkeil @UnitAPI
https://youtu.be/v1Zst19VWvo
Life on Mars 1999
@wernerkeil @UnitAPI
https://youtu.be/2CZl7ysDKOI https://youtu.be/EdLdL-Su_fo
Mars Climate
Orbiter
• Launched on 11
December 1998
• 338 kilograms
• $125 millions
• To study Martian
climate, atmosphere
and surface changes
@wernerkeil @UnitAPI
@thodorisbais@wernerkeil
What went wrong
@thodorisbais@wernerkeil
lbf·s N·s4.45
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 process, to detect the
error. That’s why we lost the spacecraft.”
Edward Weiler
NASA associate administrator of space science,
IEEE Spectrum: Why the Mars Probe went off course
@thodorisbais@wernerkeil
Lessons Learned
@thodorisbais@wernerkeil
•Read the software specifications
•Use JSR-385 instead of primitives
•Fail-fast
More unit mishaps
@thodorisbais@wernerkeil
Problem Statement
@thodorisbais@wernerkeil
What is the Fundamental Problem?
Primitive (Java) types are primitive types
• static final double C = 1079252849;
• static final double SPEED_OF_LIGHT = 1079252849;
• static final double SPEED_OF_LIGHT_IN_KM_PER_H = 1079252849;
@thodorisbais@wernerkeil
static final Quantity<Speed> SPEED_OF_LIGHT =
Quantities.getQuantity(1079252849, Units.KILOMETRE_PER_HOUR);
Rolling your Own Library
• Development
• Maintenance
• Upgrades & extensions
@thodorisbais@wernerkeil
Werner Keil Thodoris Bais
Maintenance Lead JSR-385 Expert Group Member JSR-385
Let’s meet
@thodorisbais@wernerkeil
What is JSR-385?
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
JSR-385: Units of
Measurement API 2.0
JSR-275 Modularity
Support Java SE >=8
JSR-363
JSR-385 Basic Concepts
• Dimensions
• Units
• Quantities
• Prefixes
• Converters
• Formats
• Systems of units
@thodorisbais@wernerkeil
Exercise
@thodorisbais@wernerkeil
Write a program to calculate the BMI of a person
Exercise description
@thodorisbais@wernerkeil
Setting up a project
<dependencies>
<dependency>
<groupId>tech.units</groupId>
<artifactId>indriya</artifactId>
<version>2.0.2</version>
</dependency>
</dependencies>
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
Quantities
–Wikipedia
“A physical quantity is a physical property of a phenomenon, body, or
substance, that can be quantified by measurement.”
Definition of a Physical Quantity
@thodorisbais@wernerkeil
Speed of Light
c = 299,792,458 m/s
Value Unit
@thodorisbais@wernerkeil
One more quote
@thodorisbais@wernerkeil
–Ibidem
“The same physical quantity can be represented equivalently in many unit systems.”
Speed of Light
c = 299,792,458 m/s
= 1,079,252,849 km/h
@thodorisbais@wernerkeil
1. Define two quantities
a. A mass
b. A length
2. Print them out
Useful classes:
•tech.units.indriya.quantity.Quantities
•getQuantity(java.lang.Number value, javax.measure.Unit unit)
•tech.units.indriya.unit.Units
•javax.measure.Quantity
•javax.measure.quantity.Mass
Exercise Time
@thodorisbais@wernerkeil
•Divide the mass by the square of the height
•Print out the result
Exercise Time
@thodorisbais@wernerkeil
•Parse mass and height from a String
•Read mass and height from the command line
Exercise Time
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
Units
Base Units
@wernerkeil @UnitAPI
Derived Units
@wernerkeil @UnitAPI
Multiples
• km
• ms
• Mm?
• ks?
@thodorisbais@wernerkeil
1.Define a BMI quantity
2.Define a BMI unit
3.Convert the quantity to the BMI unit before printing it out
Exercise Time
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
Dimensions
Dimensions
• L: length
• T: time
• M: mass
• I: electric current
• Θ: thermodynamic temperature
• N: amount of substance
• J: luminous intensity
• (1)
Force: L · M · T-2
@thodorisbais@wernerkeil
•Autodetect which argument has mass dimension and which length
Exercise Time
@thodorisbais@wernerkeil
Summary Table
@thodorisbais@wernerkeil
Doing the Math
@thodorisbais@wernerkeil
Equality and Equivalence
• kΩ ≠ mHz
• kΩ ≠ mΩ
• kΩ ≡ kΩ
• N ≅ kg·m·s-2
• kg·m-2 ≅ mg·mm-2
• 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 Ω
Units Quantities
@thodorisbais@wernerkeil
Quantity Addition
• 1 Ω + 1 Ω = 2 Ω
• 1 Ω + 1 mΩ = 1.001 Ω
• 1 mΩ + 1 Ω = 1,001 mΩ
• 1 Ω + 1 m “does not compile”
@thodorisbais@wernerkeil
Royal Swedish Academy of Sciences
February Exam on Math
How much is 0 °C + 0 °C?
• 0 °C
• 0 °C
• 273.15 °C
Two absolute temperatures
0 °C + 0 °C = 273.15K + 273.15K
= 546.30K
= 273.15 °C
@thodorisbais@wernerkeil
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.15K + 0K
= 273.15K
= 0 °C
@thodorisbais@wernerkeil
Royal Swedish Academy of Sciences
February Exam on Math
How much is 0 °C + 0 °C?
• 0 °C
• 0 °C
• 273.15 °C
Two temperature changes
0 °C + 0 °C = 0K + 0K
= 0K
= 0 °C
@thodorisbais@wernerkeil
Royal Swedish Academy of Sciences
February Exam on Math
How much is 0 °C + 0 °C?
Answer
@thodorisbais@wernerkeil
Royal Swedish Academy of Sciences
February Exam on Math
Temperature Scales
@UnitAPI@wernerkeil
Lord Kelvin
(1824 - 1907)
Anders Celsius
(1701 - 1744)
Daniel G. Fahrenheit
(1686 - 1736)
•Swedish astronomer, physicist and
mathematician
•Born in Uppsala, on 27 November 1701
•Supported formation of the Royal Swedish
Academy of Sciences in Stockholm in 1739
•Founded the Uppsala Astronomical
Observatory in 1741
•Proposed the Celsius temperature scale
in a paper to the Royal Society of Sciences
in Uppsala in 1742
•Died from tuberculosis on 25 April 1744
Anders Celsius
@wernerkeil @UnitAPI
Royal Swedish Academy of
Sciences
@UnitAPI@wernerkeil
Systems of UnitSystems of Unit
•Metric System
•Imperial System
•US customary units
•Roman units of measurement
•Swedish Units of Measurement
@wernerkeil @UnitAPI
Demo Time
@thodorisbais@wernerkeil
What was the Fundamental
Problem Again?
Primitive (Java) types are primitive types
@thodorisbais@wernerkeil
JSR-385 Links
• JCP page
• https://jcp.org/en/jsr/detail?id=385
• GitHub pages
• https://unitsofmeasurement.github.io/
• https://github.com/unitsofmeasurement
• http://uom.si
• Current status
• Final Release
@thodorisbais@wernerkeil
Java Community Process
@wernerkeil @UnitAPI
Becoming a JCP Member
@thodorisbais@wernerkeil
@UnitAPI@wernerkeil

More Related Content

What's hot

22 mitchell lee_am_and_pwat_spectral_correction
22 mitchell lee_am_and_pwat_spectral_correction22 mitchell lee_am_and_pwat_spectral_correction
22 mitchell lee_am_and_pwat_spectral_correction
Sandia National Laboratories: Energy & Climate: Renewables
 
Portable Energy-Aware Cluster-Based Edge Computers
Portable Energy-Aware Cluster-Based Edge ComputersPortable Energy-Aware Cluster-Based Edge Computers
Portable Energy-Aware Cluster-Based Edge Computers
Thomas Rausch
 
Masterarbeit_Verteidigung
Masterarbeit_VerteidigungMasterarbeit_Verteidigung
Masterarbeit_VerteidigungAmr Awad
 
41 corbellini analysis_and_modelling_of_bifacial_pv_modules
41 corbellini analysis_and_modelling_of_bifacial_pv_modules41 corbellini analysis_and_modelling_of_bifacial_pv_modules
41 corbellini analysis_and_modelling_of_bifacial_pv_modules
Sandia National Laboratories: Energy & Climate: Renewables
 
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 KasaiCosmoAIMS Bassett
 
44 castillo aguilella-multi-year_study_of_bifacial_energy_gains
44 castillo aguilella-multi-year_study_of_bifacial_energy_gains44 castillo aguilella-multi-year_study_of_bifacial_energy_gains
44 castillo aguilella-multi-year_study_of_bifacial_energy_gains
Sandia National Laboratories: Energy & Climate: Renewables
 

What's hot (8)

22 mitchell lee_am_and_pwat_spectral_correction
22 mitchell lee_am_and_pwat_spectral_correction22 mitchell lee_am_and_pwat_spectral_correction
22 mitchell lee_am_and_pwat_spectral_correction
 
Portable Energy-Aware Cluster-Based Edge Computers
Portable Energy-Aware Cluster-Based Edge ComputersPortable Energy-Aware Cluster-Based Edge Computers
Portable Energy-Aware Cluster-Based Edge Computers
 
Masterarbeit_Verteidigung
Masterarbeit_VerteidigungMasterarbeit_Verteidigung
Masterarbeit_Verteidigung
 
41 corbellini analysis_and_modelling_of_bifacial_pv_modules
41 corbellini analysis_and_modelling_of_bifacial_pv_modules41 corbellini analysis_and_modelling_of_bifacial_pv_modules
41 corbellini analysis_and_modelling_of_bifacial_pv_modules
 
54 paul gibbs_helioscope
54 paul gibbs_helioscope54 paul gibbs_helioscope
54 paul gibbs_helioscope
 
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
 
STEG_Poster_Chuck_Ofoegbu (1)
STEG_Poster_Chuck_Ofoegbu (1)STEG_Poster_Chuck_Ofoegbu (1)
STEG_Poster_Chuck_Ofoegbu (1)
 
44 castillo aguilella-multi-year_study_of_bifacial_energy_gains
44 castillo aguilella-multi-year_study_of_bifacial_energy_gains44 castillo aguilella-multi-year_study_of_bifacial_energy_gains
44 castillo aguilella-multi-year_study_of_bifacial_energy_gains
 

Similar to How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020

How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020
How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020
How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020
Thodoris Bais
 
How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019
How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019
How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019
Thodoris Bais
 
How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020
How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020
How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020
Thodoris Bais
 
How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...
How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...
How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...
Thodoris Bais
 
How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019
How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019
How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019
Thodoris Bais
 
How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019
How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019
How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019
Thodoris Bais
 
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
Werner Keil
 
physics_lecture_note_energy_flow_human.ppt
physics_lecture_note_energy_flow_human.pptphysics_lecture_note_energy_flow_human.ppt
physics_lecture_note_energy_flow_human.ppt
SunCharoenrat
 
Lect1(unit).ppt
Lect1(unit).pptLect1(unit).ppt
Lect1(unit).ppt
LuongTuan15
 
Heat & Thermodynamics
Heat & ThermodynamicsHeat & Thermodynamics
Heat & ThermodynamicsCarla Faner
 
Kecsm2012uren
Kecsm2012urenKecsm2012uren
Kecsm2012uren
urvics
 

Similar to How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020 (11)

How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020
How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020
How JSR 385 could have Saved the Mars Climate Orbiter Java Global Summit 2020
 
How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019
How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019
How JSR 385 could have Saved the Mars Climate Orbiter DevoxxUA 2019
 
How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020
How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020
How JSR 385 could have Saved the Mars Climate Orbiter Adorsys 2020
 
How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...
How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...
How JSR 385 could have Saved the Mars Climate Orbiter CodeMotion Milan Octobe...
 
How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019
How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019
How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019
 
How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019
How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019
How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019
 
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
 
physics_lecture_note_energy_flow_human.ppt
physics_lecture_note_energy_flow_human.pptphysics_lecture_note_energy_flow_human.ppt
physics_lecture_note_energy_flow_human.ppt
 
Lect1(unit).ppt
Lect1(unit).pptLect1(unit).ppt
Lect1(unit).ppt
 
Heat & Thermodynamics
Heat & ThermodynamicsHeat & Thermodynamics
Heat & Thermodynamics
 
Kecsm2012uren
Kecsm2012urenKecsm2012uren
Kecsm2012uren
 

More from Werner Keil

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
Werner Keil
 
OpenDDR and Jakarta MVC - JavaLand 2021
OpenDDR and Jakarta MVC - JavaLand 2021OpenDDR and Jakarta MVC - JavaLand 2021
OpenDDR and Jakarta MVC - JavaLand 2021
Werner Keil
 
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
Werner Keil
 
NoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 VirtualNoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 Virtual
Werner Keil
 
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
Werner Keil
 
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)
Werner Keil
 
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)
Werner Keil
 
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)
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
Apache DeviceMap - Web-Dev-BBQ Stuttgart
Apache DeviceMap - Web-Dev-BBQ StuttgartApache DeviceMap - Web-Dev-BBQ Stuttgart
Apache DeviceMap - Web-Dev-BBQ Stuttgart
Werner Keil
 
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
The First IoT JSR: Units of Measurement - JUG Berlin-BrandenburgThe First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
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
Werner Keil
 
Apache DeviceMap - ApacheCon core Europe 2015
Apache DeviceMap - ApacheCon core Europe 2015Apache DeviceMap - ApacheCon core Europe 2015
Apache DeviceMap - ApacheCon core Europe 2015
Werner Keil
 

More from 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
 
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
 
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
The First IoT JSR: Units of Measurement - JUG Berlin-BrandenburgThe First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
 
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
 

Recently uploaded

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 

Recently uploaded (20)

Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 

How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020

Editor's Notes

  1. Software engineers
  2. Software engineers
  3. Launched on the 19th of December 1998 at 18:45 UTC. It was launched from Cape Canaveral aboard a delta to launch the eco. the complete burn sequence lasted 42’ and brought the spacecraft into a so called human transform orbit from earth to Mars. The orbit is 669million kilometers long and takes 9.5 months to complete > over a pregnancy Primary science objectives of the mission: determine the distribution of water in Mars monitor the daily atmospheric conditions record changes of the Martian surface (due to wind) determine temperature profiles in the atmosphere look for evidence of past climate change So that was a whole set of things the MCO was supposed to do
  4. into a trajectory above 226km above the surface of Mars It probably got disintegrated in the atmosphere and disappeared. Minimum altitude to survive was 80km
  5. A piece of software provided by Lockheed Martin produced results for the total impulse by the thruster firing in pound force seconds, whereas the trajectory calculation software provided by NASA expected it to be in Newton seconds. The software specification said it should have been in Newton seconds so Luckheed Martin clearly made a mistake
  6. if Lockheed Martin had done a good job, it would have never happened Use JSR-385 instead of primitives Fail fast <== don’t rely on the checksum balancer to discover problems
  7. The 12 October 1492 “mishap” Colombus miscalculated the circumference of the earth cuz he used roman miles instead of nautical miles. ended up in Bahamas, but thought he was in Asia. Consequence? the native americans were called for Indians 500 years afterwards 2) “Gimli Glider”, 1983 - Air Canada flight 143 from Montreal to Edmonton.-After Canada went over from imperial units to SI system. received Less than the half needed and run out of fuel. Captain made a mistake in the conversion of the units. Groundcrew didn’t look it up independently. Less than the half needed and run out of fuel. Airport nearby used for car races, festivals, social happenings. There was a festival that day. just a few injuries 3) Clarence the Tortoise, 2001 , Galapagos tortoise Los Angeles Zoo loaned to Moorpark College. “Build an enclosure for an animal that weighs in at about 250” Forgot to say “kilograms” . so Moorpark college built one for a 250 pound tortoise. Guess what happened the first night. Clarence wrecked the cage “It weighs 250”. forgot to say kilograms they built a cage for a 250 pound tortoise comes in, eats, and the tortoise wrecked the cage 4) units begging for mistakes —> Tea spoon . gram and grain “take 5 grains” is being understood as “take 5 grams”
  8. using a primitive to represent a quantity is fundamentally conflicting with OOP and DDD, cuz you’re using a type representing just a number to represent a quantity which has a unit —- built in into the property and it contains both the value and the unit —- No way to misinterpret the SPEED of light at the bottom as that number in km/h
  9. wanna do it properly? define ur own library how difficult can it be? it’s just a value and a unit lot of work —> many units meter, time units, electrical resistance , TEMPERATURES?, divide & multiply Are you a UoM domain expert? so even if you use the SI system every day do you really understand how it works? TBH I didn’t even answer that question to myself. I would be surprised if you know all the peculiarities around SI. There is a number of strange things, even though it is designed as the rational system as compared to some other systems.
  10. This JSR is a major evolution of the Unit API 1.0 (JSR 363) specification. Focussed on the SI System redefinition, modularity and support for Java SE 8/9 and above. JSR 363 This JSR specifies Java packages for modelling and working with measurement values, quantities and their corresponding units.
  11. Dimensions: length Unit: metre Quantity: 5 metres prefixes: kilo, milli, etc. converters: km/h —> m/s or mph formatting: print out the quantity and parse the quantity of the unit systems of units: metric, imperial and handle them in a good way
  12. kg/m^2 a thing that matters for the BMI index is to express the units as kilograms and meters and not cm for example. We’ll see as we go through th exercise that we can handle that in a good way
  13. It doesn’t do some kinds of optimisations that one could think it would be nice to have
  14. Let’s start by defining a number of quantities and try to print them out.
  15. 5 meters = 500 cm
  16. So you see? this is not difficult to do, so instead of defining an Integer to hold 75 as the mass, that’s not much of simplification compared to this
  17. Yesterday I travelled 1.6Mm??? 1hour = 3.6ks, but “come back in 1ks”???
  18. Yesterday I travelled 1.6Mm??? 1hour = 3.6ks, but “come back in 1ks”???
  19. Yesterday I travelled 1.6Mm??? 1hour = 3.6ks, but “come back in 1ks”???
  20. You need 1 for the angle for example so that you can handle the absence of dimension
  21. Should you have functions to normalize expressions into what could be closer to the base unit That’s something you could consider, and also for quantities for example that 1 mg per mm-2 is automatically normalized to 1kg m-2 Special paint for small devices It’s not just about comparing the values and the units you have to convert to one unit and do the comparison in one reference unit
  22. We use the 1st unit if we can If it leads to an overflow, we can fall back to the second unit Otherwise, if it leads to an overflow in both units, we just throw an overflow error
  23. THAT’S EASY! RIGHT? There are thermodynamic parameters when you want to add temperatures
  24. All 3 answers are correct depending on the situation. absolute or relative quantity? We hadn’t modelled this. So, again, are you a domain expert in ur system? Do you really know the SI system so that you can write a library to handle this stuff? Why are we using degrees celsius. Undoubtedly, it’s easy (0-100 degrees), but degrees celsius is not such a good unit to measure temperature. JavaZone example with Time (i.e. day light, saving time, etc., formatting problem with US month – dd - yyyy, countries using F and celsius)
  25. Metre, kilogram, second, ampere… Foot, ounce, pound, gallon, Fahrenheit, horsepower Foot, ounce, pound, gallon, Fahrenheit, gallon, … Pes, uncia, libra, … Fot, favn, mål, tønne, snes, …