Why APL?

Why APL? Because it’s faster, easier to use, and less error-prone than Excel.

Excel is learned by use, by problem solving. There is a manual behind the help entry in the menu. Sometimes it’s helpful. There is a completion engine that makes suggestions from what you’ve typed. And, oh yes, there is the world wide web. Many days of problem solving can be just trying things until something works.

There are, however, many days when Excel just doesn’t. If I have a complicated model to build, I quickly get a spreadsheet of too many pages, too convoluted to be useful. I like to think of this as the one-to-many problem.

The one-to-many problem occurs with two lists when for any entry in list 1 there are many related entries in list 2. An accountant’s trial balance is a good example. A trial balance starts as a list of the accounts together with their balances. The trial part is adding up all those balances to demonstrate that the debits do equal the credits (the accountant’s holy grail; don’t ask). It is followed by adjustments. That is, the accountant concludes that some of these balances have to be adjusted for some reason and uses the trial balance to recalculate. There may be more than one adjustment to some of these accounts.

In Excel this means inserting lines and entering new formula. It is tedious and error prone.

Enter APL. APL is an interpreted computer language. That means you can type in a calculation and APL will execute it and display the result. It is an array-processing language. That means you can perform calculations on an entire array.

Let’s go back to that trial balance. This list of accounts becomes any array of four columns, with a line for each account. The columns are account number, account title, debit, and credit, much like those I put on one page of my Excel spreadsheet. The proof that the debits equal the credits is one line of code.

For years I avoided APL, as the annual license fees were prohibitive. Recently, GNU has released an interpreter that is free and open software. I use it rather than Excel. If you’d like to try it out, download it from https://gnu.org/software/apl. I have an example trial balance at https://dalywebandedit.com/workspaces/trial_balance.apl

Instructions for installing and using GNU APL are included in the archive you download. Set up a directory in your home directory, name it work spaces, and place trial_balance.apl in it.

The point of using APL rather than Excel is that APL will do a lot of work fast without proliferating your work spaces. Tools tend to fall along a curve: at one end they are easy to learn but hard to use; at the other end they’re easy to use but hard to learn. Excel and Google Docs are easy to learn but a pain to use. APL and Word are a lot harder to learn but much, much, much easier to use. You’ll be surprised at how fast that steep learning curve pays off.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *