Q: Cian, if I take my oldest Alpha Software manual off the shelf and turn to the credits page, I will find your name. You have been with Alpha Software for quite some time now. Can you tell us how long?

My first project with Alpha was AlphaWorks which was released in 1988, So I have been involved with Alpha for close to 15 years.

Q: How did you and Alpha Software come together?

I grew up around Ithaca, New York. I eventually ended up working for an Ithaca based software company called Electric Software, which exclusively licensed electric desk to Alpha Software (and which later became known as AlphaWorks).

Q: Can you tell us how you first got involved in software development?

My first experience with programming was in high school with an Apple II. First I learned the basic interpreter, then I proceeded to learn how to program in assembly language. My main interest then was writing games. Programming remained just a hobby until I started work with an Electrical contractor maintaining their network of 3B1 workstations. I then learned to program in-house database applications in C with an ISAM manager called C-Tree. So, my first job involved developing databases.

Q: Selwyn Rabins, co-owner of Alpha Software Inc., introduced you at the last Alpha Five Developers Conference as being 'absolutely incredible with the C language' or words to that effect. My impression is that you are the main 'behind the scenes guy', coding in C/C++ to make Alpha Four and Alpha Five jump through hoops. Would that assessment be correct?

Yes, I maintain most of the C/C++ code.

Q: Can you tell us a little about the environment you work in while developing Alpha Five, ie: I understand that you are networked via a WAN to the other Alpha developers and Alpha Software's Headquarters.

I do builds on machines at Alpha from my home office. I have several net meetings a day, including, on occasion, remotely debugging Alpha Five on machines at Alpha Software Inc. headquarters, if I cannot reproduce the problem here. It really is like being there. I don't know what I would do without the internet.

Q: What kind of computers and operating systems do you have up and running to test, debug, and evaluate Alpha Five as you work?

I have pretty much everything: Windows NT 4.0, Windows 2000 , Windows XP , Windows 98, Windows Millennium. I have everything from Pentium II through Pentium 4, Celerons, and even an AMD based machine.

Q: Do you have a favorite Windows version?

Currently XP is my favorite and here is why. I have always liked NT based windows and hated Win9X, but windows9X continued to live on. Windows 2000 was supposed to be the NT branch that represented the end of the line for Win9X, but then Millenium comes out. Now I think that XP actually stands a chance of NT overtaking Win9X, especially since most of the new PC's I see are XP based.

Q: I understand that Alpha Five is coded in C and C++, with many of the new enhancements being added via Xbasic and its extension, Xdialog. You are the developer of Xbasic, are you not?

Alpha Five is coded mostly in C, although lots of the new code is written in C++. The original author of XBasic was Doug Ross who developed Xbasic in version 1.0 of Alpha Five. I have been developing and extending Xbasic since version 2.0 of Alpha Five. I completely rewrote the expression parser and have added lots of new language constructs and capabilities.

This gets into another area I would like to talk about - languages, and in particular appropriateness of a computer language to the task. While C/C++ work well for lots of tasks, and for some tasks are the best way to go, there are many times when a task is better solved in an interpreted language like Xbasic. This realization, that we could use our own language to implement much of Alpha Five, has led to great productivity gains.

Q: When you speak of productivity gains, I know that much of the new UI (User Interface) features of version 5 are being developed with Xdialog, as well as many of the Alpha Five WAS features, but are there other areas where Xbasic is playing a major role in extending Alpha Five?

More than anything else, the gains have been in the UI (User Interface), but the UI is a really big part of ALPHA FIVE. In fact, I believe that people buy ALPHA FIVE because of its UI. We are planning to rewrite the field rules in Xbasic, which should allow for easy extension of the field rules (read field rules that are more specific to solving specific Alpha Five developer problems), but this is a focus of version 6.0. Eventually it is our goal to make persistent storage of forms, browses, and reports, Xbasic scripts. But that again is a focus of version 6.0.

Q: In a recent interview with Selwyn Rabins, we spoke quite a bit about Xbasic and Xdialog, and I have been busy trying to get up to speed with Xdialog. Xdialog has an incredibly concise syntax, composed of some 'special' symbols, ie: such as #,^,{},[], etc. It is almost unbelievable what can be done with a few lines of Xdialog code. Is the Xdialog syntax patterned after another language, and can you tell us why you approached the syntax this way?

