归零

September 30th, 2008 at 1:44 · Filed Under Ada, Blogging, Chinese, Days in My Life, Essay, General · 2 Comments 

读了成彪登在新华网作者文集,我对“归零”有很大的回响,也让我心中再次涌现了她的影子。读完文集,我热泪盈眶:

Read more

Ada tasking on multi-core

July 17th, 2008 at 0:37 · Filed Under Ada · 12 Comments 

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?

July 9th, 2008 at 23:46 · Filed Under Ada, At Work, Blogging, Days in My Life, Seminar · 4 Comments 

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

June 17th, 2008 at 21:25 · Filed Under Ada, At Work, Blogging, Call Me a Geek, Software Development, Web · Comment 

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.

Patched a security hole in KazeServer

June 4th, 2008 at 14:46 · Filed Under Ada, At Work, Software Development, Web · Comment 

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

June 2nd, 2008 at 22:46 · Filed Under Ada, At Work, Blogging, Days in My Life, Software Development, Web · Comment 

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

June 1st, 2008 at 22:35 · Filed Under Ada, At Work, Days in My Life, Software Development, Web · 1 Comment 

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

May 26th, 2008 at 9:44 · Filed Under Ada, Computing, Linux, Software Development · 1 Comment 

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

May 21st, 2008 at 1:50 · Filed Under Ada, Call Me a Geek, Computing, Mathematics, Pascal, Software Development · 4 Comments 

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 enable 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 won’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. There was no copyright law 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 were 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.

China’s proven world class competency

April 13th, 2008 at 13:20 · Filed Under Ada, China, Computing, Humanity, Linux, Software Development, Web · Comment 

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!

Talking to a wall

March 8th, 2008 at 1:53 · Filed Under Ada, At Work, Blogging, Conferences, Software Development · Comment 

I had two talks about Ada at MMU (February 25) and UTAR (March 5). Among the local universities I had given talk about Ada, UTAR was the only university where I had given more than 5 talks over the years. According to my previous experience at UTAR, the response from the students were quite good.

On March 5, the talk at UTAR was the worst as if I was talking to walls or stone sculptures. The students were acting very rude by ignoring my talk. They were doing their assignment at the computers instead of listening to my talk. The talk was rescheduled to another venue which was in a computer lab. Nonetheless, I wrapped up the talk quickly. I skipped many parts to take it to the end and at the end of the talk, no one had asked any questions. I asked them some questions instead and of course, they did not know to answer. Obviously, they did not pay any attention at all.

In contrary, the talk at MMU on February 25 received better responses from the students.

Ada Seminar

February 18th, 2008 at 9:27 · Filed Under Ada, Conferences · Comment 

I gave my last Ada Seminar in March 2005 at MMU Melaka. It has been 3 years since I last active in Ada and Ada projects. It will be a great pleasure to restart any Ada related activities after quite a long inactivity.

This time, I am going to give a talk about Ada at two universities. For more information about the Ada seminars, read here.

Coding War or Extinction of Human Race?

December 18th, 2007 at 16:28 · Filed Under Ada, Blogging, Call Me a Geek, Computing, Software Development · 6 Comments 

When I stumbled on this story about a software engineer and his encounter of a bug in a missile launch command and control system, I read with delight because it has been a while since I read an exciting piece of story about Ada. On the other hand, I was so nervous because our extinction might just be a string away.

The story is about a software engineer trying to maintain a 400KSLOC legacy system when the OS and compiler version were upgraded. You can read the full story here.

It is pretty exciting to read about the job of working on the legacy Ada code of such mission critical system. Why was the error occurring? What would be the consequence if the missile launch test failed? What if the missile were launched “accidentally”?

I believe, one day, the human race will extinct as was portrait in the movie Terminator. The extinction will be due to an error in a software, or rather the negligence or ignorant of a software engineer.

What the story tells us is that it appeared to be some 20 lines of code which caused the upheaval this Thanksgiving. May be it is really Thanksgiving for giving the human race another chance to survive. So, do what you want to do most, enjoy life while you can.

Leopard unleashed!

October 28th, 2007 at 22:46 · Filed Under Ada, Computing, Mac OS X, Software Development · Comment 

