POV-Ray : Newsgroups : povray.off-topic : Tell me it isn't so! Server Time
10 Oct 2024 19:23:18 EDT (-0400)
  Tell me it isn't so! (Message 241 to 250 of 473)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: clipka
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 12:10:00
Message: <web.4a6dd0aaac52dfd4842b7b550@news.povray.org>
"David H. Burns" <dhb### [at] cherokeetelnet> wrote:
> > I just took it as an eyample, having been *my* long-time favorite language
> > (after BASIC).
>
> Well, I guess I'll have to admit it BASIC is my favorite language.

Not really the most modern of languages (unless you count VB/VBA, but as you say
yourself these are actually totally different beasts), and indeed one of the
most frowned-at languages (VB/VBA included in this case); I guess that's mostly
undeserved, however: The frowns should go to the people who thought it a good
idea to introduce "GOTO" as the second statement after "PRINT", thereby
inviting virtually the whole Home Computer Generation to become hobbyist
spaghetti code producers.

Normally, the first two programs would be:

  10 PRINT "Hello World!"

and

  10 PRINT "Hello World!"
  20 GOTO 10

A few years ago I did some work for an insurance company to port a few old small
SINIX-BASIC programs to VBA (something like two dozen 1000-liners) so they could
get rid of the last legacy machine that could run those programs; some of them
were really well-strucutured, well-commented and well-indented. Others were
really the worst classic spaghetti code I've ever seen in my life, and I was
more than happy that I only had to *port* them, not *fix* anything in them.

It's really a matter of programming style whether a BASIC programmer should be
despised or not. BASIC allows for a broad spectrum there. But then again, ever
since I've seen the C source code of "NetHack", I can tell that at least C
programs - even when not deliberately obfuscated - can be just as messy as any
BASIC code. And at least BASIC is not as cryptic as C.


> QuickBasic was it's highest development.

Just out of curiosity: Did they ever introduce such things as structs (records
in Pascal)? That was the thing that bothered me most about BASIC ever since I
first wanted to store a list of data tuples. Using a separate array for each
"dimension" of the tuple just didn't feel right.


> I was able to display an image and VBnet seemed to promise good image
> handling capabilities if one could only figure them out.

If graphics (or any other non-textual user interaction, for that matter) is what
you want to do, it comes as no surprise to me that you don't like modern
computer languages. The major problem, however, is not an inherent feature of
the languages themselves, but of graphical user interfaces (at least as far as
Windows is concerned; I never got to have a look at X Window or the like),
which follow an *event-driven* paradigm - i.e. *they* want to tell your program
when to do what, which is almost perfectly incompatible with the classic
application-driven paradigm. And although I guess this is exactly what you're
wrongly attributing to OOP, you're not so far off the mark: As a matter of
fact, an object in OOP can be regarded as an event-driven piece of software
(each method call constituding an event), so OOP is a very good paradigm to
model an event-driven application: All you need to do is consider your whole
application an object, too - which I admit is indeed *not* a natural way of
thinking.

(However, while the event-driven paradigm *is* an antithesis to the classic
application-driven paradigm you undoubtedly favor, OOP can be used perfectly
well for both.)

Unfortunately, modern mainstream programming environments indeed don't seem to
come with any framework to support the classic application-driven paradigm,
except for purely textual interfaces ("console application" in Microsoft terms)
or a static sequence of dialogs ("wizards").


> I have a couple of versions of Python which
> I may eventually learn to play
> with and "Borland's" free C/C++ compiler that I might use some if I
> could figure out how to do graphics
> with it. How I do run on! :)

Speaking of Borland, maybe they still come with the good old "graph" library and
the BGI graphics driver format, in which case I'd expect them to include a BGI
to interface to Windows, too.

Same goes for FreePascal. I guess I'll check that out.

C is really not a pretty language, by the way. I'd possibly still program in
Pascal, had it not been for the limitations of the compilers I had at my
disposal (16 bit "real mode" applications only, max array size of 64 kByte)
when I was introduced to C, C++ and Java. (And I'd possibly still program in
BASIC if I hadn't had to learn Pascal at school anyway, and found the language
to feature records ;)).