The Xdialog syntax actually fell out of how we wrote user interface changes. Since I am remote, and email has been the most convenient form of communication, when Selwyn requested a new dialog box or a change to an existing one, I would first send him an ASCII representation of what the dialog would look like. To denote buttons, I used <> characters, and I enclosed field controls in [] characters. The mono spaced character 'pictures' of dialogs would look enough like the dialog box that a couple emails back and forth could hash out how a dialog would look before I sat down to code it in C. It is these 'pictures' that became the basis for the Xdialog syntax, which originally only supported buttons and fields. Combo boxes, list boxes, tree controls, conditional areas, and tabs, all came later, and broke with the faux 'WYSIWYG' nature of the initial syntax in the interest of supporting more complex controls.

One aspect of Xdialog that I really like is the fact that you can do a lot without writing a line of event handling code - population is automatic - and control enabled expressions can be done without events. I have always preferred offering users a passive programming approach (like a spreadsheet) to an approach that requires users to think about trapping events.

Q: Cian, can you explain what you mean by 'passive programming approach'?

By passive, I mean that the application developer can describe what the relation between data is without having to concern themselves with how it is maintained. Here is an example. An application developer wants to have a field whose value is the sum of two other fields. They define a calculated field for this whose expression is the sum of the two other fields. The application developer doesn't care about all the events that can lead to the field's value changing, i.e. one of the fields being edited, or a new record being navigated to, just that the value in the calculated field is always accurate with respect to the fields it depends on.

Q: Xbasic is a scripting language, so I would assume that much of your work involves the Xbasic interpreter. What kind of process goes on when Xbasic is interpreted, ie: is it interpreted into C code, then executed?

Xbasic expressions are converted internally to something called a RP-stack. RP stands for 'reverse polish' notation. RP is the model for languages, such as Forth, and Postscript, and is used by spreadsheets to store their formulas. The RP stack is simply a list of function pointers, so, while not being 'compiled' as a C program would be, it is very efficient.

Q: Is RP different in concept from Visual Basic and its 'P' code or Java's 'byte' code?

The RP is very similar to byte code. In fact most P-Code and byte code uses RP to order operations.

Q: Alpha Five version 5 now has support for ActiveX objects. Can you tell us a little about ActiveX and how it relates to Alpha Five?

First, I would like to comment on our ActiveX support in Alpha Five. Version 5.0 represents our first foray into ActiveX support and has a number of rough edges. First, constant and enumeration support is completely missing, requiring the programmer to use constants. The workaround is to hard-code the values, which is always a bad idea since it leads to difficulty in reading, maintain and possibly coding. Second, I find our Auto-complete support to be lacking as well. In version 5.0 it only worked from the interactive window. Fortunately, we are addressing all these shortcomings in version 5.1. We believe that solid ActiveX support is critical to Alpha Five. We are using ActiveX Xbasic code in our own addins to link to third party libraries and controls.

Q: There is a vast amount of 3rd party ActiveX controls available. How much of these should work 'out of the box' with Alpha Five version 5?

While I would like to say 99.9%, it is probably closer to 50% when you start using all the features. Even though all ActiveX controls can be inserted, we have found problems with using certain features of ActiveX. Version 5.1 has a number of fixes (in particular, support for user defined types). Adding ActiveX support has been an iterative process.

Q: Alpha Five version 5 supports the new Addin technology. This will allow the savvy end user or developer to add in custom functionality to Alpha Five. Can you explain how this is different from just creating a Xbasic script to add the functionality, and how do you see the Addin capabilities being used by the Alpha community?

It is my hope that our users will build on top of our Addin technology. The advantage of Addins is that it can be available for every database the user opens that is integrated into the UI. The first application that comes to mind is Bill Parker's new documenter for Alpha Five. But I see the potential for all sorts of a new tools to make building specific applications and scripts easier. Here are some examples of what addins could provide:

  1. An Alpha Five user creates a script that converts an arbitrary table to an XML data file. By converting the script to an addin they can add the option to the table context menu. This allows the user to convert any table to an XML file simply by selecting a Menu Item.
  2. An Alpha Five user writes an addin that generates an Xdialog script that simulates the functionality of cardstacks without any programming. The addin exists on the code page context menu.
