Report

Thodoris BaisFollow

Jun. 26, 2019•0 likes•96 views

Jun. 26, 2019•0 likes•96 views

Download to read offline

Report

Technology

Slide deck for our talk with Werner Keil at the Developer Week Conference. Nuremberg, June 2019

Thodoris BaisFollow

How JSR-385 Could Have Saved the Mars Climate OrbiterFilip Van Laenen

How JSR 385 could have saved the Mars Climate OrbiterFilip Van Laenen

Rigit rotarMANISHSAHU106

First semester diploma Engineering physics iSHAMJITH KM

Chapter 1 MechanicsAzmizi Abdullah

Lecture 01: STKM3212Saiful Irwan Zubairi

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

- Thousand separator Decimal point Star Times Middle dot -1 sub html or unicode minus and 1 Carrot Hours Local represantation of hours