USER command questions

Tyler Style tyler.style at gmail.com
Fri Sep 11 07:08:04 PDT 2009


John Esak wrote:
> Well, since you used the archaic and essentially useless... If not just
> plain difficult NEXTDIR() instead of the dead-easy method of accessing the
> @dirlist arrays... I'm thinking I cannot help you much anymore.  To consider
> using "user" and mv or cp is not even on the map for doing what you want to
> do. Aside from the simple fact that you would have to make hundreds of
> system calls just to open and read a directory with hundreds of files in
> it... When opendir()fills those arrays in one shot.  Well, go for it if you
> still feel that is the way to go.
>   
How on earth am I supposed know which commands are archaic and useless, 
and which aren't? 

And why would using USER ls be hundreds of system calls?  As far as I 
can tell, it's just one.  I call USER ls, and it stays live; each time I 
assign it to a variable filePro plugs in the next value, it's accessing 
the same process and pulling the next line of output from it.
> Yes, you can moan and groan about not knowing the commands for filePro
> because of its terrible documentation. But, I could list hundreds of other
> programs with far less utility and far worse docs.  I'm not into arguing
> with you for arguing sake.  I could teach you how to use the USER command
> and what it might be good for... But I think it might stay in this kind of
> murky complaint mode rather than being of value to the readers here, so I'll
> let somebody else take on that task. 
>   
Okee dokee, you're certainly not obliged.

And other programs' documentation levels are irrelevant here.  We're 
talking about filePro's and how it affects it's users (ie, it pissing me 
off and my calling it garbage).  If the docs are so bad that I need to 
find a mentor to teach me the basic syntax of commands, there is 
something seriously wrong.  Especially given that it is a 30yr old 
product - there's been more than enough time to write decent documentation!
> As I said before... Good luck.  You actually will need it.  In fact, that is
> not much more than any of us had in learning the vagueries of programming in
> all those decades you mention.  Luck, perseverance, not putting down the
> people who wrote the program and the docs for the product you are asking
> about... All that usually helps.
>   
Luck really shouldn't be a factor in learning a programming language, 
IMHO.  You have my sympathies that it was such an important part of your 
own original learning process.

However my criticism is valid, if negative, and given the frustration it 
causes me and the maturity of the product I don't think my tone is 
inappropriate.  I will not just wink wink nudge nudge say no more to 
it's issues.  filePro has problems, they need addressing, and they 
obviously aren't being addressed by fptech.  I will never mistake a 
sow's ear for a silk purse, and I feel valid in complaining if it tries 
to pass itself off as such.
> Incidentally, I did read your code, but it is so off the mark for what you
> want to do, I passed over it pretty quickly.  Someone else may chirp up and
> want to work on that for you.  I am of the opinion that you can't make a
> silk purse out of a sow's ear.  Plus, unless you add a few ifdef lines and
> some better pathing, you will be locked to *nix... No portability to
> Windows... Of course, you may not need that.  However, all the code I've
> written in filePro for the past several years has been usable on any
> platform. This, and speed is why I always choose the filePro version of a
> function before ever considering some O/S utility. 
It's not far off the mark from what I want to do - it does a directory 
listing perfectly.   However, it is not how you would have coded it 
given your superior experience and knowledge.  There is a difference!

Windows portability is not a concern, you are correct.  It's inhouse 
only, and we're definitely not going to buy a whole new set of licenses 
to migrate filePro as that would mean not only shelling out bucks for 
something we technically already own, but reviewing/rewriting the 20yr 
old code base.
> And in that vein, you
> don't need the chdir in your code.  Superfluous.
>   
The CHDIR was in there because of the impressions I got from the dev ref 
on how to work with OPENDIR.

> I'm doubting you would be interested. However, if you had the Survivor
> Series loaded on a PC near you, you could have typed in something like
> "directory" or any number of other keywords, and the system would have
> prompted you to put in the correct CD (1 through 3) and then immediately let
> you pick from several video presentations of how to use opendir()... Oh how
> funny... One of the uses in there is to perform a copy operation on all the
> files in one folder.  Well, again you see we agree on that all important
> precept. Having and knowing the right tools is the best way to proceed. 
>   
You're correct, I wouldn't be interested, tho I appreciate the info.  
We've pretty much phased out filePro from everything but our accounting 
processes, and so justifying the cost would be difficult as we only need 
to code once every couple months.

As for the copy tutorial, feel free to taunt if you like.  It's not 
really a problem, I can always go back to using SYSTEM to mv the files.  
My intent in trying it in new ways was to improve my coding practices 
and system performance by avoiding SYSTEM, as per the dev ref 
recommendation.

Thanks for taking the time with the original OPENDIR example - it is 
good to know how that works.

Tyler


More information about the Filepro-list mailing list