SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
How JSR-385 could have
Saved the Mars Climate
Orbiter
Werner Keil & Thodoris Bais
#jfall19
@thodorisbais@wernerkeil
Mars Climate
Orbiter
• Launched on 11
December 1998

• 338 kilograms

• $125 millions

• To study Martian
climate, atmosphere
and surface changes
@thodorisbais@wernerkeil
Result of the Mission
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
What went wrong
@thodorisbais@wernerkeil
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
@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;
static final Quantity<SPEED> SPEED_OF_LIGHT =
Quantities.getQuantity(1079252849, Units.KILOMETRE_PER_HOUR);
@thodorisbais@wernerkeil
Rolling your Own Library
• Development
• Maintenance
• Upgrades & extensions
@thodorisbais@wernerkeil
Werner Keil Thodoris Bais
Spec Lead JSR-385 Expert Group Member JSR-385
Let’s meet
@thodorisbais@wernerkeil
What is JSR-385?
@thodorisbais@wernerkeil
JSR-385: Units of Measurement API 2.0
Description

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.
@thodorisbais@wernerkeil
JSR-385 Basic Concepts
• Dimensions

• Units

• Quantities

• Prefixes

• Converters

• Formats

• Systems of units
@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.”
–Ibidem
“A physical quantity can be expressed as the combination of a
magnitude expressed by a number - usually a real umber - and a
unit.”
Definition of a Physical Quantity
@thodorisbais@wernerkeil
Speed of Light
c = 299,792,458 m/s
Value Unit
@thodorisbais@wernerkeil
–Wikipedia
“A physical quantity is a physical property of a phenomenon, body, or substance,
that can be quantified by measurement.”
“A physical quantity can be expressed as the combination of a magnitude
expressed by a number - usually a real umber - and a unit.”
Definition of a Physical Quantity
–Ibidem
“The same physical quantity can be represented equivalently in many unit
systems.”
@thodorisbais@wernerkeil
Speed of Light
c = 299,792,458 m/s
= 1,079,252,849 km/h
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
Units
Base Units
@thodorisbais@wernerkeil
Derived Units
@thodorisbais@wernerkeil
Multiples
• km

• ms

• Mm?

• ks?
@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
Summary Table
@thodorisbais@wernerkeil
Doing the Maths
@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 compute”
@thodorisbais@wernerkeil
JFall School 2019
October Exam on Maths
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
JFall School 2019
October Exam on Maths
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
JFall School 2019
October Exam on Maths
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)
Answer
@thodorisbais@wernerkeil
JFall School 2019
October Exam on Maths
Multiplication
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
@thodorisbais@wernerkeil
JFall School 2019
October Exam on Maths
Division
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
@thodorisbais@wernerkeil
JFall School 2019
October Exam on Maths
Powers
Units
•(m)2 = m2

•(km)2 = km2
•(m2)2 = m4
Quantities
• (3 m)2 = 9 m2
•
@thodorisbais@wernerkeil
JFall School 2019
October Exam on Maths
Celsius Revisited
Units
•(K)2 = K2

•(°C)2 ≟ (K - 273.15)2
•m × °C ≟ m·(K - 273.15)
Quantities
•0 °C2 ≟ 74,610.9225 K2
•1 m°C ≟ 1 mK or 273.151K
@thodorisbais@wernerkeil
JFall School 2019
October Exam on Maths
Parsing Units & Quantities
•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
Speed of Light
@thodorisbais@wernerkeil
Systems of Unit
Systems of UnitSystems of Unit
• Metric System
• Imperial System
• US customary units
• Roman units of measurement
•Norwegian Units of Measurement
@thodorisbais@wernerkeil
Demo Time
@thodorisbais@wernerkeil
What Was the Fundamental
Problem Again?
Primitive (Java) types are primitive types
@thodorisbais@wernerkeil
Setting up a project
<dependencies>
<dependency>
<groupId>tech.units</groupId>
<artifactId>indriya</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
@thodorisbais@wernerkeil
JSR-385 Current Status
• JCP page

• https://jcp.org/en/jsr/detail?id=385

• GitHub repositories

• https://github.com/unitsofmeasurement

• Current status