Post a reply to this message

From: Warp
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 12:56:36
Message: <4a6ddc44@news.povray.org>
clipka <nomail@nomail> wrote:
> Not really the most modern of languages (unless you count VB/VBA, but as you say
> yourself these are actually totally different beasts), and indeed one of the
> most frowned-at languages (VB/VBA included in this case); I guess that's mostly
> undeserved

  The original BASIC was such a simplistic scripting language compared to
way more advanced programming languages of the same era (including such
masterpieces as lisp, which was surprisingly advanced and high-level taking
into account it was invented in 1958) that it was basically frowned upon by
everybody from the beginning.

  The original BASIC didn't even have the concept of functions. It had a
very primitive version of them, subroutines (which are like functions which
don't take parameters nor return anything, and without any local scope).
The only thing which differentiated a subroutine call from a goto is that
the subroutine call pushed the caller's address onto a stack, so that a
"return" statement could return there when the subroutine ends. But that's
about it.

  More jarringly, every single variable was global. The concept of local
variables was inexistent, obviously because of the lack of proper functions.

  Goto was an inherent part of the language, and used extensively. This,
naturally, also caused criticism, as liberal use of gotos easily disrupts
the logical flow of code and makes it harder to follow and understand, even
if the obfuscation is not intentional.

  Even if we took goto as barely acceptable, its original implementation was
very ascetic. AFAIK the original BASIC did not support named labels, but
instead every line of code was numbered (by hand by the programmer), and
gotos always jumped to a specified line number. AFAIK the numbering of each
line was mandatory. Naturally this made it quite problematic to insert code
between existing lines. While it was customary to number the lines in
multiples of ten, this only gives the possibility of inserting 9 lines
of code between any existing lines. If you run out of line numbers, you
will have to start renumbering. And good luck trying not to break existing
gotos if you start renumbering. (Some later BASIC text editors supported
automatic renumbering, including all gotos, but naturally no such editors
existed back then, when even having an interactive text editor in the first
place was luxury.)

  Control structures were ascetic and limited, as well as the possibility
of creating things like data containers.

  It's no serious programmer ever bothered with BASIC.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 13:00:00
Message: <web.4a6ddcc5ac52dfd4842b7b550@news.povray.org>
"David H. Burns" <dhb### [at] cherokeetelnet> wrote:
> The fact is (that is to say, "my opinion is") that those who talked that
> way rightly perceived it as a
> threat to their elite status and so its development was squelched.

That may have been part of the deal. I guess, however, it was partly justified
by a surge of hobbyist spaghetti-code programmers claiming to know how to
program, but being unaware that software development also includes maintenance
(i.e. bug fixing and later modifications) and teamwork, and that their
spaghetti-code was often very ill-suited to those parts of the job.

I don't think the development was actively squelched. It just slowly died out as
soon as BASIC ceased to be actively pushed by a thriving home computer industry.
That's the primary reason BASIC became so popular in the first place: You got it
for free with every home computer brand in the whole wide world. Not only that:
It even constituted the standard user interface, so without typing a BASIC
command you usually couldn't even start any other software.

For quite a while you didn't get any programming language for free with
IMB-compatible PCs when they replaced home computers as the private man's
computer. (Well, you had batch files, but I guess we agree that they don't
really count.) The reason for this is highly unlikely to have anything to do
with attempts to squelch the language - much to the contrary, Microsoft instead
probably hoped to make money out of it. And in the beginning they did.

I think it was not before DOS 5.0 that Microsoft started to bundle BASIC again
with DOS, possibly in an attempt to revive the dwindling popularity of BASIC;
still it was not as omnipresent as it had been in the home computer era, so it
didn't manage to attract as many new enthusiasts.

Visual Basic, too, might not have gained such popularity, had it not been chosen
as the scripting language for the most popular office package. And who would be
talking about JavaScript, had it not been the first scripting language to be
integrated in a web browser?

(And who would ever have heard of POV-Ray SDL if it wasn't bundled with the
POV-Ray raytracer? ;))


