Posts

Showing posts from 2007

Wireshark on U3

Wireshark (former known as Ethereal) is a great tool for network diagnostics. I have been using it extensively to monitor network performance of my network applications. Recently I discovered that they have release a U3 package for it! If you have a U3 flash drive and you frequent need to perform network diagnostics on various computers, I would really recommend you to try it out. When you launch Wireshark from U3 launchpad, it will prompt you if you would like to install winpcap on the computer if it has not been installed. After winpcap has been installed, it will launch wireshark. Once you have finished using wireshark, when you click on the eject button on U3 launchpad, it will also automatically uninstall the winpcap! While this installation/uninstallation of winpcap seems a bit clumsy, it is still very useful as I can bring wireshark anywhere, stick it into any Windows PC and start troubleshooting the network!

Ubuntu 7.10 Gutsy Gibbon has been release

[K]ubuntu Gutsy has just been released last week. So I'm thinking of upgrading my current Feisty but I'll have to spend some time to image the root partition as backup just in case the upgrade procedure screws up. Upgrade instructions is available at http://kubuntu.org/announcements/7.10-release.php I'll probably post more info and a short review on it once when I have completed upgrade.

Now my car roars with 110db twintone horn

Image
About 2 years ago, I had an auto accident (luckily no one was seriously injured) and damaged my front bumper and the horn was also replaced. But after I got my car back from the workshop, I realized that they gave me an cheap horn that is soft and squeak like a little kitten, far worse that the stock horn. I have been wanting to change it for some time and recently, there was a few occasion when some reckless drivers dangerously cuts in front of me, forcing me to slam the brakes and also horn, but what came out was a mere little kitten squeak. So yesterday, I finally decided I had enough of the ineffective horn. As I am sorta the DIY guy and also I been wanting to learn more about fixing my car,I decided to fix it myself. I could learn more about car wiring and save some money. First, I took a spanner to remove the horn, took it back into my room and experimented with it. I found that electric horn connection terminal are not polarized, so we can connect +12V and GND from my power supp...

Hosting WCF in WPF app

In an application that I am developing, I have encountered a problem when the WPF GUI freezes when a client access the services in the server. Both client and server are WPF applications and the service operations typically takes several seconds to complete. So, the server GUI became unresponsive when the client performs service operation calls to the server. After some investigation, I found that the default behavior for WCF is to use the default synchronization context for the current AppDomain for synchronizing client access. Thus, when it is hosted in a GUI application, it locks the UI thread too. To disable this behavior, I have disable the UseSynchonizationContext switch in the ServiceBehavior attribute of the service implementation class. [ServiceContract] public interface IMyService { [OperationContract] void DoSomething(); } [ServiceBehavior( UseSynchonizationContext = false)] public class MyServiceImpl : IMyService { public void DoSomething() { ... } } Unfortunately,...

cpufreq and measuring power consumption

Image
Since everyone are talking about Live Earth and global warming recently, I have decided to check my personal power consumption. Other than my car, I guess the second most power consuming device is my PC. So I decided to measure how much power it consumes. Especially as I have recently discovered the cpufreqd that can adjust my Pentium 4 processor speed from 2.4GHz down to 300MHz. Unlike some hardware review sites where they could afford to buy good quality power meters like the Watts Up , all I have is just two multimeter laying around my toolbox and they can't even measure AC current. So, I also can't measure power as the method described in the article in TwistedMod . I has to create my own method to measure the current that goes into my PC. The circuit is as shown below: The resistor 5.1ohm, 5W was used because it is the only suitable resistor that is in my toolbox. Basically, any low resistance high power resistor should be suitable. The power dissipation of the resistor m...

The Economics of open source

An interesting and lively discussion thread has popped up at Ubuntu Forums with a title that is sure to invite a large reaction among the group of highly enthusiastic Ubuntu users in the forum: *deep breath* For the most unpopular opinion of any Ubuntu user, please click here. In summary, the original poster's opinion was that Ubuntu should be made closed-source so that programmers can make a lot money and improve their lives. He/She also said that by closing up Ubuntu, its quality will improve because paying more money will make things better. It is unfortunate that he/she has such opinion, which makes many other posters in the thread believe that he/she has very little understanding of the dynamics of open-source softwares. Later in the thread, he/she has indicated that he is still in college and he would wish that the software industry would be a huge money pot for everyone to join. So, I guess he/she can be forgiven for being less knowledgeable in the dynamics of the software i...

Moonlight: Silverlight for Linux/Mono

I just found out that the guys at Mono has hacked up a version of Linux clone of Microsoft's Silverlight that was just release a couple of months ago. They called it moonlight . Another interesting fact is that the it was done in just 21 days of intensive hack-a-thon ! Working on a project that uses.NET Framework 3.0, I find that the XAML and WPF is pretty interesting technology for GUI as it allows "declarative programming" where UI design is separated from coding. While some may argue that Qt's ui files and GTK's Glade already offers such capability, XAML seems more easily readable and could be manually edited with notepad to create pretty powerful effects without a designer tool. It would be interesting to monitor the progress of this project and also the future of Silverlight, if it will revolutionize the Web as claimed by Microsoft. Another interesting component in .NET Framework 3.0 that I would really like to see on Linux is Windows Cardspace which provide...

Kill the creeps on your desktop!

Image
My colleague recently introduced me to a little flash game call Desktop Tower Defence . At first look, it seems to be a pretty simple game. Just place the defence towers and shoot down the creepy little creatures that tries to travel across the desktop area. After one round, I got hooked. If you just google for Desktop Tower Defence, you will realize how many people got addicted over this simple flash game. Usually, I'll just pass after playing most online flash games for 10-15 minutes but this got me hooked for hours and hours for days! It is challenging, fun and somewhat stress relieving! Try it out. After one week, I have finally completed the Hard level with 4689 points! Hint: Be familiar with the keyboard shortcuts in the instruction section. You will need it when action heats up!

Journey to Kubuntu 7.04 Feisty Fawn

Image
Finally I have installed Kubuntu Feisty Fawn! But I have to admit that the journey was not exactly smooth. Initially, as I do not have a really reliable connection, I have downloaded the Alternate CD and tried to execute the cdromupgrade script. However, I found that it needs gksu which it not installed. Trying to cheat it. I changed that to kdesu and it successfully launched the Distribution Upgrade tool, but quickly failed due to a bug I discovered in DistUpgradeViewKDE.py and I submitted a bug report . Next, I tried a new attempt using the new Kubuntu Distribution upgrade tool as described here . But it failed during the "Modifying Software Channels" stage due to some gzip error. After some googling, I found that I could modify the /etc/apt/source.list to point to mirrors instead of the official source at http://archive.ubuntu.com/ubuntu/. To my disappointment, there are no mirrors in Malaysia. So I looked for mirrors in Asia. As I thought Thailand would be the closest nei...

KTorrent rediscovered and it ROCKS!

I have just rediscovered KTorrent and I find it as a great alternative compared to more mainstream Bittorrent clients. Previously, I was using Azureus as it is feature packed and portable. I have been using it for a couple of years when Windows was still my primay OS and Linux was mainly for fun. It has I have tried KTorrent earlier but it was not stable has less features. After installing Kubuntu, I tried to reinstall Azureus and it worked with gcj/gij implementation of JAVA but it was somewhat slow and unreliable. But I was a little lazy to download real Java runtime from Sun. So I decided to try the KTorrent that is part of default installtion. It is KTorrent 2.1 and 10 minutes later... I loved it. It has all the feature that I need from a Bittorrent client such as: PeerGuardian IP blocking Protocol Encryption DHT, which is compatible with mainline version Web UI and it's UI is more responsive that Azureus So, if you are using KDE, try it out!