Q: How is the speed of interpreted Xbasic compared to C code?

C/C++ is still considerably quicker, but Xbasic has the advantage of generally being smaller as well as easier and safer to write. Also, with machines as quick as they are now, the difference for most small operations is barely noticeable. This is particularly the case with UI code. If something needs to be faster than an Xbasic script using more primitive functions can provide, we write a high-level function in C that does the task. To give an example, for version 5.1 I added a high level function that copies a stream of data between a socket and a file. This meant that I could replace an Xbasic loop with a function call and get 10 times the performance on the version 5.1 FTP client object.

Q: A built-in FTP client, the new beta Alpha Five Web Application Server, the built-in Email client, NetMailer coming soon, it appears that Alpha Five in a very short time has gone from a desktop database environment to the distributed environment of the internet. Can you share with us some of the potential you see for Alpha Five users with all these new capabilities?

I Think that Alpha Five Web Application Server will greatly benefit those people who want a client/server version of Alpha Five before version 6.0 becomes available. I believe that we will be able to support around 90% of the functionality of existing Alpha Five applications. I believe that applications will need some tuning, but that folks should be able to keep all of the data utilities and reports and most of the forms/browses and scripts when moving their applications to the web. Folks who have been jumping through hoops by doing such things as hosting their applications on Citrix Winframe as a terminal server for an Alpha Five Application will be better off running those applications as Alpha Five Web applications because of the greatly reduced requirements of the backend.

Q: Alpha Software's approach to the new Alpha Five Web Application Server has necessitated multi-threading capacity. Can you tell us a little about multi-threading and what it means to both Alpha Five and Alpha Five Web Application Server?

Multithreading in an application is when the application can do two things at once, i.e. print a file while allowing the user to edit a document. The Multithreading model for Xbasic starts in cooperative mode (i.e. only one thread of Alpha Five is really running at any one time). This is the safest (with respect to existing code) but not the fastest approach to multi-threading. After getting this working, I have been adding thread safe versions of various Xbasic functions and methods which Alpha Five will run concurrently with the main thread. For example, all the socket API calls run concurrently with the other threads, however, when a .DBF file read/write is hit, we go back to reading data one thread at a time.

Q: How is multithreading different from 'forking'?

A fork starts a new process. Threads share the same process space, but have a different stack. It is easier for threads to share data (intercommunicate).

Q: Alpha Five has grown into quite a large project spread over a number of years. Can you give us an idea of how many lines of code make up Alpha Five?

Alpha Five has entirely too many lines of C/C++ code. Last count for version 5.1 was 1,095,299 lines of C/C++ code (excluding headers and resource files). Some code has been deleted. My hope is that I can get rid of redundant code and move still more of the user interface code to Xbasic. The shear volume of code is one of the reasons that we haven't committed to non-windows platforms yet.

Q: What would you hope to get the code size down to?

My expectation is that we will be able to eliminate 15-20% of the C/C++ code.

Q: With this large of a program, developed over the years, there has to be 'old' code intermingled with new. Can you tell us what parts of Alpha Five are slatted for an 'overhaul'?

I am overhauling browses right now. The back end of browse in version 5.1 will be populated via Xbasic and all events will be exposed to Selwyns addin layer. I hope to complete the rewrite of browse within the next week. All the bugs in browse navigation will be fixed by this rewrite. Also, look for new features, such as multi-row selection (i.e. you can highlight every other line), and optional selection of rows and columns simultaneously (i.e. copy data from selected columns of selected rows to the clipboard).

Q: Wow, I can hear the cheers from the Alpha crowd over that last answer! Cian, can you give us a few more hints? How about browse events?

I am adding system level events to practically every aspect of browses. Enough so that it will be up to Selwyn to decide what user events to add, or whoever writes the standard Xbasic browse events, they will be able to add events without me changing a line of browse code. Here is just one example;