• Final Release
@thodorisbais@wernerkeil
Java Community Process
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil
We’re running for an Associate Seat!
Becoming a JCP Member
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil

Mais conteúdo relacionado

Mais procurados

L1 - Energy Systems and Thermofluids 2021-22
L1 - Energy Systems and Thermofluids 2021-22L1 - Energy Systems and Thermofluids 2021-22
L1 - Energy Systems and Thermofluids 2021-22Keith Vaugh
 
Heat Stress in Livestock and People
Heat Stress in Livestock and PeopleHeat Stress in Livestock and People
Heat Stress in Livestock and PeopleKatestone
 
Firemaps.net slideshare
Firemaps.net slideshareFiremaps.net slideshare
Firemaps.net slideshareGernotRuecker
 
Report data-logger full
Report data-logger fullReport data-logger full
Report data-logger fullQhalilah Radin
 
Motion SCIENCE
Motion SCIENCEMotion SCIENCE
Motion SCIENCESnju Lehri
 
Chapter 14 heat and heat transfer methods
Chapter 14   heat and heat transfer methodsChapter 14   heat and heat transfer methods
Chapter 14 heat and heat transfer methodsSarah Sue Calbio
 
Fire tetrahedron
Fire tetrahedronFire tetrahedron
Fire tetrahedronUBONG EDET
 
Chapter 13 temperature kinetic theory and the gas laws
Chapter 13   temperature kinetic theory and the gas lawsChapter 13   temperature kinetic theory and the gas laws
Chapter 13 temperature kinetic theory and the gas lawsSarah Sue Calbio
 
Lab 12 heat engines and 1st law
Lab 12 heat engines and 1st lawLab 12 heat engines and 1st law
Lab 12 heat engines and 1st lawMidoOoz
 
Thermal Energy PPT
Thermal Energy PPTThermal Energy PPT
Thermal Energy PPTDARK95
 
OLM Science6_9
OLM Science6_9OLM Science6_9
OLM Science6_9gosomers
 

Mais procurados (20)

L1 - Energy Systems and Thermofluids 2021-22
L1 - Energy Systems and Thermofluids 2021-22L1 - Energy Systems and Thermofluids 2021-22
L1 - Energy Systems and Thermofluids 2021-22
 
Temperature
TemperatureTemperature
Temperature
 
Heat Stress in Livestock and People
Heat Stress in Livestock and PeopleHeat Stress in Livestock and People
Heat Stress in Livestock and People
 
Firemaps.net slideshare
Firemaps.net slideshareFiremaps.net slideshare
Firemaps.net slideshare
 
Report data-logger full
Report data-logger fullReport data-logger full
Report data-logger full
 
Motion SCIENCE
Motion SCIENCEMotion SCIENCE
Motion SCIENCE
 
Chapter 14 heat and heat transfer methods
Chapter 14   heat and heat transfer methodsChapter 14   heat and heat transfer methods
Chapter 14 heat and heat transfer methods
 
Fire tetrahedron
Fire tetrahedronFire tetrahedron
Fire tetrahedron
 
Chapter 13 temperature kinetic theory and the gas laws
Chapter 13   temperature kinetic theory and the gas lawsChapter 13   temperature kinetic theory and the gas laws
Chapter 13 temperature kinetic theory and the gas laws
 
Lab 12 heat engines and 1st law
Lab 12 heat engines and 1st lawLab 12 heat engines and 1st law
Lab 12 heat engines and 1st law
 
Chapter 15 thermodynamics
Chapter 15   thermodynamicsChapter 15   thermodynamics
Chapter 15 thermodynamics
 
Unit 14 Power Point
Unit 14 Power PointUnit 14 Power Point
Unit 14 Power Point
 
Temperature MEASUREMENT
Temperature MEASUREMENTTemperature MEASUREMENT
Temperature MEASUREMENT
 
Fire ppt
Fire pptFire ppt
Fire ppt
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Thermodynamics
ThermodynamicsThermodynamics
Thermodynamics
 
#20 Key
#20 Key#20 Key
#20 Key
 
Measuring mass
Measuring massMeasuring mass
Measuring mass
 
Thermal Energy PPT
Thermal Energy PPTThermal Energy PPT
Thermal Energy PPT
 
OLM Science6_9
OLM Science6_9OLM Science6_9
OLM Science6_9
 

Semelhante a How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019

How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020Werner Keil
 
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 2021Werner Keil
 
New chm 151 unit 1 powerpoints sp13 s
New chm 151 unit 1 powerpoints sp13 sNew chm 151 unit 1 powerpoints sp13 s
New chm 151 unit 1 powerpoints sp13 scaneman1
 
1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdf1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdfDr. Syed Haider
 
New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01
New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01
New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01Cleophas Rwemera
 
Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal
Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal
Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal nitinagarwal634
 
What is energy? Slide share
What is energy?  Slide shareWhat is energy?  Slide share
What is energy? Slide shareImranAnsari174
 
Energy transfer and storage
Energy transfer and storageEnergy transfer and storage
Energy transfer and storagemithilan
 
Unit 1 Presentation
Unit 1 PresentationUnit 1 Presentation
Unit 1 Presentationpoags25
 
Measurement and matter
Measurement and matterMeasurement and matter
Measurement and matterMrCram
 
Unit 1 Numbers
Unit 1 NumbersUnit 1 Numbers
Unit 1 NumbersJosh Macha
 
Measurements &amp; units
Measurements &amp; unitsMeasurements &amp; units
Measurements &amp; unitsameermudasar
 
Ppt#1 chapters 0+1
Ppt#1 chapters 0+1Ppt#1 chapters 0+1
Ppt#1 chapters 0+1laubin2000
 
01scientific measurement
01scientific measurement01scientific measurement
01scientific measurementDr Ahmad Fahmi
 
2 matter and mesurement and elements of uncertatinty.ppt
2 matter and mesurement and elements of uncertatinty.ppt2 matter and mesurement and elements of uncertatinty.ppt
2 matter and mesurement and elements of uncertatinty.pptIrishPonce2
 

Semelhante a How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019 (20)

How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
 
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
 
New chm 151 unit 1 powerpoints sp13 s
New chm 151 unit 1 powerpoints sp13 sNew chm 151 unit 1 powerpoints sp13 s
New chm 151 unit 1 powerpoints sp13 s
 
1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdf1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdf
 
New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01
New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01
New chm-151-unit-1-20powerpoints-20sp13s-140227172225-phpapp01
 
Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal
Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal
Chapter 12 ~ Work and Energy Transformation of energy ~ Nitin Agarwal
 
What is energy? Slide share
What is energy?  Slide shareWhat is energy?  Slide share
What is energy? Slide share
 
Energy transfer and storage
Energy transfer and storageEnergy transfer and storage
Energy transfer and storage
 
Unit 1 Presentation
Unit 1 PresentationUnit 1 Presentation
Unit 1 Presentation
 
energy
energy energy
energy
 
Lect1(unit).ppt
Lect1(unit).pptLect1(unit).ppt
Lect1(unit).ppt
 
Measurement and matter
Measurement and matterMeasurement and matter
Measurement and matter
 
Unit 1 Numbers
Unit 1 NumbersUnit 1 Numbers
Unit 1 Numbers
 
Sec 4 Chapter 3
Sec 4 Chapter 3Sec 4 Chapter 3
Sec 4 Chapter 3
 
Measurements &amp; units
Measurements &amp; unitsMeasurements &amp; units
Measurements &amp; units
 
Ppt#1 chapters 0+1
Ppt#1 chapters 0+1Ppt#1 chapters 0+1
Ppt#1 chapters 0+1
 
01scientific measurement
01scientific measurement01scientific measurement
01scientific measurement
 
0708 energy
0708 energy0708 energy
0708 energy
 
0708 energy
0708 energy0708 energy
0708 energy
 
2 matter and mesurement and elements of uncertatinty.ppt
2 matter and mesurement and elements of uncertatinty.ppt2 matter and mesurement and elements of uncertatinty.ppt
2 matter and mesurement and elements of uncertatinty.ppt
 

Mais de Thodoris Bais

EclipseCon 2021 NoSQL Endgame
EclipseCon 2021 NoSQL EndgameEclipseCon 2021 NoSQL Endgame
EclipseCon 2021 NoSQL EndgameThodoris Bais
 