So you see, bundling is a very strong tool for promoting a software language.
I'd say BASIC wasn't quenched, but instead had been hyped before, both
ideologically ("the first language everyone can learn") and financially (dead
giveway with every computer), and has just been allowed to settle to its
"natural" level of importance.

With "natural" level meaning that BASIC is (aside from VB/VBA) not a mainstream
language anymore, but all the while far from dead either - and may even have
what you're looking for. Just had a quick browse though a few Wikipedia pages,
to stumble across this paragraph:

------------
FreeBASIC has a built-in 2D, software graphics library to be QuickBASIC
compatible, which provides the user with simple graphics primitives (such as
rectangles, lines, and circles), blitting, and additional features which
weren't present in QuickBASIC's graphical library. The library itself is not OS
dependent, so code is portable across platforms with the library.
------------
(http://en.wikipedia.org/wiki/FreeBASIC)

(Yes, you *definitely* should spend more time with Wikipedia - she's your friend
;))


Post a reply to this message

From: clipka
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 13:05:00
Message: <web.4a6ddd51ac52dfd4842b7b550@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> And not because of any of the dozens of *actual* reasons that have been
> described over the years.  No, just a conspiracy by the elite to make you,
> David Burns, feel bad that programming is hard. <plonk>

Hmm, I think plonking him is a bit too extreme a reaction...


Post a reply to this message

From: Darren New
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 13:30:55
Message: <4a6de44f@news.povray.org>
Warp wrote:
>   The original BASIC was such ... that it was basically frowned upon by
> everybody from the beginning.

Welllll... I wouldn't go that far. It was acknowledged as simplified, in 
much the same way that DOS BAT files are simplified or editor macros are 
simplified. It was designed as a beginner's language, so it wasn't really 
frowned upon any more than LOGO or PILOT is frowned upon.

It was only after people tried to turn it into something sophisticated they 
could continue using for large professional programs with multiple 
programmers that it was "frowned upon", methinks.

>   The original BASIC didn't even have the concept of functions.

And many of the languages of the time didn't have recursion even if they had 
functions. :-)

>   Goto was an inherent part of the language, and used extensively. This,
> naturally, also caused criticism, 

Except that BASIC was invented a couple years before structured programming 
was, so this was only a criticism a decade after BASIC was popular. It also 
started out with only what you might call "computed if" statements. I.e., 
the only valid thing after a "then" or "else" was "goto".

>   Even if we took goto as barely acceptable, its original implementation was
> very ascetic. AFAIK the original BASIC did not support named labels, but
> instead every line of code was numbered (by hand by the programmer), and
> gotos always jumped to a specified line number. AFAIK the numbering of each
> line was mandatory.

Yes. BASIC was revolutionary in that it had its own editor built into the 
language, which was pretty nice in the days of punched cards and paper tape.

> Naturally this made it quite problematic to insert code
> between existing lines. While it was customary to number the lines in
> multiples of ten, this only gives the possibility of inserting 9 lines
> of code between any existing lines. If you run out of line numbers, you
> will have to start renumbering.

It also contributed to the spaghetti code, because if you ran out of lines 
and didn't have a automatic renumbering program, you'd put a subroutine 
somewhere, gosub it, and then return. Like patching assembly code. Good 
thing all the variables are global. ;-)  That's why serious people used 
counts of 100 instead of 10. ;-)

>   Control structures were ascetic and limited, as well as the possibility
> of creating things like data containers.
> 
>   It's no serious programmer ever bothered with BASIC.

Not if there was a reasonable choice, and not if you had more than one 
person working on the program. Unless you were just learning how to program.

Actually, I worked with lots of serious programmers that did extensive work 
in BASIC. They were all people I didn't consider very professional, tho, and 
the programs were fairly small compared to what you see for even a simple 
program nowadays.

Except for the ones doing BASIC on the microcomputers, where it was actually 
pretty good, since it was the main supported "high level" language. People 
did some neat stuff in spite of the limitations.

-- 
   Darren New, San Diego CA, USA (PST)
   "We'd like you to back-port all the changes in 2.0
    back to version 1.0."
   "We've done that already. We call it 2.0."


