Friday, October 18, 2024

Beyond BASIC: SheerPower 4GL

There are so many programming languages out there, it’s almost impossible to count them without digital help – and that’s not a reference to fingers. A quick browse in a bookstore can easily overwhelm even an intermediate programmer.

When a new language comes out, it’s a difficult birthing process. The language must take its first breaths in full public view, amongst cynics and idealists. This is a trying period; there are competing languages already out there and in use, and it’s difficult for a new language to find a place. All too often, YAPLs (Yet Another Programming Language) are released and dwindle into nothingness.

Without giving too much away about SheerPower, it can be said at this point that this is not just another YAPL. It fills some niches that exist already, and may fill niches that this reviewer is too short sighted to see immediately.

Getting Started

The system requirements aren’t openly defined, but it’s assumed the minimum requirements of Windows 98 must be met, since the platforms supported are Windows 98, Windows ME, Windows 2000, Windows XP, and Windows NT. For those uncertain of the minimum hardware requirements of Windows 98, the applicable requirements are:

(1) a 486DX 66 MHz or faster processor
(2) 16 megabytes (MB) of memory (24 MB recommended)
(3) VGA or higher resolution (16-bit or 24-bit color SVGA recommended)
The size of the installation on a FAT-32 disk is 6.54 megabytes.

For the review, a Windows 2000 system, Service Pack 3, was used for development and testing. The hardware consisted of an AMD Athlon XP 2200+ and 1 Gigabyte of RAM – a machine used specifically for development, and hardly one that tests the lower limits.

SheerPower 4GL was a pleasant surprise in many ways. It was a short download for the developer version – only 3 megabytes (it makes broadband access a bonus – not a necessity). The manual, too, was an approximate 3-megabyte download, and is well worth it – though unnecessary to get started.

Without opening the manual, it was possible to intuitively open the development environment and run the sample applications. The development environment gained a lot of usability points here: It eases new users into the language so seductively that the code leaps out and begs to be understood. The code is more of the same.

As an objective reviewer, it was impossible for me to find a flaw in the installation and running of the sample applications even without the manual. This is nothing short of excellent work on the part of Touch Technologies, Inc., and certainly made the rest of the review easy.

The Language

The SheerPower 4GL website says that SheerPower 4GL is beyond BASIC, and that’s quite accurate. It’s as intuitive as BASIC – even without the manual. At times I thought I was looking at well-documented BASIC code, or C code, and sometimes both.

From a developer perspective, the code looks not only easy to read and write, it looks even easier to maintain. The IDE seemed to become invisible when editing. To be fair, this reviewer has a fair amount of development experience in a variety of languages – but to compare this language to another language almost seems an injustice.

It is important to note that this isn’t an object-oriented language here – it’s a structured programming language, much like BASIC. One can easily access all the functionality one would normally do within Visual Basic 6.0 without tangling with the objects, which is a plus for rapid development. To be fair, this functionality wasn’t tested thoroughly for the review, but what was seen indicated this.

After playing with the sample applications for a bit, and seeing how they worked – approximately 1 hour – I opened the manual to find that there was so much more. Debug switches, exception handling, and Compilation options (the latter available with purchase of a license so that you may hide your source code).

Basic data types are separated into Strings (up to 12 million characters), 32 bit Integers, and Real numbers. The real treasures here are the Real Numbers.

The Real Numbers allow 18 digits to the left of the decimal point – and 16 digits to the right of the decimal point – the largest possible number within this type is:

999999999999999999.9999999999999999.

What is most impressive about this is the patent pending “exact math” that is used – which avoids penny rounding. The sample application ‘Precision’ that comes with the development environment demonstrates this well, and prompted me to try the same application in C++. The folks at Touch Technologies, Inc., made their point quite well. Maybe the reader’s results will vary – try and find out. The sample code in SheerPower 4GL looks like this:

n = 301.84 – 301
if (n = .84) then
print ‘Perfect Precision’
else
print ‘Not quite right’
end if

x = 0
for i = 0 to 1000
x = x + 0.01
next i
z = 10.082 – 0.072
if (x = z) then
print ‘Perfect Precision’
else
print ‘Not quite right’
end if

