Generator in Go

Go doesn't have built-in support for generators. To be honest, it doesn't have to. Go has enough functionalities for the general use cases, and with the philosophy of simplifying everything, generators can be a distraction and cause more problems than they're worth. However, it doesn't mean we can't have our ...(more);

No More Inheritance

Let me be honest, I hate inheritance. There's no other programming feature that annoys me as much as having two classes inherit from each other. And it's not just classical inheritance. Prototypal inheritance, which I used to think as a good idea, is not an exception as well. I have ...(more);

ReactJS server-side rendering with browser dependencies

Server-side rendering is one of the most powerful features of React. With renderToString() and browserify, a React component can be pre-rendered on the server to save page rendering time on the browser. There's an excellent example by Pete Hunt to demonstrate this pattern here. However if your React component depends ...(more);

Why I'm no longer using Rails

A lot of people have asked me why I stop doing Rails development, especially after finally making my contribution to the framework with web_console. While it's true that my full-time job doesn't involve Rails anymore, it's not the real reason. The real reason is that I no longer find ...(more);

DustJS share variables between client and server

Sharing variables between client and server is one of the most powerful features of NodeJS. However, it took me quite a bit of time to figure out how to do it properly with Dust templating engine (LinkedIn version). Suppose that we want to share the product object below with the ...(more);

Is Go Good for Parallel Programming?

Go is a language designed for better concurrency. Although concurrency is not really parallelism, the Go's approach also makes it suitable for parallel programming. But just how exactly suitable is it in term of performance? Out of curiosity, I've done 2 simple experiments to access the performance of parallel handling ...(more);

What Computer Science Can Teach You

I've just officially graduated. My 4 years in university passed by in a blink of an eye. I suffered a great deal of pain during the last 4 years, but also learned a lot. For anyone still pursuing or thinking about pursuing a degree in CS, here's what you can ...(more);

Javascript As a Compile Target: A Performance Breakthrough

Things are getting more and more interesting in the font-end community. Whenever we think Javascript has reached its limit, something comes out that pushes it to the next level. Mozilla has been working on a couple of interesting research projects that can redefine the performance of the web. Emscripten is ...(more);

Some More JavaScript Weirdness

JavaScript is a pretty fun language with many "weird" behaviors that make developers want to kill themselves. Some behaviors are quite common like variable hoisting or global scope pollution, some are almost unknown to the majority of frontend developers. Below is the list of weird JavaScript features that I know ...(more);

What makes Javascript slow?

This post consolidates some of the most notable frontend performance issues related to Javascript and desktop browsers. For mobile web performance, you can read this article from Sencha. Is Javascript really slow? No. To be precise, a programming language neither fast nor slow. It's just a language. What's slow is ...(more);

No CoffeeScript for Beginners

CoffeeScript is growing in popularity. Taking a tour around the recent web repositories on Github, you'll notice a lot of CoffeeScript being used instead of our good old Javascript. There was a heated debate on whether CoffeeScript is worth it, and the best answer is "You either hate it or ...(more);

Summary of ECMAScript 6 Major Features

ECMAScript 6, the new Javascript standard, is going to be released by the end of 2014. Dr. Axel Rauschmayer gave a presentation about its features at the O'Reilly Fluent Conference 2013 in San Francisco. The presentation slides can be found here. Here is my summary of what I think are ...(more);

EmberJS: How to Use Ember within a Rails page

I have been working extensively with EmberJS recently and loving every bit of it. Ember can make things happen out of the box, very well suited for single-page applications. However, a lot of times I find myself writing semi-single page websites, i.e. only some portions of the site require ...(more);

Mac Development: Get Highlighted Text on Key Press

Not long ago I wrote this little Mac hack called InstantGSearch out of my burning desire for the quickest way to search Google for any highlighted text from any application (Chrome, IDE, PDF, Console... you name it!). How it works: Highlight text Hit Option+G It's really simple, but I ...(more);

Get Your Ass Back to School

Degrees don't matter. They really don't. But it doesn't mean school is a total waste of time. I used to be a school hater, and at some point last year I even thought of dropping out. I went as far as taking a one year off school for an internship ...(more);