Just Another Blog

Are you thinking what I'm thinking?

Wednesday, November 26, 2003

Say NO to IE

Today I found a real good collection of articles about anti-IE. The slogan "say NO to IE" attracts me. Just like "say NO to drug". Haa... There is another VERY INTERESTING finding: CSS can kill IE. See 我要當掉我的IE. Think twice before clicking if you are really using IE... =P

Also, I found a typo in a logo made by me! How come no one tell me... T__T Let me fix it...

Wednesday, November 19, 2003

Are Application Developers Stupid?

I've been using OpenWiki for nearly 2 months. But I just realize how stupid the author is: there is no index in his database design!!! Also, there are only 2 foreign key constricts (But there are 8 tables!). Actually I knew about this already quite a long time ago. But I didn't make any change as I didn't know what will happen if I altered the design.

However, after creating the indexes tonight, Wiki looks running faster! I think if I use database other than MS Access, the improvement should be more obvious. (^-^)

Maybe all application developers who work with database should take a database course mandatory, so that they will know how B-trees and R-trees (and other indexes as well) can help them improve query performance when the queries only select a small percentage of rows in a table, just like the case in Wiki.

Sunday, November 16, 2003

Bang!

Today my PC give me a little surprise: its transformer (火牛) suddenly exploded! o..o|||

When the PC was starting up and entering Windows, there was suddenly a huge sound and a sparking. The whole machine then powered down and some gave some smoky smell...

Although the new one isn't expensive (only 95 HKD), but it wasted my whole afternoon... Sigh...

Now it is the time for some SS quiz revision. -__-

Saturday, November 15, 2003

An Exciting Day

Today we found a very interesting Wiki: UseModWiki. Although it is a file-based Wiki and doesn't look so good at the first glance, it is actually very powerful (compared with the other Wiki in Perl)! Some highlighted features: preview, subpages, interwiki, page redirection, edit conflict detection and resolution, free link, page index, etc.

Then I found a UseModWiki Korean Extension, which is EVEN BETTER! It adds things like double-click edit, orphaned pages, wanted pages, syntax highlighting of program code, emoticon, etc.

The only thing that is not so good is that the UseModWiki consists of mainly one file only! @__@ wtf... But anyway, we'd probably use it to replace our exisiting Wiki which is so rubbish.

We also had a great meeting with Miss Mong. Now seem everyone got his target.

The database lecture after the meeting is again very good. Tonight's topic is skyline retrieval. Again, R-tree plays an important role in this kind of queue. This data structure and its related algorithms are so amazing! Hmm... I think my interest in such topic is increased a bit.

Friday, November 14, 2003

A Very True Statement About Blog

I found this statement very true:

While a blog can be a great medium for self-expression and introspection, it is rarely of interest to people other than the author. That is, unless the blog is especially exciting.

- extracted from Hackles

Hmm, then will I continue to write weblog? Absolutely! It's not for anyone but myself. =P

Tuesday, November 11, 2003

Rare Visitors

Today I got a few rare visitors: one using Macintosh and one using Opera. *o* See the AWStats.

Also, I realized that Netscape, IE and Mozilla had become the BIG 3 in my site. Actually the hits from Netscape and Mozilla are mainly contributed by me, I think...

OK, time for more Last Exile. =P

P.S. I've added the title for each post in this blogger. Isn't it nice?

Monday, November 10, 2003

Immelman Turn

In Last Exile, Dio always call Claus "Immelman". At first, I thought it is a Japanese word, or something that doesn't have a meaning. But it is actually something: Immelman Turn...

Ha... now I know more, Immelman.

P.S. .: last exile :. is a very good site about Last Exile. I think it is even better than the offical site.

RTFM

I was searching for things related to RTFM. An example is from this Jargon Dictionary. Surprisingly, there are so many variation about this word. o..o

Man, RTFM next time before asking me question!

Saturday, November 08, 2003

Team Hackles

My ranking in Team Hackles is slowly raising... Hee hee... Hope that I can quickly bubble up the list...

Friday, November 07, 2003

About My Visitors

Someone was using Linux to view my website. I wonder who he/she is? ?__? See: http://minghong.dyndns.org:8080/AWStats/awstats.pl?output=osdetail

P.S. Some even use Windows ME and Windows 98... What the... 6__9