You Graduated Now What ECE UoWM 2021
You Graduated Now What ECE UoWM 2021You Graduated Now What ECE UoWM 2021
You Graduated Now What ECE UoWM 2021Thodoris Bais
 
NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021Thodoris Bais
 
Be the Leader of Your Own Career Global Summit for Java Devs 21
Be the Leader of Your Own Career Global Summit for Java Devs 21Be the Leader of Your Own Career Global Summit for Java Devs 21
Be the Leader of Your Own Career Global Summit for Java Devs 21Thodoris Bais
 
How to grow an amazing community - JavaLand 2021
How to grow an amazing community - JavaLand 2021How to grow an amazing community - JavaLand 2021
How to grow an amazing community - JavaLand 2021Thodoris Bais
 
Securing eHealth, eGovernment and eBanking with Java - IT-Tage 2020 Conference
Securing eHealth, eGovernment and eBanking with Java - IT-Tage 2020 ConferenceSecuring eHealth, eGovernment and eBanking with Java - IT-Tage 2020 Conference
Securing eHealth, eGovernment and eBanking with Java - IT-Tage 2020 ConferenceThodoris Bais
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020Thodoris Bais
 
Securing eHealth, eGovernment and eBanking with Java - JCON Conference
 Securing eHealth, eGovernment and eBanking with Java - JCON Conference Securing eHealth, eGovernment and eBanking with Java - JCON Conference
Securing eHealth, eGovernment and eBanking with Java - JCON ConferenceThodoris Bais
 
Be the Leader of Your Own Career JCON Conference 2020
Be the Leader of Your Own Career JCON Conference 2020Be the Leader of Your Own Career JCON Conference 2020
Be the Leader of Your Own Career JCON Conference 2020Thodoris Bais
 
NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020Thodoris Bais
 
NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020Thodoris Bais
 
Utrecht JUG meetup September 2020
Utrecht JUG meetup September 2020Utrecht JUG meetup September 2020
Utrecht JUG meetup September 2020Thodoris Bais
 
Developer Career: Own it - SouJava April 2020
Developer Career: Own it - SouJava April 2020Developer Career: Own it - SouJava April 2020
Developer Career: Own it - SouJava April 2020Thodoris Bais
 
Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020
Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020
Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020Thodoris Bais
 
How to pitch an innovative idea in a corporate environment
How to pitch an innovative idea in a corporate environmentHow to pitch an innovative idea in a corporate environment
How to pitch an innovative idea in a corporate environmentThodoris Bais
 
Utrecht JUG meetup February 2020
Utrecht JUG meetup February 2020Utrecht JUG meetup February 2020
Utrecht JUG meetup February 2020Thodoris Bais
 
Developer Career: Own it - Adorsys 2020
Developer Career: Own it - Adorsys 2020Developer Career: Own it - Adorsys 2020
Developer Career: Own it - Adorsys 2020Thodoris Bais
 
Utrecht JUG Meetup January 2020
Utrecht JUG Meetup January 2020Utrecht JUG Meetup January 2020
Utrecht JUG Meetup January 2020Thodoris Bais
 
Developer Career: Own it - Java2Days 2019
Developer Career: Own it - Java2Days 2019Developer Career: Own it - Java2Days 2019
Developer Career: Own it - Java2Days 2019Thodoris Bais
 
Securing eHealth and eGovernment with Java - Java2Days 2019
Securing eHealth and eGovernment with Java - Java2Days 2019Securing eHealth and eGovernment with Java - Java2Days 2019
Securing eHealth and eGovernment with Java - Java2Days 2019Thodoris Bais
 

Mais de Thodoris Bais (20)

EclipseCon 2021 NoSQL Endgame
EclipseCon 2021 NoSQL EndgameEclipseCon 2021 NoSQL Endgame
EclipseCon 2021 NoSQL Endgame
 
You Graduated Now What ECE UoWM 2021
You Graduated Now What ECE UoWM 2021You Graduated Now What ECE UoWM 2021
You Graduated Now What ECE UoWM 2021
 
NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021NoSQL Endgame LWJUG 2021
NoSQL Endgame LWJUG 2021
 
