Python Xero Integration Setup

I got a task about Xero integration in my work last week, aiming to copy invoices from one account to the other. To perform this task, the workflow will be:

    1. Invoice created/updated in Xero account A
    1. The webhook from Xero account A is triggered
    1. Our App handles the webhook and copy the newly created/updated invoice to Xero account B

This article will show you how to setup Xero and talk about some tricky parts of the task.

Continue reading →

Cypress: UI Test For Your React/Webpack Project

UI Test has been a problem for every web front end project once it grows and becomes rather complicated while the common unit tests fail to cover complex workflow and business logic.

UI Test in this artile, I would say it’s more like integration test, but I would not put it as E2E test, since I have no intention to test the real backend. So the things that I am going to talk about in this article, are “login and redirect to the home page”, “sign up and redirect to the home page”, “create a query in the dashboard and see if the result is correctly rendered” and all sort of stuff that a unit test is unable to cover.

Continue reading →

《如何阅读一本书》 笔记





Continue reading →

Review: The Spare Room

Story Brief

The author (Helen) had her fifteen-year friend Nicola from Sydney staying in her spare room in Melbourne for three weeks. Nicola was there for a Vitamin C Treatment claiming to cure her cancer, while Helen had to care for her.

Nicola had never been married and had no children. She was what called Bohemian.

She was obsessed with alternative treatments and theories, even they all seemed to be deceptive to Helen. The side effects of the treatment gave Nicola a lot of bad nights but she made herself believed that it was the proof of the cancer being reduced, while at the same time, Helen had to spend all those sleepless nights taking care of Nicola and holding back to not hurt Nicola by pointing out the truth of the false treatment.

The days went on until Helen could no longer stand and confronted Nicola. Helen pushed her to face the truth: She was going to die.

Continue reading →

I Just Released My English Number Listening Practice App

Yes, I just released the first rough version of my English number listening practice APP: English Number

Why An English Number App?

I m having my NAATI class recently, it is a course that helps you practice to be an interpreter. I’m doing English-Mandarin interpreting.

The practice is usually based on a dialogue conducted by an English speaker and LOTH speaker. What I will do is interesting the content from the English speaker to Mandarin and the other way around, one by one.

Continue reading →

Lower you expectation for Webpack’s Tree Shaking

Recently I upgrade my project from webpack1 to webpack3, one of the main highlight feature for me is Tree Shaking. Depnding on the static structure of ES6 module system, webpack is now able to get rid of unused modules from your build.

That sounds very cool, but after I finished my upgrade and rebuilt my project, the decrease of the file sizes did not reflect my expectation.

Why? Did I not use it right, or is it actually not working?

Continue reading →