denotes what I'm best at.



Who Am I

Hello! I'm a programmer with strong interest in system languages such as C, C++ and Rust. I am currently in my third-year studying Software Engineering at the University of Waterloo and have had three co-op's. My projects are hosted on github and I maintain this blog.

Programming is a huge part of my life. I enjoy the process of creating things and love seeing my efforts come to fruition. When not working on my projects, I like to read books and blogs on programming, and keep a close watch on some interesting open source projects (e.g. Rust). I also subscribe to several mailing lists, with Coder Weekly being my favourite.

Simple and efficient code is the kind of work I strive to produce. Efficiency is the primary reason I'm in love with template meta-programming in C++. At the same time, I devote a lot of attention to code correctness. Attempting to achieve better efficiency at the cost of violation of the language standard is never a rule in my book.

What I Excel At

  • Very strong knowledge and experience in C++ RAII, Template Tricks, etc.
  • Excellent understanding of embedded programming ‐ C and arm assembly
  • Solid experience with a variety of programming languages and technologies
    ‐ Python, Ruby, Make, GDB, Latex, Markdown, Jekyll, etc.
  • Familiar with Linux and very comfortable with working on the command line
  • Very particular with code clarity, correctness, and efficiency.


Programming Language C C++ C# Haskell Java Python Ruby Rust
Web Technology HTML Jekyll jQuery Ruby on Rails
Mobile Android
IDE/Editor Eclipse Qt Creator Vim Visual Studio
Version Control CVS Git Perforce SVN
Operating System AIX HP-UX Linux Solaris Windows


Header-only C++ library capable of building state table at compile-time.

The idea came from the process of building a toeknizer for my Graph Program project. I ended up making a compile-time initalized state table for it. As first I had to use a ruby script to generate the table, but later I was able to automatically make the compiler initialize the table during compile-time with the help of recursive and variadic templates.

Performance should be very good with this library as there is no run time cost at all for creating the table. Everything is pre-computed and the entire table can be loaded into memory right at program start. Another advantae is that the user does not have to write much code to for the table. A State enum and a traversal function are all it needs.

For more information, refer to the project page here.


Cool Stuff

Interesting tidbits of code from various sources. I started this project as I wanted to record the not-so-obvious stuff that I've come across in programming (mainly C or C++). It turned out to be quite useful as I often refer back to it for my other projects.

My favorites are Type Erasure, Static Type ID and EnableIf through template meta-programming in C++. Strict-aliasing and restrict keyword optimization in C are also very interesting as they demonstrate how compilers optimize at the assembly level. Also, there is a fun demo of a LFSR pseudo-random generator.

For more information, refer to the project page here.


Graph Program

Graph is a program which builds simple graphs as defined in the graph theory section of MATH239 at the University of Waterloo. The program is capable of building one or more graphs and answer queries on the various properties of the graphs.

Dot one version of the project had just been released. It comes with a command line interpreter. A gui front-end is in the planning, although I'm currently still deciding on which framework to use (Qt or Gtk).

Contribution from anyone would be welcome. The project's foundation is IMHO fairly well laid out. Additional features to the algorithm engine and such should be very easy to implement.

For more information, refer to the project page here.

This is a placeholder.

This is a placeholder.

This is a placeholder.

Wlpp+ is a simple, easy to use language similar to C. The idea came from the compiler project from CS241 from my university. We implemented a compiler for a very simple language called Wlpp in the course.

Unsatisfied with the fact that Wlpp has too little power and flexbility, I decided to add more features, such as allowing for function calling. I also intended to allow recursion and have more types.

The project is on hold as of now. I feel that I do not yet know enough about programming languages and compilers in general to produce something that is actually much better than Wlpp. I at first had trouble at extending the language grammar and later had not been able to get the compiler to produce correct assembly for functions. I plan to revisit this project in the near future after I finish a compiler course.

For more information, refer to the project page here.


Embedded Systems Software Developer on the Bootrom Team
Sept 2012 - Dec 2012

  • Participated in bootrom and its pc-side tool suite development
  • Implemented a much improved bootrom unit test framework
    • Isolated the unit test portion of the bootrom
    • Test size limit no longer an issue
    • Improved PC-side test scripts allowing for more flexible runtime choices
  • Wrote highly detailed documentations on several critical bootrom components
  • Improved the bootrom build process
  • Implemented various other features and bug fixes

Technologies I worked with

Arm Assembly Batch C C++ Make Python Scatter Files