For engineering, scientific, mathematical and financial applications – the precision mathematical ability is a huge boon (http://www.sp4gl.com/index_perfect.htmlx).

Overall – if you can write BASIC code, you can write SheerPower 4GL code. In fact, it’s probably easier for experienced developers to write code since the language itself has been streamlined to the point where it’s not your father’s BASIC. This is new, more functional, and possibly more intuitive.

What adds to this is the fact that there are Coding Standards for the language already developed, and available in Appendix A of the downloadable manual.

Database Support

The database functionality is bragged of on the site, and deservedly so. Though the sample applications provided did not include a database example, it did not take long to generate one based on the examples in the manual. Time constraints didn’t allow the reviewer to stress test this code, which is a bit of a disappointment, and will have to be remedied. To be frank, the database support deserves it’s own article. Anything less would be a disservice to the developers of this language.

Portability

A quick email test with a few friends showed that they had no problems simply downloading the virtual machine allowed me to send them working applications. Of course, this was a simple menu program I adapted from the given example in the manual, but the response was good – and a 2-megabyte download didn’t seem to bother anyone I sent it to. I wouldn’t be surprised if at least one of the developers I sent it to downloaded the complete development package after sniffing the code.

Of course, this meant using the Deploy functionality of the development environment – which let me deploy the application to my guinea pigs with relative ease.

Unfortunately, I couldn’t send it to my Linux or Mac friends – Windows only, and Windows 98 and above only.

Strengths

This language – and product – can be of serious benefit to applications that are used for financial, engineering, mathematical and some scientific applications. The mathematical precision demonstrated by SheerPower 4GL had me looking for a price tag under it.

The speed of development is apparent, as is the maintainability of the code. Any language that is this readable and flexible can suffer because there are so many ways to do the same thing. This does not seem to be the case with this language, and its basis in BASIC may well be why this is. Whatever it is, it works.

The development environment is intuitive, and becomes transparent quickly. In time, this may change as more is done with the language. It was refreshing not to have to poke around the development environment to see what things did. One can quickly focus on code, and when using a new tool, that’s very important.

Portability across all Windows platforms, from Windows 98 up, is something that few languages can boast of. In enterprise development, this translates to rapid development and deployment throughout the organization. Though this functionality was not fully tested in the review, the capacity of the language to do this is notable. Real world testing is something that is being done right now, since it’s a free download. When they say on their site that they do want your feedback, they mean it – email support is there, and quick. A sneaky test through a cohort revealed this, and showed how seriously Touch Technologies, Inc., takes this product.

This portability across platforms is further facilitated by the small size of the virtual machine.

Database support functionality, is strong and customizable. Stress testing was not done, so this is not a quantitative assessment – it is qualitative.

The documentation on this language was unbelievably straightforward, and easy to find in the PDF manual available for download. There’s also online help, which is a mirror image of the PDF. Touch Technologies, Inc. really put some effort into the documentation, and it shows. It’s impossible to do it enough justice in this simple review.

Weaknesses

It’s important to note, especially in this section, that every programming language has a balance of strengths and weaknesses; it’s par for the course in the design of any language. The rest of this statement will be left for the conclusion.

The language seems to be limited to the Windows platforms, which can be a big issue for those industries that are moving – or have moved – to Linux. If it were available on Linux and the Macintosh, SheerPower 4GL would be even more of a force to be reckoned with. Though there has been no communication with Touch Technologies, Inc. on this, it seems that they are thinking in that direction with the use of their Virtual Machine.

SheerPower 4GL is not object oriented. This, in itself, is not really a weakness but some may see it that way. In an age where Object Oriented development is in it’s prime, that can be a negative for larger projects. It could be argued that the virtual machine encapsulates object-oriented ability in some fashions, though during this relatively short review it was not possible to test.

The deployment feature, though nice, would probably be nicer if the virtual machine could be packaged with the deployed product. This can be done manually, and is not that much of an issue. However, the developer must remember to send the virtual machine if it is not already installed on the computer on which the application(s) are to run.

Conclusions

SheerPower 4GL does not compare well to any language that I have used. Period.

For portability and speed, it could compare to Sun’s Java and Microsoft’s .Net, though it’s present limit to the Windows platforms may be temporary. The small download needed by users to run the virtual machine balances this out well (for those running Windows 98 and above). This, too, is an unfair comparison, since SheerPower 4GL does not make a bid at Web Services in an age where nobody seems to be quite sure what Web Services are. That does not mean it isn’t capable of Web Services.

For development speed, two languages immediately come to mind – Perl and Visual Basic (two languages which rarely are seen in the same sentence!).

Speed of development would probably depend on the project. Larger projects may benefit from an object-oriented approach – large being an Operating System, or a full suite of applications that interact with one another. SheerPower 4GL does not seem to be designed for this sort of development, so saying that it is inferior because of that would be highly inaccurate. Furthermore, it would be possible to develop such applications with SheerPower 4GL; it would simply require the developer(s) to avoid approaching it as an object-oriented application.

In the same token, it does appear to be strongly suited to small to medium sized applications that require mathematical precision and/or string handling ability across an enterprise. Once again, it seems wrong to limit the language to this, but there is no doubt in the reviewer’s mind that it’s capable.

Due to constraints, this review is hardly complete. In a way, it’s an injustice to the language, and the only thing that I can say is: Download it and try it (http://www.name-keeper.com/cwad/cwad.nkscript?sp4_download.html).

I think you’ll be pleasantly surprised.

Located in Trinidad and Tobago, Taran Rampersad does international
consultation work related to Software Development and related processes. He is also is a Free Software and
Open Source (FOSS) advocate, and is a presenter at the FLOS Caribbean
conference (http://www.floscaribbean.org). As a developer and writer, he
is well informed on FOSS and its positive impact economically and
philosophically, as well as in process.
His website is http://www.knowprose.com.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles