Skip to content

Instantly share code, notes, and snippets.

View kamauwashington's full-sized avatar

kamauwashington kamauwashington

View GitHub Profile

TypeScript Bits

Use for..of in lieu of traditional incremental for loops when appropriate

TypeScript Bits are small, easily digestible pieces of information to encourage TypeScript/JavaScript best practices. From beginner, to intermediate, to ninja, these bits are for you 😄


Estimated reading time : 2 minutes

For loops are for loops, sure. There is absolutely nothing wrong with the traditional incremental iterator approach. However, this recommendation is about readability, maintenance, decreasing code smells, as well as best practice when using loops in TypeScript (and in this case ES6+ as well). Often during code review one will find references to an item via its parent array and index numerous times (think myArray[i].firstName and guess how lastName is accessed? :disappointed:). It is a best practice in most if not all languages to create a variable out of this value accessed by index once.

TypeScript Bits

Use provided array functions instead of Lodash

TypeScript Bits are small, easily digestible pieces of information to encourage TypeScript/JavaScript best practices. From beginner, to intermediate, to ninja, these bits are for you 😄


Estimated reading time : 2 minutes

Lodash is an amazing library, and is often used to minimize the the hassle of working with arrays, numbers, objects, strings, etc. However, it is often seen that one of it's primary uses is array manipulation, and accessing elements within.

TypeScript Bits

Template Literals

TypeScript Bits are small, easily digestible pieces of information to encourage TypeScript/JavaScript best practices. From beginner, to intermediate to ninja, these bits are for you 😄


Estimated reading time : 2 minutes

In many TS code-reviews one may find string concatenation (with the addition operator) used to assemble a message, query, multi-line comments, or other manners of literals. While this gets the job done, it is often prone to error, difficult to read, and in many cases tedious to refactor and or implement.

@kamauwashington
kamauwashington / developer_ethos.md
Last active September 4, 2022 23:34
Developer Ethos

Developer Ethos

During code review, triage, early stages of sprint development we are so focused on the deliverables that we often forget that our commits, communication, teamwork, and ownership are more than simple roles and responsibilities… they are all part of our development culture.


  • I will ABC (Always Be Collaborative). Do not build in isolation. Collaborate with other developers working on an application, the end user, and the testers.

  • I will seek business requirement clarity. Don’t imagine and build. If there is a lack of clarity – discuss, record then build towards the exact business requirement for acceptance.