My experience as an ACM ICPC Regional Judge

I competed in ACM-ICPC for last three years. I was also an ACM-ICPC World Finalist in 2016. That year was a peak in my ACM-ICPC career as I competed in six(!) contests: three local contests, two regionals, and the world finals.

This year I retired from competing in the ACM-ICPC. My main reason is that the ACM-ICPC takes too much time. (After concentrating during the five hour contest, I would not be productive for weeks). I want to focus more on my research topics. However, I still stay as volunteer for this year contets that my university hosts.

Simple SPA for old-time programmer (and maybe newer one)

Note: Somehow it is hard to keep a regular schedule on blogging. Mostly because I have nothing worthwhile to write

Single Page App (SPAs) is the rage nowadays. Everyone seems to do SPAs left and right, whether it fits their application or not. As with anything concerning web development, there are billions of tools, helpers and frameworks to choose from. Most popular one are Angularjs (12), Emberjs, React and Vuejs.

There are older one like backbone, etc. but we won’t be discussing them todays.

New Blog Again!

Apparently moving blogs is more fun than writing in it, at least for me.

There has always been three choices for blogging:

  • Use WordPress.com platform: Pro: Easy Cons: Not on my domain, ads.
  • Self-hosted WordPress: Pro Trusted platform, on my domain Cons: Maintenance
  • Static site generator: Pro Simple Cons: Require learning new things

Overwhelm by Complexity

The very first programming framework I have ever used was CakePHP. That was around the time when MVC framework was hyped (around 8 years ago, if I remember correctly). But to say my experience with it is not so good. In fact, I remember I fought with it way more than I really used it.

The reason, if I am asked now, was that I hadn’t really developed really large web application before, and a lot of those helpers/indirections didn’t make sense to me at all. It just overwhelmed me. Really. There are lots of thing to learn: MVC, ORM, conventions etc etc etc. And that time I was very naive.

Refactor, not rewrite

Last October I wrote TypingMania, a type-along game on web based on TypingMania Odyssey of SightSeeker studio. It’s not quite polished (the menu screen could use some serious work), but I am happy with it (well, I wrote it because I want to use it).

That was my first Javascript project in a very long time (~6 years), and of course the web changed a lot in the recent years. If you reviewed the code you will see many old style code, callback spaghetti and many synchronising boolean that look like some bad shot at thread safety, of which Javascript doesn’t have one.

Even though UI is always the most time-consuming part in any game – or application, really – the most fragile part of this piece of code is audio processing. It should be able to show loading indicator to tell how much has it buffered, it must have perfect time synchronising to the type-along part, and it must run in browser.

Reasons to hate Copyleft license

Copyleft license stated that any code that incorporated works under copyleft license (“derived work”) need to be licensed under same license. Their purpose is to make everyone contribute back to community, as in “Free as in Freedom” phrase by RMS. This idea look very good, and is in fact a very good idea to promote free and open source software. But people do need to eat, drink have needs. They also need money to survive.

My First Contribution to an Open Source Project: A story

Although I have been programming for a while (~10 years since I first learn programming), I have not yet made any (significant) contributions to existing works. I have done many projects, but all of them are either myself only or me and another designer. This changed last October, when I start contributing to AviSynth+, a modern fork of original AviSynth project, seriously. For a note, AviSynth is a script-based, non-linear video editing program/library.

Basic Image Processing

In my most recent Introduction to Computer Programming (aka CS101), the instructor decided to shows us very simple image processing: blurring and secret image hiding. There are quite a number of things he did not mention because they are too complicated, but I think someone might be interested so I decided to write it here.

I am not talking about how to load image or save image, you can easily find documentation online for your favourite language. Our professors talk about two algorithm in class: blurring and secret image hiding. I am going to cover only these two here.

On Assembly Language Syntax

In case you do not know assembly, let me introduce it briefly. x86 Assembly, which is mnemonic version of underlying x86 machine code, has two main syntax: AT&T syntax (or GAS syntax) and Intel syntax.

Reasons why I don't hate PHP

PHP is probably the most hated programming language, ever. Yet it is so widely used, easy to write and easy to deploy that most programmers nowadays have to learn it at some point.

Unless you count pure HTML, PHP is what introduced me to programming world years ago. Back then I don’t know better, and PHP is so easy to write that I begin to commit to it. I do have a few big project written in PHP (not open sourced). Not for long, I begin experiencing nightmares of PHP, first being magic_quotes. I need to implement a lot of workarounds, but I still use PHP because back then (and even now), many shared hosters only support PHP. (I just use VPS now, though)

On Low-Level Programming and Assembly

“I write Assembly”

When I say that, people usually think: “Hey, you are pro as f**k programmer”. Yes, I am not kidding; I have too many people saying that to me, and it is completely opposite of what I am.

I am beginner programmer. In everything. Yes, I have freaking 8 years experience, but that doesn’t really make me good programmer, isn’t it? I don’t have enough experience working in teams for large project, working under pressure and such. And knowledge will only get you so far.

Okay, to be honest I am not really writing Assembly nor is an assembly programmer, because I don’t know how to write .asm file. But that isn’t really matter (I have always been using intrinsics function, but more on that later). [Edit: 26/6/2014: I know how to now]

Javascript requestAnimationFrame()

You could says I live behind the rock in Javascript world in past two years. I recently developed Typing Mania in pure Javascript, decided to be my own replacement for Flash-based TypingMania Odyssey, which for some reason I can’t set it up properly at all.

Because I haven’t been following what happened in Javascript world recently, I did not know requestAnimationFrame() exists. I use setInterval(func, 20) as my main loop.

Vim as my new main editor

While I know how to use Vim to manipulate text file – a skill mostly required if you need to manage Unix/Linux server, I don’t know how to use vim efficiently.

Before, I know that <i> and <a> get me into insert mode, where arrow button works. <Esc> would take me back to command mode, where :w saves the file, :q quit the program and :q! quit without saving. Actually, I learnt to Vim because I didn’t know nano editor exist!

Trying Linux Seriously

There’s a phrase: We are now in an era of abundant of processing power. While I certainly agree about this phrase – I believe it myself too – for some field no processing power is enough; namely graphics and video field.

I also work in such field, and I have got quite a powerful main rig (that I can afford). My main rig is Intel Core i7 2630QM Sandy Bridge (2.0GHz, Quad-code, mobile) with 16GB RAM running Windows 7. While might not sound as powerful as you might think (it still struggles on large After Effect composition, for example), it’s certainly more powerful than many new computer today.

Another field that screams for processing power is programming. While text editing (and yes, programming is just text editing) is not a burden on computer itself, compiling and testing sure do. Some program takes long time to compile even on fast processors. When testing, it’s very common to lunch virtual machines, which consumes quite a bit of RAM. Also, some IDE also takes a lot of RAM and processing power to provide better insight of code to programmer.