If JavaScript libraries are proving costly, replace them with smaller alternatives. Lots of great options in https://t.co/dtMSv5DLfp & https://t.co/hU1xwmn9N7
I regret having written integration tests and not written unit tests every time I come back and try to understand that code later.
Every Single time.
Unit tests are tedious and annoying to write, but they are the only thing that truly explains what the code was supposed to do.
Here's some of the best advice I got when I became a manager last year! It's simple, but considering most people receive no management training whatsoever these days, it's better than nothing. Thread!
Tips for useful, respectful code reviews:
- Assume competence (author may have a different context)
- Provide specific, actionable feedback
- Focus on the code (avoid personal criticism)
- Clearly mark nitpicks & optional comments
- Provide rationale (e.g refs to a style guide)
Optional Chaining & Nullish Coalescing are coming to JavaScript! They're short, readable and are both available to try in Chrome Canary 🎉
https://t.co/c9YGBtlt18
https://t.co/ZWcHzDPffd
TypeScript 3.7 is finally here!
✔ Optional Chaining & Coalescing
✔ Assertion Functions
✔ .d.ts Emit From .js Files
✔ Smarter Control Flow Analysis
✔ Flatter Error Messages
and more! Check out the blog post today! https://t.co/mJ3EpvTz3H
#TypeScript tip for today:
When you return an array, TypeScript infers the type as an Array of included types (see attached code)
If you want this value to be inferred as a Tuple instead, add `as const` to the return statement.
Hierarchy of any implementation:
1. Correct
2. Simple
3. Fast
------
Be wary of the temptation to flip 2 and 3. Fast is great but if you can never touch the code again what is the point?
New Web Performance API + Metric:
⚡ Largest Contentful Paint (LCP) ⚡
LCP helps you measure when the main content of a web page has loaded.
FCP + LCP now gives you a much more holistic view into how fast your sites actually load for real users! https://t.co/mTnoByASnN
Learn how to make network connections early to improve perceived page speed: https://t.co/6lDZydP8Vl ~ a new guide on <link rel=preconnect> & <link rel=dns-prefetch> by @bibydigital