week 49, 2019

Moving from Vim to Emacs

I’ve been a staunch Vim user for a long time now, and recently switched over to Emacs. Time to fight the other side of the war!

I’ve got years worth of muscle memory tied up to Vim Key Bindings, so it’s unlikely that I’d have considered this change if it weren’t for evil-mode.

Source: Moving from Vim to Emacs, an article by Paul Kuruvilla.

Do Butterflies Challenge the Meaning of Species?

What is a species? It’s a question that has agonized scientists since well before Darwin. With some exceptions, the thinking has landed on an evidently firm reproductive barrier: Members of different species don’t mate. If they do, their offspring are sterile and can’t contribute to future generations. The reproductive barrier has thus created a useful demarcation of “what is a species”—until a deep dive into butterflies showed otherwise.

Source: Do Butterflies Challenge the Meaning of Species?, an article by Mary Ellen Hannibal.

Simple Go Mocks

Go‘s interfaces and “duck typing” makes it very easy to create simple mock or stub implementations of a dependency for testing. This has not dissuaded a number of people from writing generalized mocking libraries such as gomock and testify/mock, among others.

Here I want to describe a simple alternative pattern I frequently use when writing tests for an interface, that I think is generally applicable to many use cases.

Source: Simple Go Mocks, an article by Jonathan Hall.

Building DSLs in Swift

A DSL, short for Domain Specific Language, can be explained as a special kind of API that focuses on providing a simple syntax that's tailored to working within a specific domain. Rather than being complete stand-alone languages - like Swift is - DSLs are often hosted in other languages, and as such, need to use a grammar that's also perfectly valid in their host language.

Source: Building DSLs in Swift, an article by John Sundell.

Principal Components Analysis (PCA) – Better Explained

Principal Components Analysis (PCA) is an algorithm to transform the columns of a dataset into a new set of features called Principal Components. By doing this, a large chunk of the information across the full dataset is effectively compressed in fewer feature columns. This enables dimensionality reduction and ability to visualize the separation of classes or clusters if any.

In this tutorial, I will first implement PCA with scikit-learn, then, I will discuss the step-by-step implementation with code and the complete concept behind the PCA algorithm in an easy to understand manner.

Source: Principal Components Analysis (PCA) - Better Explained. A recommended read.

What is Functional Programming?

Functional Programming is, like Object Oriented Programming (OOP), a programming paradigm. There isn't a formal agreed-upon definition of what FP entails, but there are two core concepts most people would agree are central to the paradigm:

  1. Avoiding mutating state and side-effects
  2. Using functions as the central building block of programs

Lets discuss each of these in turn.

Source: What is Functional Programming?, an article written by Kjetil Valle.