Kip - the major stumbling block I've encountered with my own code is that I
often render it non-portable by writing small utility functions that are
available in the standard libraries - I suggest you get familiar with what's
already available so you don't have a personal version of a "remove leading
and trailing spaces" function (dltb).

I seldom use the ijs and ijx windows as I do most of my work in "jee" within
an emacs editing session as I'm very accustomed to this editor; "jee" allows
me to use graphics windows as I would in an ijs session.

I've adopted a commenting convention I've touted elsewhere which I find
helpful: for example,

NB.* crTmpFl: create new, randomly named file in temp dir.
crTmpFl=: 3 : 0
   suff=. ,>(0=#y){y;'tmp'
   td=. getTempDir ''
   while. fexist flnm=. td,suff,~'.',~ALPHA{~?8$#ALPHA do. end.
   flnm
NB.EG batfl=. crTmpFl 'bat'
)

The convention is to precede a function with its name and a one-line
description prefixed by "NB.* " and end the function with an example of its
(common) usage.  The prefixing description lets me grep for "NB\.\*" once
I've written several funcitions in a file so I can begin the function file
with a table of contents consisting of all function names, with brief
descriptions, in order of occurrence; this is handy for finding things
quickly.  I also comment any global variables similarly and include them in
the table of contents.

The trailing usage example is handy for seldom-used functions - I just type
its name and grab the last line of the listing to modify in my session in
order to use it.  It's especially helpful when a function takes several
arguments.

Hope this is helpful,

Devon

-----Original Message-----
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Kip Murray
> Sent: Friday, September 05, 2008 7:07 AM
> To: Programming forum
> Subject: [Jprogramming] Working with J
>
> I'm addressing this to the Programming Forum because you know how to work
> with J.
>
> Where does a beginner learn good J work habits?
>
> To begin, how to use ijs and ijx windows, how to save your work at the end
> of a session and resume it at the next.
>
> Next ...
>
> What should "next" be?
>
> An eventual topic would be a smooth way to transfer work, favorite
> programs, and favorite additions to PUBLIC_j_ from one version of J to the
> next.
>
> I'm looking for a "table of contents" whose "page numbers" are pointers to
> the documentation, labs, and Wiki, but I'll take whatever you can
> contribute.
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to