From J Wiki
Jump to: navigation, search

John Baker - Data Manipulation

I first read about J in the Internet USENET group, comp.lang.apl in 1991. Because of Ken Iverson's reputation (the inventor of APL and J), I decided to take a look. The USENET message described J as essentially Dictionary APL that used the ASCII character set. That didn't sound very good to me. All previous attempts to ASCII'ize APL had resulted in abominable transliteration schemes. Was J just another ugly ASCII APL?

I quickly discovered that J is not APL. IT is a new language that was built on the fundamental strengths of APL, fixes its many deficiencies and introduces a new style of pure functional or tacit programming. As an added bonus, J's ASCII notation is very well thought out. The language just looks gooooood!

In a world of same song programming languages, J strikes a different tune. Using J changes the way you think. In my opinion, this is J's greatest strength. Of course programmers don't want to change the way they think. They want to write applications.

So why do we write applications? Usually to solve problems. So asking if J can be used to write applications is basically asking if it can be used to solve problems. J is a wonderful problem solving tool. J really shines when you want a little program to do this or that but don't want to spend ages programming.

Here are some problems I have solved with J:

a) I wrote a small preprocessor ( a few verbs) to convert FoxPro source code into fully indexed and cross-referenced LaTeX source code. My system converted a 5000 line FoxPro procedure file to LaTeX in about 1 second on a 66 MHz/486 PC. Consider the time it took me to write the 5000 lines of FoxPro, this was fast enough.

b) I download a large Oracle SQL table over an unreliable network using J's ODBC facilities. J's ODBC interface is a fine example of "less is more".

c) With onlookers peering over my shoulders, I composed a verb off the top of my head and quickly computed the frequency distribution of over 100,000 integers: too large for EXCEL. The size of the program and the speed of processing (2 seconds on my 66/486 PC) greatly irritated my observers. It seemed like I was cheating.

   Freqdist=: ~. ,: #/.~

d) To test the input screens of a large mainframe application I wrote a small set of J verbs to generate thousands of screen input combinations. Many bugs were flushed out with these tests.