Other Easy Programming - Beginner Yabasic Yabook?

Hello,

I find yabasic, ideal for beginners. Basic and free. Available for Windows, Linux and BSD.
Programming for everyone.

There is a manual here:

Hello world example
This is the "Hello world !" source code example.

print "Hello world !"
Save it with in hello.yab then run it typing:

~# yabasic hello.yab
Hello world !


More links, or PDFs, are highly welcome.
Yabasic needs to be promoted. More documentation, especially for kids and teenagers, would be welcome. It could be made as well a Raspberry FreeBSD SD image with available Yabasic.
(Note, it works as well under a simple terminal or with SSH ;) cool ;))
 
I think that BASIC was an appropriate language for beginners in the 80s of the last century. And even then it could be argued that PASCAL was better.

However, in this century there are much better languages for beginners. Languages that encourage structured programming, support modern data types and programming paradigms. BASIC doesn't do any of that.

One such language would be Python. It's easy to learn for a beginner, with a gentle learning curve, but still very powerful and can be used for serious work. It's also very popular on the Raspberry Pi – in fact, most of the images have Python pre-installed, along with modules to access the Raspi's hardware features.
 
I think that BASIC was an appropriate language for beginners in the 80s of the last century. And even then it could be argued that PASCAL was better.

However, in this century there are much better languages for beginners. Languages that encourage structured programming, support modern data types and programming paradigms. BASIC doesn't do any of that.

One such language would be Python. It's easy to learn for a beginner, with a gentle learning curve, but still very powerful and can be used for serious work. It's also very popular on the Raspberry Pi – in fact, most of the images have Python pre-installed, along with modules to access the Raspi's hardware features.

I also think that PASCAL is a good way, maybe at university level, or earlier if possible.

BASIC is good for early analytic thinking. If, then, input, print, loop, goto, ... when solid basic knowledge is there. Pascal needs to come first.

For a really, easy approach BASIC is still good. I guess that school shall propose free software, programming, on Raspberry PI. (free, opensource software). Yabasic is readily available on any platform : linux and BSD.
+ Enormous advantage: You can run your applications without graphical frontend ;) At least for learning UNIX later. Whatever it will be...

What about not to use Python ;) No one use python for early steps in programming.
 
I also think that PASCAL is a good way, maybe at university level, or earlier if possible.

BASIC is good for early analytic thinking. If, then,...
… goto …
Sorry, but that's exactly the wrong way. BASIC is not good for early anything.
when solid basic knowledge is there. Pascal needs to come first.

For a really, easy approach BASIC is still good. I guess that school shall propose free software, programming, on Raspberry PI. (free, opensource software). Yabasic is readily available on any platform : linux and BSD.
+ Enormous advantage: You can run your applications without graphical frontend ;) At least for learning UNIX later. Whatever it will be...
You are mixing things up. The question of a graphical front end is not a question of the language.

Second, both BASIC and PASCAL are very old and outdated. (Well, C is very old, too, but that's a different story.)
Beginners should not start with an obsolete language that teaches them the wrong things (such as using “goto” instead of exceptions or other modern paradigms).

What about not to use Python ;) No one use python for early steps in programming.
Hu, “no one”? What are you talking about? Python is quite popular as a beginner's language.
 
By the way, the yabasic homepage looks rather suspicious. There is no imprint (which is illegal for a .de domain), no privacy statement (also illegal) and no real license or copyright for the code. There is no mention of the author(s) anywhere on the site. I would advise against downloading anything from there.
 
Python is also the only language that I would recommended for beginners. Not only is it easy to learn, it's also useful. It's one of the most popular languages at the moment. When you learn BASIC or Pascal, you can learn concepts but then you would have to learn a new language in order to be productive in any organization.
 
Python is also the only language that I would recommended for beginners. Not only is it easy to learn, it's also useful. It's one of the most popular languages at the moment. When you learn BASIC or Pascal, you can learn concepts but then you would have to learn a new language in order to be productive in any organization.