Apple has unleashed Leopard (Mac OS 10.5) last week. It’s an awesome operating system beating all other OS flat out! New features such as time machine, desktop space, interoperability with Apple Mail and many more.

Time Machine is a repository with version control system to keep track all the changes to your files and directories. When you plug in a FireWire hard disk, Leopard will automatically version all your files and directories onto the external hard disk. You are able to go back in time to look for a file (or directory), which you have deleted or modified, and to restore them.

Desktop Space gives you more desktop spaces to organize your works on the screen. It makes switching from task to task simple and easy with a click of the mouse.

It will be a nice upgrade but if you are developing software with Ada, unfortunately, you have to wait for a while. Ada does not come with xcode yet. The folks at MacAda is still working on a stable and working version of Ada compiler.

HOWTO - Building GtkAda project with xcode

October 7th, 2007 at 11:35 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 2 Comments 

My current project (here) requires to develop a GUI application for displaying some JPEG images. I intended to develop a native Mac OS X GUI application using Carbon or Cocoa. Since there is no Cocoa binding in Ada, I narrowed down my option to Carbon. I hit on the wall of frustration where Carbon binding on MacAda.org is very old and supports only gnat-3.3 and PPC (I hope I am not wrong on this).

I have to turn to Gtk+ which will require GtkAda and X11 on Mac OS X. I compiled my test code written for GtkAda very well on console. But when I imported the codes into xcode project, it did not compile. I got the following errors:


error: "gtk.ads" must be recompiled ("a-except.ads" has been modified)
error: "gdk.ads" must be recompiled ("a-except.ads" has been modified)
error: "glib.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-object.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-type_conversion_hooks.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada.ads" must be recompiled ("system.ads" has been modified)
error: "gtkada-bindings.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada-c.adb" must be recompiled ("system.ads" has been modified)
...

I sought help from GNAT-OSX mailing list (September 2007 archive), but there was no avail. I spent many days investigating the cause of the errors. I found out that gtkada source codes would be compiled and produced .ali and .o files in the build directory when I used gnatmake to build my GtkAda application.


$ gnatmake testproject.adb `gtkada-config`

To build a GtkAda project in xcode, follow the instructions below:

  1. In the project browser, under the Group & Files column, locate Targets and the your project name. Right click your project name and select Add Link Binary With Libraries. Select GtkAda libraries from /opt/local/lib/gtkada and necessary libraries from /opt/local/lib.
  2. Select your project name and click on the Info button. In Build tab, select Search Paths under Collection. Include /opt/local/include/gtkada in Header Search Paths. Also include /opt/local/lib and /opt/local/lib/gtkada in Library Search Paths.
  3. Select Source in your project. Select Add to Project … in Project menu. Include all the GtkAda source files in /opt/local/include/gtkada.

HOWTO - Installing gnat-4.3 on Mac OS X

October 4th, 2007 at 23:15 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 4 Comments 

Perhaps someone has written this before but it seems no where to be found. So I just write a simple HOWTO about installing gnat-4.3 on Mac OS X.

My installation is on MacBook 2.16GHz Intel Core 2 Duo running Mac OS 10.4.10 with Xcode 2.4.1. Pre-requisition is to have Xcode installed before installing gnat-4.3.

  1. Go to MacAda.org to download gnat-4.3 and other necessary tools. Launch the installation in the disk image.
  2. Make the following softlinks:
    
    $ ln -s /usr/local/ada-4.3/bin/gcc /usr/bin/gcc-4.3
    $ ln -s /usr/local/ada-4.3/bin/g++ /usr/bin/g++-4.3
    
  3. Launch gcc_select:
    
    $ sudo gcc_select 4.3
    

Adrenaline Hack

September 25th, 2007 at 14:39 · Filed Under Ada, At Home, At Work, Call Me a Geek, Computing, Days in My Life, Hacking, Mac OS X, Software Development · 4 Comments 

Wow! I’ve done it! Yes! Yes! Yes!

After a successful hack to receive a server-push JPEG stream from a video server (more story here), the next challenge for me was to display the JPEG in a GUI window.

