Links since last time - 3rd May 2020

Here are some of the interesting resources I came across these couple of weeks.

Links since last time - 3rd May 2020

Here are some of the interesting resources I came across these couple of weeks.


Good Coding Practices

Coding Practices Our Teammates Will Thank Us For
Subscribe to my email list now at http://jauyeung.net/subscribe/ Follow me on Twitter at https://twi...
  • Standardize code format (search for editorconfig)
  • Abstraction if the snippet is too long or constantly repeated
  • Meaningful logs for debugging
  • Avoid unnecessary features
  • Avoid unnecessary comments
  • Consistent indentation (editorconfig)
  • Group related snippets of code (getter/setter should be beside each other, etc)
  • Consistent naming scheme
  • Minimal nesting

SOLID Principles

S.O.L.I.D. Principles Around You
Real-world visual examples of S.O.L.I.D. principles to make them more understandable, readable and memorisable.
  • Single Responsibility - Each piece of code should only do one task
  • Open/Closed - Each piece of should be open for extension but close for modification, allowing its functionality to be extended, but not modified
  • Liskov Substitution - Functionality that involves a class instance should have the same behavior when dealing with their child classes
  • Interface Segregation - Multiple client-specific interfaces are often better than one single general interface (Think microservices, the authentication endpoint only handles authentication, the CRUD endpoint only handles data)
  • Dependency Inversion - Splitting complex dependencies into well-defined layers (abstractions)

Understanding Context in JavaScript

JavaScript: Execution Context and Lexical Scope
When I can’t fully explain something I try to go back and understand it better and often create notes. These are my notes from trying to further explain both JavaScript’s execution context and lexical scope.

AngularJS vs ReactJS vs VueJS

React vs Angular vs Vue.js — What to choose in 2019? (updated)
The best comparison of frontend frameworks Angular, React, Vue.js on the web

Picking values from JavaScript Objects

Pick desired key-value pair from an object
It’s very common that in development we needed only a few key-value pairs from an object and still,...

Rajnish wrote a short ingenious function for picking values by their keys from a JavaScript Object.

Git Hooks

https://youtu.be/fMYv6-SZsSo
https://git-scm.com/docs/githooks
Git hooks allow you to run scripts along its pipeline. You can configure a simple linter to execute right after you pull or run some tests before you push to remote.

Rebasing and Merging - Linus Torvalds

https://github.com/torvalds/linux/blob/master/Documentation/maintainer/rebasing-and-merging.rst
Rebasing changes the series of commits, effectively rewriting your local history. Merging combines the history of 2 different trees, retaining the history of both.


Check out my Telegram Channel

Dev stuff to read on commute
A resource hub for web development related content. Question of the Day All #QOTD are scheduled. They are bite-size (2-15 mins) random computer science or software dev knowledge (text / video), perfect over lunch everyday. admin: t.me/limxz97

Whenever I come across an interesting resource, I will post it on this Telegram channel, so check it out.