I am sure that PYTHON is the worst language to start with for early steps. The tabulation means that focus will be directed on something else. The complexity is also huge.

Focus shall be to free mind for simple commands: print, input, variables, if, then, goto, loop. Already enormous time investment. Which makes BASIC the easiest basic programming language.
 
By the way, the yabasic homepage looks rather suspicious. There is no imprint (which is illegal for a .de domain), no privacy statement (also illegal) and no real license or copyright for the code. There is no mention of the author(s) anywhere on the site. I would advise against downloading anything from there.
This licensing is kinda weird, yeah.

Which other Free, BASIC would you propose ?

FreeBASIC for instance?
 
I am sure that PYTHON is the worst language to start with for early steps. The tabulation means that focus will be directed on something else. The complexity is also huge.
Obviously you haven't tried to work with Python yourself yet. Because what you write is just plain wrong. And it is spelled Python or python, by the way, not PYTHON.

Focus shall be to free mind for simple commands: print, input, variables, if, then, goto, loop. Already enormous time investment. Which makes BASIC the easiest basic programming language.
You are seriously advocating that beginners should learn to use “goto”? That doesn't make any sense.

By the way, of course you can use Python to start with simple things (print, input, if, …). When you learn something, you always start with simple things. The more complex and powerful concepts can be learned later, one after another. You shouldn't try to do all at once.

Which other Free, BASIC would you propose ?
I do not propose any BASIC. I thought I made myself clear already.
 
The easiest way is to receive a preinstalled SD card (8Gb or 16Gb), to place it into the reader of the Raspberry PI.
Power, and it boots. It uses the autologin trick, and it starts a basic editor for Yabasic (for instance this one).

Fullscreen without graphical X environment (no X, no Wayland interface), just BASIC, powered by FreeBSD !!.

Type what you want:

print "Hello"
input "Enter your name? " a$
print "Your name is" + a$

F5 = RUN!

To Get a Good Manual, I took an old book about BASIC for C64 - which is actually still quite valid.
Just small changes.
 
The main question is whether you want to learn programming as a hobby or you want to get more involved. If you like some projects, and you're willing to lend a hand, you better pick the language & framework those projects use. I would suggest against starting with a language that will do too much hand-holding or that will create bad habits in the long term. Automatic memory management, AKA garbage collection, is one of them. It is nice, however, in the long term, it takes care for the memory only and all other resources (files, sockets), you'll have to manage by yourself anyway.

Learning basic syntax/rules of a programming language is easy (okay, not that much with C++). It is harder to master a language (nearly impossible with C++). And it takes a lot of effort to learn & master some languages' standard library or popular 3rd party libraries.
 
The main question is whether you want to learn programming as a hobby or you want to get more involved. If you like some projects, and you're willing to lend a hand, you better pick the language & framework those projects use. I would suggest against starting with a language that will do too much hand-holding or that will create bad habits in the long term. Automatic memory management, AKA garbage collection, is one of them. It is nice, however, in the long term, it takes care for the memory only and all other resources (files, sockets), you'll have to manage by yourself anyway.

Learning basic syntax/rules of a programming language is easy (okay, not that much with C++). It is harder to master a language (nearly impossible with C++). And it takes a lot of effort to learn & master some languages' standard library or popular 3rd party libraries.

Just Hobby - at first, to learn thinking.
What was your first programming experience, and when did you start (age)?
 
Goto can cause confusion but it's okay if used judiciously by an expert. I have seen gotos in both the Linux and FreeBSD kernels.
Wasn't there some paper by someone opinionated called "Goto Considered Harmful"? I don't care what some randomer thinks.
Two judicious uses of goto in C:
  1. to break out of multiple nested loops with a single keyword ( avoids a "flag" variable.
  2. in a function that does multiple sequential operations, each of which can cause a memory/resource leak. It is desirable to have a single point at the end of the sequence, labeled "failure", which cleans up any resources, and jump to it with a goto. This keeps the cleanup simple and avoids repetition and the ugliness of cleaning up "inline".

Having said that, I'm a bit disillusioned with BASIC. The BASIC landscape is fragmented and support is hard to find. Also many BASICS are proprietary meaning their future is uncertain.
If I was advising a new programmer I'd say to learn Haskell. Much harder in the beginning but it teaches you good habits that you can then apply in any other language.
 
What I like with yabasic, is that possibility to use it without graphical environment - especially with SSH. But, actually, you did mentioned, there is no clear certain future for BASIC.
Qbasic is likely more certain ;)

I think that GOTO is an important function.
It helps in programming thinking, in order to understand better the concept of loop.

It is important to be learned to get the concept, later of procedure/function.
First GOTO to practice a simple loop concept.

Step by step - little by little
 
Goto can cause confusion but it's okay if used judiciously by an expert.
That is an interesting question, which experts don't agree on. Some people say that goto is always bad, and must never be used. Other people say that the "Knuth goto" (for error handling) is legitimate in languages that don't have structured error handling mechanisms; the folks in the former group say that even that use is bad and one should use if statements instead. I've not heard anyone (who is sane) say that any other use of goto is acceptable. This topic is debated in the software engineering community, although in the last 10 or 15 years, the first group seems to have won the debate. Personally, I have functioned in communities of either style, and I can adapt.

I have seen gotos in both the Linux and FreeBSD kernels.
Kernels are to some extent different from normal programs; some low-level and hardware-near programming can require unusual programming styles that should not be used otherwise. Both kernels are also quite old, and there is serious debate over the quality of the Linux kernel. Using them as a guideline for good software engineering practices is a bad idea.

Wasn't there some paper by someone opinionated called "Goto Considered Harmful"? I don't care what some randomer thinks.
It was Dijkstra. I wouldn't call him opinionated ... I would call him one of the greatest computer scientists and software engineers of all times. He is very much not a "randomer". But we need to understand that other very smart people (among them Knuth and Wirth) were on different sides of this debate.

to break out of multiple nested loops with a single keyword ( avoids a "flag" variable.
Some programming languages (like Java) introduced the concept of labeled loops, and then allow the break and continue statements to break out of specific loops. There is some debate whether this is a good or a bad thing though. Personally, I like it. But in many cases, this can be handled cleanly, without goto, and without flag variables. And if it can't be handled cleanly, then an explicit flag variable makes clear what is going on.

in a function that does multiple sequential operations, each of which can cause a memory/resource leak. It is desirable to have a single point at the end of the sequence, labeled "failure", which cleans up any resources, and jump to it with a goto. This keeps the cleanup simple and avoids repetition and the ugliness of cleaning up "inline".
That is the "Knuth goto". There are other ways of handling it, which are just as clean, and which don't require multiple copies of the cleanup code.

If I was advising a new programmer I'd say to learn Haskell. Much harder in the beginning but it teaches you good habits that you can then apply in any other language.
Interesting idea. Before we can give any explicit advice on what programming language to learn, we need to ask why the person wants to learn programming. Are they going to be a computer scientist? In that case, they will learn a lot of different programming languages anyway; and the skill they really need is not being great programmers, but understanding how computers and algorithms work. Are they going to be professional software engineers (which is very much not the same as a computer scientist)? Then they really need to learn other skills, such as OOA&D, engineering processes, QA and test, and several programming language. Most importantly, they need to learn good taste in the craft of programming (which is neither a science nor purely an engineering discipline, but at its core a craft). Are they going to be casual computer users, who need to occasionally program (like typical data scientists or economists, who need to be able to analyze data, but not build towering edifices of software)? Then they need something that's relatively easy to learn and use, since it is not their main focus. Very different requirements.

As far as I can see, most introductory programming classes today are done in Java or Python.
 
Just Hobby - at first, to learn thinking.
What was your first programming experience, and when did you start (age)?
I've started at about age of 10, on a Bulgarian rip-off of Apple ][, with BASIC it originally came with, built-in. The funny part is, that recently (say few years ago), after reading an interview with Wozniak, I learnt, that there was integrated debugger, as well 😀 Didn't know that, back then.

However BASIC is really not very good first language. 5 or 6 years later a friend of mine showed me C.
 
Building Yabasic from source uses a Rakefile which requires Ruby.

For comparison - here is hello world in Python.

print "hello world"

... and Ruby ...

puts "hello world"

Python is too much complex.

Basic is really a first good step for easy stages of programming - if it is GNU, Free, Open.
qbasic is still used for learning basic.

Usually, at universities level, Pascal (like languages) is still existing ;) Good thing.
The era of python ..
But, Microsoft Basic might be the first programming approach even :) Quite interesting that Microsoft is still so much present in the education at the time of opensource for programming.
 