A user clicks on browse control scrollbar: Right now, this piece of Xbasic code simply adjusts the top row, but Selwyn will be able to add any events he wants to this system level event, i.e. perhaps:

And/or

New events will be defined at the Xbasic level. Right now I am working on mouse events for browse. I am aiming for the same functionality that form objects already provide, i.e. Flyover and OnPush for any target in a browse.

Q: Cian, you mention version 5.1. Is this the Alpha Five Web Application Server? If so, will the 'standard' Alpha Five version 5 have the exact same functionality, except for the Web Application Server?

Yes, I have been maintaining two releases: version 5.0 and version 5.1. Once 5.1 is ready for primetime, my hope is that it becomes the new 5.0 patch.

Q: In the midst of the major rollout of Alpha Five version 5, this has to be a hectic time for you. Can you give us a little insight into how this effects what you do on a day-to-day basis?

The number of bug reports we got back after shipping version 5.0 has cut into my work on the next version - It has really been an exercise in juggling. I have worked well into the night and weekends up to the 5.0 release date, but really haven't slowed down after the release. I don't have the pressure of the need to ship the product, but I have had to divide my time between 5.0 and 5.1.

Q: Fundamentally, I would consider Alpha Five version 5 almost an entirely new product, especially in term of releasing and supporting it. Although it has almost total continuity with prior versions, it has a tremendous amount of totally new features.

The biggest change in version 5.0 versus previous versions is the extent to which user interface actually makes use of the same tools we provide to the end user. The biggest challenge has been supporting all of the subtle behaviors of previous versions given totally re-written code. It has not been painless, and we didn't get it right the first time (as witness to all the patches we have released), but all in all, it was well worth it.

Q: I just want you to know that your presence, along with Selwyn, Richard, and the rest of the Alpha Five development staff, on the message board is greatly appreciated. It is comforting to know that the actual people who build Alpha Five are watching over the Alpha community.

Thanks. Over the years I have appreciated the persistence, patience, and support of our users. For example, a number of users have gone out of their way helping me track down bugs, to the point of loaning me a machine that demonstrates a bug if I cannot reproduce the bug on my end.

Q: With Xdialog creating much of the user interface for the new features of Alpha Five version 5, can you tell us how dependent the code is on the Windows API?

Xdialog is dependent on the Windows API to the extent that it is implemented on top of windows API calls, however, this doesn't limit us to windows. I hope, with the Web Server version, to convert Xdialogs to DHTML so that all the UI written in Xdialog will be available over a browser. Having Xdialogs replace all the Window's dialogs written in C/C++, does get us a lot closer to porting Alpha Five to other platforms.

Q: My last question was really just a lead-in for the real question; how tied is Alpha Five to the Windows platform? Any hope we'd see a Linux release of Alpha Five, or even a Windows CE version?

The UI code is currently the biggest issue tying us to Windows. The dependence on Microsoft Visual C language extensions comes in second. I would need to find a compiler/platform combination that supports something akin to Microsoft C's thread local variables. That said, there is a lot of code that doesn't depend on windows in Alpha Five, particularly the language and the engine.

In Windows CE, I see a target platform for an application developed using Alpha Five. Not a hosting environment for developing applications. As such I would expect that a Windows CE version of Alpha Five's runtime would have to be minus a large number of features. Windows CE is enough different from Windows that it would make sense to support Palm OS as well (i.e. publish to PDA).

I believe that getting the Web Version is the important step to getting Alpha Five over to other platforms. Even if we continue to host development only on Windows. The way I would implement Alpha Five under Linux would probably be to use a browser as the UI and have the underlying Alpha Five a command-line program, (i.e. no direct graphics support), and interface with the user through a browser.

Q: Software languages, and the communities that form around them, remind me more of religion than of science. C/C++ has reigned king for a while now but Java was suppose to take over the throne. Microsoft has come out with C#, which I have read is Microsoft's answer to Java. With the object oriented nature of languages today, one could conceivable develop a given project in multiple languages. Do you foresee continued development of Alpha Five with C/C++ or are you playing with other languages?

I am experimenting with other languages including C#. I like C#, though Microsoft is mainly pushing .NET as a platform, which is language agnostic. There is an intermediate language (MSIL) that all Microsoft .NET language compile to. That said, C# is the best language for writing .NET applications and I have been impressed by a number of the features on C#.

