Development

How to measure memory consumption of a program on Linux

According to the hard fight which is a comparison of Java, Python and Ruby side by side, the performance is very impressive because Python is faster than the rest. A java guru immediately identified flaws of this test in Java codes. In addition, he also improved the codes for getting faster program. However, he was too busy to perform the benchmarks again himself. I volunteered to do this task on my laptop. After preparing all codes in Java, Python and Ruby, I have to measure how long it takes to execute each code. The tool I used was "time". Everything went well until I was asked to also measure memory consumption in each case. time always gave me zero without any error message. It seems this is a bug in Linux kernel that getrusage() will return zero in all memory related values. Fortunately, I found a workaround using Python!

How to calculate MD5 in C#

Not only wget but also MD5SUM, I have been asked how to implement this functionality in C#. Again and again, I wrote below code in Mono on Ubuntu Feisty.

How to implement simple wget in C#

.NET is such a good programming environment because it provides many useful standard libraries. Actually, this concept is very similar to battery included in Python. The best part of .NET is that we have Mono so it is possible to develop .NET application on Linux to run on Windows. I have been asked to find a solution for retrieving content from specified URL using HTTP protocol in C#. Here is the code.

Mandelbrot Set Viewer using wxPython

In previous post, I benchmarked several implementation of Mandelbrot Set in Python. To make it more complete, I port a Mandelbrot Set Viewer written in Ruby posted at Codenone using OpenGL to Python and wxPython.

Mandelbrot Set in Python

I found a good homework and posted at Codenone since last week. The first question is about Mandelbrot Set. Actually, this problem could be categorized in compute intensive which should be solved in low-level language to let it run as fast as possible. However, we are talking about alternative languages aka scripting languages like Python and Ruby so I will try to solve this problem in Python. For the solution in Ruby, please go to another post.

How to setup fglrx for Ubuntu Feisty

It took me so long to setup fglrx driver for ATI Mobility X300 in my laptop, IBM Thinkpad T43. Actually, the ATI open source driver comes with Xorg 7.2 works very well except only 3D acceleration. The open source driver does not support 3D acceleration for ATI Mobility X300. As a result, Google Earth is useless because I can't even drag the earth to see my home. There are so many howto but none of them worked for me even this one. Now I found the exact problem and its solution to make fglrx 8.35.5 work perfectly on Ubuntu Feisty.