I've started at about age of 10, on a Bulgarian rip-off of Apple ][, with BASIC it originally came with, built-in. The funny part is, that recently (say few years ago), after reading an interview with Wozniak, I learnt, that there was integrated debugger, as well 😀 Didn't know that, back then.

However BASIC is really not very good first language. 5 or 6 years later a friend of mine showed me C.

I started Basic too, on an early machine with disks even ;)
At that time, there was not many manuals. I learned basically by myself reading source codes, just programming interests. Asm Assembler, AlphaBasic Alpha Microsystems, Business Basic, MBasic, Cbasic, ... Prolog,...
Then Basic microsoft 1.0,
C came afterwards, like long-awaited discovery,
Pascal,...
 
The funny part is, that recently (say few years ago), after reading an interview with Wozniak, I learnt, that there was integrated debugger, as well 😀 Didn't know that, back then.

I remember this. To get the debugger from Applesoft,

CALL -151

... to get back to BASIC on your ][+ or ][e ...

3D0G

I do not miss BASIC, not one bit.
 
Python is too much complex.

You keep repeating yourself over and over and over again. Python is not complex at all so I fail to see why it would be "too" complex. Where is your proof? It is very obvious that you are just advocating a project (YaBASIC) in which you have some involvement. It's not because you like BASIC that it suddenly becomes the BEST LANGUAGE IN THE WORLD and everything else is overly complex or stupid.
 
Structured programming is possible with BASIC, for example a Turbo/Power BASIC for DOS I wrote some decade ago ;-)
 

Attachments

  • pflash.bas.txt
    9.6 KB · Views: 144
Hi ralphbsz,
Gosh, that's a lot to take in...
I suppose my labelling of the anti-goto evangelist guy as opinionated might have something to do with others who dismiss goto and BASIC without actually thinking about them. Maybe he did think about it but I don't know as I'm not him. I don't like that the no goto rule has passed into programming lore as a sort of "generally accepted fact" though.
Also I think it's very easy to make code that's labyrinthine in nature without a single goto - I tried to read the GNU Debugger source code recently and eventually gave up because every function seemed to just call another function (often in another file). Sometimes, paradoxically, even simplicity can be overdone and begin to obscure the meaning of the code.
I guess that's where one needs the "craftsmanship". And for me, I needed to write a lot of bad code before I knew what good code was.
When I said I'd recommend a beginner to learn Haskell I meant it in an idealistic, hacker kind of way. Obviously if there were financial or time pressures it might be more practical to learn something miserable like Java!
 
anti-goto evangelist guy

Let me refer you to https://en.wikipedia.org/wiki/Structured_programming. Specifically this part (emphasis mine):
High-level programming languages that originally lacked programming structures, such as FORTRAN, COBOL, and BASIC, now have them.

That's the usual if/then, for/while and subprograms (functions and procedures) stuff you now take for granted. The whole GOTO debate does not exist in a modern context, you have to consider the state of the software industry at the time the Dijkstra's letter was written.
 
Back
Top