SlideShare una empresa de Scribd logo
1 de 52
Descargar para leer sin conexión
How JSR-385 could have
Saved the Mars Climate
Orbiter
Werner Keil & Thodoris Bais
@thodorisbais@wernerkeil
Werner Keil Thodoris Bais
Spec Lead JSR-385 Expert Group Member JSR-385
Let’s meet
@thodorisbais@wernerkeil
Mars Climate
Orbiter
• Launched on 11
December 1998

• 338 kilograms

• $125 millions

• To study Martian
climate, atmosphere
and surface changes
@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
More unit mishaps
• 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
@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
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. Focused
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
Exercise
@thodorisbais@wernerkeil
Write a program to calculate the BMI of a person
Exercise description
BMI is a person's weight in kilograms (kg) divided by his or her height in meters squared
@thodorisbais@wernerkeil
Setting up a project
<dependencies>
<dependency>
<groupId>tech.units</groupId>
<artifactId>indriya</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
@thodorisbais@wernerkeil
Quantities
@thodorisbais@wernerkeil
–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
1. Define two quantities

a. A mass

b. A length

2. Print them out
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
Exercise Time
@thodorisbais@wernerkeil
•Read mass and height from the command line
Exercise Time
@thodorisbais@wernerkeil
Units
@thodorisbais@wernerkeil
Base Units
@thodorisbais@wernerkeil
Derived Units
@thodorisbais@wernerkeil
Multiples
• km

• ms

• Mm?

• ks?
@thodorisbais@wernerkeil
1.Define a BMI unit

2.Convert the quantity to the BMI unit before printing it out
Exercise Time
@thodorisbais@wernerkeil
Dimensions
@thodorisbais@wernerkeil
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 is the mass and which is the length
Exercise Time
@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
JCON School
September 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
JCON School
September Exam on Maths
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
JCON School
September 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
JCON School
September 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
JCON School
September 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
JCON School
September 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
JCON School
September Exam on Maths
Powers
Units
•(m)2 = m2

•(km)2 = km2
•(m2)2 = m4
Quantities
• (3 m)2 = 9 m2
•
@thodorisbais@wernerkeil
JCON School
September 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
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
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
–https://www.jcp.org/en/participation/overview
“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.”
–https://www.jcp.org/en/participation/membership
“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.”
The Java Community Process
@thodorisbais@wernerkeil
Becoming a JCP Member
@thodorisbais@wernerkeil
@thodorisbais@wernerkeil

Más contenido relacionado

La actualidad más candente

La actualidad más candente (18)

Physics Pp Presentation Ch 9
Physics Pp Presentation Ch 9Physics Pp Presentation Ch 9
Physics Pp Presentation Ch 9
 
#20 Key
#20 Key#20 Key
#20 Key
 
Report data-logger full
Report data-logger fullReport data-logger full
Report data-logger full
 
#22 Key
#22 Key#22 Key
#22 Key
 
Data loging report
Data loging reportData loging report
Data loging report
 
#20
#20#20
#20
 
AE5810 - Thesis
AE5810 - ThesisAE5810 - Thesis
AE5810 - Thesis
 
Causes of change
Causes of changeCauses of change
Causes of change
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Thermochemistry
ThermochemistryThermochemistry
Thermochemistry
 
Data logging
Data loggingData logging
Data logging
 
Thermochemistry
ThermochemistryThermochemistry
Thermochemistry
 
Thermal Energy PPT
Thermal Energy PPTThermal Energy PPT
Thermal Energy PPT
 
Energy ch 16
Energy ch 16Energy ch 16
Energy ch 16
 
Satics Design project
Satics Design project Satics Design project
Satics Design project
 
OLM Science6_9
OLM Science6_9OLM Science6_9
OLM Science6_9
 
#21 Key
#21 Key#21 Key
#21 Key
 
Solution Manual – Heat and Mass Transfer: Fundamentals and Application, 5th e...
Solution Manual – Heat and Mass Transfer: Fundamentals and Application, 5th e...Solution Manual – Heat and Mass Transfer: Fundamentals and Application, 5th e...
Solution Manual – Heat and Mass Transfer: Fundamentals and Application, 5th e...
 

Similar a How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 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 2020Thodoris Bais
 
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
 
Unit 1 notes_pp_12_13
Unit 1 notes_pp_12_13Unit 1 notes_pp_12_13
Unit 1 notes_pp_12_13sdieker
 
1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdf1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdfDr. Syed Haider
 
What is energy? Slide share
What is energy?  Slide shareWhat is energy?  Slide share
What is energy? Slide shareImranAnsari174
 
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 2019Thodoris Bais
 
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
 
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
 
01scientific measurement
01scientific measurement01scientific measurement
01scientific measurementDr Ahmad Fahmi
 
Acc intro to thermal energy spring 2012
Acc intro to thermal energy spring  2012Acc intro to thermal energy spring  2012
Acc intro to thermal energy spring 2012sbarkanic
 
Unit 1 Numbers
Unit 1 NumbersUnit 1 Numbers
Unit 1 NumbersJosh Macha
 
Ccp intro to thermal energy fall 2010
Ccp intro to thermal energy fall  2010Ccp intro to thermal energy fall  2010
Ccp intro to thermal energy fall 2010sbarkanic
 

Similar a How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019 (20)

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 - 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
 
Unit 1 notes_pp_12_13
Unit 1 notes_pp_12_13Unit 1 notes_pp_12_13
Unit 1 notes_pp_12_13
 
1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdf1-Physical-quantities-units.pdf
1-Physical-quantities-units.pdf
 
energy
energy energy
energy
 
What is energy? Slide share
What is energy?  Slide shareWhat is energy?  Slide share
What is energy? Slide share
 
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
 
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
 
