Notes on codes, projects and everything
I am Lai Choon Siang. The place where I am living currently is in Subang Jaya, Malaysia. Most of the time, people I met online know me by my Internet Alias “Jeffrey04”. In my free time, I like reading books, traveling, taking photographs and blogging. I am currently maintaining two blogs; first consists mostly life journals in Mandarin language and the second, which is the blog that you are reading at, would be used to keep my findings and notes in web-development field. Besides that, I am also help in operating a Chinese blogger community website which helps to promote blogging in Mandarin Language among Malaysian.
I started learning about computer when I was in the age of 10. The first program I learned was Delta Drawing and recent studies claimed that it is actually a type of simplified LOGO language. I also learned a bit of LOGO before Windows 95 became popular and I quited the class which taught LOGO. Then I spent some time in learning the HyperText Markup Language (HTML) around the age of 12 and started to write some simple websites and applied CSS in later years. After getting used with installing scripts, then I built some bulletin boards using YaBB, YaBB SE, SMF, phpBB and Discuz without knowing much about programming.
In my secondary school life, I joined Malaysia Red Crescent Society and held the position as an Afternoon Session Representative, then Assistant Secretary, followed by Secretary and finally as a President. Besides that, I also joined Chinese Language Society and held position as a form representative. In these societies, I joined some camping activities, marching competitions and attended some courses such as basics in first aid. I also participated in educational slide making competition for physics when I was in form 5.
Then I entered Tunku Abdul Rahman College to take my Diploma in Computer Science and Management Mathematics. Throughout the two years of studies, I learned various programming languages such as C, basic JAVA, HTML and CSS, Classic VB and SQL as well as other subjects like Accounting, SDLC and Mathematics such as Statistics, Algebra, Calculus, Introductory Discrete Maths etc. Besides that, I also spent some time in learning PHP after learning the key-concepts of programming in college and built a simple blog. However, I migrated the blog to WordPress because of the lack of time and limited knowledge in spam prevention.
After obtaining my Diploma, I continued my studies in Advanced Diploma cum Bachelor’s Degree (in conjunction with Campbell University, North Carolina, USA) of Computer Science and Management Mathematics on a partial scholarship offered by the college. Throughout the two years of study, the new programming languages and technologies learned are procedural C# with ASP.NET, Object Oriented VB.NET, Oracle PL/SQL and Microsoft T-SQL, SWI-Prolog as well as some theory subjects such as basics in Database Design and Maintenance, basic Operating System principals, Windows 2003 Administration and Maintenance, Artificial Intelligence, OOAD as well as Mathematics subjects such as Quality Control, Applied Statistics, Theory of Interest, Mathematics of Life Insurance and Financial Market, Discrete Mathematics, Operational Research, Cryptography etc. I also took some liberal arts unit in Introduction to Psychology, Music Appreciation and Introduction to Short Story.
The topic for my final year seminar was on Solving Linear and Non-linear Equations using Numerical Analysis and built a web 2.0-ish tourism information website titled “Trekkr” with co-operation of Regina Foo. The final year project was built using PHP5 and MySQL5 with full Object Oriented MVC architectural. We didn’t use any framework at that moment as we wanted to keep the project simple (and the MVC architectural design is posted here). The final year project website was being uploaded to a real life web-server offered by my friend Clemence for testing in production environment and was taken down after the development completes. The web server used was Apache and was operating on Linux Operating System.
I am currently graduated from college and is looking for a job in web-development field. Unless I am developing projects other than PHP5, I would be on LAMP for my web-development projects. I used Eclipse PDT to develop my final year project but I am shifting to OpenKomodo for my future PHP5 projects. The operating system that I am using most of the time is Ubuntu Linux as it doesn’t cost me much money to work on it.
It is very much expected that there will be endless stream of new (and often times better) tools introduced to solve the same set of problems. While I am slowly resuming my programming work, and in the process of reviving my very much dead postgrad project, I found some alternative to the tools I had used in the past. I suppose I shall just jot them down here so that there’s a reference for later use.
Traversing a tree structure often involves writing a recursive function. However, Python isn’t the best language for this purpose. Therefore I started flattening the tree into a key-value dictonary structure. Logically it is still a tree, but it is physically stored as a dictionary. Therefore it is now easier to write a simple loop to traverse it.
While my static pages and site theme is still under construction, I went to CodeIgniter.com to see how to work with it and played the tutorial screencasts. The reason behind in considering CodeIgniter (CI) to be used in my next project is because I don’t feel like re-inventing the wheel. However to port my current project to use CI may cause some problems as there are differences in how we implement MVC structure.
After the last post, I found that it may be fun to write a wrapper for YUI in order to make it behave like jQuery. Therefore, the code below is clearly mainly for self-amusement and is not intended to be used in production projects. However, through coding this, I found that although the difference in design, but YUI is obviously capable to do what jQuery offers (if not more). I will not continue working on this so whoever interested may just copy and paste the code to further developing it.
After being frustrated of not getting consistent and accurate result via standard DOM methods especially
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