This work term gave me a lot of insight into embedded programming. In addition to managing through lengthy processor documentations, I learned about scatter-loading description files and message passing mechanism between the device and PC-side tool suite. I found low level C code very interesting and enjoyable to read.

During the course of four months, I found keeping notes of each task and its solution very helpful for understanding the internals of the bootrom. The notes later also helped me prepare tutorials for future co-op students.

What I liked about the job

  • Low level programming (very refreshing compared to other developments I've done)
  • Could always find new, interesting things to learn from the codebase
  • Friendly, enthusiastic teammates

Software Developer on the Avamar SAP Plug-in team
Jan 2012 - April 2012

  • Participated in cross-platform development (Windows, Linux, HP-UX, AIX, Solaris)
  • Worked with threads
  • Implemented a maintenance mode for the plug-in for offline use if Avamar Server ever becomes unreachable
  • Wrote python scripts to conduct code refactoring on the code base
  • Implemented various other features and bug fixes

Technologies I worked with

Bash C++ Make Python

This was my first time working on a team, first time doing code reviews, first time working with a large existing codebase, etc. Overall, I learned many things in the four months, such as that one can't remember all the small details and specifications for even five minutes after a meeting. So, it's best to write them down on paper.

Also, never to be afraid of asking questions. It's okay to ask questions. And it's important to ask for clarification on unclear instructions. Much time and frustration can be saved this way.

What I liked about the job

  • Straight-forward web interface for conducting code reviews
  • Clean, logical organization of source code
  • Readable makefiles (quite rare nowadays...)



IT Support Specialist
May 2011 - Aug 2011

  • Built application in C# to extract data from excel documents into SQL Server
  • Built Access modules for organizing the data needed by the auditing team
  • Wrote Batch scripts to organize files and automate backups for the IT team
  • Managed the Active Directory server and the internal monitoring server
  • Troubleshot software problems for other employees and set up new computers

Technologies I worked with

Access Active Directory Batch C# Excel SQL Server

This was my first ever job. Now that I look back, it was certainly an easy one. But nonetheless it was still quite intimidating at the beginning. I still remember that during the first few days, I would actually hesitate and wonder how I should greet my supervisor.

One thing I didn't really expect at this job was that I actually was able to do quite a bit of development. The only software developer on the team had a really tight schedule on things. So he had me develop applications for which he didn't have the time. The firm was an auditing company and most work was related to database in one way or another.

What I liked about the job

  • Fresh experience (first time working; literally everything was new.)
  • Development (was unexpected since I was hired as IT Support)
  • Sushi for team lunch!


Candidate for Bachelor of Software Engineering

Co-operative Program, Sept 2010 - Present

Relevant Courses
SE350 - Real-time Operating Systems CS341 - Algorithms
CS349 - User Interfaces CS240 - Data Structures
CS241 - Sequential Programs CS247 - Software Abstraction/Specification
CS138 - Data Abstraction ECE222 - Digital Computers
Relevant Assignments
Side Scrolling Helicopter Game, Jan - Feb 2013
  • Multi-threaded
  • Rendering routine is implemented using Xlib
  • Actually quite playable...
Straights Card Game (group of 2), June - July 2012
  • Leveraged various design patterns such as MVC and Facade
  • Used GTK to implement the user interface
  • Git was used to manage the source code
Wlpp Compiler, Nov - Dec 2011
  • First wrote an assembler for mips assembly
  • Put various compiler theories, such as LR1 parsing, to use
  • Scored 8th place in the class-wide compiler competition
Lego Robot Project (group of six), Sept - Dec 2010
  • Experience with the Not-So-Quite-C
  • Built a simulator for C++ for testing
  • Presented the robot to fellow classmates and professor

British Columbia Secondary School Diploma

Sept 2006 - June 2010

Relevant Courses
ICT Independent Study - C++ with QT
ICT 12 - Visual C++ ICT 11 - Visual Basic
Relevant Assignments
Bubble Tea Club Cashier Program, Feb - April 2010
  • Used QT to implement the user interface
  • Various easter eggs such as a club photo and coupon code
  • Greatly increased efficiency of the bubble tea club
Etch A Sketch, Dec 2008 - Jan 2009
  • A paint program
  • Implemented in Visual Basic
Space Invader, Sept 2008 - Nov 2008
  • A retro-style game with fighter jets as enemeies instead of space aliens
  • Implemented in Visual Basic