Q: Would not developing in C# mean that you would be tied tightly to the Windows environment?

This depends on how successful Mono is, started by the developer of Gnome. .NET looks like it will be well supported by the open source community - check out http://www.go-mono.com.

Q: An ADO version of Alpha Five is on the horizon. Can you tell us a little about ODBC, and ADO and how you see this working in future versions of Alpha Five?

Our approach has been evolving with respect to ADO. We are now planning on taking a distributed database approach where we quickly fetch data from the server, using ADO or ODBC, update a locally cached copy of the data, then batch the changes back to the server. We will implement a simple replication feature to achieve this. We decided on this approach because it focuses the interaction with the server to an initial fetch of the data, followed by a posting of data back to the server instead of spreading the interface to the server across the entire API. This will be more robust because there are fewer points of failure and it will mean that we will be able to bypass ADO if direct access to the server is considerably faster.

Q: In this same vein, do you think we will eventually have a built-in SQL editor so a user/developer could, within the context of Alpha Five. develop and store SQL routines, either by direct editing, or via an Action Scripting type environment, or will the ADO version make this unnecessary?

I think that given the optimization that writing to SQL will provide, we will want to provide the option for native SQL. It is becoming clearer that ADO will just be one of many ways to get at the data. For instance, we are planning on directly supporting MySQL in a manner similar to PHP. That is to say, provide an API that talks directly to the MySQL backend.

Q: That is great news Cian. Would you anticipate that this MySQL API would support existing Xbasic table and set methods?