Sec 4 Chapter 3
Sec 4 Chapter 3Sec 4 Chapter 3
Sec 4 Chapter 3
 
0708 energy
0708 energy0708 energy
0708 energy
 
0708 energy
0708 energy0708 energy
0708 energy
 
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
 
01scientific measurement
01scientific measurement01scientific measurement
01scientific measurement
 
Acc intro to thermal energy spring 2012
Acc intro to thermal energy spring  2012Acc intro to thermal energy spring  2012
Acc intro to thermal energy spring 2012
 
Unit 1 Numbers
Unit 1 NumbersUnit 1 Numbers
Unit 1 Numbers
 
Lect1(unit).ppt
Lect1(unit).pptLect1(unit).ppt
Lect1(unit).ppt
 
Ch4 heat and temperature
Ch4 heat and temperatureCh4 heat and temperature
Ch4 heat and temperature
 
Ccp intro to thermal energy fall 2010
Ccp intro to thermal energy fall  2010Ccp intro to thermal energy fall  2010
Ccp intro to thermal energy fall 2010
 
M2
M2M2
M2
 

Más 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
 

Más 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

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfmbmh111980
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems ApproachNeo4j
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024vaibhav130304
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionWave PLM
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfFurqanuddin10
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationHelp Desk Migration
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignNeo4j
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationHelp Desk Migration
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersEmilyJiang23
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdfkalichargn70th171
 
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 TransformationWSO2
 
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityAPVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityamy56318795
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 

Último (20)

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
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
 
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purityAPVP,apvp apvp High quality supplier safe spot transport, 98% purity
APVP,apvp apvp High quality supplier safe spot transport, 98% purity
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 

How JSR 385 Could have Saved the Mars Climate Orbiter JCON September 2019

  • 1. How JSR-385 could have Saved the Mars Climate Orbiter Werner Keil & Thodoris Bais @thodorisbais@wernerkeil
  • 2. Werner Keil Thodoris Bais Spec Lead JSR-385 Expert Group Member JSR-385 Let’s meet @thodorisbais@wernerkeil
  • 3. Mars Climate Orbiter • Launched on 11 December 1998
 • 338 kilograms
 • $125 millions
 • To study Martian climate, atmosphere and surface changes @thodorisbais@wernerkeil
  • 4. 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
  • 5. More unit mishaps • 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 @thodorisbais@wernerkeil
  • 7. What is the Fundamental Problem? Primitive (Java) types are primitive types @thodorisbais@wernerkeil
  • 8. 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
  • 9. Rolling your Own Library • Development • Maintenance • Upgrades & extensions @thodorisbais@wernerkeil
  • 11. JSR-385: Units of Measurement API 2.0 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 This JSR specifies Java packages for modelling and working with measurement values, quantities and their corresponding units. @thodorisbais@wernerkeil
  • 12. JSR-385 Basic Concepts • Dimensions • Units • Quantities • Prefixes • Converters • Formats • Systems of units @thodorisbais@wernerkeil
  • 14. Write a program to calculate the BMI of a person Exercise description BMI is a person's weight in kilograms (kg) divided by his or her height in meters squared @thodorisbais@wernerkeil
  • 15. Setting up a project <dependencies> <dependency> <groupId>tech.units</groupId> <artifactId>indriya</artifactId> <version>2.0</version> </dependency> </dependencies> @thodorisbais@wernerkeil
  • 17. –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
  • 18. Speed of Light c = 299,792,458 m/s Value Unit @thodorisbais@wernerkeil
  • 19. –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
  • 20. Speed of Light c = 299,792,458 m/s = 1,079,252,849 km/h @thodorisbais@wernerkeil
  • 21. 1. Define two quantities a. A mass b. A length 2. Print them out Exercise Time @thodorisbais@wernerkeil
  • 22. •Divide the mass by the square of the height •Print out the result Exercise Time @thodorisbais@wernerkeil
  • 23. •Parse mass and height from a String Exercise Time @thodorisbais@wernerkeil
  • 24. •Read mass and height from the command line Exercise Time @thodorisbais@wernerkeil
  • 28. Multiples • km • ms • Mm? • ks? @thodorisbais@wernerkeil
  • 29. 1.Define a BMI unit 2.Convert the quantity to the BMI unit before printing it out Exercise Time @thodorisbais@wernerkeil
  • 31. 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
  • 32. •Autodetect which argument is the mass and which is the length Exercise Time @thodorisbais@wernerkeil
  • 35. 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
  • 36. Quantity Addition • 1 Ω + 1 Ω = 2 Ω • 1 Ω + 1 mΩ = 1.001 Ω • 1 mΩ + 1 Ω = 1,001 mΩ • 1 Ω + 1 m “does not compute” @thodorisbais@wernerkeil
  • 37. JCON School September 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
  • 38. JCON School September Exam on Maths 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
  • 39. JCON School September 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
  • 40. JCON School September 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
  • 41. JCON School September 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
  • 42. JCON School September 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
  • 43. JCON School September Exam on Maths Powers Units •(m)2 = m2
 •(km)2 = km2 •(m2)2 = m4 Quantities • (3 m)2 = 9 m2 • @thodorisbais@wernerkeil
  • 44. JCON School September 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
  • 45. 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
  • 46. 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
  • 48. What Was the Fundamental Problem Again? Primitive (Java) types are primitive types @thodorisbais@wernerkeil
  • 49. 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
  • 50. –https://www.jcp.org/en/participation/overview “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.” –https://www.jcp.org/en/participation/membership “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.” The Java Community Process @thodorisbais@wernerkeil
  • 51. Becoming a JCP Member @thodorisbais@wernerkeil