[Info-vax] Coding with/without RDBMS

Dave Froble davef at tsoft-inc.com
Fri Oct 15 14:44:23 EDT 2021


On 10/15/2021 2:17 PM, Simon Clubley wrote:
> On 2021-10-14, Dave Froble <davef at tsoft-inc.com> wrote:
>> On 10/14/2021 2:06 PM, Simon Clubley wrote:
>>>
>>> Having compared the two programs, I find the Pascal version to be
>>> a lot more readable and easier to follow than the Basic version,
>>> although Arne does put his begin statements in a strange place... :-)
>>
>> Yeah, Arne's code had lots of comments to explain things.  Not!
>>
>> I'd really be interested in what parts of the Basic code was so bad?
>>
>
> In addition to what I have already said, Arne's control blocks feature
> indented code, while all your code is at the same indentation level.

We must not be looking at the same code.  Did you miss the "If Then Else End If"
indentations?  I guess some people can go a bit wild on such, wonder what it's
like to read code in column 382?

> Indenting code within control structures makes the code much easier
> to read.

I agree.  In fact I've found myself doing more than I should.

>> I do realize that since you are not familiar with DAS and it's implementation,
>> and my library routines, which would not be understood.  That's normal.
>>
>>> The Basic version has much more jumping around and just doesn't read
>>> as well as the Pascal version does.
>>
>> I really resent that claim.  With a few exceptions, mainline code is pretty
>> much straight through, and for someone who seems to like scripting languages
>> with all their library routines, placing specific in subroutines should
>> seem rather natural.
>>
>
> Even in scripting languages, you have the Pascal style control structures
> and indentation of code. That makes a major difference in readability.
>
>> I'm a really big fan of modular code.
>>
>> My IDE is a big fan of things having a place, and things being in their place.
>> Much of what you call jumping around is actually the IDE pulling in pieces of
>> code to perform specific functions.  I'm guessing if I had pulled in the forms
>> control stuff, which is used for paging in reports, you'd be even more confused.
>> But it works great, and doesn't have to be re-written for every program.  Such
>> also avoids coding errors.
>>
>>> BTW, Basic really does like spewing its special characters onto the
>>> end of variable references. :-)

Do you say that as a complaint, or just a comment.  I find such to be helpful,
not having to go back to check any variable declarations.

>> And other languages don't have such quirks?
>>
>
> In general, not to that extent, although PHP likes its prefix character.
>
>>> One thing I was surprised by was the goto and gosub to integer line
>>> numbers instead of looping constructs and named function calls with
>>> parameters as you see in the Pascal example and in other languages
>>> such as C and Ada.
>>
>> I've seen people attempt to jump through many difficult hoops to attempt to follow
>> some coding standard.  Doesn't make any sense to me.  There are perfectly logical
>> uses for both GoSub and GoTo.  Such as just throwing out the anchor if fatal errors
>> occur.  Moving special functionality out of the mainline code makes it more readable,
>> for me.
>>
>> Did I mention I don't like C, and most likely would not like Ada?
>>
>> Got to ask, just what do you think a NEXT, WHILE_END, and such statements do?
>> Sure looks like another form of GoTo to me.
>>
>
> Is code within these blocks written at an extra indentation level in
> DEC Basic ?

I do that when I feel it is appropriate.  Usually in small pieces of code.
You do that in the program mainline, and it soon becomes very hard to read.
I'm aware of that because someone here liked to write such code, and after
a dozen indentations, it gets rather tiresome.

> It is in other languages with their control structures and it makes
> the code much easier to read.

Sometimes it is just a particular person's practice, and yours being good
for you doesn't mean mine isn't good for me.


-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list