Thursday, August 5, 2010

Google Wave went to the dead pool

According to Official Google Blog (this entry)

Wave has not seen the user adoption we would have liked. We don’t plan to continue developing Wave as a standalone product, but we will maintain the site at least through the end of the year and extend the technology for use in other Google projects.

Well, it's not a big deal when a product is put in the dead pool, especially nowadays. But there is one thing which is interesting here: Google is really fast in terms of their search engine response time and in terms of the corporation's actions. Google Wave, when it was announced in May 2009 it was believed to be the "email killer" and even the "Facebook killer". The Google Team were very excited about Google Wave (and clearly, Google Wave has a lot of innovative technologies). But then the buzz decreased day by day because users don't find it useful. Then... Boom! Google decided to stop developing the product and move on to the next big thing. Well, with a large company like Google, admitting a failure is such a brave thing. Way to go!

Thanks to my buddy Iqraam for pointing out my grammatical mistakes. Way to go, man!


Wow, I have followed this website for a few days but I was too busy to write about it. It's really awesome, check it out if you are interested in forums software: This totally new software is written by 2 former developers of vBulletin (which is currently considered the best one in the market). One of them is the former lead developer Kier Darby, the other one is Mike Sullivan. They are both very talented as you can see when you visit the site with a live version of their new software. Even it's still in early development, it's very impressive!

But then, which gets more attention from me is the discussion about vBulletin and xenForo. Many people are also eager about the new software (just like me). We both see a lot of potential on the new one. Especially when the current vBulletin's owner (Internet Brands, this is the new owner, IB acquired Jelsoft back in 2007) screwed a lot of things up. The latest version of vBulletin (4.0.3) contains a long list of unfixed bugs. The older branch of vBulletin (3.8.x, which is the most stable one as many people believe) is no longer support. To be exact, IB said there will be only one minor release in this branch, just to fix some bugs. Let me remind you the recent fiasco about a huge exploit in vBulletin 3.8.6 which was covered by CNN. But anyway, vBulletin still dominate market share these days so when the news about xenForo was broken, people hope to see some changes from IB to make vBulletin better (and save them money from buying and moving to another forums software).

I have used vBulletin since it's 3.0.x version and then I started developing things for vBulletin since 3.3 or something like that. That's quite a long time. And hell yeah, it made me quite a lot of money. If anybody asks me for a forums software, I definitely recommended vBulletin but not now, or at least not vBulletin 4. vBulletin 3.8.x is solid, many people still operate their (large) forums with vBulletin 3.8.x. Hmm, anyway, I will wait and see how this xenForo is going to be. I hope this is good. I'm not afraid of getting used to a new environment, actually, it's kinda exciting to do it.

I really hope I can get my hand on xenForo soon. Wow!

Saturday, July 3, 2010

Facebook: Photo's caption profile-tagging hack

For "hacking" definition, please read this.

You may know the profile-tagging feature when you post from the publisher in Facebook. There is one thing that is inconvenient: if you tagged some profiles in a Wall Photo and then you want to edit the caption, all the tagged profiles will be untagged and come back to normal text. Fortunately, you can now manually tag profiles in photo caption by using the syntax

@[Facebook UserID:Facebook Name]

Very simple, if you want to tag profile called "A Friend Of Mine" and his/her UserID is 123456, just go edit your photo caption and type in @[123456:A Friend Of Mine], save the caption and you are done! The tagged profile will receive notification as usual. I'm not sure if there is any limitation so... try it and tell me if you run into one. Happy Facebooking!

Friday, July 2, 2010

Viettel vs. Facebook: fifteen love

For those who don't understand the title: "fifteen love" means "15-0" in tennis score. When a player scores 1 ball, he/she will get fifteen points (second ball = another fifteen but from third ball, each ball equals to ten). Simply speaking, Viettel has just won 1 ball against Facebook. I'm wondering if they (Viettel people) will win this game or not... They definitely can!

Anyway, Viettel has blocked all Facebook servers. All requests will fail. A simple SYN will fail. All means everything! And obviously, Viettel Internet users won't be able to access Facebook in a direct manner. This sucks! REALLY SUCKS!

