Five ways to be a happier JavaScript developer

32
Five ways to be a happier JavaScript developer Chris Heilmann (@codepo8) Feburary 2018

Transcript of Five ways to be a happier JavaScript developer

Page 1: Five ways to be a happier JavaScript developer

Five ways to be a happier JavaScript developer

Chris Heilmann (@codepo8) Feburary 2018

Page 2: Five ways to be a happier JavaScript developer

tar -cvzf here.tar.gz thisone

christianheilmann.com/2017/12/05/so-you-learned-javascript-what-now/

Page 3: Five ways to be a happier JavaScript developer

ways to be a happier JavaScript developer

Page 4: Five ways to be a happier JavaScript developer

ways to be a happier JavaScript developer

▪ Concentrating on the now

▪ Limiting our development

environment

▪ Making it harder to write

bad code

▪ Getting to know our tooling

▪ Giving back to others

Page 5: Five ways to be a happier JavaScript developer

Concentrating on the now…

Page 6: Five ways to be a happier JavaScript developer

Worries of the past shouldn’t prevent us from creating…

Page 7: Five ways to be a happier JavaScript developer

Focusing exclusively on the next cool thing is as stifling and depressing

Page 8: Five ways to be a happier JavaScript developer

developer.mozilla.org/en-US

Page 9: Five ways to be a happier JavaScript developer

caniuse.com

Page 10: Five ways to be a happier JavaScript developer

Limiting our development environment

Page 11: Five ways to be a happier JavaScript developer

The web development trinity

BrowserTerminalEditor

▪ Where we code▪ Where we tweak themes▪ Where we mix spaces and

tabs – like animals

▪ Where we do version control

▪ Where we run build tasks▪ Where we deploy▪ Where we tweak themes▪ Where we assume

everyone runs OSX

▪ Where we debug▪ Where we check and

tweak visual output▪ Where we audit▪ Where we annoy the

end user with odd log messages.

Page 12: Five ways to be a happier JavaScript developer

That is a lot of duplication and multiplication with choice

Page 13: Five ways to be a happier JavaScript developer

Tooling is starting to overtake that

historically grown trinity.

Page 14: Five ways to be a happier JavaScript developer

Good editors consolidate

features to avoid context switching.

Page 15: Five ways to be a happier JavaScript developer

VS Code (@code)

code.visualstudio.com

▪ Open Source, Cross-platform

▪ Hundreds of extensions

▪ Highly theme-able

▪ Built-in source control support

▪ Built-in terminal

▪ Integrates into build processes

▪ Written and extensible in TypeScript

▪ Straightens and lightens teeth with

repeat use

▪ Possibly is good against hair loss

▪ Gluten free, macrobiotic

Page 16: Five ways to be a happier JavaScript developer

smashingmagazine.com/2018/01/visual-studio-codevscodecandothat.com

Page 17: Five ways to be a happier JavaScript developer

Instead of using your own

machine, why not try online before?

glitch.com

jsbin.com

codepen.io

Page 18: Five ways to be a happier JavaScript developer

Making it harder to write bad code.

Page 19: Five ways to be a happier JavaScript developer

Applying a stricter ruleset

pre-empts mistakes

Page 20: Five ways to be a happier JavaScript developer

Linting > Debugging

code.visualstudio.com

▪ Find mistakes while you make them

▪ Based on the experience and

consensus of many others

▪ Learn from explanations of linting

results

▪ Install and configure, or use in-built

linting.

Page 21: Five ways to be a happier JavaScript developer

Overall, I give linting high marks

Page 22: Five ways to be a happier JavaScript developer

Moving fromknowing .*

tolearning by

making mistakes

Page 23: Five ways to be a happier JavaScript developer

Auditing

▪ Audit your work before you go live

▪ Learn from explanations of why

these are mistakes

▪ Keep iterating until it becomes

second nature.

Page 24: Five ways to be a happier JavaScript developer

Linting and validation tools can

be part of your release process.

sonarwhal.com

Page 25: Five ways to be a happier JavaScript developer

Getting to know our tooling

Page 26: Five ways to be a happier JavaScript developer

It is true that our tools have become

much more complex.

Page 27: Five ways to be a happier JavaScript developer

Knowing them gives you superpowers

and insights how to build great solutions

Page 28: Five ways to be a happier JavaScript developer

Step one is to stop using console.log() and use

breakpoints instead.

code.visualstudio.com/Docs/editor/debugging

smashingmagazine.com/2018/02/javascript-firefox-debugger/

Page 29: Five ways to be a happier JavaScript developer

Giving back to others

Page 30: Five ways to be a happier JavaScript developer

Not everybody cares about the nuts and bolts and has

endless time to invest

twitter.com/headjs_ru/status/955333399564161024

Page 31: Five ways to be a happier JavaScript developer

My plea to you:

Be the person you’d like to meet. Be kind, be supportive, and avoid unnecessary drama.