I have been trying to get Carbon binding to work with gnat 4.3 on xcode but I am forced to abandon it for a while. I switched my target to GtkAda which will require X11 on Mac OS X. One plus side is that my application will be platform independent if I use Gtk/GtkAda. That means my application can be compiled and run on Linux, Solaris and Windows with the platform-independent GUI. More business may be and hopefully.

I was working to get GtkAda to work on my Mac since yesterday but I had corrupted some of the files I installed with Fink. Fortunately, I have a backup (actually I copied) on my MacBook but I guess I won’t need it anymore since the Gtk+2 and GtkAda are working on my Mac Mini. I will delete the copy on my MacBook later and install it with the working Gtk+/GtkAda.

I spent the entire morning and noon to write a single window, stripped down application to display the JPEG image I downloaded using the application I worked on earlier. I could not get the result. After many hours of hacking, I finally got it to work!

It is so rewarding to see it happens and I have got a good dose of adrenaline today. The feeling is difficult to describe. So it is difficult for other people to feel the excitement and the rewarding state of mind I am into.

The next challenge is to write an experimental application to continuously receive multiple streams of JPEG images and display them in multiple frames in a window, the last and toughest task with parallelism involving socket and GUI. After this, comes the serious software development by integrating all these experimental applications into a nice GUI application.

A Petition To Apple

September 14th, 2007 at 10:42 · Filed Under Ada, Cocoa, Computing, Mac OS X, Software Development · 22 Comments 

I have been on and off using Ada (gnat) on Mac OS X. The folks at MacAda.org are doing a great job. Thanks to Jim Hoppers, Andrew Reynolds, Mike Feldman and others.

It has been years since Apple rolled out Xcode, an integrated development environment. Xcode is heavily centered around Objective C and Cocoa. MacAda.org, a group of Ada enthusiasts, took on a NDA (Non Disclosure Agreement) with Apple and integrate Ada, based on gnat, into Xcode. This is very encouraging for developers who develop on Ada to switch to Mac.

I have been developing some Ada standard tools (console applications without GUI) on Mac with Xcode. I am kind of on and off of Ada on the Mac. Every each time when I come back with a project with Ada on the Mac, I will find inconsistencies and between Ada and Xcode.

The support of Ada-Carbon is really hard to follow up with. Even the MacAda’s website does not provide enough information and a proper link to the Carbon binding. The easiest way to develop a GUI application using Ada on Mac is using GtkAda. But getting GtkAda built and installed will require tremendously arduous work to build and install Gtk+ first. And running the GtkAda application will require X11 and of course Gtk+. The application will not be Mac native application.

I (and many others too) would love to see Apple really makes serious consideration to incorporate Ada into Xcode as a de facto standard. Here’s the list:

  1. Makes Ada comes with Apple’s Xcode so that there will be a consistency with every updates from Apple and not from 3rd party website such as MacAda.
  2. Enable Xcode to create Cocoa and Carbon projects with Ada bindings.
  3. Support Core Data Application project using Ada.

Any Mac Ada developers who wish to add to the list, please feel free to post your comments. Thank you!

Server-Push JPEG Stream

September 13th, 2007 at 23:46 · Filed Under Ada, Call Me a Geek, Computing, Hacking, Mac OS X, Software Development, Web · 6 Comments 

I am working on a video server project since last week. This project is to develop a client software running on Mac OS X to control a video server and to retrieve streams of JPEG images from it. And of course, I am going to develop with Ada together with AWS (Ada Web Server).

Up to this point, I am able to connect to the video server with AWS and retrieve a stream of JPEG images from the video server. I have been able to manually extract JPEG images from the stream identified by SOI (0xFFD8) and EOI (0xFFD9). But some of the images extracted from the stream are not recognized as JPEG file while some images appeared to be corrupted. I am totally puzzled by this behavior.

Could it be the size of the stream buffer (512 bytes) causing the corruption? Could it be the output of the received stream to a disk file delay the receiving process?

Here’s a snip of my Ada code:


     ...
     Data         : Ada.Streams.Stream_Element_Array (1 .. 512);
     ...
     loop
        AWS.CLient.Read_Some (Connection, Data, Offset);
        exit when Offset < Data'First or Count > 512_000;
        Ada.Streams.Stream_IO.Write (File_Handler, Data);
        Count := Count + Integer (Offset);
     end loop;
     ...

