- π Things I Donβt Know as of 2018 β Overreacted
- π The βBug-Oβ Notation β Overreacted
- π The Elements of UI Engineering β Overreacted
- π Fix Like No Oneβs Watching β Overreacted
- π Coping with Feedback β Overreacted
- π Name It, and They Will Come β Overreacted
- π My Decade in Review β Overreacted
- π Goodbye, Clean Code β Overreacted
- π The WET Codebase β Overreacted
- π Increment: Software Architecture
- π Increment: APIs
- π The EverestEngineering Manifesto. We want our companyβ¦ | by Sebastian Luehr | EverestEngineering | Medium
- π Software Engineering at Google
- π Turn the Ship Around!
- π 1x Engineer
- π GitHub - jbranchaud/til: Today I Learned
- π Inside look at modern web browser (part 1) Β |Β Web Β |Β Google Developers (Part 1 - 4)
- π Processes and Threads - Computer Science Wiki
- π web.dev/learn
- π User-centric performance metrics
- π Understanding Low Bandwidth and High Latency Β |Β Web Fundamentals
- π Optimizing Content Efficiency Β |Β Web Fundamentals Β |Β Google Developers
- π Reduce JavaScript Payloads with Tree Shaking Β |Β Web Fundamentals
- π The Offline Cookbook Β |Β Web Fundamentals Β |Β Google Developers
- π web.dev (Lazy Loading Resources)
- π Apply instant loading with the PRPL pattern
- π Resource Prioritization β Getting the Browser to Help You
- π Introduction Β |Β Web Fundamentals Β |Β Google Developers
- π Itβs time to lazy-load offscreen iframes!
- π Choose the best build tool for your project with tooling.report
- π Prevent layout shifting and flashes of invisibile text (FOIT) by preloading optional fonts
- π Native image lazy-loading for the web
- π Extract critical CSS
- π Rendering Performance Β |Β Web Fundamentals Β |Β Google Developers
- π Layers, layers, layersβ¦ Be careful! | by Mariola Moreno GonzΓ‘lez | MΓ‘sMΓ³vil Engineering | Medium
- π content-visibility: the new CSS property that boosts your rendering performance
- π Optimize Largest Contentful Paint
- π Optimize First Input Delay
- π Optimize Cumulative Layout Shift
- π Monitor your web pageβs total memory usage with measureMemory()
- π Fixing layout instability
- π Are long JavaScript tasks delaying your Time to Interactive?
- π What should you measure to improve performance?
- π Features Β· V8
- π Blog Β· V8
- π Security
- π Why you need βcross-origin isolatedβ for powerful features
- π Know your code health with the ReportingObserver API
- π Cascade and inheritance - Learn web development | MDN
- π Introduction to the DOM - Web APIs | MDN
- π CSS Basic Box Model - CSS: Cascading Style Sheets | MDN
- π ResizeObserver: itβs like document.onresize for elements
- π βMental Models: Javascriptβ by Dan Abramov
- π What Is JavaScript Made Of? β Overreacted
- π On let vs const β Overreacted
- π Trampolines in JavaScript
- π Meta programming - JavaScript | MDN
- π Proxy pattern - Wikipedia
- π Proxy - JavaScript | MDN
- π GitHub - anvaka/set-vs-object: What is faster Set or Object?
- π javascript promises, the event loop, and the job queue - Stack Overflow
- π Understanding Event Loop, Call Stack, Event & Job Queue in Javascript
- π Underscore.js | _.defer() - GeeksforGeeks
- π Efficiently iterate on Javascript arrays
- π arrays - What is the difference between ( forβ¦ in ) and ( forβ¦ of ) statements in JavaScript? - Stack Overflow
- π Performance of Object.keys vs Object.values for getting the number of props of an object Β· GitHub
- π Benchmark: isArray - MeasureThat.net
- π Monkey patching in JavaScript - Aurelio De Rosa blog
- π JavaScript - Implicit Return | javascript Tutorial
- π The shortest way to conditional insert properties into an object literal - DEV Community
- π AggregateError - JavaScript | MDN
- π Guide to Web Authentication
This section is meant to serve as an example on how I personally keep track of feedback from various code reviews.
-
Wrap
console.logorthrow new Error()for development related error messages in a:process.env.NODE_ENV !== βproductionβcondition. -
Alphabetise imports.
-
You could use the following pattern so the reduce has a single return point:
const _fields = this.get('ticketFieldViews').reduce(
(acc, fieldView) => {
if (!fieldView.get('isDestroyed')) {
...
}
return acc;
}
)- Optimisation: You should define a single callback function outside of the reduce instead of creating one for each field:
const isReactContainerViewEnabledCallback = () => false;-
You might want to move the declaration of
allowListin the global space at the top of the file (as a constant) so JS does not have to reprocess it every time the setter is built. -
Those VOICE constants as well the array
[VOICE_HOLD, VOICE_INBOUND, VOICE_OUTBOUND]should be defined at the global scope so we don't reprocess it every time:
const VOICE_ACTIVE_STATUSES = ['voice_hold', 'voice_inbound', 'voice_outbound'];- No need to call
Object.prototype.hasOwnProperty.call(), use the function available on the object instead:
ticketTab && ticketTab.hasOwnProperty('omnitabData');
-
Please move
Object.keys(eventChannelTypes)outside of the reduce loop. -
Keep a collection intuitive and also applying memoization / lazy invoking to expensive regex computation.
-
Put parameters with a default value at the end of the parameter list in a functionβs parameters list.
-
Add a
isDevelopmentflag to indicate which code to be run in development mode only. -
Hereβs another clever trick (not that Iβd particularly recommend using this one π)
const myArray = [1, 2, 3];
const {length, [length - 1]: lastItem} = myArray;