Wednesday, September 05, 2007

Quarter begins didn't mean class begins

Shame on me!!!

Fall quarter 2007 began at September 5th, I wrote down in my note, and keep counting down to that day (wishing it will come slowly :p).

And today is that day. According to my class schedule, I had a partial differential equation class today at 9:30 AM. I hate waking up early, and get used to 11 AM wake-up time during the summer. But today, I had to wake up so early (8:00 AM) for the first PDE class. 

I went to the class a little bit early, 9:25 AM, and then the nature call :p
Since that time, nobody's at the class.

I went back to the class again at 9:30 AM sharp, still nobody's there.

I wait until 10:00 AM, no body came!!! HOLY SHIT, WHAT HAPPENING???? (I screamed in my mind).

Then, I decided to go to the instructor's office to ask him what happened.

Waiting at his office for half an hour (there's a student talking to him), and finally got the answer.

"The class begin at Sept 6th", he told me and showed the University calendar.

"WHATTTTTTTTTTT???!!!" (I shouted, again, in my mind).

We smile, and I laughed at my stupid (I was so humiliated at that time). 

Now, I learned that the "Quarter Begin" day and "Class Begin" day didn't have to be the same day.

:p

Saturday, September 01, 2007

God!!!

"For every house is built by someone, but God is the builder of everything. [Hebrews 3:4 , New International Version]" is the sentence that drag me from my bed (actually, floor) to open the door this morning.

Two man ringing the door bell at my apartment this morning (around 10:30 AM). At that time, I was sleeping. I thought that would be the pest control service, at the first time. But when I opened the door and saw them, they dressed way too better than pest control service guys. Two old men with formally decent looks in their suits.

I kind of curious and thinking in my mind ".. are they lawyers and want to sue me with no reason?". But then, after we say hi, the white guy introduced himself and ask me about design and creation. I didn't remember the exact word but he ask me something like "Are you curious about existent of everything?".

Respectfully, I have no idea about :D

And then he showed me a bible and referring to those sentence I stated above.

I kind of admire him in his attempt to distribute his believes. So I didn't strongly reject his believes. All I said is just "I am not a bible reader, not at all :)" (I really talked with smile face).

The reality is I never believe that God creates everything.

My beliefs are all about Buddha Dharma, of course I am a buddhism.

God create everything, then who create him?

F, my most erotic friend, said god is existed, no one created him. And he has such a power to create everything. Believe in god, heaven you go. Down to hell, vice versa.

My believe is, our soul is such a thing that existed without creation. And we reincarnate for a long time. The way to stop this birth-and-death cycle is Nirvana. There are such heavens and hells, but only our actions will decide where would we go. Good, go to heavens. Evil, go to hell. When the good or evil reaction force (from what we did) end. The other reactions from what we did would drive us to somewhere or give us something (we always did things).

With this topic, I spent time discussing with F for an hour or so. And there is, obviously, no conclusion since they are "beliefs" that hard to prove. Then F tell me the way to prove the existent of god by "praying". Just make a wish to the God as children ask something from their father, and put "in the name of Jesus Christ" in the end. Surely, I will do so, and we can discuss more about the result.

I will leave this topic just at this point, or it could be my dissertation for another religion philosophy degree :)
Use your own experience and wisdom to believe or not to believe in such a thing.

But the things I believed with all my heart is good people won't go to hell just only because they didn't believe in god (thinking about people before Christian era, wouldn't it so unfair to them?).

Fug U Man

Tuesday, August 28, 2007

Coke with Vitamin!!!

Hi friends,
You might find recently about various variation of Coca-Cola.

Some basic example of them are Coke-zero, Vanilla Coke, Diet Coke, Cherry Coke, etc.
But here, in US, I found Diet Coke Plus - diet coke with vitamins and minerals!!!.

Check it out :)






Sunday, August 26, 2007

Writing a service in Linux

As Khem's request, today I will (try to) explain the simple way to write a linux service.
The linux services are nothing but programs running in the background (usually daemon) to provide their service. For example, the httpd (HTTP Daemon) provide HTTP server service which made your system be a web server.

Writing a Linux service is easy, it require only two major steps.
1. Implement your program as Linux daemon
2. Write the service script, usually simple shell script, and place it in "/etc/init.d" directory

Ah, and you should be the root to start/stop or add services.