It is quite fun spending entire day hacking the server-push stream and the JPEG images. It has been a long time since my last hacking. Welcome back to the reality!

A bunch of Ada-holes talking

May 26th, 2007 at 0:40 · Filed Under Ada, At Work, Blogging, Days in My Life, Software Development · Comment 

Like last week, a bunch of “Ada-holes” meet up on every Friday midnight (MYT) to discuss about work progress and some jokes. They are Jesse (the team leader), Jeffrey, Jerrid, Chip, Mark and I. Mark and I are from the far east. Mark from Vietnam and the rest are in the U.S.

We discuss mainly on the svn commit guidelines, Ada coding standards and document formats. We have yet to choose either ODF or LyX. The discussion is fruitful and we begin to see a software development process emerging.

It is tiring but fun!

Peculiar behavior of Sed

What is Sed?

Sed is the ultimate stream editor. If that sounds strange, picture a stream flowing through a pipe. Okay, you can’t see a stream if it’s inside a pipe. That’s what I get for attempting a flowing analogy. You want literature, read James Joyce.

Anyhow, sed is a marvelous utility. Unfortunately, most people never learn its real power. The language is very simple, but the documentation is terrible. The Solaris on-line manual pages for sed are five pages long, and two of those pages describe the 34 different errors you can get. A program that spends as much space documenting the errors than it does documenting the language has a serious learning curve.

You can read more about Sed here.

My project uses a thick binding of PostgreSQL/MySQL called APQ. APQ is a project by Warren and I helped to host it at my server. See my post here. The configure and make process are not really stable which I think is due to various version of MySQL and the Linux tools such as sed.

To build APQ, first, two MySQL include files, errmsg.h and mysqld_error.h need to be parsed. These files contain MySQL error codes and they need to be parsed and translated into Ada syntax. This translated Ada code will be inserted into apq_mysql.ads.

However, this parsing and translation process are not working correctly as they supposed to be. When I look into this problem, I found a peculiar abnormality. The parser uses sed. When I built APQ on Mac OS X, FC5 and Solaris (Intel), the result in apq_mysql.ads is not consistent on these different OS.

After I upgraded to Mac OS X 10.4.9, the parser refused to work with some error messages which I think caused by sed. I was mingling with the configure script until this hour. Suddenly, something struck my mind. Why do I need to mingle with configure? The problem is the parsing and it deserves the highest priority. The build configuration does not perform a thorough check of the environment but it still works fine at this point. So, I moved my priority to write a parser in Ada to solve the parsing problem. This light shed on me at this whee hour in the morning and I was really too tire to continue working on the parser.

Scarce resources on AWS with Ajax

March 17th, 2007 at 14:04 · Filed Under Ada, Software Development, Web · Comment 

Although AWS comes with some demo codes, I find it insufficient to learn using AWS to develop an Ajax web application. Due to the scarce resources on using AWS with Ajax, I’ve been trying to understand the working mechanism between AWS and Ajax.

To build a knowledge base in myself about developing a web application using AWS and Ajax is challenging. To use AWS with Ajax, I need also to learn/use XML/Ada. I’ve played around with XML for a while, mainly hacking into data saved in XML format by some Mac OS X applications.

XML is Extensible Markup Language. This is a format used to organize text files into tags and associated set of values. XML/Ada is a collection of simple modules that provide manipulation of XML streams.

In an Ajax (or Reverse Ajax) capable web application, data streams are packaged and sent in XML format, for example:


<client_info>
   <name>Acme Corporation</name>
   <id>ACME</id>
</client_info>

A JavaScript will interpret and read the corresponding tags and associated values after the web page has received the package.

Reverse Ajax

March 17th, 2007 at 12:28 · Filed Under Ada, Software Development, Web · Comment 

Since my new job at Singo Solutions, I’ve been reading about Ajax and Reverse Ajax. My development project requires the use of Ada, AWS and Ajax to build a web application with real-time data display and better user-browser interaction. See my earlier post about Developing web applications with AWS. Ajax was a term new to me. I had not bothered to read about Ajax and JavaScript before I joined Singo Solutions.

What is Ajax? Ajax is an acronym for Asynchronous Javascript And XML. The conjunction was injected into the acronym to spice up and to make pronunciation easier. Ajax is not a technology. It is a web programming technique to develop interactive web applications using combination of technologies such as JavaScript (JS), XML, DOM and XHTML. Ajax makes the web page to exchange a small amount of data with the server behind the scene, so that the entire web page will not have to be refreshed each time the user requests a change. With this technique, information can be displayed on web page in real-time without user’s intervention or a web page reload.

What is Reverse Ajax? Reverse Ajax is just different from Ajax, as reverse Ajax is a compounding technologies for pushing data from a server to a client. These technologies include COMET or PiggyBack and Polling, and, of course, Ajax.

Ajax keeps alive a connection between a server and a client and send data to the client. In another words, the server will contact the client when data need to be sent (without Ajax, the client will have to contact the server in order the data can be sent from the server to the client). The problem is that some web servers can’t easily contact web browsers. One thing for sure, the firewalls will get in the way.

Comet, or long-lived http or slow load technique, keeps the communication between a server and a client open. This technique actually have a client to send a request to the server and also allows the server starts replying to the request, slowly, extremely slowly but the reply actually never finish. This permits the server to keep the communications channel open to pass down additional information when the time comes. The closest comparison to this technique is server push.

Reverse Ajax makes the browser to send requests in the background to the server and receive responses/data from the server without the intervention of user.

To use both Ajax and Reverse Ajax, I need to use JS in web templates although the web application (server) is developed with Ada and AWS. I am starting a love/hate relationship with JS.

Developing web applications with AWS

February 24th, 2007 at 15:20 · Filed Under Ada, Software Development, Web · 1 Comment 

What is AWS? AWS or Ada Web Server is a complete web application framework written completely in Ada and allows development of application with an embedded web server. The application is self-contained with an embedded server. That means, the application is also a web application that can be controlled and manipulated using any web browsers on any clients that connect to it. And more, you don’t need any web server like Apache anymore.

My current job involving developing a web application using Ada and AWS only and there will be Ajax using server push technology in AWS. I was developing some web applications using AdaCGI. One drawback about using AdaCGI is that if there is a minor format changes in the html code, the entire application needs to be re-compiled again.

I was not totally familiar with AWS before I joined the US-based company but I was familiar already working with mails using AWS with the SMTP and POP protocol. I am beginning to understand the mechanism of the http protocol in AWS and I hope to write about this with more details in near future. I am beginning to love this job already and I believe I will be busy in the mud hole mingling with Ada, AWS and Ajax.

A tribute to Jean Ichbiah

January 27th, 2007 at 23:39 · Filed Under Ada · 2 Comments 

Jean Ichbiah? Who is he?

Jean David Ichbiah was born March 25, 1940. He was the chief designer of the Ada programming language from 1977-1983. During that time, he worked as a member of the Programming Research division at CII-Honey Bull (CII-HB) at Louveciennes, France. He had been chairman of Simula User’s Group and was one of the founding member of IFIP WG 2.4 on System Implementation Language.

CII-HB’s proposal won the US DoD (Department of Defense) contract to design a new programming language. After Ada was selected, he left CII-HB and founded Alsys Corporation in La Celle-Saint-Cloud which continued language definition work on Ada and later went into the Ada compiler business. Alsys first released a PC version of Ada compiler in 1983 making Ada compiler more affordable in PC programming. Ichbiah later moved into the Waltham, Massachusetts subsidiary of Alsys.

Ichbiah later started the Textware company, which sells text entry software for PDA and tablet PCs as well as text entry software for medical transcription on PCs.

Jean Ichbiah was a member of the France Legion of Honor and the French Academy of Sciences and received a Certificate of Distinguished Service from the DoD for his work on Ada.

He died of complications of brain tumor and a fall, on January 26 2007.

APQ and AdaVox

November 11th, 2006 at 15:27 · Filed Under Ada, Computing, Software Development · 2 Comments 

