May 22, 2008

Delphi is a very useful tool (with case study)

I've been working with Borland Delphi since 1996, when 2.0 was shiny new. Before that time I've been more or less formally taught Pascal and Delphi seemed a very welcome tool. And it still does, after 12 years. Strange thing is, whenever I mention using Delphi now, eyes are often rolled and "but it's not .NET" sounds. Know what ? I don't care about .NET. Pragmatically speaking, what matters is the product.

The very reason for this post is that the most recent GUI application that I've written was officially released a few days ago, and it is in Delphi. What's special about this particular application is that it comes really close to the ever sought perfect "one button" program. Ease of use was the major goal and what our group managed to produce you can see for yourself here:

Internetbank installer (in Russian!)

To give you the idea what it is for, it is a program to initiate access to remote banking web site for the bank of Severnaya kazna, which I happen to be working for right now. A client clicks the button, browser pops up and the client is brought to from where he can manage his cards, accounts, transfers, payments etc.

Looks simple, except that before you can enter, you need to have started a cryptographically protected HTTP proxy server and provided with it a key, which is used for putting legally valid digital signatures under all your payments.

And that encryption key needs to be have been generated before. And the key expires and needs to be extended remotely. And CA certificates (the bank runs its own certification authority) also expire and need to be replaced remotely. And the user may have multiple keys to choose from.

And there might be problems with Internet access and the user needs a clear and concise yet technical enough diagnostics.

And it should run without installation from a removable drive with very restricted rights. And it should not require any runtime installation, such as .NET, but it must run on Windows 98.

And it must be remotely updatable.

And it must be simple to be usable by the most average Joe.

The result is the program works and really has just one button, which is also big and pretty. There is no confusion as to what to do next, because most of the time the user is simply not given any choice at all, clicking the only button starts the only process (of entering the protected web-site).

In a rare case when a user has to initiate some other process, such as generating a new key, the reasons for that are clearly explained right there on the program's face. Hints and careful label wording help at least those users who can and actually are reading.

Looking back I realize that the only reason why such a simple solution appeared is three years of refining the procedure. During last three years our customers had to use different software, clumsy and inconvenient (despite being also written by me). But in three years we learned all the moves and most of the problems. And then a strategic decision was made and we trashed the old software and rolled out the new one. And I like what we did.

Anyhow, returning to Delphi.

I'm using it for what it does best - pretty GUI with access to OS services or 3rd party libraries. Skin support (as well as good taste) makes programs really good looking. Being pretty is a major advantage for end-user software. Positive emotional reaction would actually help the user to deal with it.

Aside from that, Delphi programs don't require any *cough* runtime platform but run on Windows 98. And Delphi produces reasonably lightweight executables. And you don't need administrative rights to run them. And I like it.

Great stuff.

May 18, 2008

Just in: the benefits of compiling into platform-independent byte code

After the existence of Pascal became known (in 1974), several people asked us for assistance in implementing Pascal on various other machines [...] Thereupon we decided to provide a compiler version that would generate code for a machine of our own design. This code later became known as P-code. [...] Had we possessed the wisdom to foresee the dimension of this movement, we would have put more effort and care into designing and documenting P-code.

-- Niklaus Wirth, 1985

May 13, 2008

Just in: the only way to reliability is through simplicity and that can't be bought

Almost anything in software can be implemented, sold, and even used given enough determination. There is nothing a mere scientist can say that will stand against the flood of a hundred million dollars. But there is one quality that cannot be purchased in this way - and that is reliability. The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay.

-- C.A.R. Hoare, 1981

О самописных программах

There is a Russian word "самописный" [səmopisni], literally meaning - "written by oneself". The word has a strong disparaging tone in it and is typically used to describe the low quality software written by one's colleagues (or even oneself), as opposed to the high quality truly industrial commercial software written by people somewhere else, even better if purchased for a huge chunk of money.

The mere existence of such word and the attitude of programmers who use it in derogative way is totally beyond me. The programmers who don't appreciate and value the work they do, how good a software they really write ? Moreover, how can they evaluate the quality of somebody else's work if they despise their own ? Besides, the absurdity of the situation is in that all the programs are really of this sort as someone has ultimately written them.

A concluding quote from a nobleman:

Clearly IBM and MIT must be possessed of some secret of successful software design and implementation whose nature I could not even begin to guess at. It was only later that they realized they could not either.

-- C.A.R. Hoare, 1981

May 11, 2008

Just in: choose your language carefully

I have regarded it as the highest goal of programming language design to enable good ideas to be elegantly expressed.

-- C.A.R. Hoare, 1981

Language designers also have an obligation to provide languages that encourage good style, since we all know that style is strongly influenced by the language in which it is expressed.

-- Donald Knuth, 1974

I have the feeling that one of the most important aspects of any computing tool is its influence on the thinking habits of those who try to use it.

-- E.W.Dijkstra, 1972

Just in: permanently low quality of software

I feel that all too often we have been satisfied with such a low level of quality that we have done ourselves harm in the process. We seem not to be able to use the machine, which we all believe is a very powerful tool for manipulating and transforming information, to do our own tasks in this very field.

-- R. W. Hamming, 1969

May 06, 2008

Just in: debugging is unnecessary

If you want more effective programmers, you will discover that they should not waste their time debugging - they should not introduce the bugs to start with.

-- E.W.Dijkstra, 1972

May 05, 2008

Just in: reusability as a central problem

Perhaps the central problem we face in all of computer science is how we are to get to the situation where we build on top of the work of others rather than redoing so much of it in a trivially different way.

-- R. W. Hamming, 1969

May 03, 2008

Just in: no adequate programming teaching

To parody our current methods of teaching programming, we give beginners a grammar and a dictionary and tell them that they are now great writers. [...] As a result, few programmers write in flowing poetry; most write in halting prose.

-- R. W. Hamming, 1969

May 02, 2008

Just in: domain-specific languages

We have, in fact, two languages, one inside the other; an outer language that is concerned with the flow of control, and an inner language which operates on data. There might be a case for having a standard outer language - or a small number to choose from - and a number of inner languages which could be, as it were, plugged in. If necessary, in order to meet special circumstances, a new inner language could be constructed; when plugged in, it would benefit from the power provided by the outer language in the matter of organizing the flow of control.

-- Maurice V. Wilkes, 1967

May 01, 2008

Just in: standardization

I am sorry when I hear well-meaning people suggest that the time has come to standardize on one or two languages. We need temporary standards, it is true, to guide us on our way, but we must not expect to reach stability for some time yet.

-- Maurice V. Wilkes, 1967