RSSAmplifier

Blog

I'm Brian Chu

brianchu.comRSS feed ↗9 posts

Latest posts

The Discovery of Magic

I spend plenty of time thinking about the kinds of questions most ambitious college students do: how should I prepare for the future? What kind of career should I pursue? What’s worth learning? Most of my college friends plan their next semester, next year, and the year after graduation. Most of my friends in industry plan about as far as their next job. This is a pretty good strategy. I…

Making Decisions

A few of the frameworks and factors I’ve encountered for thinking about the decisions and choices I make. When facing multiple priorities and opportunities that you can take, consider these ideas: The regret-minimization framework: Ask yourself which opportunity you will regret not taking. Ask yourself if you will regret doing something. This has probably been the most influential for me.…

Work where you have comparative advantages

Like most developers, you probably keep a running list of ideas for apps you might build. I do. They all seem promising and potentially useful. How do you prioritize what to build? One way I try to decide what to work on: I think of my comparative advantages. Work where you have a comparative advantage. Consider the unique skills, insights, networks of people, networks of beta users, and marketing…

My First iPhone Game: Devils in Heaven

Introducing my first iPhone game, Devils in Heaven , a 2D infinite runner game with interactive obstacles! Beezlebubbly is stuck in heaven, and you need to help him escape from the not-too-happy angels chasing him. Fling statues and harps around and protect Beezlebubbly from the arrows. It’s completely free with no ads or in-app purchases, though I might add in-app purchases if the game gets…

Creating an Auto-Growing Text Input

On two occasions I’ve encountered the same problem: how do you create a textarea that automatically expands along with your input. Here’s an implementation. This was inspired by some bits and pieces on StackOverflow. The gist of it is that you place your textarea inside a wrapper div, set the textarea height to 100% so that it fills the parent, and then insert a div behind the textarea…

Photo Embarrassment

Instagram and Snapchat seem to share a common theme: they try to solve the hurdle of photo embarrassment - they find ways to get around our self-restraint with sharing photos. Instagram does this with filters so that users can create beautiful pictures of mundane scenes. Snapchat does this with ephemeral photos that disappear [1] . This theme fits in with my observations of frequent users of…

An Interesting Module Pattern: the Sealed Module

An interesting way to share private state across components of modules in JavaScript: (credit goes to this article ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 var module = ( function ( module ) { var _private = module . _private = module . _private || {}; var _seal = module . _seal = module . _seal || function () { delete module . _private ; delete module . _seal ; delete module . _unseal ; } var…

A Little Note on Versions

tl;dr. Versions in bower and npm are maddeningly inconsistent in a tiny way now consistent. So&hellip; In semver and bower (I&rsquo;m assuming bower since it relies on the node-semver module), a hypenated version suffix (postfix) decreases precedence <(1.0.0 > 1.0.0-alpha > 1.0.0-1) and non-hypenated suffixes are invalid (1.0.0alpha is invalid). Whereas in npm, hypenation with a numeric suffix…

Grunt by Example - A Tutorial for JavaScript's Task Runner

What&rsquo;s Grunt used for? Automating front-end and JavaScript workflow tasks. Refreshing the browser when you change a script. Minifying and concatenating. Running tests. Think rake and guard , if you&rsquo;re coming from the Ruby world. Enter Grunt by Example! A blow-by-blow tutorial. Just the way I like it. Let&rsquo;s dive in. The catch - Grunt configuration files can be fairly convoluted at…