## Eus's blog

### JavaScript: Dynamically Deleting or Altering a Table Cell Needs Refreshes

on March 5, 2010 - 11:12am

One frustrating point that I encountered twice during my course in using JavaScript is that a dynamic modification of a table leaves traces on the screen like missing background color. Googling for the solution was not that easy. But, at the end I found this good forum thread: http://www.dynamicdrive.com/forums/showthread.php?t=25139. Basically, you need to repaint the element yourself.

### Why JavaScript? (Taking JavaScript Seriously)

on March 5, 2010 - 9:39am

Before I worked on the service publishing AP project and having the course in massively distributed systems, I had never taken JavaScript seriously. In fact, I always tried to omit the use of JavaScript whenever possible preferring heavy UI interaction with the server (i.e., the server manages every single button that the user clicks) because each browser has its own quirks and it breaks accessibility. Moreover, the language is pretty much lenient unlike C so that combined with the quirks, I really didn't like to do JavaScript programming. And, I had the sense of insecurity in using JavaScript because it could be modified by a malicious user to send invalid data. But, through the project, I came to appreciate the use of JavaScript.

### Sqlite3 Hangs Getting Stuck In OpenWRT Kamikaze 8.09.1

on March 1, 2010 - 11:30pm

Having a programming project for a service publishing wireless access point running OpenWRT Kamikaze 8.09.1 in which I decide to use sqlite3 as the data backend, my first attempt in cross-compiling and running the service inquiry handler daemon that was fully tested on my laptop was greeted with a hang.

### One Semester of Functional Programming at RWTH Aachen

on February 19, 2010 - 7:56am

Throughout my undergraduate study, I only heard about Functional Programming but had never been deep inside it. Then, I had the chance to dive into it for one semester at RWTH Aachen: http://verify.rwth-aachen.de/fp09/. In short, the course was totally fun to get to know Functional Programming! Moreover, it improved my mathematical proficiency as well :-)

### A Gentle Introduction to First-order Logic

on February 6, 2010 - 4:03am

Source:
(1) Knowledge Representation and Reasoning by Ronald Brachman and Hector Levesque
(2) Artificial Intelligence: A Modern Approach (2nd Edition) by Stuart Russell and Peter Norvig

### Learning by Doing: Programming Razz Simulator

on February 4, 2010 - 7:54pm

As a final assignment in my Languages for Scientific Computing class, I develop a Razz Simulator (http://github.com/eus/razz_simulation). Basically Razz is the inverse of Poker in which you try to come up with the worst hand (http://en.wikipedia.org/wiki/Razz_(poker)). The game is well explained in the slide for the first and second lectures and in the sixth assignment foud in http://www.cs.utexas.edu/users/pauldj/lectures.html. The first problem on Razz was at the end of the first assignment: given A, 2 and 3 to start with, what is the probability of getting a hand with rank exactly 7? Well, no one answered that correctly until the professor showed an elaborate calculation in Mathematica that resulted in 0.143008. One important message is that people don't do such an elaborate calculation in reality. Rather they use a simulation (i.e., play as many Razz games as possible with the given starting cards and count the number of times you score 7). So, the last assignment is about developing the simulator that can simulates as many games as possible in the shortest time possible. The most interesting thing about the assignment is that the program is neat enough to show some interesting software engineering principles in action beside telling you that Razz is not as simple as it seems to be.

### Seeing It as a Relationship: <-> beta-reduction

on January 29, 2010 - 2:36pm

Last week I got a question that asks me to show that the following statement about Y combinator (http://en.wikipedia.org/wiki/Fixed_point_combinator#Y_combinator) in LaTeX is correct:

Y z \leftrightarrow^{*}_{\beta} z (Y z)

where \leftrightarrow{\beta} = \rightarrow{\beta} \bigcup \leftarrow{\beta}


### What does mrproper in "make mrproper" stand for?

on January 23, 2010 - 11:44am

Last Friday the morning session of my Languages for Scientific Computing class was about Makefile. Well, largely there was nothing interesting since I know how Makefile works already. But, still the teaching assistant could surprise me with: make mrproper.

### The Difference between LEA and MOV OFFSET

on January 23, 2010 - 10:33am

The other day a friend of mine asked me to code a decimal-to-hex-converter in MASM using DOS ISRs (Interrupt Service Routine) for I/O. Well, I just gave her the equivalent C code since I am not into proprietary software. But, anyway I googled for some materials related to MASM syntax and DOS ISRs for I/O [0]. Upon reading some examples of using DOS ISR 21h, I stumbled upon the use of LEA dx, var and MOV dx, OFFSET var. So, I decide to have a look into them and come up with the following conclusion.

### Selling Copy-lefted Free Software Encourages More Copy-lefted Free Software

on January 9, 2010 - 6:39am

Free software does not mean public distribution. Free software means that the licensees have all of the four essential freedoms (http://www.fsf.org/licensing/essays/free-sw.html) with the software. Selling free software means that you license the software with a fee to a buyer under a free software license.

### Android ListView Selection Problem

on December 31, 2009 - 3:55pm

About some weeks ago I got the chance to fiddle with Android (http://www.android.com) that is used in mobile service discovery research in Mobile Communication System Engineering Lab (http://ds.informatik.rwth-aachen.de/teaching/ws0910/mcse/). The assignment was to create a simple ToDo list (http://github.com/eus/android_todo). But, it turned out that programming Android's ListActivity to highlight a ToDo item was not that simple.

### Massively Distributed Systems I (One Semester at RWTH Aachen)

on December 27, 2009 - 9:22am

The course in Massively Distributed Systems I: Peer-to-peer makes me able to appreciate the power of P2P networking in providing a scalable censorship-resistant robust network as well as the basic know-how to engineer one. The course is very enlightening for me who had only one course in Computer Networking and didn't realize how limited a server is.

### Your CPU Peak Performance

on December 24, 2009 - 1:43pm

I am following an interesting class on Languages for Scientific Computing (http://www.cs.utexas.edu/users/pauldj/lectures.html) taught by Prof. Bientinesi (http://www.cs.utexas.edu/users/pauldj/). Just a week ago he explained about the theoretical peak performance of a processor that is none other than: n_cores * frequency * ops_per_cycle_per_cpu. But, that is not the practical one.

### ASUS WL-500W Router Internals

on December 24, 2009 - 11:42am

Some weeks ago I had the chance to fiddle with OpenWRT (http://openwrt.org) on ASUS WL-500W router because I got an assignment to extend Screamer (http://github.com/eus/screamer/) further: assignment 4 (http://github.com/eus/screamer/blob/master/doc/assignment4/assignment4.txt). The OpenWRT wiki was sufficient to get everything up and running (http://nuwiki.openwrt.org/oldwiki/openwrtdocs/hardware/asus/wl500w), but the network configuration was not right for the task at hand that required that traffic from and to each LAN port and the WLAN interface has to be filtered.

### Why It is Called Counting in Discrete Mathematics

on October 17, 2009 - 3:01pm

When I learned Discrete Mathematics, I was curios why it is called "counting" the chapter that discusses permutation and combination. Isn't that mathematics about counting after all? But, I didn't think about it further until I need to revisit Discrete Mathematics again today.