Yes, we should be able to. In version 5.0 we added Xbasic classes. For example the toolbar class in version 5.0 is written in Xbasic. I plan to make the table.open() method capable of returning pointers to Xbasic classes, either using the path to the table, or some alternate extension (we haven't decided on this detail yet, so that we can implement a class mySQLtable, ADOTable, etc. in Xbasic which can have all the methods that a table implements (fetch_find, etc).

Q: Do you envision Alpha Five having a native file format other than, or in addition to, the current dbf format?

We are looking at the latest Codebase format, but haven't committed to implementing the needed changes to make it 'native' to Alpha Five.

Q: You had mentioned to me in earlier correspondence that you are working on having layout definitions stored as Xbasic code. Can you tell us a little about this and what it would mean to the Alpha community?

Storing Layouts as Xbasic has a number of advantages

  1. It is human readable, so if there is a problem in the stored form, there is a chance of being able to fix it with a text editor.
  2. It is easier to send your forms via Email.
  3. If a form is simply an Xbasic program, you can tune the program to dynamically generate a form.
  4. Since a form is text, it would be easy to perform search/replace operations on a form (i.e. change all wording on all forms). Maybe we could get reconfigure features like Alpha Four had.
  5. Because layouts would be just another kind of scripts, It makes it easier to support layouts stored in .ALB files, which in turn means that layouts can be stored in .AEX files.
Q: You may have read my interview with Selwyn Rabins where I asked him about command line Xbasic. I do not want to whine here in public, BUT…….. how about it Cian, I know you have been playing with this.

I have, but not to the extent of having a shippable product. I hope in version 5.1 to provide a command-line interface that is based on Xbasic threads and sockets (i.e.you will need a copy of Alpha Five running in memory, but you will be able to run Alpha Five at the command line though a small program that communicates with Alpha Five over a socket).

Q: I have not even explored version 5 completely, yet you have already wetted my appetite for version 5.1! Lenny Forziati, lead developer on the Alpha Five Web Application Server, mentioned in the October issue of the newsletter that you have a younger brother, also working with Alpha Software Inc.

Yes, Eavan is very talented with Javascript, and is getting pretty good at Xbasic as well. He is writing a converter that takes Alpha Five Forms and converts them to DHTML with Javascript. So far he has been able to do things with Javascript and DHTML that I thought were only possible with flash, including translucent buttons with all the border styles we provide in Alpha Five.

Q: Is this being done to automate the conversion of Alpha Five layouts directly into an HTML format for the Alpha Five Web Application Server?

To a large extent, yes. However I foresee some conversion needed for XBasic commands, that respond to events, that need to be handled in real time. Particularly OnKey events, since any Xbasic requests in 5.1 will need to be handled by the server. This could make some automatically converted apps respond too slowly. However, we can check for Menu accelerators on the client side, so for OnKey events I also see this as the solution. In an ideal world, the Xbasic interpreter would be made available on the client side in the form of an activeX control, but I don't see us shipping client side Xbasic for version 5.1.

Q: Alpha Software is developing a very aggressive product in the various flavors of Alpha Five, yet with a relatively small development staff. In some ways I can see a small tight group of developers as an advantage over a large 'design by committee' structure. Give us your thoughts on your ability to innovate and move forward in the highly competitive software world?

I have worked in both environments. I have found it true that a small team is better for application development.

Q: If I understand correctly, one of the early compelling PC applications, VisiCalc, was developed and supported for many years by a single developer. Is that correct?

This was the case with VisiCalc. In a sense the single developer has an advantage of knowing all the pieces, so moving the architecture forward can be a simpler task. Back when we had more programmers we were constantly stepping on each others toes. Also, features were often implemented at the wrong level because the tasks were divided up before the feature set was completely defined. I am now revisiting a lot of code, taking a top-down approach, which often involves moving functionality to the correct place.

Q: We know about the planned ADO enabled version of Alpha Five, but can you tell what else you have up your sleeve for version 6?

I have a couple things that I would like to see get into the product, but will only happen if I get everything else done in time:

1. Xbasic addin defined types for memo fields - probably using ActiveX as the medium to display. This would make memo fields containing HTML pages, CAD drawings, alternate image formats every bit as well integrated as the native text memos, RTF, and Supported image formats.

2. Anchoring of objects in a form to edges other than the top-left - Anchoring of both edges of an object would make the object stretch with the form.

3. Better Sub-form support. Integrated with a better toolbox in the layout editor so that an Alpha Five developer can define sub forms that act as controls, and put them on the toolbox so that they might be used like any other control. The C# UI builder in Visual Studio .NET has a concept similar to this.

4. Repeating Forms. The work I am doing on browses should make this more attainable.

5. At the last Alpha Five users conference I attended, John Gamble told me that one feature he had found lacking in every database manager he had used was the concept of subschema. This involves separating a field into 'sub fields' (a concept that was around in Cobol, and exists as a data type called a 'union' in C/C++).

Imagine having a date field in a table, but being able to reference all the components of a date as fields as well, or have NAME composed of FIRST and LAST subfields.

The table would be defined like this:

NAME C 30
DT D 8


User could add subscheme fields (perhaps in field rules)

NAME.FIRST C 15
NAME.LAST C 15
DT.DAY N 2
DT.MONTH N 2
DT.YEAR N 4


Relationships (maintained between subfield and field):

NAME = NAME.FIRST+" "+NAME.LAST
NAME.FIRST = WORD(NAME,1)
NAME.LAST = WORD(NAME,2)
DT = date_value(DT.YEAR,DT.MON,DT.DAY)
DT.YEAR = year(DT)
DT.MONTH = month(DT)
DT.DAY = DAY(DT)


The user could then place either regular fields or the subschema fields on the form and field rules would take care of all the translation automatically.

Q: This sounds a lot like dot variable functionality, only built-in to the table structure. Is this an accurate observation?

Close, except for the fact that this will be a predefined structure given that it is already operating on structured data. One other idea that has been tossed about is supporting a dot-variable memo field that would allow users to define arbitrary sub fields.

Q: Cian, my last question has to be 'How are you going to get all this done'?

Selwyn has said time and again during the development of version 5.0:

  "How do you eat an Elephant? Answer: One bite at a time."

Basically attack one issue at a time, and resolve it. I think we have a team assembled that is up to the task, but getting it all done is not a matter of pulling a rabbit out of a hat, just hard work.

Q: Cian, what do you do when you are not hard at work on Alpha Five, any hobbies?

I have recently taken up an interest in home brewing, and have several batches of beer and mead fermenting. Prior to that I have been to busy to have a hobby -- between getting in firewood this year, and helping my wife with the garden and landscaping have pretty much filled my weekends.