I’ve assumed the hosting of APQ and AdaVox from their creator, Warren W. Gay. Warren is an old friend from CLA who seek help to host his projects due to his limited web space and he is no longer writing software.

Both APQ and AdaVox can be found by following the link in my Projects page. Anyone who wish to contribute patches and maintaining the code, please contact me.

Warren, if you’re reading this, enjoy your new found interest and all the best to you.

Pluto is fully operational

September 17th, 2006 at 20:25 · Filed Under Ada, Call Me a Geek, Computing, Mac OS X, Software Development · Comment 

Finally, I’ve installed the two last components I required to work with, Xcode 2.4 and gnat 4.2 (Ada compiler). The Mac Mini comes with Xcode 2.2.1 so I have to download 958MB of file to install Xcode 2.4.

Pluto is fully armed and ready for real actions.

ANNOUNCE: AdrianHoe.com provide web-based applications development

August 17th, 2006 at 8:47 · Filed Under Ada, Business, Computing, Mac OS X, Software Development · Comment 

Today, AdrianHoe.com together with AdaStar Informatics announced to provide web-based application development.

Using reliable software technology, the development team develops mission critical web-based applications. Depending on the requirement, MySQL or MaxDB will be used as the database backend. The core technology is not Java, C#, or anything else. Ada is the only core implementation vehicle with tiny pieces in PHP.

A pilot project has been under development since June and is the first of its kind for AdrianHoe.com. The software is a mission-critical web application aiming to provide on-line registration and management of contestants in a sporting event. The final implementation date will be in 2009/2010.

The development is targeted to Mac OS X platforms for its reliability and robustness. There is no plan at this moment to target Linux or other Unix.

Shooting Yourself In The Foot - A Humorous Approach In Comparing Ada To Other Programming Languages

August 4th, 2006 at 11:17 · Filed Under Ada, Computing, Software Development · 1 Comment 

The author of this humorous comparison is unknown. I think it is a fun way to compare programming languages. I hope you will enjoy reading it.

Shooting Yourself in the Foot

The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you’re currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas.

C: You shoot yourself in the foot.

C++: You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can’t tell which are bitwise copies and which are just pointing at others and saying, “That’s me, over there.”

FORTRAN: You shoot yourself in each toe, iteratively, until you run out of toes, than you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling ability.

Modula2: After realizing that you can’t actually accomplish anything in this language, you shoot yourself in the head.

COBOL: Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER. on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.

LISP: You shoot yourself in the appendage which holds the gun with
which you shoot yourself in the appendage which holds the gun with
which you shoot yourself in the appendage which holds the gun with
which you shoot yourself in the appendage which holds the gun with
which you shoot yourself in the appendage which holds ….

BASIC: Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.

FORTH: Foot in yourself shoot.

APL: You shoot yourself in the foot, then spend all day figuring out how to do it fewer characters.

Pascal: The compiler won’t let you shoot yourself in the foot.

SNOBOL: If you succeed, shoot yourself in the left foot. If you fail, shoot yourself in the right foot.

Concurrent Euclid: You shoot yourself in somebody else’s foot.

HyperTalk: Put the first bullet of the gun into foot left of leg of you. Answer the result.

Motif: You spend days writing a UIL description of your foot, the trajectory, the bullet, and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams.

Unix: % ls foot.c foot.h foot.o toe.c toe.o % rm *.o rm:.o: No such file or directory % ls %

Paradox: Not only can you shoot yourself in the foot, your users can too.

Revelation: You’ll be able to shoot yourself in the foot just as soon as you figure out what all these bullets are for.

Visual Basic: You’ll shoot yourself in the foot, but you’ll have so much fun doing it that you won’t care.

Prolog: You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn’t allow it to explain.

370 JCL: You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.

Ada: After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type. Generally speaking, Ada will not allow such foolish attempts in safe mode. And if you do shoot your own foot, the ambulance is already on its way.

Assembly: You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot.

I took the liberty to add the last 2 sentences in Ada.

Ada UK Conference 2006 Goodies

July 15th, 2006 at 0:02 · Filed Under Ada, Conferences, Software Development, Technology · Comment 

I found some goodies about Ada 2005 here. If you are interested to learn about Ada, it is certainly worth peeping.

Next Page »