TIL - Today I Learned

Number of TILs remaining to meet 2017 goal: 20

Javascript Class Basics

  

TIL about the javascript class keyword introduced in ES6, and dug in to some of the nuances behind it.

URLSearchParams Object

  

TIL about the URLSearchParams Object, which is useful for parsing URL querystrings in to maps of keys and values.

XMLHttpRequest Example

  

TIL how to initiate a request using native browser XMLHttpRequest objects, instead of a request library that wraps these objects.

Fetch API: Options

  

TIL how to pass headers along with requests initiated by the fetch API.

Semantic Versioning

  

TIL what semantic versioning is, what each number of the version indicates, and why using a versioning scheme like semantic versioning is important.

Flyway Migrations

  

TIL how to configure the database migration framework Flyway, as well as the difference between Versioned and Repeatable migrations.

Linear Algebra Review

  

TIL how to calculate the magnitude, normalization, dot product, and cross product of vectors. I wrote a small library that performs the calculations - repo w...

Pattern Matching in SQL

  

TIL how to properly write a SQL statement using the LIKE operator, including how to use wildcards to match various patterns.

Snapshot Testing with Jest

  

TIL how to perform snapshot testing using Facebook’s React unit testing framework jest. It is somewhat different than traditional visual regression testing… ...

Webpack: Chunking with Plugins

  

TIL how to use webpack plugins like ExtractTextPlugin and CommonsChunkPlugin to create smaller chunks out of my webpack bundles.

node: require.cache

  

TIL that node’s require method maintains a cache of the modules that have been imported. I also learned that it is possible to invalidate this cache.

Webpack: Using loaders

  

TIL how to use webpack loaders to transpile React code to ES5, and compile .less stylesheets to .css.

Webpack: Configuring webpack-dev-server

  

TIL how to configure webpack-dev-server (WDS) to both serve files from the publicPath and proxy APIs on different domains to avoid cross site request warning...

Webpack: Paths and Naming

  

TIL the difference between path and publicPath in webpack, and how the output.filename property can be used to assign files to sub-directories in the path.

Arrow Functions and this

  

TIL how to leverage ES6 arrow functions to avoid losing “this” when writing functions inside of functions.

Prototypal Inheritance

  

TIL how to implement an inheritance relationship (from scratch) in javascript using prototypal inheritance.

’async’ script attribute

  

TIL about the behavior of script loading in an HTML page, when the async attribute is added to a script tag.

‘let’ transpilation in Babel

  

TIL how Babel transpiles variables defined with let to their ES5 var equivalents, while still maintaining the same block scoping rules that apply to let.

em vs rem

  

TIL the difference between em and rem in CSS.

What is Firebase

  

TIL what Firebase is. I followed the tutorial and published a quick app to understand its capabilities.

CSS Positioning

  

TIL (reviewed) the differences between the 4 CSS position property values: static, fixed, relative, absolute.

Javascript Debugger

  

TIL of two ways to work debug statements into javascript code.

CSS specificity and the Console Object

  

TIL (more like relearned) CSS specificity rules, and (unrelated) some additional methods on the console object other than console.log.

Postgres Extensions: CITEXT

  

TIL about Postgresql extensions, particularly the CITEXT extension for making a case insensitive column in a table.

app.use and app.all

  

TIL the difference between app.use and app.all in the context of an express application.

Native vs 3rd Party Promise Implementations

  

TIL that the promise implementation shipped with ES6 is not very performant, and that it is still preferable to use a 3rd party promise library for several r...

Amortized Time Complexity

  

TIL that the amortized time complexity of adding an item to an ArrayList in Java is O(1), but that the “worst case” for an add operation is O(n). This caused...

LRU cache

  

TIL how a standard caching strategy, the Least Recently Used (LRU) cache, works.

Call By Value vs Call By Name

  

TIL the difference between Call By Value and Call by Name expression evaluation strategies implemented by languages such as Scala.

HTML5 Email Templates…

  

TIL how difficult it is to create emails with rich content…inline CSS and email client incompatibilities for days!

Using JS FileReader

  

TIL how to use the javascript FileReader to read data from a text file.

Mobile Browser Data Limit

  

TIL that there exists a hard cap on the amount of data a single webpage can ship to a mobile browser, before the browser crashes.

Cohort Analysis

  

TIL about cohort analysis, and how it can be used as an input to product strategy.

Synchronous Javascript

  

TIL that javascript is really a synchronous language with callback capabilities that make it feel asynchronous at times.

Sorting Algorithms

  

TIL (more like re-learned) the differences between a few basic sorting algorithms: selection sort, insertion sort, and merge sort

Sorting Arrays in Javascript

  

TIL how the Array.prototype.sort() sorts by default, and how to pass a comparator function in to the sort method if a different sort order is desired.

Using Javascript Object Prototypes

  

TIL how to use javascript object prototypes, to associate common methods and data types with the “superclass” for a javascript object.

Overwriting Mocks in Jasmine

  

TIL how to overwrite mocks in tests, by saving them to a variable and modifying the function tied to the object.

Mocking the Clock Using Jasmine

  

TIL how to mock the internal clock of a test using jasmine. This was useful for testing methods that rely on a timeout or debounce before firing.

Net Promoter Score (NPS)

  

TIL of a metric that helps measure customer engagement and loyalty: Net Promoter Score

Hunting Down Performance Issues

  

TIL what the angular-animate library does, after noticing it was contributing to over 60% of the scripting time necessary to scroll through our grid!

One Time Binding

  

TIL that angular 1.3 and onwards has a one-time-bind option to pass to interpolated expressions, which tells angular that the data is not expected to change.

Using the Chrome Profiler

  

TIL how to use the Chrome “Timeline” Profiler to help uncover poorly performing front-end code.

Angular Interpolation vs. ng-bind

  

TIL that instead of interpolating a data binding in a template (via double curly brace syntax), you can accomplish the same thing by adding the ng-bind direc...

Angular ng-model-options - Debounce

  

TIL about the ng-model-options directive, which augments the behavior of an input element bound to a scope property via ng-model.

Underscore.js

  

TIL about Underscore.js (an awesome javascript util library) that prevented me from needing to write a custom dictionary-parsing method.

Javascript - Call by Sharing?

  

TIL that there is a programming language evaluation strategy called “call by sharing,” and that Javascript implements this approach.

Service Design in Angular

  

TIL how to design a service in Angular that encapsulates the actions necessary to supply data to a controller.