Be the Leader of Your Own Career Global Summit for Java Devs 21
Be the Leader of Your Own Career Global Summit for Java Devs 21Be the Leader of Your Own Career Global Summit for Java Devs 21
Be the Leader of Your Own Career Global Summit for Java Devs 21
 
How to grow an amazing community - JavaLand 2021
How to grow an amazing community - JavaLand 2021How to grow an amazing community - JavaLand 2021
How to grow an amazing community - JavaLand 2021
 
Securing eHealth, eGovernment and eBanking with Java - IT-Tage 2020 Conference
Securing eHealth, eGovernment and eBanking with Java - IT-Tage 2020 ConferenceSecuring eHealth, eGovernment and eBanking with Java - IT-Tage 2020 Conference
Securing eHealth, eGovernment and eBanking with Java - IT-Tage 2020 Conference
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020
 
Securing eHealth, eGovernment and eBanking with Java - JCON Conference
 Securing eHealth, eGovernment and eBanking with Java - JCON Conference Securing eHealth, eGovernment and eBanking with Java - JCON Conference
Securing eHealth, eGovernment and eBanking with Java - JCON Conference
 
Be the Leader of Your Own Career JCON Conference 2020
Be the Leader of Your Own Career JCON Conference 2020Be the Leader of Your Own Career JCON Conference 2020
Be the Leader of Your Own Career JCON Conference 2020
 
NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020
 
NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020NoSQL Endgame Percona Live Online 2020
NoSQL Endgame Percona Live Online 2020
 
Utrecht JUG meetup September 2020
Utrecht JUG meetup September 2020Utrecht JUG meetup September 2020
Utrecht JUG meetup September 2020
 
Developer Career: Own it - SouJava April 2020
Developer Career: Own it - SouJava April 2020Developer Career: Own it - SouJava April 2020
Developer Career: Own it - SouJava April 2020
 
Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020
Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020
Securing eHealth and eGovernment with Java - AllTheTalksOnline 2020
 
How to pitch an innovative idea in a corporate environment
How to pitch an innovative idea in a corporate environmentHow to pitch an innovative idea in a corporate environment
How to pitch an innovative idea in a corporate environment
 
Utrecht JUG meetup February 2020
Utrecht JUG meetup February 2020Utrecht JUG meetup February 2020
Utrecht JUG meetup February 2020
 
Developer Career: Own it - Adorsys 2020
Developer Career: Own it - Adorsys 2020Developer Career: Own it - Adorsys 2020
Developer Career: Own it - Adorsys 2020
 
Utrecht JUG Meetup January 2020
Utrecht JUG Meetup January 2020Utrecht JUG Meetup January 2020
Utrecht JUG Meetup January 2020
 
Developer Career: Own it - Java2Days 2019
Developer Career: Own it - Java2Days 2019Developer Career: Own it - Java2Days 2019
Developer Career: Own it - Java2Days 2019
 
Securing eHealth and eGovernment with Java - Java2Days 2019
Securing eHealth and eGovernment with Java - Java2Days 2019Securing eHealth and eGovernment with Java - Java2Days 2019
Securing eHealth and eGovernment with Java - Java2Days 2019
 