New Western Digital Caviar SE 250GB EIDE harddisk and Kubuntu Edgy

I have just bought a new Caviar SE 250GB EIDE harddisk. I am quite satisfied with it. It run quite and cool just as advertised at it's website . hddtemp shows 34°C when it is under light loading while my room temperature is 30°C: $ hddtemp /dev/hda /dev/hda: WDC WD2500JB-55REA0: 34°C It is currently cooled with a standard 5cm case fan. Even without the fan it seldom reaches 40°C. Anyway, these are some performance numbers which is pretty average and definitely nothing near high performance drives like those 10,000 rpm Raptors $ sudo hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 174 MB in 3.03 seconds = 57.48 MB/sec $ sudo hdparm -T /dev/sda /dev/sda: Timing cached reads: 1172 MB in 2.00 seconds = 585.58 MB/sec BTW, I have now switch to Kubuntu (yeap, I prefer KDE compared to gnome). I have been using many different distros in the past from Red Hat 4.2, Mandrake, Red Hat 9.1, openSUSE 10.0, then SUSE 10.1. All of them are uses Red Hat/RPM based package management. ...

KEEP YOUR HARDDRIVES COOL!

Arg! There are dozens of bad blocks in my root partition and it does not boot properly anymore. It is a Maxtor 80GB HDD about 3 years old. This is the first time I had such a serious problem in my 12 years of experience with computers. I have help many people troubleshoot their computers with bad sectors in the past but this is the first time it happens to me! I have always kept my harddrives cool with a cooling fan. Well, this Maxtor drive is not really mine, it was my girlfriend's. Last year, I bought a 160GB drive as I needed a new drive for Linux as my old 4.3GB is aging and getting slower but still no bad sectors! And, since I don't really need so much space while my girlfriend always complain that she does not have enough diskspace, so we swapped. She has a laptop and the 3.5" 80GB HDD is in an external USB/IDE enclosure that was not too well ventilated compared to my other older 40GB drive that is still running well. Therefore, the lesson learnt is: KEEP YOUR HARDDR...

openSUSE zen-updater crashes

Today is the 2nd time I have encountered zen-updater crashes that shows the "Unhandled exception" dialog. After a little googling, I found the solution here http://en.opensuse.org/Using_zen-updater#Why_zen-updater_crashes Basically, it says that the zenworks database is corrupted and one way to fix it is to: kill the zmd and zen-updater processes delete the database at /var/lib/zmd/zmd.db restart zenworks and zen-updater. For more details, please refer to the link above.

It's a monster and it's a 12cm, 12V DC Fan!

I have just got a 12cm fan from my company's scrap parts. It is a poweful fan that I have just installed in computer. To do that I know a Dremel would be a great tool for case mod like this but I don't have one. Using a hacksaw, a plier and a set of files, I was able to cut a hole at the top of the casing and installed the fan. It wasn't great, but it works. I can't post any picture yet as I don't have a camera with me now and my camera phone was stolen :( Because the fan is so powerful, when it is powered at full speed, it will suck so much air out of the casing that it interrupted the air flow into the PSU. Therefore, I'll need to build a PWM controller circuit to control the fan speed.

Adobe Flash Player 9 beta for Firefox/Linux

If you are getting fustrated that you are still using Flash Player 7 in Linux and many sites are started to require minimum version 8 or 9, you can try using the Flash Player 9 beta. The following are the few simple steps I took to update mine: 1. Download the player from Adobe Labs: http://labs.adobe.com/downloads/flashplayer9.html 2. Extract the GZip file which will contain 2 files: readme.txt and libflashplayer.so 3. Following the instruction in readme.txt. For my SuSE 10.1, I just copy the libflashplayer.so to /usr/lib/firefox/plugins which of course requires root login. After that, most of the sites that require Flash Player 9 seems to work pretty well. UPDATE: Linux Flashplayer 9 is now release, go to http://www.adobe.com/go/gntray_dl_getflashplayer instead!