I did ping some Facebook servers and they all went timed out. *sigh*
  • []
  • []
  • []
  • []
  • []
  • []
The whole situation is being controlled by a fifteen kid who loves to piss everybody off, I guess. *sigh*

PS: To people who wants to access Facebook, you may need to find a proxy software now (do a Google search for "UltraSurf" or "Freegate"). There are several other ways to work around, just do a quick search. Good luck

Wednesday, June 30, 2010

QR Code

I have just had to deal with a 2D QR Code, which is interesting and I want to share it with you

The online decoder can be found here:
Have fun QR Coding :>

Friday, June 25, 2010

vBulletin 4 .XML Converter

It's really inconvenient to develop plugins for vBulletin these days since the 2 systems (vBulletin 3 and vBulletin 4) use different template engines (or so called). After a lot of frustrations, I finally made a converter which will "read" your old .xml product file and make it vBulletin 4 compatible. Please note that it doesn't magically make the plugins work in vBulletin 4 (which involves a lot of things), it just makes sure the template will be parsed correctly in vBulletin 4's system just like how it's supposed to be done in vBulletin 3's. Changes are made under several aspects

  1. Variable accessing
    • Array accessing will be updated to the new way. No more $array[key], it should be {vb:raw array.key}
    • StyleVar accessing (via vb:stylevar)
  2. Phrasing (support both simple phrases and compound ones)
  3. IF/ELSE condition in template
The new .xml file will be saved in the same directory with the suffix _vb4. Okie, here is the code (in PHP, obviously)

You may want to change the $rootdir to different directory... Enjoy

Tuesday, June 8, 2010

YAFB 3.3.1 is out

After a long time being busy at a lot of personal things, finally I managed to release a maintenance version of YAFB to make it work with vBulletin 3. Also, as vBulletin 4.0.3 now has a built-in Facebook integration, many users want to migrate their Facebook users from YAFB to that integration. Hmm, it's obviously not a good move for YAFB but I decided to build the migration tool and it's available right away in this 3.3.1 release.

The super-thread for YAFB is still located here, happy facebooking!

Friday, May 28, 2010

What the Hell Is Going on in Vietnam?

I have just read this: What the Hell Is Going on in Indonesia via TechCrunch. The author (Sarah Lacy, one of my favourite) took her chance in Indonesia to find out why there is such a great growth in Internet usage in that South East Asia country. It was a good read.

There are some interesting parts like

I grilled them on some basic questions to bring you a Web-in-Indonesia primer. But before we get to those, here’s what impressed me the most about this small-but-tightly-knit community: It’s incredibly collegial. Plenty of research has shown that the biggest reason Silicon Valley beat Boston as a venture capital and startup hot spot was because culturally it was open, trading employees, funding, mentorship and ideas among competitors. It’s not uncommon to see Web competitors in the Valley having dinner together and generally discussing business challenges, before they go back to the office for some late night coding to bury one another in the market.
I laughed so hard reading this!  But then it was eye opening when the author found they do the same thing in Indonesia. Maybe, just maybe, that's the key point to listen to competitors and improve ourself to be better than them? Hmm, it's a little tricky here, better than but not, please don't try to become something alike. By that way, the whole competitions will become more and more competitive and then finally, users will benefit from that. Such a great way of doing thing, at least in theory.

Also, as Indonesia is a (going strong) developing country, its Internet userbase is also growing with 8% of the population, approximate 20 million people (the numbers in Vietnam are 23% and almost 20 million, limited to users using computers only). The pricing in Indonesia is also low with even prepaid BES/BIS (really?) and Blackberries (read: smartphones) are used commonly.

Okie, that's the infrastructure (signal coverage, services and devices) but actually, I think there are problems with our (Vietnamese) developers, with entrepreneurs' business plan. In Indonesia, the situation is quite the same: people don't want to pay for web, most of them don't have credit cards or any other electrical-enabled paying methods. So, what did they (Indonesian developers) do? They build a useful service for free initially and plan ahead to generate revenue later. Twitter as an example, it's 4 years old with cash flow positive (recently) but it hasn't been being profit, just yet. Of course, taking Twitter - a global phenomenon - as an example is not really appropriate but the point is: it takes time to be successful in web business (it also takes a lot of money, needless to say).

