Modern Compiler Implementation in Java - Andrew Appel


Very clean and concise book about a rather complicated subject – the compiler design and implementation.

Where it shines

I started off reading the “Dragon book” four months ago and was forced to stop. Because I simply cannot justify the reasoning for the lengthy deductions in there. In contrast, this book does a great job only providing the very essences of all stages of compiling: lexical analysis, syntax analysis, semantic analysis, translating to intermediate code, instruction selection, aliveness analysis, and register allocation. All irrelevant details and math proofs are omitted for the scope of the book.

I would say this is the truly useful compiler book for application developers, not for compiler designers and researchers. Highly recommended!

Share Comments

Warehouses still use XML exclusively

Though the whole web community has shifted away from the fatty XML documents format to the lighter JSON objects. Many business sectors still not taking any moves to go out this way.

The growth of online retailers have pushed hard to get better APIs. However the whole transportation industry relies on software based on exchange of static files rather than ephemeral web requests and responses.

Share Comments

Finished new questions on, do not want to buy their book

Finished 163/171 of their problems in Leetcode online judge.

Very unhappy about them charging extra for the new questions. Now you have to pay to access the extra 8 questions?

And no, I definitely don’t want to buy your book!

Share Comments

HTTP: the definitive guide - David Gourley & Brian Totty


An old book, and mostly a descriptive document, highly recommended to Web developers. You can definitely find everything in here from Wikipedia, however this book saves you all the time finding what you need about HTTP.

Figures in the book are actually very good. Worth going through in a separate pass.

1/3/2015 Finished reading it. All notes taken to anki.

Share Comments

Ask Myself Questions When A Topcoder Problem is NOT Solved

  • Do I know what kind of method this question needs?
  • What is stopping me from applying that method?
  • What observation can I make to simplify the question and apply the method?
  • After reading the answer, what was the barrier there?
Share Comments

Folk Knowledge in Machine Learning


Machine learning algorithms can figure out how to perform important tasks by generalizing from examples. This is often feasible and cost-effective where manual programming is not. As more data becomes available, more ambitious problems can be tackled. As a result, machine learning is widely used in computer science and other fields. However, developing successful machine learning applications requires a substantial amount of “black art” that is hard to find in textbooks.

This article summarizes twelve key lessons that machine learning researchers and practitioners have learned. These include pitfalls to avoid, important issues to focus on, and answers to common questions.

Original paper pdf

Share Comments

Topcoder Learning Process

Started Github repo back in March, picking up speed lately: Github repo

Starting from latest SRM (single round match) 628, finished 30 total match in DIV 2 so far.

250 pt questions take 5-10 mins, 500 pt questions will take 1-4 hours mostly. And 1000 pts questions usually take days and I cannot solve most of them :( In total, about 3-4 SRMs per week.

To the bright side, each question I cannot solve myself, I can learn a lot from it. And it’s great to have other coders’ solutions ready for view in Topcoder Java Applet. Lots and lots of new discoveries, extremely beneficial. The only downside is their naming conventions are usually terrible. Considering they are doing it for contest, it’s somewhat reasonable.

Share Comments

Weekend Project: Gather my code templates together into Git

Initiative: My code templates for contest programming spread among different projects and folders in Dropbox. It’s rather inconvenient to find and reuse, also this would generate duplicates.

Solution: Init git repository to hold all my Java code templates for contest programming.

When in particular contest, put this git repo as submodule into the current git repo for specific contests.

Use case will be easy accessible by the fuzzy search from sublime text.

Github repo

Share Comments

Topcoder Learning Plan

Stumbled upon what tools to use for topcoder SRM matches last night. And haven’t got a good solution yet.

IntelliJ IDEA IDE is pretty functional complete, however starts too slow, and need to learn a whole bunch of key maps.

Sublime will be more comfortable at the moment. However will be very lacking in the help of a good debugger.

Plan for now:

  1. Continue use Sublime as main editor.

  2. Search for a good plugin for Topcoder that generates test cases.

  3. Edit code in sublime, and use IDEA as only a debugger.

  4. Use git to manage code.

Share Comments

Finishing all 151 problems of Leetcode online judge

Finally almost finishing the journey of Leetcode. I’ve actually figured out how to appreciate an online judge and ways to use test data well.

All solutions hosted on Github:

Most importantly, the most effective way to enhance coding skills is to code more and more. DO NOT WASTE TIME ON PICKING LANGUAGES. Knowing more language will not take your brains messy, it will only make you a better programmer. Try to figure out the best ways to use EVERY programming language.

The next step? I’m currently reading the compiler ‘dragon book’.

I have come to believe the book will greatly deepen my understanding of the whole coding generation process, although I haven’t find it to be better than reviewing code.

Further, I’ve decided to use Top Coder problems as my next step. They have good problems for all difficulty levels, good test data, and good answers to all their old problems.

Share Comments