Briefly, the daemon is a program that run in the background and had practically no parent (literally it had only init process - the pid #1 - be its parent). You may implement Linux daemon program using C by simply calling daemon() function (in unistd.h). After daemon() called, your program will be a daemon :)
Service script is somewhat easy to write, too. Check the code below for example. (Suppose that this code was in the file /etc/init.d/testservice).

Sample service script called "testservice"
----------------------------
 1: #!/bin/bash
 2: . /etc/init.d/function #Include some necessary function
 3: case $1 in
 4:   start)
 5:     echo -n "Starting test service";
 6:     daemon /program/directory/test arg1 arg2;
 7:     echo;
 8:   ;;
 9:   stop)
10:     echo -n "Exiting test service";
11:     killproc test;
12:     echo;
13:   ;;
14:   status)
15:     status test;
16:   ;;
17:   *)
18:     echo " Usage: service testservice {start|stop|status}";
19:   ;;
20: esac
--------------------------------------

The "daemon" in line 6, "killproc" in line 11, and "status" in line 15 are bash functions written in /etc/init.d/functions. We include that file from . command in line 2. Alternatively, "source" command might be used instead of ".", for the code readability. The arguments in line 6 will be passed in the program you write.

Actually, you don't have to write the service script this way. You can make your own style, write your own function, define your command, or what not, since this is only the script being invoked via command "service".

You can even write perl script, or python, and put it in "/etc/init.d". Don't forget to change its permission to be 755 (executable). That's it. 

When root invoke command "service your-service ", the service program will pass argument to "your-service" script.

By the way, as I shown you, Linux (I tested on red-hat based Fedora Core 5 and Cent OS 4) had already provided some convenient function to start/stop or check service status. It would be more convenient to write in the simple style I posted :)

***NOTE***: For some reason (maybe pattern matching problem), the daemon program name should not include "_" (underscore). My service (shell) script didn't work when I had a underscore in a file name.

Hope this might benefit you a bit :)

Fug.U.Man

Wednesday, August 22, 2007

Google Summer of Code DONE!!!

OH MY GOD!!
Finally, my codes were done!!!!