Último

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
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-learnAmarnathKambale
 
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) SolutionOnePlan Solutions
 
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
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
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
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Último (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
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
 
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
 
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 ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
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
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 

How JSR 385 could have Saved the Mars Climate Orbiter JFall 2019

  • 1. How JSR-385 could have Saved the Mars Climate Orbiter Werner Keil & Thodoris Bais #jfall19 @thodorisbais@wernerkeil
  • 2. Mars Climate Orbiter • Launched on 11 December 1998
 • 338 kilograms
 • $125 millions
 • To study Martian climate, atmosphere and surface changes @thodorisbais@wernerkeil
  • 3. Result of the Mission @thodorisbais@wernerkeil
  • 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 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
  • 7. Lessons Learned @thodorisbais@wernerkeil •Read the software specifications •Use JSR-385 instead of primitives •Fail-fast
  • 10. What is the Fundamental Problem? Primitive (Java) types are primitive types @thodorisbais@wernerkeil
  • 11. 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; static final Quantity<SPEED> SPEED_OF_LIGHT = Quantities.getQuantity(1079252849, Units.KILOMETRE_PER_HOUR); @thodorisbais@wernerkeil
  • 12. Rolling your Own Library • Development • Maintenance • Upgrades & extensions @thodorisbais@wernerkeil
  • 13. Werner Keil Thodoris Bais Spec Lead JSR-385 Expert Group Member JSR-385 Let’s meet @thodorisbais@wernerkeil
  • 15. JSR-385: Units of Measurement API 2.0 Description 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. @thodorisbais@wernerkeil
  • 16. JSR-385 Basic Concepts • Dimensions • Units • Quantities • Prefixes • Converters • Formats • Systems of units @thodorisbais@wernerkeil
  • 18. –Wikipedia “A physical quantity is a physical property of a phenomenon, body, or substance, that can be quantified by measurement.” –Ibidem “A physical quantity can be expressed as the combination of a magnitude expressed by a number - usually a real umber - and a unit.” Definition of a Physical Quantity @thodorisbais@wernerkeil
  • 19. Speed of Light c = 299,792,458 m/s Value Unit @thodorisbais@wernerkeil
  • 20. –Wikipedia “A physical quantity is a physical property of a phenomenon, body, or substance, that can be quantified by measurement.” “A physical quantity can be expressed as the combination of a magnitude expressed by a number - usually a real umber - and a unit.” Definition of a Physical Quantity –Ibidem “The same physical quantity can be represented equivalently in many unit systems.” @thodorisbais@wernerkeil
  • 21. Speed of Light c = 299,792,458 m/s = 1,079,252,849 km/h @thodorisbais@wernerkeil
  • 25. Multiples • km • ms • Mm? • ks? @thodorisbais@wernerkeil
  • 27. 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
  • 30. 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
  • 31. Quantity Addition • 1 Ω + 1 Ω = 2 Ω • 1 Ω + 1 mΩ = 1.001 Ω • 1 mΩ + 1 Ω = 1,001 mΩ • 1 Ω + 1 m “does not compute” @thodorisbais@wernerkeil
  • 32. JFall School 2019 October Exam on Maths 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
  • 33. 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 JFall School 2019 October Exam on Maths
  • 34. 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 JFall School 2019 October Exam on Maths
  • 35. 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) Answer @thodorisbais@wernerkeil JFall School 2019 October Exam on Maths
  • 36. Multiplication 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 @thodorisbais@wernerkeil JFall School 2019 October Exam on Maths
  • 37. Division 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 @thodorisbais@wernerkeil JFall School 2019 October Exam on Maths
  • 38. Powers Units •(m)2 = m2
 •(km)2 = km2 •(m2)2 = m4 Quantities • (3 m)2 = 9 m2 • @thodorisbais@wernerkeil JFall School 2019 October Exam on Maths
  • 39. Celsius Revisited Units •(K)2 = K2
 •(°C)2 ≟ (K - 273.15)2 •m × °C ≟ m·(K - 273.15) Quantities •0 °C2 ≟ 74,610.9225 K2 •1 m°C ≟ 1 mK or 273.151K @thodorisbais@wernerkeil JFall School 2019 October Exam on Maths
  • 40. Parsing Units & Quantities •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 Speed of Light @thodorisbais@wernerkeil
  • 41. Systems of Unit Systems of UnitSystems of Unit • Metric System • Imperial System • US customary units • Roman units of measurement •Norwegian Units of Measurement @thodorisbais@wernerkeil
  • 43. What Was the Fundamental Problem Again? Primitive (Java) types are primitive types @thodorisbais@wernerkeil
  • 44. Setting up a project <dependencies> <dependency> <groupId>tech.units</groupId> <artifactId>indriya</artifactId> <version>2.0</version> </dependency> </dependencies> @thodorisbais@wernerkeil
  • 45. JSR-385 Current Status • JCP page • https://jcp.org/en/jsr/detail?id=385 • GitHub repositories • https://github.com/unitsofmeasurement • Current status • Final Release @thodorisbais@wernerkeil
  • 48. Becoming a JCP Member @thodorisbais@wernerkeil