Post a reply to this message

From: Darren New
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 13:34:41
Message: <4a6de531@news.povray.org>
clipka wrote:
> For quite a while you didn't get any programming language for free with
> IMB-compatible PCs when they replaced home computers as the private man's

I'm pretty sure you still had GWBasic in ROM. Indeed, that was one of the 
reasons people wanted a "real" IBM PC and not just a "compatible" - you 
could build the same hardware, but you couldn't include the GWBasic ROMs, so 
code that called into the ROMs (for things like trigonometric functions etc) 
wouldn't work on a "clone" at first. (Or was it "QuickBasic"?)

-- 
   Darren New, San Diego CA, USA (PST)
   "We'd like you to back-port all the changes in 2.0
    back to version 1.0."
   "We've done that already. We call it 2.0."


Post a reply to this message

From: andrel
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 14:04:34
Message: <4A6DEC33.3070508@hotmail.com>
On 27-7-2009 18:56, Warp wrote:
> clipka <nomail@nomail> wrote:
>> Not really the most modern of languages (unless you count VB/VBA, but as you say
>> yourself these are actually totally different beasts), and indeed one of the
>> most frowned-at languages (VB/VBA included in this case); I guess that's mostly
>> undeserved
> 
>   The original BASIC was such a simplistic scripting language compared to
> way more advanced programming languages of the same era (including such
> masterpieces as lisp, which was surprisingly advanced and high-level taking
> into account it was invented in 1958) that it was basically frowned upon by
> everybody from the beginning.

As was Pascal, dismissed as 'just an educational language' that was not 
useful for real life projects.