(Actually, almost done, since the installation package still using shell script :(

OK, however I can have some free time to do more things I love to do :D

For your information, my ComSci friends, I wanna tell you that Linux and open source programs are great!!! But it took you some more time to work on, and had a very high (in my opinion) learning curve.

I worked on Fault-Tolerance High-Availability OSCAR, which will work on Linux cluster to enable fault tolerant job queue and job execution on MPI parallel programming (whomever would like to know more, please contact me :)

I didn't want to talk much about my GSoC here, just a few sentence complaint something happening on my project.

HOLY SH*T, many open source software had a great number of issues about dependencies!!!! And you might have to manually resolve those dependencies by yourself!!! (Again, ***MIGHT HAVE TO***, many of them were managed by packaging software like RPM, YUM, etc.) Installation alone might cost you more than one day.

If you use too new Linux distributions, the program might not support it. In consequences, you had to build it yourself from its codes. If some error appears, only you, the installer, would solve it T_T.

Moreover, some program might had a very bad documentation, that would make a lot of confusions instead of illuminations (I guess mine is one of them T_T).

Some programs that you had to depend on to complete your work might produce some unexpected error without any clue!!! Even the Q/A mailing list support might contain some issues similar to your error experience, but it's possible that no one help you out in that Q/A mailing list T_T. ARRRRGHHHHHHH

By the way, there are a lot of program that were written with robustness, efficiency, powerful, beautiful, or whatever good :D

Especially the active open source project like Open Office, Lynx, Inkscape, etc.

They work almost like commercial softwares.

"Linux and Open Source Software" are great!!!
But they're two-edge swards. 

If you understand what to do about them, you'll got a lot of advantages of free software :D

Within this week, I will begin introducing a bunch of free softwares I am using in my MacBook, with some easy installation tips :D for newbies (like me).

So, hope you all also enjoy my free software fever :D

HAIL THE FREE SOFTWARE!!!

Wednesday, June 20, 2007

Travel to DALLAS, TX

After I (had just) got my driver's license, I was sooooo eager to get a car, obviously a used one (the cheapest price for a new car is around $15,000 ~ 490,000฿, while an average price for a good conditioned, used one is around $7,000 ~ 490,000฿)

Actually, I did research about used cars and new cars for a while, but couldn't do anything as I had no license!!! NOW IS MY TIME TO DO SHOP THEM HA HA HA
After I research the car price over the Internet, I found that, in the big city, I will, definitely, get a better car than those in my town, with the same rate. Spending a lot of time researching, Mon and I had Dallas as a conclusion for a shopping place. Moreover, we can go meeting Nunn (Mon's gig) at Denton (neighboring city).

OK, come back to the details of traveling to Dallas.

For your information, let me talk about Greyhound, the public ground transportation of US-คล้ายๆ บ.ข.ส. ประเทศไทยแหละ. Please remember that, in US, if you made a reservation pretty long time before the trip (e.g. 1 week), you will get some significantly discount. In my case, Mon chose to pay for the ticket one week before the trip, we got only $58 instead of $90.

I arrived the bus station a little bit early, and it surprise me. The greyhound bus station in my city was farrrrr more different than those in my imaginations (I imagined more than one :p). Take a look at the picture T_T



Moreover, it was 6 hours to travel with greyhound to Dallas (เมื่อยตูด อย่างแรง). Before we arrived Shreveport, the little Latin boy was so annoying. He kept crying and shouting (สาดดด เด๋วตบกลิ้ง ไอ้เด็กเวร). We take a long break (about 30 min.) at Shreveport, LA.


Shreveport greyhound bus station had a very interesting guard (see picture)

And then after we continue traveling, the other white children started playing and yelling!!! (and when they didn't had something they want, they'll start crying T_T)





By the way, we arrived Dallas safely :) - around 5-6 PM.

After we arrived Dallas, we go to "Enterprise" (the car-rental company), rent a car and drive to Super 8 Hotel. Here is a tip for anyone who didn't own any GPS (Global Positioning System, an expensive device being used for telling about 'WHERE YOU ARE' in the world and can give you the road direction to the place you want to go), you can use Google maps. It is very helpful.

Next day, we started to finding cars in our list...

Fortunately, the hotel provided high-speed internet (around 6 Mbps). I can use high-speed internet at my room, send a copy of google map to my mail and used share printer at the (very small) lobby to get map printed. By the way, with our bad luck and the suck of the traffic sign system here, we always get lost!!!

In the morning, we would like to go to a Mitsubishi dealer, but ended up with another Mitsubishi dealer. When I asked the dealer that is this the address I am seeking, he lied to me "yes, of course". Oh man... And he took me to test a car - Mitsubishi Galant, year 2000.

He tried almost everything to sold me that car. I tried to tell him that I just want more time to think about it.... At the first time, he tried to sold it to me at $9,500. I told him that I can't afford it... Hey tried to give me a monthly payment option (with some interest rate, as we knew). I never agree with this kind of option (why we had to pay more???). I confirmed him that I had only $7,000 to spend, and it is cash. Then he left me for a while ... and come back to told me that I was so lucky, with cash pay at that time, the deal can be closed with only $7,000. HOLY SHIT!!! $9,500 to $7,000 man.... Don't have to think about how much profit they made from selling used car. I drove that car and felt something bad about the suspension. After we check the car history from CarFax.com, we saw a lot of suspension repair/check/replace list... No doubt, this car might have suspension problem.

Finally, we can get out from that tricky dealer safely (phewwww)

We spent almost 2 hours with this dealer T_T (I tried to get out since 1 hr after we finished test driving)

After that, we had to go to meet another private car owner at Mesquite Mall. We had lunch at the A&W there.

When we met this private car owner (we trade privately, no dealer to make profits), we found that the Honda Accord Special Edition '97 is in a very good shape. Especially when comparing to its price - $4,900.

Monn (the Honda professional) said the engine is in a good shape, I felt the suspension is good also. Only some scratch on the exterior body, interior still very good.

We love this car, even it is old (10 yrs) but the condition is still good and we can save a lot of money (we don't have to spend all $7,000 budget, right?). We tried to bargain to $4,500 but the deal was closed at $4,700. It's OK :)

So lucky, we got a car in 1 day :) then we can return the rented car to Enterprise earlier, and paid only for 1 day rental, hippy :) - save more money.

After that day, we spent time to travel around Dallas and its vicinity, with Nunn.

Please see pics @ my web album, I already give stories with picture there.

So tired... so long story ...

Wanna talked a little bit more details, but I can't hold it any more T_T

Thanks for reading everyone

Regards,
Fug U Man

Thursday, June 14, 2007

Say hello to my BLOG and my driver's license :)

First of all, greeting my new blog. Everything in this blog, written by me, will be English, except for something that English can't give a right expression (e.g. เช็ดเข้เอ๊ยยยย)

