PHPNews

The Reader monad and read-only context

In this three-part series, I want to take a functional approach to building React applications. There will be mathematical theory sprinkled throughout the series, and hopefully by the end of it you will pick up some useful techniques! Series contents: Part 1 - Deconstructing the React Component Part …

Continue reading »

Written by Jack Hsu - - Aggregated on Wednesday May 10, 2017


Deconstructing the React Component

In this three-part series, I want to take a functional approach to building React applications. There will be mathematical theory sprinkled throughout the series, and hopefully by the end of it you will pick up some useful techniques! Series contents: Part 1 - Deconstructing the React Component Part …

Continue reading »

Written by Jack Hsu - - Aggregated on Sunday April 30, 2017


Don't Fear the Type System

There’s been a lot of talk about static types recently. I’ve especially noticed that folks who usually work with dynamically typed languages have become big proponents of static typing – and I count myself amongst them. Being a fan of Robert C. Martin (aka Uncle Bob) for a long time, it was a surprise for me to see …

Continue reading »

Written by Jack Hsu - - Aggregated on Tuesday January 24, 2017


Don't Fear the Type System

There’s been a lot of talk about static types recently. I’ve especially noticed that folks who usually work with dynamically typed languages have become big proponents of static typing – and I count myself amongst them. Being a fan of Robert C. Martin (aka Uncle Bob) for a long time, it was a surprise for me to see …

Continue reading »

Written by Jack Hsu - - Aggregated on Tuesday January 24, 2017


Why You Need Types

Dynamically typed languages like JavaScript provide a lot of expressiveness and power to the programmer. By not having to think about strict types, a program is more maleable since it will run no matter what, allowing the programmer to write code very quickly. The problem with dynamic types is that it slows …

Continue reading »

Written by Jack Hsu - - Aggregated on Tuesday August 23, 2016


Why You Need Types

Dynamically typed languages like JavaScript provide a lot of expressiveness and power to the programmer. By not having to think about strict types, a program is more maleable since it will run no matter what, allowing the programmer to write code very quickly. The problem with dynamic types is that it slows …

Continue reading »

Written by Jack Hsu - - Aggregated on Tuesday August 23, 2016


Three Rules For Structuring (Redux) Applications

In this series we are looking at code organization in the context of a React and Redux application. The takeaways for the “Three Rules” presented here should be applicable to any application, not just React/Redux. Series contents Part 1 - Three Rules for Structuring (Redux) Applications Rule #1: …

Continue reading »

Written by Jack Hsu - - Aggregated on Sunday February 28, 2016


Three Rules For Structuring (Redux) Applications

In this series we are looking at code organization in the context of a React and Redux application. The takeaways for the “Three Rules” presented here should be applicable to any application, not just React/Redux. Series contents Part 1 - Three Rules for Structuring (Redux) Applications Rule #1: …

Continue reading »

Written by Jack Hsu - - Aggregated on Sunday February 28, 2016


The Little Idea of Functional Programming

A little known fact about me is that I took Wing Chun lessons for four months back in 2006. A student starting in Wing Chun will begin by learning the first form, called Siu Lim Tao (小練頭). This form’s name translates to “little idea,” and it provides the foundation in which succeeding forms and techniques depend …

Continue reading »

Written by Jack Hsu - - Aggregated on Wednesday January 13, 2016


The Little Idea of Functional Programming

A little known fact about me is that I took Wing Chun lessons for four months back in 2006. A student starting in Wing Chun will begin by learning the first form, called Siu Lim Tao (小練頭). This form’s name translates to “little idea,” and it provides the foundation in which succeeding forms and techniques depend …

Continue reading »

Written by Jack Hsu - - Aggregated on Wednesday January 13, 2016


Avoid Unnecessary Indirection

In programming, indirection is the ability to hold references to something, as opposed to the value itself. In object-oriented programming, indirection is used for dynamic dispatch and delegation . For example, we can use delegation as follows. class Delegator { constructor(delegatee) { this.delegatee = …

Continue reading »

Written by Jack Hsu - - Aggregated on Saturday November 21, 2015


Avoid Unnecessary Indirection

In programming, indirection is the ability to hold references to something, as opposed to the value itself. In object-oriented programming, indirection is used for dynamic dispatch and delegation . For example, we can use delegation as follows. class Delegator { constructor(delegatee) { this.delegatee = …

Continue reading »

Written by Jack Hsu - - Aggregated on Saturday November 21, 2015


React and Redux with TypeScript

The release of TypeSciprt 1.6 includes support for React components. I decided to give it a whirl and see what TypeScript has to offer. The end result is a port of the Redux TodoMVC example to TypeScript. (See my repo on GitHub ) So why use types in the first place? Isn’t the dynamic and flexible nature …

Continue reading »

Written by Jack Hsu - - Aggregated on Saturday September 26, 2015


When Learning, Attitude and Approach Matter

As programmers, one of the most important skills to have is being able to learn quickly. It doesn’t matter that you know frameworks X and Y, or languages Foo and Bar. what’s hot and what’s not will change several times throughout our career, but the skill to learn new abilities will always be in demand. In this …

Continue reading »

Written by Jack Hsu - - Aggregated on Thursday June 25, 2015