Okie, that how others did things, how Vietnamese companies are doing now? I think we are being influenced by Chinese ways of doing thing (yes, those fcukers!). Chinese companies have the tradition of ripping off Western success models and make their own versions in Chinese and for Chinese people. Journalists even have a word for that: copycat. We are doing the same. Exactly the same way. Both in web businesses and a few others (I think it's not correct to say "everything", hopefully). Anybody heard about social network? It sucks. And the new FPT mobile, F99? It sucks, too. Those 2 examples are from Vietnam, let's take a look at our fellows from China. Check out this two sites: Groupon (made in US) and Groupon (made in China) (the Chinese clone managed to rip off the domain name as well). Another lovely couple: Facebook and Xiaonei or Renren. Oh, don't forget those low price iPhone clones from China also. China is the master of cloning and Vietnam is learning from the friendly neighbor really fast. Real fast...

We will see how everything's going. In the mean time, check out the special corner for 3G customers from VietNamNet with a lot of hot sh!t:

Saturday, May 22, 2010

UML Diagram - Here we go

Finally, we made it!

The UML assignment now has 3 versions

  1. Standalone version which is packed as a .jar file and can run without any problem in Windows and Linux (of course, JVM is required). You can get in here (Google Code link). The features are
    1. Build UML class diagram
      • From scratch: using menu, pop-up menu, drag and drop with a bunch of forms
      • From existing source code: load your Java source file(s) and modify the diagram using the same techniques as above
    2. Export Java source file(s) from the diagram. All methods are empty (of course)
    3. Save as Image
      • The whole diagram
      • Or this a part of it
    4. Easy navigation: most of the cases, the diagram will be big and it will be hard to have a good view but you can...
      • Zoom in and zoom out
      • Moving around 
      • Rearrange structures to make them more well-organized (if you mess them up, feel free to re-draw from the menu)
      • Quickly find a structure in the diagram 
      • A more focus view in a structure by display related structures only (from the menu bar or with the pop-up menu)
  2. Eclipse Plugin version. Get it from Google Code and drop it into the dropins directory inside your Eclipse installation (more details). Restart Eclipse (if you are running it) and the plugin should work right away!
    • You can watch a screen cast here
    • With this plugin, if you enable its view (Class Diagram), the view will watch the file in your editor and display it and its related structures. You can also right click in the package view or almost anywhere in Eclipse and get a new entry under Show In which is Class Diagram, click it and you will have a diagram of that item. The killing feature (in my opinion) is you can create new structure within the view using right clicks, after that, one more right click and you can select Generate to create new class right into your project with the specified relationships, properties, methods, etc. It's really amazing! Give it a try
  3. Applet version. This is actually a test to see how the GUI will work inside an applet and it turned out to be pretty neat. You can check it out in an older entry of mine but it's not the latest version. You can grab our submitted .zip package here (MediaFire link) which includes sources code, tests and many other interesting thing to test the applet view
In the source code, my teammates and I tried to comment as much as possible and we even export the documents by javadoc (which is available online here or downloadable here)

Well, that's a great introduction post I think. Don't forget to svn checkout our repository to get the latest source code (currently, the head is revision 50). Our Google Code link is: Thank you for reading this

A short description in Vietnamese for the folks who will have to do this exercise next year: Bài tập lớn Lập trình hướng đối tượng (Java) của thầy Nguyễn Việt Hà (hanv) giao cho lớp K53CC, Đại học Công nghệ, Đại học Quốc gia Hà Nội. Đề 1: Xây dựng biểu đồ lớp từ mã nguồn Java: phân tích mã nguồn Java sau đó hiển thị biểu đồ lớp và các quan hệ (is_a, has_a) của các lớp. Đề 2: Sinh chương trình khung từ biểu đồ thiết kế lớp: xây dựng công cụ đồ họa thiết kế lớp và các quan hệ rồi inh tự động chương trình khung Java: lớp, thuộc tính và định nghĩa phương thức (phương thức rỗng)

Have a nice weekend!

Sunday, May 16, 2010

OOP Assignment 2 - Report Document

Wow, finally I have done the report for the UML assignment. It's really tired to write 20 pages of this, honestly. We will have 3 more days to make it perfect, let's see.

PS: I almost forgot, grab the PDF file here (MediaFire link)

Wednesday, May 12, 2010

UGV Presentation

We did it. A wonderful presentation about UGV

Full version download: (including PowerPoint presentation - packed, English speech, Vietnamese speech)

Sunday, May 9, 2010

UML Diagram - Almost got it

If you haven't read it, we had an assignment 2 months ago about making a Java application which focuses on UML diagram (class diagram specifically). There are 2 assignments actually and each team will select one:

  1. You have a bunch of .java source code files and you have to display the UML diagram of it
  2. The second assignment is opposite of the first one: let built the UML diagram and then generate source code files from it (empty methods of course!!!!)
We made the first attempt really early but we was so busy that we haven't made any further progress until now and hell yeah, we got some really interesting stuffs to show off today.

Some functionalities is not available when you run it as an applet so you may want to download the jar version. It should run well in both Windows or Linux if you have the JRE

Monday, April 26, 2010

Facebook Open Graph has an impact on me!

Watching the live F8 coverage, I had some vision about Facebook new Open Graph. I remember that part when FriendFeed CEO talked about his experience and the magic 5 (on average, a new user won't become active unless he/she find 5 friends using the same site). I thought at that moment: "Oh well, sound amazing. The Open Graph with all the new social plugins will be good". It's not really true.

Today, when I visited a site. I was stunned seeing a few (Facebook) friends of mine did some activities on that site. OMG. It's a really strange feeling!

I believe the Open Graph with all the new social plugins will be GREAT! The idea is just... brilliant. Except the issue about privacy: the Instant Personalization is opt-out (which means everybody has it turned on automatically, user must explicitly turn it off, more about opt-out). Many people complained about it and they are warning people to turn off in order to protect privacy but I think most of them will just leave it on because they don't read all those nerdy sites. And basically, most of 500 million people is... quite a lot! I'm having it on anyway, the personalize experiences are fun and useful, love it!

Saturday, April 24, 2010

Facebook loves  

Just recently, Facebook has messed up all instances of a unicode character "à" (latin small letter A with grave, code: U+00E0). My biggest guess is they (Facebook Team) ran into a UI problem so they decide to make dirty str_replace before sending output for both the main site and mobile site. I said it's just some kind of search and replace for the output because getting posts directly with Facebook API works just fine

The replacement originally is "&nbsp;" but for some reasons, it gets displayed as "?nbsp;". FYI, &nbsp; is a html entity which means "no break space". What the hell is it? Normally, all browser will ignore multiple spaces placed together. This is used as a trick to bypass character count in replying post: just type an emoticon (":D", 2 characters), hold the space bar for a few seconds to generate around 20 spaces, type anything else (a period is enough). The post will be displayed with only 1 space between the emoticon and the period. Note that if you don't type the period, it's high chance that the post will be trimed (remove spaces at the beginning and the end) so your post will failed the character count validation. Back to &nbsp;, using it just like space but browser will keep them as it. You put 20 of them, they will be displayed all. Some people even used &nbsp; to indent their stuffs! Actually, it's sometime useful to use &nbsp;, for example when you have to leave an empty <div>
or <td>, you should place a &nbsp; inside to make the XHTML document validated. See the demonstration below: they both have 20 spaces between the emoticon and the period.

  • Using spaces: ":D ."
  • Using &nbsp;: ":D                    ."

Anyway, a bug has been filed but I think Vietnamese users will have to wait. Stay calm, everybody.

Thursday, April 22, 2010

OAuth with Google, Twitter and... Facebook!

This is sick!

Just a few days ago, I ran into OAuth as I want to get my GMail feed based on Google Data API. I succeeded. With a little help of an OAuth open source (here, available in several programming languages).

Then I remember that I once heard that Twitter also uses OAuth as an authentication option so I turned into Twitter and had a good read. Finally, I found out that they are basically the same (hehe, it's obvious since OAuth 1.0 is a worldwide standard). I had an idea of writing a universal class which can handle both Google and Twitter OAuth functionalities. It's not too hard. I took most of the idea from the PHP example (here, PHP only). I also made a small script which accepts URI to send and intercept response from Google & Twitter servers.

At that moment, I was so excited with all the ideas but actually it has no real world benefit so I just left it there... Until today, in the F8 (says "fate") conference of Facebook, I was stunned finding out that Facebook implements OAuth too! That's so awesome! Oh, actually, Facebook implements a newer version of OAuth (2.0, which hasn't been well documented yet) but no problem. I managed to rewrite the universal script to handle all Google, Twitter and Facebook now. If you want to check it out, follow these links:

  1. For Google:
  2. For Twitter:
  3. For Facebook:
The 3 scripts must be seperate because each one use different configuration (the ID, the secret string, etc) but they shares the same class and each scripts has the same structure like this (from facebook.php)

I'm still looking for the best way to implement something useful. Let's see

Monday, April 19, 2010

Buy me an "iDevice"

Buy me an iDevice (which including iPod Touch, iPhone, iPad) and you will get 70% of whatever I build with it for 3 years. That's the deal ;)

Sunday, April 11, 2010

Implementing Quick Sort

I never wants to re-implement classical stuffs as it will be useless but this time, it's an assignment at the college so... here it is. Quick Sort implementation of mine which supports arrays and lists.

Using the class's (static) methods is very simple.

For those who don't know what the heck Quick Sort is, check it out here. Have a nice day!

Saturday, April 10, 2010

Survival Simulator Game (a closer look)

As mentioned earlier (in this post), I have built several modules for a Survival Simulator Game. You can see it in action in the old post. And now, I have finished documenting the source files (my modules only) and you can get source file and document from MediaFire or BlueHost. You can also view document online here: Using the TextUserInterface is very simple (code copied from, provided by the instructor):

Using my GraphicalUserInterface is pretty the same way:

There are 2 notes:
  1. I modified the Game class ( to make it run infinitely
  2. If you double click the gui.jar file, you won't be able to view debug messages. If you want to view them, you have to invoke from console using something like this:
    java -jar gui.jar

Friday, April 9, 2010

Survival Simulator Game

Ran into this from a note by mr Ha. Pretty interesting assignment and now I have finished completely. I'm so glad!

Thursday, April 8, 2010

vBulletin 4.0.3

vBulletin 4.0.3 has just been released with a new feature: Facebook Connect. Well, this thing kinda pissed me off the first time I read about it but it turned out to be not a big deal. The really near future plan is to make YAFB connected users vBulletin Core feature connected users. Well, I will see since I haven't had a version of 4.0.3 yet. Yay me.

Tuesday, April 6, 2010

Keyboard Shortcut for vBulletin

It started from a night (like tonight) when I'm reading a lengthy thread some where and then when I wanted to go to the next page, I pressed K just like in Gmail when I want to go to next conversation. But unfortunately, it didn't go to the next page. Well, I thought for a moment then decided to do this: Keyboard Shortcut for vBulletin (both version 3 and version 4). I hope someday I can use keyboard shortcuts with my favourite sites, in my favourite threads. Uh oh. Some screenshots:

Firefox. vBulletin 4. Forum display page

Google Chrome. vBulletin 4. Album page

Safari. vBulletin 4. Picture page

And of course, Internet Explorer. vBulletin 3. Forum display page (again)

Monday, April 5, 2010

Lazy developer

Have you ever heard a joke about developers? Actually it's not a joke since I personally think it's true (at least to me) but it's always fun to hear: Developers are very lazy. (Oh yeah, I'm). They can't afford to finish a 15-minute job at all. (Oops). They will spend 3 hours coding to be able to finish that job in 1 minute. (Uh oh, that's 14-minute laziness. LOL)

I have an example here: got an exercise in discrete mathematics which involve using the Dijkstra algorithm to find the shortest way between a vertex to another in a graph. There are enough vertex in the graph that made me lazy (5, LMAO). Oops, I have just opened up the source code and found out it's about Hamiltonian path, anyway, I was lazy and finally came up with this PHP script to solve the problem quickly (hundreds millisecond is considered quick, isn't it?)

