## (note (code cslai))

Notes on codes, projects and everything

# 2014 March 05

• ### Visualization of my profile, in (not quite) RDF way

After a miserable trip back to academic world, I finally re-gained the courage to get back to job-market. For the time spent in university, I spent quite some time reading about Semantic Web and RDF. Then I thought, I should have published more in this format in future. However, that didn’t really happen, mostly because I am too lazy.

## Random Posts

• ### Spiraling Number

Back then in college, we were given a lot of programming practices. These questions usually shows a desired output format, and we were required to write a program to print out the exact thing. Usually it involves printing a matrix of numbers, or symbols etc. For these problems, usually a loop structure or two should solve the problem.

• ### Learning a new language for more than 2 months (feat. Exercism)

Usually I take about a week to learn a new language so I can start doing some real work with it. After all a programming language (at least the high level and dynamic ones) is just assignment, calculation, branching, looping and reuse (and in certain cases, concurrency/parallelism, not gonna dive deep in defining the difference though). Well, that was true until I started learning Rust, partly for my own leisure.

• ### The Little Pythoner, Part I

I saw this article from alistapart, which is about Javascript’s prototypal object orientation. So the article mentioned Douglas Crawford, and I was immediately reminded about my struggle in understanding the language itself. Back then I used to also refer to his site for a lot of notes in Javascript. So I went back to have a quick read, and found this article that discusses the similarity between Javascript and Lisp.

• ### Approximate Neighbour Search in Multiple Dimensions

In the previous post, I re-implemented Annoy in 2D with some linear algebra maths. Then I spent some time going through some tutorial on vectors, and expanded the script to handle data in 3D and more. So instead of finding gradient, the perpendicular line in the middle of two points, I construct a plane, and find the distance between it and points to construct the tree.

• ### Using YUI for DOM Manipulation

After being frustrated of not getting consistent and accurate result via standard DOM methods especially `html_element.getAttribute('key');` and `html_element.setAttribute('key', 'value');`, I came across some YUI library components that provides abstractions to various DOM methods. Some interesting DOM-related tools covered in this post are `YAHOO.util.Element`, `YAHOO.util.DOM` and `YAHOO.util.Selector`.