Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to Be Effective Javascript Developer

How to Be Effective Javascript Developer

Process is automatic decisions for trivial questions and framework for making decisions for all other questions.

Radoslav Stankov

November 09, 2022
Tweet

More Decks by Radoslav Stankov

Other Decks in Technology

Transcript

  1. !

  2. “It is better to be a good programmer with great

    habits, than a great programmer.” - Kent Beck
  3. “Process is automatic decisions for trivial questions and framework for

    making decisions for all other questions.” - Rado What is process
  4. “Flow state, also known as being in the zone, is

    the mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity.” - WikipediA Flow
  5. “Task switching is an executive function that involves the ability

    to shift attention between one task and another unconsciously.” - WikipediA Task switching
  6. “In cognitive psychology, cognitive load refers to the used amount

    of working memory resources. ” - WikipediA Cognitive load
  7. “Ego depletion refers to the idea that self- control or

    willpower draws upon a limited pool of mental resources that can be used up.” - WikipediA Ego depletion
  8. “Process is automatic decisions for trivial questions and framework for

    making decisions for all other questions.” - Rado What is process
  9. “Process is automatic decisions for trivial questions and framework for

    making decisions for all other questions.” - Rado What is process
  10. export function useEffect( create: () => (() => void) |

    void, deps: Array<mixed> | void | null, ): void { const dispatcher = resolveDispatcher(); return dispatcher.useEffect(create, deps); } https://github.com/facebook/react/blob/main/packages/react/src/ReactHooks.js
  11. https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberHooks.new.js const HooksDispatcherOnMount: Dispatcher = { // ... useRef: mountRef,

    // ... }; const HooksDispatcherOnUpdate: Dispatcher = { // ... useRef: updateRef, // ... }; const HooksDispatcherOnRerender: Dispatcher = { // ... useRef: updateRef, // ... }; const ContextOnlyDispatcher: Dispatcher = { // ... useRef: throwInvalidHookError, // ... };
  12. https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberHooks.new.js " const HooksDispatcherOnMount: Dispatcher = { // ... useRef:

    mountRef, // ... }; const HooksDispatcherOnUpdate: Dispatcher = { // ... useRef: updateRef, // ... }; const HooksDispatcherOnRerender: Dispatcher = { // ... useRef: updateRef, // ... }; const ContextOnlyDispatcher: Dispatcher = { // ... useRef: throwInvalidHookError, // ... };
  13. function updateWorkInProgressHook(): Hook { // This function is used both

    for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can // use as a base. When we reach the end of the base list, we must switch to // the dispatcher used for mounts. let nextCurrentHook: null | Hook; if (currentHook === null) { const current = currentlyRenderingFiber.alternate; if (current !== null) { nextCurrentHook = current.memoizedState; } else { nextCurrentHook = null; } } else { nextCurrentHook = currentHook.next; } let nextWorkInProgressHook: null | Hook; if (workInProgressHook === null) { nextWorkInProgressHook = currentlyRenderingFiber.memoizedState; } else { nextWorkInProgressHook = workInProgressHook.next; } if (nextWorkInProgressHook !== null) { // There's already a work-in-progress. Reuse it.
  14. function updateWorkInProgressHook(): Hook { // This function is used both

    for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can // use as a base. When we reach the end of the base list, we must switch to // the dispatcher used for mounts. let nextCurrentHook: null | Hook; if (currentHook === null) { const current = currentlyRenderingFiber.alternate; if (current !== null) { nextCurrentHook = current.memoizedState; } else { nextCurrentHook = null; } } else { nextCurrentHook = currentHook.next; } let nextWorkInProgressHook: null | Hook; if (workInProgressHook === null) { nextWorkInProgressHook = currentlyRenderingFiber.memoizedState; } else { nextWorkInProgressHook = workInProgressHook.next; } if (nextWorkInProgressHook !== null) { // There's already a work-in-progress. Reuse it.
  15. function updateWorkInProgressHook(): Hook { // This function is used both

    for updates and for re-renders triggered by a // render phase update. It assumes there is either a current hook we can // clone, or a work-in-progress hook from a previous render pass that we can // use as a base. When we reach the end of the base list, we must switch to // the dispatcher used for mounts. let nextCurrentHook: null | Hook; if (currentHook === null) { const current = currentlyRenderingFiber.alternate; if (current !== null) { nextCurrentHook = current.memoizedState; } else { nextCurrentHook = null; } } else { nextCurrentHook = currentHook.next; } let nextWorkInProgressHook: null | Hook; if (workInProgressHook === null) { nextWorkInProgressHook = currentlyRenderingFiber.memoizedState; } else { nextWorkInProgressHook = workInProgressHook.next; } if (nextWorkInProgressHook !== null) { // There's already a work-in-progress. Reuse it.
  16. 3 Run a test 0 Search in codebase ✈ Jump

    across files 5 Refactoring - moving code around 6 Search documentation 7 Writing new code ⛩ Common operations
  17. 9

  18. 9

  19. : Personal Goals ✈ Travel to Japan < 3 Weight

    90kg 7 Work Goals = Ship claiming of Product Hub 6 Learn PostgreSQL internals ; Baseline > 10k steps per day ? Train 3 days a week @ Sleep 8 hours a night
  20. E Top priority F G Second priority H I Third

    priority J ⏺ Something else ⏺ Something else ⏺ Something else F Priority
  21. E Top priority F G Second priority H I Third

    priority J ⏺ Something else ⏺ Something else ⏺ Something else F Priority
  22. E Status of goals G What went well? I What

    could have been done better? L What are the goals and plans for next week? M Weekly Review