The script is intelligent enough to sort out all duplicated paths. Lazy meeee!

Thursday, April 1, 2010

Reason why it is great to be a geek!

You must have read many articles saying how bad a geek is in a relationship: He loves the computers more than everything. Nothing else matters once he gets stuck with a few (hundred?) lines of code. It's very high chance that he shows up in front of your home just in time for a dinner with your parent (with untidy clothes and messy hairstyle). And so on... Well, it sounds really scary, isn't it?

And then you can read other articles also, saying how great a geek in a relationship, specifically in bed (oops). I don't have references for the first type of articles but with this one, I have plenty of them, go check it yourself:

  1. Why geeks make the best lovers
  2. 7 reasons to date a geek
  3. 10 reasons you should marry a geek (wow!)
  4. and so on...
Hell yeah, everything has advantages and disadvantages. If you want to take something, you have to accept both the positive and the negative things. The problem is you have to decide if it's worth to take the risk. Right?

To me, it's so great to be a geek (or at least, I claim myself one). Why? Because Sylvie Truong has just posted a blog entry in her My Opera blog. It showed her interest in geeks, pretty much! That's more than enough for me. A really good reason, isn't it? 

Monday, March 29, 2010

This is pretty cool

This is pretty awesome. Try it now: "Trương Thúy Ngân", "Truong Thuy Ngan" and Trương Thúy Ngân. The links will be opened via to prevent customized search results from Google. You may want to use Google Vietnam version: "Trương Thúy Ngân", "Truong Thuy Ngan" and Trương Thúy Ngân.

You invaded my life, didn't you?

Friday, March 26, 2010

UML Diagram - Very first steps

Well, this is our second assignment of Java: writing an application which allows user to create a UML diagram and generate the code (with empty methods, of course) in Java. Actually the assignment suggested another reversed approach: reading Java source code files and generate the UML diagram but our team decided to choose it.

After some discussion, yesterday, mr Tran Viet Son has done the data structure for the application which is pretty interesting and I'm showing you now. The source code can be grab here. All the core classes are under a package called com.tranvietson.uml. The test code is something like this

Wednesday, March 24, 2010

vBulletin users list in AdminCP Options

I intended to write about this for a while but I haven't had time. This is pretty cool stuff. When ever you want to have a users list for your plugin? Let's say you want to give some members a special permission to use the plugin. What's the best way to do that? Well, adding a field into `users` table is not really good. Setting up a new bitfield permission is interesting but if some other coder use the same bitfield value, disaster! Hmm, the most secure thing will be a separate table to store authorized userid, really good but slow and costly (and stupid somehow), nobody implements a new table just to store those userids! Many coders will use vBulletin Core Options system, create a free type input box, ask the Administrator to input userids, seperated by comma, etc... That's a good approach I think since it's quick and easy, most Administrators have enough knowledge to get the correct userids. But well, if we can make it better, why not? That's why I came up with this idea: use vBulletin Options system to store and load that piece of data but I will display usernames along with userids. That's really useful but then I think why don't I improve it even more? Store user basic information in an array, serialize it to store in database, unserialize when needed. Administrator can now input usernames to add to the list and remove a user from the list if they want. Piece of cake!

