Posts

Showing posts from 2006

JDK 6

JDK 6? I felt 5 was just out for not long, wait a minute, it has been out more then a year ago. Am I too old!? Do you guys have to same feeling? Java grows like crazy.

Had a look at JDK 6, I love it. You can feel it's faster, some say it's two digits performance improvement. The script engine is a brilliant idea! I was thinking that JCP was only stealing ideas from open source projects. Of cause there are lots other improvements. Such as the new debugger. Looking forward to use that function soon.

It made me exited and proud to be in Java field. Give me some challenges.

Scripting

Have been thinking about learning a powerful script language for a while. I am not bad on Bash. Bash probably is the most guaranteed tool when you need a scripting language. You can find it on every machine these days. It definitly worth to spend sometime if you use *nix.

Last night, I felt that I have to do something about my scripting skills. Walked up to my computer, did a quick search on google, before long, I found I need to choose one from Python and Ruby. Did 30 minutes reading, among these two languages, I decided I will learn Ruby. Why, here are the reasons.
I live in Java world. Python use "indent" to mark the boundary, made me feel unsecure.I do web applications. Ruby on Rails is another attraction that Ruby have on me.Ruby's Completely OO. I am curious about what Ruby's OO looks like.
IMO, to learn which one probably doesn't really matter. Ruby just happened fit in my knowledge base better.

===============================================
After about two we…

Spring framework, Hibernate and MySQL Replication

Image
Laterly we have our site grown to the stage that a single mysql server will not able to do the job anymore. That's something we realy like to see. The CPU usage had reached more then 90% at peak traffic time. MySQL even crashed a couple time when we were running an early version. 5.0.x. Don't remember what it was exactly. But when we upgrade to 5.0.24, it stopped crashing. It was also unacceptablely slow under the heavy loads. We need some heavy duty database solution.

I have read a couple articals about mysql cluster. So my first thought is cluster. But when we ask our hosting company to set up a MySQL cluster, they suggested replication instead. Sometimes you just could not judge things by their name. Have run into the word "replication" a couple times in the mysql ref book. I miss judged the replication function. My sql does not like some other databases, this replication is real-time replication.

To set up a master/slave replication system up is really a straight f…

FC6 LiVES amr_nb amr_wb audio

I was trying to connect a couple video clips from my daughter's Halloween party. My home computer has Fedora Core 6 Linux. The video editing tool is LiVES. Under the hood, it's using mplayer to load my videos. But with my installed mplayer options, the amr_nb audio wasn't enabled. It's time for source code digging. Into the libavcodec directory of mplayer, noticed the amr.c file, it says:
This code implements amr-nb and amr-wb audio encoder/decoder through external reference
code from www.3gpp.org. The licence of the code from 3gpp is unclear so you
have to download the code separately. Two versions exists: One fixed-point
and one with floats. For some reason the float-encoder is significant faster
atleast on a P4 1.5GHz (0.9s instead of 9.9s on a 30s audio clip at MR102).
Both float and fixed point is supported for amr-nb, but only float for
amr-wb.

--AMR-NB--
The fixed-point (TS26.073) can be downloaded from:
http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-510…

Fedora core 6 update

Image
First snow of 2006 Edmonton.

Noticed that the Fedora 6 was out when I had the "baseurl" yum error. So I just could not stop myself from downloading a copy. Started Bittorrent and run out for a whole day. After my daughter's halloween party, the dvd iso downloading is complete. Did not stop the seeding until I have the DVD burned. That was about 11:00pm. Try to give something back instead only taking. That's what p2p about.

I did not use yum to upgrade my home machine from 5 to 6, because when I tried yum, it met some dependency issues. I also don't have time to figure it out. My wife is always checking our financial status on this machine. There are some instructions about using yum to upgrade from other FC to FC5. Haven't seen one talking about 5 to 6 yet.

Had the machine booted from the new dvd. Selected "upgrade" instead of install a new system. Then it's the waiting game. I went to bed to catch some sleep. All my family had not enough sleep for…

UTstarcom

Image
This is a photo I took a couple days ago using an UTstartcom pocket PC.

Finally I had a Pocket PC. UTstarcom, 3 years contract with Telus. I have played with it for two weeks now. Nice device. Runs Microsoft Windows Mobile 5.0. OS dead twice. Had it resetted once. I guess it's what MS famouse about.

I like it very much.

Tried wireless network, worked perfectly. So I can surf the Internet while I am on the toilet.

Downloaded WordNet CE version. It's a free dictionary. It works, only crushes from time to time. Didn't bother to buy a dictionary.

Downloaded PocketPutty, the cvs nightly build version. Worked very well. Only thing I don't like is that it doesn't work with ssh port higher then 9999. I am really excited about being able to connect to my machines from anywhere at any moment. Although I doublt that I will use it for a real situations.

I had this photo taken a couple minutes ago. I am going to have it on my profile. 8-]

Mplayer mencoder converting videos to flv files

The website I worked on is a casual game and video type website. Lately I have got a chance to revisit the back end media conversion engine we built half year ago. Instead of using ffmpeg, this time I used mplayer project to do the trick.

I like mencode better. FFmpeg is good, does everything, except did not give me enough options, switches to adjust. I did not find a middle way to have the quality and the size of the flv meet our needs.

In our environment, I have faac, faad2, lame installed. Faac and faad2 are a little trouble-some. I downloaded their release first, the source code just would not compile. So I tried their cvs version. It worked perfectly. I think I was too cautious.

Here is the mencode command I used:
#mencoder $1 -o $2 -ofps 15 -of lavf \
-oac mp3lame -lameopts abr:br=64 -srate 22050 -ovc lavc \
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
-lavcopts vcodec=flv:keyint=25:vbitrate=300:mbd=2:mv0\
:trell:v4mv:cbp:last_pred…

Day trip to Miquelon Lake

Image
Had invited a couple friends to have a day trip to Miquelon Lake at South-East Edmonton. About one hours driving from Edmonton.

Here is what I am going to bring:
Food, water, salad bow, forks, cups, dishs, knife, cutting board. Swimming suite, sun screen, off, lighter, axe, tower, chairs, shade, soccer, camera, map, first-aids, leatherMan SuperTool.

We met at The Brick Store at 23Av-Calgary Trail at 10:00 AM. Had a quick discuss about the trip and route, and hand every driver a map.

The funniest thing happened after 30 mins driving. We found out that the park is closed for improvements. Then we changed our plan and went to the hw 16, and spent a day at Elk island. It's the last thing you would expect that a lake shore was closed in summer.

We took the yellowhead high way 16 and had a nice day in Elk Island.

Things can get better

Seems things are getting better, it has been a while I did not get kneed at my ribs. Started taking Brazillian Jujutsu classes. Only two classes so far. It's very interesting. At the same time, I noticed that my kicking skills are not as good as it used to be. More practic.
Was kneed on my rib last Friday and kneed on my leg yesterday. It hurts. It is still a long way to go. All these weapons, elbow, knee, punch and kicks, they are slowly getting effective during the sparring.

I am going to take a rest this Saturday. Not used to the bike riding yet. Hopefully it will be better next week.