~/talk

Applying NASA coding standards to JavaScript

Talkat JSConf EU 2017 · on Sunday, 2017-05-07· [testing, developer-experience]
slides:none on file

Claims that applying JPL/NASA coding rules to web code yields production‑grade reliability, with a real HTML/JavaScript flight instrument actually built and flew around Amsterdam at ~1,000m. Lists concrete rules: limit function size, avoid indirect recursion, enforce static analysis, use ESLint and object pooling, measure memory with DevTools timeline, favor assertions (≈2 per function), limit transpiler/bundler cost, and no compiler warnings from day one. Describes which rules fit JavaScript and which are impractical.

AI-written summary · about

  1. 0:00Intro
  2. 1:41Unification - effective method to decrease diversity. Aim for unification is to place elements in particular order building strict system which is comfortable to use.
  3. 2:26The same works for engineering Unification never stops
  4. 7:15Unification Decreases development cost standardizing development flow and technologies stack
  5. 12:46Do one thing Long functions: less readable, not reusable, harder to test, harder to reactor
  6. 13:24Predictability • If you want to write reliable code-drop to write cool one and write predictable • Define coding standard and follow it . Use static analysis to support standard and reduce chance for defect: ESLint + whole lot of plugins, presets • Collect metrics: Sonarube, Scrutinizer, Plato • Analyze types: Flow/ Closure Tools / Type
  7. 14:20Do not use dynamic memory allocation after initialization
  8. 17:23Test well • Higher tests density is less defects you get • Minimal amount of tests is 2 per function • Watch for anomalies in system state during run time. Generate and handle errors in case of critical failures
  9. 17:48Data objects must be declared at the smallest possible level of scope
  10. 18:51The return value of non-void functions must be checked by each calling function, and the validity of parameters must be checked inside each function
  11. 20:42The use of pointers should be restricted. Specifically, no more than one level of dereferencing is allowed. Function pointers are not permitted
  12. 21:54All code must be compiled, from the first day of development, with all compiler warnings enabled
  13. 22:40If red? Do not panic. Simply, prioritize, refactor and add tests piece by piece.
~/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.