Ok. That's enough of talking. I'm going to the main points now.

First you will need to have the option

Use the hook location named "admin_options_print". This will print out our interface

Ok. Now is the part where we parse thing and store information

Huray! See if it work or not

You may want to grab the plugin here. It does nothing except this beautiful users list. Have a nice day.

Saturday, March 20, 2010

Expression Handling (2nd approach)

After the first implementation, I have made a few more improvements and now, after submitting my assignment I think it's safe to post the final version of the classes here. Source code is available here (MediaFire). You may want to read the documentation here (Google Docs, in Vietnamese). The script is now accept natural expression input from console. The most interesting feature is each variable can also be enter as an expression (and it will ask for it's variables also). What does this mean?

For example, you input an expression: 5+x+y*z. Obviously, it will be calculated at 5 + x + ( y * z)
But because you used 3 variables, it will ask your for x, y, z. I will assign x with value of 20, y with 10.
Now is the fun stuff: I input "a-b" for z. Uhhhh. What do you think the script will do now?
Ah ha, it will ask for z.a (which means the 'a' variable of 'z' expression), 100 to go
And then z.b: 1000 to go
The result is -17985 (I'm not really sure with this result but you can check yourself)

That example is from the documentation. Feel free to leave comment

Tuesday, March 16, 2010

Expression Handling

I intended to post the whole Java source code but unfortunately, there are 8 files in total so I think it will be better if you get them from MediaFire. Don't worry, there are only ~500 lines of code and I wrote comment for every single method.

Actually, the main class (Expression) design isn't done by me 100% because I have to follow the assignment requirement (also in the uploaded file). I don't really understand why we have to have 2 constructors and then another append() method. Really, I can't get it. Tell me if you have an idea.

Anyway, using the Expression class is very simple. Here is how I tested it:

Please note that it will run but an Exception will be thrown about variable b hasn't been initialized yet. You can either remove b from the append() method or use setValue() method to assign an value for the variable.

Also note that: currently the class support adding, subtracting, multiplying and dividing. Functions can be supported easily by writing a new class (ExpressionFunction?) and change the RPNize() static method (using Shunting-yard algorithm) a little bit. All comments are welcome. Thank you for reading

Monday, March 15, 2010

Dining Philosophers

Heck, this is my assignment at college. Took me 1 hour looking around to figure out how to use wait() and notify() methods of Java Object. It's kinda cool. Let's rock and roll.

Full source code is available here.

Tuesday, February 2, 2010

YAFB nominated

The title says it all. Well, this is the second time it is nominated (the first time ended up with third position). So sad that I'm not able to update the product at this period of time but maybe at the middle of the month. Wow, I have to do something this time to make it a winner! Yay!

Check out the YAFB - Yay! Another Facebook Bridge primary thread on or if you are kind enough, vote for YAFB in the MOTM Poll

Local Search Engine

Today I ran into a problem: I need Windows XP driver for the Colorvis Z1 webcam. As usual, I have my belief on Google and because I'm using Google Chrome, I typed into Chrome's Omnibox: "windows xp driver colorvis z1", I clicked a few links but nothing works! Most of the links are from search engines or software portal sites. They did their job pretty well and I believe mis-clicks from people like me generate quite much revenue for them despite the fact that their site is useless!
I was going to give up but then I got an idea. I went directly to Google Vietnam and typed this query: "driver colorvis". Actually, a few suggestions came up and I selected "driver colorvis 6 mat" (in English: "driver colorvis 6 eyes") and I got this site in the second position. I downloaded the driver and it works!

So, in conclusion: After ~100MB downloaded driver from international sources, my webcam is still useless but after the first try with 25MB downloaded, it's working like charm now!

This is one of many aspects which a Local Search Engine (version) will beat an International Search Engine (version). Have to go playing with the webcam now. Haha

Saturday, January 30, 2010

A Big Number Calculating Approach

Although this is the first post of the blog, I have nothing much to say since I'm testing the syntax highlighter. It's a slick javascript highlighter written by Alex Gorbatchev. 

This Big Number class has been written primary for the 3rd Assignment of a unit called Advanced Programming in my 3rd semester at University of Technology and Engineering, Vietnam National University, Hanoi (you can follow this URI for full documents and exercises but I'm not sure whether it will work in the future). According to the requirement of the assignment, I had to implement a linked-list and use that list to store digits of the number. And then I decided to write some operator overloading methods for the class so I can use native operators with the big number objects. List of operators supported:

  1. Input and Output (<<, >>)
  2. Assigning (==) by another integer or another object
  3. Comparison (>, <). Writing >= or <= should be easy since the compare function (cmp) produce different returning value for larger than, less than or equal to. I just didn't write them because it's not required for my assignment
  4. Calculating: adding, subtracting and multiplying (+, -, *, +=, -=, *=)
Originally, the assignment requires adding and multiplying but in the 4th semester, in other unit, the professor requires subtracting so I used the same old class and wrote the subtracting functionality. I want to finish it with dividing also but, well, at first I'm lazy and it seems to be difficult and I have no much time so that's it for now. Here is the full code. Hope it may help some body