Thursday, November 06, 2003

My Site's Ranking in Search Engines

I found my Wiki (http://minghong.xroad.com) is listed in Google and Yahoo! Yeah ^o^... Let's see if anyone would enter my Wiki like this... though it is not the first URL listed (It is the fourth, not bad...).

Wednesday, November 05, 2003

Helping Hands

I've just receive an email from Michael Ash, a guy who wrote the How-to for legOS. (I sent him an email, asking him about how to use LNP... ^^::) I feel so happy. He is really very kind. And the email that he replied is quite long too... o..o||

> Hi,
> I'd like to have inter-RCXs communication and PC-RCX communication
> using
> BrickOS (formerly legOS). I found several useful pages like
> http://legos.sourceforge.net/HOWTO/x405.html and
> http://news.lugnet.com/robotics/rcx/legos/?n=788. But I can't find any
> example
> code. By just reading the manual, I don't quite get how it works,
> probably
> because I don't have network programming background.
> I'd like to know if there is any example programs. It don't need to be
> very
> complicated, a very simple one is good enough. For example, RCX A
> (sender)
> send something to RCX B (receiver), then RCX B response by beeping.

I've attached my lnpmsg.h and .c files in case they help. Most of what they contain is already in the HOWTO, but maybe the extra code will be useful to you.

I haven't programmed for legOS for a couple of years, so I'm a bit rusty, but hopefully I haven't forgotten everything. (I keep meaning to get back into it, but life continues to intervene.)

The best approach is to take the packet_handler function as-is. As I wrote in the HOWTO, you don't want to do anything complicated or lengthy in the packet handler, just copy the message someplace safe and mark a flag that it has arrived. You can then have a thread which waits for the gNewData variable to be set, and then acts. (Code for this thread is in the HOWTO section you pointed out, near the end.) Sending the message is fairly easy, you just use lnp_addressing_write, or the my_addressing_write function in lnpmsg.c which makes sure everything is thread-safe and also makes sure the message is actually sent (although it can't make sure that it's been recieved). So what you can do is something like this on the sending end:

char msg = kBeepMsg; // define kBeepMsg somewhere as a number or
// character to mark the 'beep' message
my_addressing_write(&msg, sizeof(char), other_rcx_address, my_source_port);

And on the recieving end, in your PacketWatcher function, see if the first char of the incoming message is kBeepMsg and act accordingly.

The only thing left is addressing, which is a bit complicated as I never did RCX-to-RCX communication. But the basic idea is you set the address in your legOS kernel somewhere. (I forget where exactly....) Then you have two copies of the kernel, each with a different LNP address. Upload one to one RCX and the other to your other RCX. Then in your program, you can #define the address of the other RCX as you can see in the lnpmsg.c file. Once they both have unique addresses and know the address of the other one, they should be able to communicate.

Hopefully this will get you started. Network programming can be either simple or complicated, depending on what you want to do. Once you get the basic messaging working and you work on more complicated things, keep in mind that in LNP your messages are guaranteed to be uncorrupted, but that they are not all guaranteed to actually arrive. Write your code with the idea that some of your messages will not make it through.

If you have other questions, please feel free to write back.

I'm so sorry... /(-__-)\

Tuesday, November 04, 2003

A Day of Photoshop

I had designed a CS logo yesterday. Now I'm trying to change it a little bit. Let's see if it will look better.

I've also selected some good photos from the gallery. The photos are taken by students like Yulam and Sing (I don't know if I spell it correctly) and the people in Lab at Nov 1. I've retouched them so as to reduce the grains resulted from scanning of the films. The photos on the gallery are the original ones, or the retouched ones. =P

Sunday, November 02, 2003

Hackles

I've spent this whole night reading the comics at Hackles. So funny! I highly recomment you to have a look.

Sigh... need to write the placement report #1... haven't even started... *o*

Saturday, November 01, 2003

A Painful Day

I can't access my server for this whole day, probably because I've configured DynSite wrongly. T__T Let's see if it works for this weekends after fixing of the settings...

My lungs are so painful today... Maybe someone had 頂-ed my lungs? >__< Probably I was infected by SARS?

P.S. Now I've installed SETI@home in 4 PCs: 1. my pc at home; 2. my sister's pc at home; 3. my server at home, and 4. my pc at office... lol... ^_^||