Building a JavaScript Development Environment

How to setup a JS development environment in 2018

14 minute read

This blog post is a summary of the excellent Pluralsight Course by Cory House. Editor and Configuration First of all, editor of choice here is surprise surprise VS Code. I’m actually happly surprised that Erich Gamma is behind this. Use EditorConfig to manage, well, editor configurations. Tabs VS spaces, etc. Note that VS Code need to install a plugin for it to work. The example .editorconfig file: root = true [] indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true charset = utf-8 [.

Python Class Development Toolkit

Some useful tips on new Python Class style

1 minute read

Raymond Hettinger is a python core developer. I recently find that his python teaching videos are of very high quality and amusing at the same time. They are usually packed with tips and wisdoms here and there, so I think some written version of his videos might be helpful as references. Here is the one about new style python class. Code in the video:

GOOS Book Distilled Part 12

A follow through of the great book Growing Object-Oriented Software, Guided by Tests with code

2 minute read

This is a series of blog posts going through the great book Growing Object Oriented Software Guided By Tests, typing in code chapter by chapter, trying to add some of my own understanding where things may not be easy to grasp in the book. I highly recommand you get a copy of the book and follow along with me. Happy coding. This post covers Chapter 19 Handling Failure, which is also the last chapter in the book related to this project.

JavaScript and Prototype Design Pattern

Is Javascript's prototypal inheritance borrowed from prototype design pattern?

Guowei Lv

1 minute read

Javascript has prototypal inheritance. For example let’s create a constructor function: function Person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } Person.prototype = { fullname: function() { return this.firstname + ' ' + this.lastname; } }; var bob = new Person("Bob", "Doe"); console.log(bob.fullname()); This is very similar to the Prototype Pattern. Whenever we want a new object, we always create it out of some prototype object. I find that it is easier to understand the JS’s prototype inheritance when comparing it with the Prototype Pattern.

JavaScript the Weird Parts Distilled

Learn Javascript the Weird Parts

Guowei Lv

1 minute read

Javascript: Understanding the Weird Parts is a great course. Highly recommended if you are getting into JS from other programming languages. Much better than the book Javascript: the Good Parts in my opinion. Here I distilled all the source code with comments from the videos, for the impatients.