Butterworth low-pass filters
I was reading about Butterworth low-pass filters since two weeks ago. Signal processing was not my favorite but this particular linear analog electronic filter had somehow captured my attention. I have interns working on some projects. One project uses Butterworth low-pass filters to process signal acquired from some sensors.
I have to verify their works using Mathematica on Mac OS X for data modeling. But there is a problem with this software. It does not have a built-in function of Butterworth low-pass filter so I need to build one.
The gain G(ω) of an n-order Butterworth low pass filter is given in terms of transfer function H(s) as:

where ωc is break frequency.
The Mathematica code with break frequency normalized at 1 rad/s:
butterworth[w1_, w2_, o_] = 1/(1 + (w1/w2)^(2*o));
LogLinearPlot[
Evaluate[Table[
10*Log[10, butterworth[w1, 1, order]], {order, 5}]], {w1, 0.01, 100},
PlotRange -> {-100, 0}, PlotPoints -> 100, ImageSize -> 400]
Export["butterworth.jpg", %]

Plot of the gain of Butterworth low-pass filters of the n-order 1 through 5.
Ada tasking on multi-core
With a multi-core processor such as the Intel’s Core Duo, the Ada tasking can be easily demonstrated compared to single core Pentium processor. Consider the following Ada code:
with Ada.Text_IO; use Ada.Text_IO;
procedure Tasking is
task A;
task B;
task body A is
begin
for I in 1 .. 10 loop
Put_Line ("A");
end loop;
end A;
task body B is
begin
for I in 1 .. 10 loop
Put_Line ("B");
end loop;
end B;
begin
Put_Line ("Begin parallel tasking...");
Put_Line ("The end!");
end Tasking;
The above program produces the following result which easily reflects the parallel execution.
A
B
Begin parallel tasking...
A
B
The end!
A
B
A
B
A
B
A
B
A
B
A
B
A
B
A
B
Hello? What is Ada?
I was giving an Ada talk this afternoon. The room was quite packed with students although not full. They were mainly 3rd year sem 1. Most of them were looking at technologies that they could work with their FYP (Final Year Project).
While I regaled them with fascinating true facts of Ada, I could see various reactions on their innocent and ignorant faces. Almost half of them gave an expression of “What is Ada going to do with my project?”, “What is Ada? Never heard of it.” or “Ada is old technology and is unpopular.” It was years of experience telling me not to waste too much time with such audiences. I quickly skimmed through some technical facts which they wouldn’t understand and continue regaling them with some interesting facts.
Finally, I had come to the end of the talk. It was the questions and answers session. No one had asked any questions except a girl who asked me about C# after the talk session was over. I explained to her the benefits of Ada over C# but she said she would have to start all over again. Again, my instinct told me not to waste time with such attitude and I turned my focus onto the two students whom I am supervising now. I continued with them a discussion of their project.
Unlike a couple of years back, I was too over-enthusiastic about Ada. I would talk regardless of audience reactions. After a few talks and a seminar this year, I find that I have changed. My enthusiasm is parallel to audience reaction.
Ada Obsession
Well, well, well. Kazeserver alpha RC1 has to be delayed due to some design issues and I am rewriting most part of the software so that the source can be understood easily. For the past two weeks, I was troubled by the old design but I have got a new picture now.
Isn’t Ada code easy to understand? Well, yes. But I was using a lot of Unbounded_String in records which made my code hard to read and understood. While Unbounded_String is compatible with database operation, it lacks the understandability and readability if compared to String (1 .. 10) for example.
Today, I am totally obsessed in Ada and am feeling the strongest Ada obsession after a couple of years. The feeling is still burning. If my Ada obsession keep burning, I believe I can release KazeServer for alpha testing before of June. Hopefully.
Subversion client hangs after post-commit
I had been hit by this problem since I setup Subversion on Ubuntu in January. The svnserve was properly invoked on Ubuntu server but whenever any svn client was trying to commit something back to the server, the client would hang for hours before it prompted an error: “Connection reset by peers.”
I searched all the Subversion and Ubuntu forums but could not find any solution to my problem. In the past months, I tried to identify the source of the problem and even tried many solutions suggested by people on these forums but the problem persisted. I had been committing to svn server with post commit email notification turned off and lost quite a number of post commit message. I used to keep track of changes by these email notification.
Yesterdat, I was trying my luck again and I accidentally noticed sendmail and sendmail-mta were called after commit. A look into syslog confirmed that sendmail process was put into sleep by some unknown reason. Failing to identify the cause, I removed sendmail and related packages from my Ubuntu server and installed Exim4. It is claimed to be easier to installed and configured than sendmail. The problem diminished after I got exim4 up and running. Now I am able to receive post commit email notification after every svn commit. Every commit takes a few seconds to complete after this. Problem resolved.
DocBook Publishing – Output to HTML
I learned about DocBook last year and found it a great tool for technical documentation. It is a XML based semantic markup language. The DocBook is originally intended for computer hardware and software documentation but it is great for other documentation purposes.
I have been working on some documentation, new and converting existing from Lyx to DocBook. With DocBook, I am able to publish the contents easily to many formats, namely TEX, text, pdf or HTML. I had been trying to output some of my DocBook documentation to HTML.
This afternoon, I have finally succeeded to publish to HTML. I installed some DocBook packages on Ubuntu. Here are the packages you need to get DocBook going:
- docbook
- docbook-xsl
- docbook-xsl-doc
- docbook-xsl-doc-html
- docbook-xsl-doc-pdf
- docbook-xsl-doc-text
- xsltproc
- and optional xalan and fop
To output your DocBook document to HTML, simply this:
$ xsltproc --output paper.html \
/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl\
paper.xml
You can turn on chapter and section numbering by setting chapter.autolabel to 1 and section.autolabel to 1. To include the chapter number in every sections, set section.label.includes.component.label to 1.
$ xsltproc --output paper.html \
--stringparam section.autolabel 1 \
--stringparam section.label.includes.component.label 1 \
/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \
paper.xml
Patched a security hole in KazeServer
While I was at Honda waiting for the technician to reprogram the ECU, I found a security hole in the authentication part of KazeServer. An unrecognized user id with a null password would grant access to KazeServer but without any significant usability but posed a potential risk.
I quickly identified the cause and rectified the problematic logic in the program design. One down and many to do. One of the other critical problem is that KazeServer will get over with initialization and execute even without the MySQL server is running. A serious bug though.
Another 3 more days to release Alpha RC1 and yet so many problems and unfinished parts. I feel the release will have to be postponed then.
Pre-Alpha RC1
I am in the midst of getting the KazeServer to roll out. During this pre-Alpha RC1 stage, works have been a little pressured especially cleaning up parts of the codes to make it neater and more efficient. A number of factors are also affecting during pre-Alpha stage.
One of them is the gnat Ada compiler issue on Ubuntu Hardy Heron or 8.04. Hardy comes with gnat-4.1 with a number of packages not added. Without these packages, I can’t build AWS-2.3. So, I have to roll out Alpha RC1 on Mac OS X until Ubuntu Intrepid or 8.10 with gnat-4.3 is released (hopefully with gnat-4.3 by October). I have another option which is I have to move to Debian Etch with gnat-4.1 but including the libaws-2.2.
libaws-2.2 is a pre-built library for AWS on Debian Etch. I am developing using gnat-4.4 and AWS-2.3 on Mac OS X. Moving to Debian Etch means I am downgrading the version of gnat and AWS and I feel a little skeptical about it. This is one thing I hate most, version inconsistency among the Linux distro.
After talking to my friends on this matter, it looks like I have few choices but to target on Mac OS X for the moment considering the tasks of installing and get the Debian Etch up and a whole lot of uncertainties in gnat-4.1 and AWS-2.2.
Entering Alpha stage
Finally, after weeks of experimental development, KazeServer is entering Alpha development stage. I expect to roll out Alpha RC1, hopefully before this weekend.
KazeServer is a web-enabled membership management system that allows registered members of an organization to login to review their membership data and other membership related transactions or records. KazeServer is developed 100% with Ada and AWS (Ada Web Server). The application itself is a web server. No web server, e.g. Apache, is needed to run KazeServer. It is a totally stand-alone independent application with a built-in web server (AWS).
Can’t build AWS in Ubuntu
About two weeks ago, I installed Ubuntu Hardy Heron in VMware Fusion on my MacBook (running Leopard). After some playing around with Ubuntu on my MacBook, I began to install software components such as the Ada compiler so that I could do testing on my MacBook without switching to the Ubuntu box.
I am working on a web-enabled application developed with AWS (Ada Web Server). This application is developed on Mac OS X. Building and testing on mac OS X has no problem at all. To compile the source on Ubuntu, I need AWS. So, I tried to install AWS packages from Ubuntu but found only broken dependencies. Then I decided to build one myself. The build has failed because the gnat (Ada compiler) from Ubuntu is 4.2. It lacks two Ada packages, a-calfor.ad[sb] (Ada.Calendar.Formatting) and a-catizo.ad[sb] (Ada.Calendar.Time_Zones). AWS depends on these to build.
I posted to comp.lang.ada and AWS list. It looks like I have no choice but to bootstrap gnat-4.3 myself or install from Ubuntu Intrepid or wait for the next Ubuntu release of gnat-4.3.
Mathematics – The Systematic Reasoning
I remembered the way my mathematic teachers taught maths in class. Although none of them explained why we must learn maths, as it was the way supposed to be, they taught me systematic problem solving. I began to appreciate the beauty of mathematics when I started immersing myself in programming. The algorithm development and language constructs which are based on mathematics fascinate me with its beauty.
A good programming language teaches us systematic discipline and systematic reasoning. The first programming language which I learned was Commodore BASIC. I hated that. I learned half way (as the matter of fact, 2 days) and I switched to Apple Basic. In the mid 1980s, Apple II was the most popular home computer after Commodore VIC 20. Apple II that ran Apple DOS caught on the wagon very fast. The most common programming tool on Apple II was of course Apple BASIC. That was my first programming language and I had written many programs with it.
Then I was exposed to FORTRAN 77. The language construct was pretty much like Apple BASIC. I caught on with FORTRAN pretty fast. Then under some influences from friends whom I met at the computer center, I learned Apple Pascal. We challenged one another to increase the boot speed of Apple DOS. We rewrote Apple DOS with Apple Pascal and evidently increased the booting speed of Apple DOS.
Pascal is a very structured language (compared to Apple BASIC and FORTRAN 77) invented by Professor Niklaus Wirth to teach students programming and systematic reasoning. The structural construct of the language enables the programmer to think of the problem in a structural approach. Pascal cultivates structural discipline in solving programming problems. Pascal has provided me most of the necessary training in systematic discipline and systematic reasoning in solving problems.
When CP/M was introduced on Apple II, I was able to use UCSD Pascal on CP/M enabled Apple II machines. It wouldn’t be long before IBM and IBM compatibles (8086) stirred up a turmoil with MS-DOS. Then, Turbo Pascal (by Borland) emerged. Turbo Pascal was the lightest and fastest compiler at that time. I became addicted in writing computer programs with Turbo Pascal.
Then I caught on with C and C++ and began to develop software with Borland’s Turbo C/C++ compiler. When MS Windows became a de-facto standard on every desktop computers, I dwelled into Borland’s Delphi (based on Object Pascal) to develop GUI applications.
During Apple CP/M era, I was exposed to Ada. I discovered Ada compiler by accident in another computer shop. I bought the program without thinking twice. Of course, it was a pirated copy. Copyright law was not enforced then but thanks to the pirated Ada compiler, otherwise I would not know such beautiful programming language has ever existed!
In 1995, I started to learn Ada when books became available. In no time, I fell in love with Ada until today. Whenever I was told or perhaps requested to look at computer programs written in any other languages, e.g. PHP, Visual Basic, C/C++ and etc., I feel that represent an insult to mind trained in systematic reasoning as in Pascal papers which Professor Wirth wrote.
Ada and Pascal are very alike because Ada developers had adopted Pascal’s structural language construct. Both Ada and Pascal clearly represent logical expression without any difficulties. Both languages are constructed heavily based on mathematic concepts and thus enforce systematic discipline and systematic reasoning.
Looking for a web hosting provider?
Alright, you need to find a web hosting company which provides web hosting services at a price ranging from $4 to $8. And you want a detailed review of their web hosting service to ensure reliable service. Look no further, visit webhostingchoice.com for a list of web hosting providers. It is easy, quick and hassle free.
At webhostingchoice.com, you have a comparison chart of pricing, fees, disk space, transfer and rating to help you choose a web host of your choice. Click on every links to checkout the web hosts’ websites to learn more about their products and services before you jump in.
This site also includes a learning center to help you through the web hosting jargon words, hosting scams, marketing gimmicks used by web hosting providers to lure and lock in customers. The site provides comprehensive advice and FAQs to guide you selecting a web host and to avoid pitfalls and tricks.
A list of useful links and resources is also included for your convenience. You may want to sign up their newsletter for monthly updates of hosting tips, offers, coupons, interviews and etc. to keep you abreast of the web hosting business and to enjoy discounts from coupons.
Take a look before you jump!
Shoulder bursitis
I had shoulder pain since March. Initially, it began at my left shoulder after waking up one morning. The pain was not too serious until recently (for the past two weeks), I had lousy sleep. Both of my shoulders were aching and often woke me up in the middle of the night. I thought it was some kind of spraining and it would go away after good rest with less training. But it seems to self-exacerbate. The pain was getting more intense every night.
Last night, I read articles about shoulder bursitis or rotator cuff injuries and treatment. After reading these articles, I decided to give it a try. I applied Fastum gel (Ketoprofen) on both shoulders. Guess what? I had the best sleep ever since March. I woke up early this morning without any pain.
Fastum is used to relief localized pain of arthritis, rheumatism or sports injury. I should have acted earlier.
On and off, I had been doing some wauke spontaneously while I was thinking or working on some programming problems. Some kind of off-my-mind of physical activities after sitting in front of computer for too long. I guess it was the effect of banging my head on the keyboard and I lost sense of safety. Without doing proper stretching, I performed wauke with speed and force as in a counter attack situation. That could have torn my muscles or tendons on the bursa and I overlook the seriousness of the pain. How insanely I was!
Alright, now I am on Ketoprofen and I am going to apply it for the second time. Hope my shoulders will recover in a month or two.
China’s proven world class competency
During the snow hazard in China this February, the Chinese government had successfully managed the natural disaster and crisis with much professionalism in such a short period of time. According to an unconfirmed source, the Chinese government managed to develop a Disaster Management System in just 5 days. 75 software engineers from the Chinese military worked around the clock for 5 days to bring up a web based Disaster Management System to collect, manage, disseminate, coordinate, and to provide command and control to the military disaster relieve team during the recent snow hazard.
The system was developed using Ada, AWS (Ada Web Server) with a little of PHP and Perl. The system deploys a MySQL database running on Linux. The system is hooked up to air-borne SAR (Synthetic Aperture Radar) for real-time acquisition of landscaping information in snow hazard affected area to help assessing the damage of rail ways, roads, housing and forest. The Chinese army engineering company was dispatched by the system to areas in need of assistance.
I have yet to receive further details of how the system works and probably will not. Anyway, that shows the Chinese ability and responsiveness in dealing with natural disaster. Hail China!
Looking for Windows web hosting?
If you Google for “Windows web hosting”, it returns 3,260,000 or more of possible websites providing Windows base web hosting services. These web hosting company offers a wide range of hosting plans and offers. To skim through all these searches for a right plan is not an easy task and usually daunting.
WebHostingChoice.com provides you a competitive list of windows hosting plans and company. The website also provides information about scam, domains, dedicated server, and a lot more in its learning center to help you understand jargons of the web hosting. You can search or browse web hosting services by features. Perfect for beginners to learn about web hosting to avoid pitfalls that could possibly hamper your website traffic and popularity. It saves you time and money. Try it out today.
If you are running a web hosting service, you can advertise your hosting service here by submitting your web hosting company details. A great way to start your web hosting business from home and let your website and web server monetize for you!
What else? You can subscribe to WebHostingChoice.com newsletter by submitting your email address to receive up-to-date web hosting business trends and information. You will never be left behind and always ahead for the latest offerings.


Listen to my podcast