>   The original BASIC didn't even have the concept of functions. It had a
> very primitive version of them, subroutines (which are like functions which
> don't take parameters nor return anything, and without any local scope).
> The only thing which differentiated a subroutine call from a goto is that
> the subroutine call pushed the caller's address onto a stack, so that a
> "return" statement could return there when the subroutine ends. But that's
> about it.
> 
>   More jarringly, every single variable was global. The concept of local
> variables was inexistent, obviously because of the lack of proper functions.
> 
>   Goto was an inherent part of the language, and used extensively. This,
> naturally, also caused criticism, as liberal use of gotos easily disrupts
> the logical flow of code and makes it harder to follow and understand, even
> if the obfuscation is not intentional.

Some historical context: BASIC is from 1964. The famous 'Go To statememt 
considered harmful' dates from 1968. At the time of design goto was 
excepted and even the norm. You can't blame the designers for that. Not 
even with 40+ years hindsight.

>   Even if we took goto as barely acceptable, its original implementation was
> very ascetic. AFAIK the original BASIC did not support named labels, but
> instead every line of code was numbered (by hand by the programmer), and
> gotos always jumped to a specified line number. AFAIK the numbering of each
> line was mandatory. Naturally this made it quite problematic to insert code
> between existing lines. While it was customary to number the lines in
> multiples of ten, this only gives the possibility of inserting 9 lines
> of code between any existing lines. If you run out of line numbers, you
> will have to start renumbering. And good luck trying not to break existing
> gotos if you start renumbering. (Some later BASIC text editors supported
> automatic renumbering, including all gotos, but naturally no such editors
> existed back then, when even having an interactive text editor in the first
> place was luxury.)

Indeed, when I started at uni ('82) I had to use a line editor for my 
programs on the mainframe. At home and elsewhere I had been using full 
screen editors for many years.

>   Control structures were ascetic and limited, as well as the possibility
> of creating things like data containers.

If you look at what the design constraints were you will find that it 
perfectly fitted. As much as everybody would have loved to have more 
expressivity it would not have fitted in the ROM of these days.

>   It's no serious programmer ever bothered with BASIC.

On the contrary, many did. Those that were designing software that had 
to run on cheap general purpose computers like Apple II and the 
Commodore PET series and the like. Many very serious programmers were 
involved in writing BASIC interpreters and compilers. Perhaps the only 
place it was not as much used was in the just starting computer science 
departments of those days. And if they didn't it was more because they 
had no feeling with the real world outside than anything else.


Post a reply to this message

From: David H  Burns
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 15:00:29
Message: <4a6df94d@news.povray.org>
clipka wrote:

> Not really the most modern of languages (unless you count VB/VBA, but as you say
> yourself these are actually totally different beasts), and indeed one of the
> most frowned-at languages (VB/VBA included in this case); I guess that's mostly
> undeserved, however: The frowns should go to the people who thought it a good
> idea to introduce "GOTO" as the second statement after "PRINT", thereby
> inviting virtually the whole Home Computer Generation to become hobbyist
> spaghetti code producers.

Of which I'm one. But to my mind any good computer language should allow 
one to produce
"spaghetti code" (I had forgotten that term) if one wanted to. The 
"GOTO" statement
deserves much of the frowning it gets, but not all.
> 
> Normally, the first two programs would be:
> 

I remember right the first "real program" I ever wrote was a program to 
calculate ozone
concentration on a Commadore Pet. It was the first computer I ever dealt 
with
and after a *very* short time playing with it I was able to write a 
program to replace
the one we had been using on a TI55(?) calculator (the one with the card 
reader --remember
that?) The Pet had a version of Microsoft BASIC in ROM. For years 
afterwards --
until Windows 95--Microsoft was my favorite software company! I had 
never even been
in the room with a computer before and could hardly use an adding 
machine. but I was
able to write a useful program with almost no experience. I don't see 
any good reason
why the basics of *any* high level computer language should not be 
almost that easy to
learn!
> It's really a matter of programming style whether a BASIC programmer should be
> despised or not. BASIC allows for a broad spectrum there. But then again, ever
> since I've seen the C source code of "NetHack", I can tell that at least C
> programs - even when not deliberately obfuscated - can be just as messy as any
> BASIC code. 

Much more so, I am assured. "Document the H* out of your C code!" was 
one of my
teacher's advice.
> 
> 
>> QuickBasic was it's highest development.
> 
> Just out of curiosity: Did they ever introduce such things as structs (records
> in Pascal)? That was the thing that bothered me most about BASIC ever since I
> first wanted to store a list of data tuples. Using a separate array for each
> "dimension" of the tuple just didn't feel right.

Not in QB as I recall. You can do it sort of in VB4, but ir fights you. 
That would
have been one of the next logical steps, along with C-like pointer 
capability and, of
course Windows graphic capability. If I remember right, the QuickBASIC 
and QuickC
IDE's were models of what a good simple IDE should be. Microsoft was 
good in those
days!

>> I was able to display an image and VBnet seemed to promise good image
>> handling capabilities if one could only figure them out.
> 
> If graphics (or any other non-textual user interaction, for that matter) is what
> you want to do, it comes as no surprise to me that you don't like modern
> computer languages. The major problem, however, is not an inherent feature of
> the languages themselves, but of graphical user interfaces (at least as far as
> Windows is concerned; 

Yes access to Windows graphic functions seem unnecessarily complicated and
poorly documented. I can't see any good reason for this.

I never got to have a look at X Window or the like),
> which follow an *event-driven* paradigm - i.e. *they* want to tell your program
> when to do what, which is almost perfectly incompatible with the classic
> application-driven paradigm. And although I guess this is exactly what you're
> wrongly attributing to OOP, you're not so far off the mark: As a matter of
> fact, an object in OOP can be regarded as an event-driven piece of software
> (each method call constituding an event), so OOP is a very good paradigm to
> model an event-driven application: All you need to do is consider your whole
> application an object, too - which I admit is indeed *not* a natural way of
> thinking.
> 
> (However, while the event-driven paradigm *is* an antithesis to the classic
> application-driven paradigm you undoubtedly favor, OOP can be used perfectly
> well for both.)
> 
> Unfortunately, modern mainstream programming environments indeed don't seem to
> come with any framework to support the classic application-driven paradigm,
> except for purely textual interfaces ("console application" in Microsoft terms)
> or a static sequence of dialogs ("wizards").

I don't understand a lot of what you say, but it fascinates me, I may 
have to learn OOP
and more about modern programming just for the fun of it.


> Speaking of Borland, maybe they still come with the good old "graph" library and
> the BGI graphics driver format, in which case I'd expect them to include a BGI
> to interface to Windows, too.

Maybe it does, if so I haven't be able to find it--or recognize it. The 
old "graphic.h" was for DOS and
won't work on XP, anyway, and I think the routines are incompatible with 
modern graphic
cards.
> 

> 
> C is really not a pretty language, by the way. 

No, but it's fascinating, and in my little experience addictive.

David :)


Post a reply to this message

From: David H  Burns
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 15:11:20
Message: <4a6dfbd8$1@news.povray.org>
Warp wrote:
> clipka <nomail@nomail> wrote:
>> Not really the most modern of languages (unless you count VB/VBA, but as you say
>> yourself these are actually totally different beasts), and indeed one of the
>> most frowned-at languages (VB/VBA included in this case); I guess that's mostly
>> undeserved
> 
>   The original BASIC was such a simplistic scripting language compared to
> way more advanced programming languages of the same era (including such
> masterpieces as lisp, which was surprisingly advanced and high-level taking
> into account it was invented in 1958) that it was basically frowned upon by
> everybody from the beginning.
> 
>   The original BASIC didn't even have the concept of functions. It had a
> very primitive version of them, subroutines (which are like functions which
> don't take parameters nor return anything, and without any local scope).
> The only thing which differentiated a subroutine call from a goto is that
> the subroutine call pushed the caller's address onto a stack, so that a
> "return" statement could return there when the subroutine ends. But that's
> about it.
> 
>   More jarringly, every single variable was global. The concept of local
> variables was inexistent, obviously because of the lack of proper functions.
> 
>   Goto was an inherent part of the language, and used extensively. This,
> naturally, also caused criticism, as liberal use of gotos easily disrupts
> the logical flow of code and makes it harder to follow and understand, even
> if the obfuscation is not intentional.
> 
>   Even if we took goto as barely acceptable, its original implementation was
> very ascetic. AFAIK the original BASIC did not support named labels, but
> instead every line of code was numbered (by hand by the programmer), and
> gotos always jumped to a specified line number. AFAIK the numbering of each
> line was mandatory. Naturally this made it quite problematic to insert code
> between existing lines. While it was customary to number the lines in
> multiples of ten, this only gives the possibility of inserting 9 lines
> of code between any existing lines. If you run out of line numbers, you
> will have to start renumbering. And good luck trying not to break existing
> gotos if you start renumbering. (Some later BASIC text editors supported
> automatic renumbering, including all gotos, but naturally no such editors
> existed back then, when even having an interactive text editor in the first
> place was luxury.)
> 
>   Control structures were ascetic and limited, as well as the possibility
> of creating things like data containers.
> 
>   It's no serious programmer ever bothered with BASIC.



Clearly, I am no serious programmer. That charge, I accept gladly and 
rejoice in it!
Thanks for the history of BASIC, I didn't know anything about it. As I 
said elsewhere,
my first experience of it was Microsoft Basic and serious programming 
language or not,
it was *very* useful at work and at play! And by it, I learned that even 
I can program,
though perhaps some would hesitate to admit that. :)

David


Post a reply to this message

From: Darren New
Subject: Re: Tell me it isn't so!
Date: 27 Jul 2009 15:13:14
Message: <4a6dfc4a$1@news.povray.org>
andrel wrote:
> As was Pascal, dismissed as 'just an educational language' that was not 
> useful for real life projects.

Much of that comes from not having standardized the libraries, by the way. 
Most of the languages from the early 60's lived or died based on how well 
you could interface to the OS without learning the details too hard. If you 
couldn't open a file by name with your language, you were pretty much doomed 
to obscurity. If you couldn't read and write the standard files that the 
"real" programming languages (FORTRAN, COBOL, etc) created (regardless of 
whether you had to open them outside the program), you didn't even get off 
the ground.

-- 
   Darren New, San Diego CA, USA (PST)
   "We'd like you to back-port all the changes in 2.0
    back to version 1.0."
   "We've done that already. We call it 2.0."


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.