Hoping that my friends gonna forgive me in changing blog address (again) and not writing in Thai.

OK, back to my story.

I'd just got a driver's license for a couple days, very proud of it (T_T).

Yes, I just said I am so proud of it.

First of all, let me told you how important driver's license is. The driver's license is an important photo ID card. Almost every where accept driver's license as a personal id card (แม่งใช้กันแทนบัตรประชาชนเลยครับ). And, of course, I can't drive any car without this license.

It's importance didn't make me sooooo proud of it, not at all. The hardness of getting this card did.

Before I was eligible to have a test, by Louisiana Law, I had to have a basic driving course certificate. This class cost me $35.00 (กรวยเอ๊ย แพงสาดดดด), plus I had to pass the after class examination (no less than 80%), or I lose my $35.00 for nothing (สาดดดด). Luckily, I passed this test and got a certificate. It seems like this test didn't give me any benefit (except for certificate to get a real test), but, by the way, it taught me quite a lot about basic law and rules of driving in US (แต่กรูก็อ่านเองได้สาดดดด หนังสือที่ DMV-Department of Motor Vehicle- เค้าก็แจกฟรี)

OK, that's the first step to get my driver's license. I had that kind of class last month, but didn't have enough free time (and also my friends, who had to took me to the DMV). Then, before going to have a test, I had to review all of content in the book, almost like I never had that class before. The difference is the teacher in that class will emphasize SOMETHING that might be in the real test (พูดตรงๆ แม่งบอกข้อสอบ).

And I took the paper test in the morning. The test was easy, and I could communicate (both listening and speaking) quite well this day (my communication ability is not steady, depending on .... I don't know ว่ะ แม่งแล้วแต่วัน) then I had some confident that the road test is gonna be not hard. It is quite easy to drive here. Almost everything is the same as it was in Thailand, just follow the direction of traffic signs (speed limits, etc.), except for the left-hand side driver and the right-of-way (ประเทศไทยชิดซ้าย ที่นี่ชิดขวา). Mon and I passed the paper test easily.

In the afternoon, I came back to have a road test. I didn't know what happen to me. At that time, I started to got bad communication. (Ohhhhhh sardddd).

Before I drove a car (borrow from my Thai friend here--thanks to you P' Kan--but the real owner is P' Kan's Korean friend), I had to demonstrate the basic car system, e.g. turn light, head light, and horn. My nervousness started to make me got worse communication (T_T). Luckily I can make a right guess about what she (the tester) said.

Then, I started to drive. The tester told me the way (which I had already learned from P' Kan, and from history, the route had never been changed), and I just drove as she said.

The speed limit was changed in some part of the road test, the tester waned me twice about the speed limit. I just follow the car in front of me, and not try to make a traffic jam. After she warned me, I slow down, and the traffic behind me started to be jammed.

In one little street (คำว่า street นี่มันซอยแล้วนะ สำหรับ US) I saw a stop sign (pretty close) and the tester told me to stop. She just said "stop". I thought she want me to stop at the stop sign (like warn me, as she did when she saw me drive over the speed limit), so I didn't pull over (แปลว่าจอดรถ). Then, she started to use a hard voice, I still didn't get her. Finally, she scold, "STOP THE VEHICLE COMPLETELY". กรวยเอ๊ยยยยย, I scream in my head, ใครจะไปรู้ป้ามึงฟะ ว่ามึงจะให้กูหยุดตรงนี้เนี่ย (before the stop sign about 10-20 feet). All I could say (at that time) was "sorry ma'am" (โวยวายเดี๋ยวมันไม่ให้กูผ่าน). Then she gently order me to back up (แปลว่าถอยหลังนะจ๊ะ), stop again and went forward.

After the hardest time (for me) in the test, everything was just fine :)

I had been warned about speed limit and changing lane without blind-spot checking, and passed the road test (WAHAHAHAHAHA).

Sooooo stress, man...

And I got my driver's license, just right after the road test (take a picture and got the card, sooo fast).

Ahhhh... just alleviate me one step....

Now I have to consider about buying a car, hard time again.....

The plan is we (Mon and I) will go to Dallas (near Denton, where Nunn'd just arrived) and get a car. There are a lot of good car there, and their prices are much more cheaper than in Ruston.

I'll post the car buying experience again when I got one.

Thanks to whomever be patient and keep reading until this line :)

FUG U MAN