Sunday, November 16, 2008

Programming treminology

Some useful terms that a developer should know:

Deprecate APIs:

  1. How and When To Deprecate APIs
  2. Definition in Java Glossary

Wednesday, August 6, 2008

Usability in Apache web server

The term Usability is used to reflect the friendliness and ease of use of a system. We are as developers have to give more attention to it. Many smart systems were forgotten because they did not take care of several usability factors such as ease of use, ease of remembering, ease of learning and task support.

We are as developers use each others code and integrate each others systems. This makes us as users of each others work and we need to put more attention to such systems' usability.

Apache web server is an example of a system that is used widely in the open source community. Installing it and configuring it is far from being friendly or usable. I am saying because I suffered from many hours of frustration trying to trace the cause of Apache failure after adding new virtual site. It turned in the end a spelling mistake in the path to the log directory!

The story started by installing Apache on Windows XP, by following a grate tutorial from http://wamp.corephp.co.uk/step_01.php. The pain started when I edited a configuration file (httpd-vhosts.conf) to add a new virtual site and I had to restart Apache to see the effects of my changes. I used Apache Monitor to start it and it wouldn't start.




I got the following error message as shown in figure #1.


Trying to start the server from "Services" did not help at all. See Figure #2.

The requested operationhas failed
Figure # 1

Figure#2



I tried starting it from the command prompt by calling "httpd.exe", which means "apache.exe"!!! With no luck, it was closing silently. All what I was looking for is a descriptive messages about what went wrong. After several trials and searching the web, I found an indirect clue in Apache web site (http://httpd.apache.org/docs/2.0/platform/windows.html). It pointed me to an error log file named (error.log) inside Apache installation folder. There I found the devil;

(OS 3)The system cannot find the path specified. : httpd.exe: could not open error log file D:/www/ittrade.dev/log/error_log.txt.Unable to open logs

The path to log folder of my site has spelling mistake, it is

D:/www/ittrade.dev/log/error_log.txt in the configuration file while it was D:/www/ittrade.dev/logs/error_log.txt in the folder structure!!!

I am just wondering why it is made in this way? Was it difficult to show this error message to the standard output instead of all the silly messages showed in figures 1 & 2 or even worse when the httpd closed silently without any hint? Was it difficult to put another option to httpd that says dump/show error message(s) to the screen? Although it want be that helpful if the user has to go that far.
I believe if the developers of Apache have paid more attention to usability their job will be very much more appreciated that just pumping a system with more functionality, that many want use at all.

Wednesday, October 24, 2007

Mustang and Java

I read in one of Java web sites this name “Mustang” and I said to my self; Oh not, is it another framework?

And I started “google” to find out what does it mean. After some effort between dictionaries and definitions I found a clue in Wiwkipdia, http://en.wikipedia.org/wiki/Mustang, which lead me to Suns' web site for the full description.

Sun team used to give every Java Development Kit JDK a number. It is started from JDK1.0 and in the time of writing this comment it is Java 1.6 or 6. Furthermore, there is another name and know as code name, I prefer to call it a nick name, and Java 1.6 nick name is Mustang.

For more information about Sun naming for other Java releases consult this link http://en.wikipedia.org/wiki/Java_version_history from Wiwkipdia web site.

Talking with the hardware in Java

I am missing to know how to talking with the hardware in Java, such as sending/receiving a stream of data to/from a device.

I had a university project about service oriented architecture, where a mobile device (Java enabled mobile phone or PDA) needs to interacts with a PC.

There must be a way to achieve that, but I could not find any sample code / help on the Net.

Some has suggested using the windows APIs and JNI. First of all I do not how to do that and I am not convinced that it is the only way!

It is hard to understand this short-coming in Java API.

Thanks in advance to anyone who may post useful solution or suggestion. Even a link to a solution will be much appreciated.