~/talk

Learning from the Mistakes of a v1

Talkat JSConf Belgium 2020 · on Thursday, 2020-07-09· [developer-experience]

Dinero.js v1 is a popular money library (29 releases, 3.6k GitHub stars, peaks of ~6k npm downloads/day) that works but exposes concrete design failures: amounts use integer minor units yet tie to JS Number and max limits; a hardcoded exponent of 2; a built-in REST fetcher for exchange rates; reliance on Intl for formatting; an object‑oriented chainable API that prevents tree-shaking. v2 replaces those with an injectable calculator, explicit currency objects, an optional functional API, accepts promises for rates and lets users provide their own formatting, and moves toward TypeScript.

AI-written summary · about

  1. 0:00Introduction
  2. 2:46Open Source
  3. 3:11Popular Projects
  4. 4:58The First Issue
  5. 5:14Using Numbers
  6. 5:39FloatingPoint Arithmetic
  7. 8:43Native Billions
  8. 9:11Dinero
  9. 9:43Factory
  10. 11:18Exponents
  11. 13:25Decimal Currencies
  12. 15:20Currency Strings
  13. 16:16Conversions
  14. 16:52Too many assumptions
  15. 17:55API design trends
  16. 19:37The price to pay
  17. 20:05User responsibility
  18. 20:53Native internationalization
  19. 21:59Readiness API
  20. 23:16two format
  21. 23:39high coupling
  22. 24:04workarounds
  23. 24:39API implementation
  24. 26:13Flexible options
  25. 26:48Internationalization API
  26. 27:22Manual Internationalization
  27. 29:00Tree Shake
  28. 31:04Dynamic API
  29. 32:09Chainable vs Functional API
  30. 33:36JavaScript
  31. 34:38Type Definitions
  32. 35:48Static Typing
  33. 37:37What happened
  34. 37:59My first serious library
  35. 39:05Building something to fix my problems
  36. 41:03Assumptions
  37. 42:37Four Pillars
  38. 48:50Questions
  39. 49:21When will v2 be released
  40. 51:50Functional Programming
  41. 54:09Benefits of having a popular package
  42. 56:06Limitations of the current design
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.