David Cai | Blog

Recent Posts

    A New Dawn

    Fri, Mar 18, 2016

    A new dawn

    It is the end of an era. After almost 8-year service at Financial Engines, I decided to advance my career in a different place. The decision is definitely not easy. Leaving FE is like carving away a big chunk of my life. So many familiar faces, so many beautiful memories. However, as of today, I still believe that when facing a great opportunity, I’d rather give it my best try than having the regrets of inaction.

    Serverless Framework at Financial Engines

    Thu, Mar 17, 2016

    Serverless framework at FE

    When working with Amazon Lambda, my colleagues asked what benefits we will reap from using the Serverless framework. We can directly code Lambda functions in AWS’ online editor, or upload a zip file to AWS if the Lambda function requires any 3rd-party node modules. The workflow might be tedious but quite easy to understand. So why Serverless?

    Serverless Framework & AWS API Gateway CORS

    Wed, Feb 10, 2016

    Serverless and CORS

    If you run into HTTP errors related to ‘Access-Control-Allow-Origin’ when calling a REST API endpoint through the AWS API Gateway, you probably need to enable CORS (Cross-Origin Resource Sharing) for your endpoint methods.

    Install Multiple Java Versions on Mac

    Mon, Dec 7, 2015

    Multiple JDKs

    During one of AWS Lambda exploration projects, I need to use Amazon’s swagger-import-tool for uploading swagger documents to AWS. The problem is that this tool has a dependency on Java 8, however, my installed JDK is 7, and I have to keep it for all existing Java projects. It seems that I need to have something like NVM (Node Version Manager) … this time for JDKs.

    Atom Essential Packages

    Thu, Nov 19, 2015

    Atom

    Atom – the hackable editor coming from Github has been my favorite for web development. Like many other lightweight editors, Atom has a community-driven packages (plugins) marketplace that greatly enhanced the editor. I found the following Atom packages are essential to my web development workflow.

    Tips on Promise and $http Service

    Mon, Sep 14, 2015

    Promise

    I’ve been reviewing a lot of Angular code lately. One common problem I found is the unnecessary use of deferred object to resolve and reject promises. In this post, I will illustrate a simplified approach. Another problem is a mix of then, catch, two callbacks in then, success, and error. I will go through each, and propose adopting a single style that can also be applied when using other Promise libraries.

    Webpack: Pack Your Web Assets

    Sat, Aug 22, 2015

    Webpack

    I just had a presentation to introduce Webpack to our UI Guild in my company. Webpack is a module bundler to pack all kinds of web assets (JavaScript, styles, images, HTML partials, etc.) into one or more bundle JS files.

All Posts