BASIC programming with Gambas for the beginner programmer

No readers like this yet.

Scratch is a great tool for teaching programming to young children, but what happens when kids outgrow Scratch? Among Raspberry Pi aficionados, the typical answer is to advance to using Python, which is an excellent choice. However, in honor of the 50th birthday of BASIC, I would like to suggest another programming environment: Gambas.

Created by Benoît Minisini, Gambas is a Visual Basic-like Integrated Development Environment for Linux and BSD. It is not intended to be a 1:1 clone and will never be compatible with Visual Basic, but there is a Gambas module for "Visual Basic conversion help." The Gambas project's purpose is to produce a tool with the benefits of Visual Basic, while avoiding many of the things that Minisini found problematic in Visual Basic. Think of it as Visual Basic: The Good Parts edition.

Gambas has plenty to offer the beginning programmer without being overwhelming. The new project wizard presents six basic project types: graphical application, Qt graphical application, GTK+ graphical application, command-line application, SDL application, and CGI web application. The user selects one of these and also selects what optional features they would like (e.g., database access, internationalization, network programming, plus a few others). Once the project creation wizard is complete, the user is presented with a clean, uncluttered interface to design the forms and write the code for their new project. Inexperienced programmers, or those looking for inspiration for a project, can learn from the numerous example projects, which run the gamut from simple games (including a ncurses-based Pong!) to useful utilities for text and image manipulation.

Of course, it doesn't do any good to write a program if a programmer can't share their finished program with others. If the correct build tools are installed, Gambas can turn projects into packages for a large number of Linux distributions. Gambas running on, for example, Fedora can easily create packages for Arch, Debian, Fedora/RHEL/CentOS, Mageia, Mandriva, OpenSUSE, Slackware, and Ubuntu/Mint. The packages can be shared with others, and they will be able to install and run the program. The distributions' package managers should automatically install the required Gambas run-time and any required modules.

Install it for yourself, and give Gambas a try:

  • For Debian/Raspian/Ubuntu: apt-get install gambas3
  • For Fedora: yum install gambas3-ide gambas3-examples
  • Installation instructions for other distribution can be found here

If you like what you see and want to use Gambas as an instructional tool (or just need some help getting started yourself), A Beginner's Guide to Gambas—Revised Edition by John W. Rittinghouse and Jon Nicholson is a great resource. The book is slightly dated (it was written when Gambas 3.0 Alpha was the newest release), but it still provides a excellent introduction to Gambas and introductory programming principles. Even better, it is available under an Open Content License. You can download the book and source code for the chapters' projects from the A Beginner's Guide to Gambas website. Apologies in advance for the somewhat odd download method required. The download links are in a Flash widget. Try installing the GNU Gnash plugin if you want to download the book and don't have Adobe's Flash plugin installed on your system.

Other Gambas resources to check out:



Thank you for sharing this. I have been trying to find the best way to teach my son to code. C, C++ or even C# may be a bit advanced to start on. I started with BASIC then went to Assembly in the old days.

The interactivity of BASIC makes the language an ideal introduction to programming. Like yourself I started on BASIC and graduated to 6502 assembly language within a few months. The ability to combine BASIC and assembly opcodes within the BASIC programme on my Commodore VIC-20 turned me into the geek that I am today.

Visual Basic is a mess. A simpler and more modern language like Go ( , ) - it has a syntax similar to C, but has automatic garbage collection and a simpler object orientation than other languages

It is a compiled language, but even large programs compile and run in a few seconds so it is close to the interactivity of interpreted languages
- It is possible to compile a large Go program in a few seconds on a single computer.
- Go provides a model for software construction that makes dependency analysis easy and avoids much of the overhead of C-style include files and libraries.
- Go's type system has no hierarchy, so no time is spent defining the relationships between types.
- Although Go has static types the language attempts to make types feel lighter weight than in typical OO languages.
-Go is fully garbage-collected and provides fundamental support for concurrent execution and communication.

To sum up, Go is kind of "C meets Python" in concept. You could also try Python.

The only thing is that Go and Python need a little bit of patience initially to take the time to understand packages and syntax because most of the functionality including the flashy stuff isn't built in like it is in Visual Basic, but needs to be imported.

Vote to bring back the VB6 programming language:

I found Gambas good, (mostly for beginners). It has two GUI: GTK and Qt. It has auto-completion.It is Object Oriented. I do not know whether it's GPL or Open Source but I guess it's fairly free onto plenty of free Linux platform. Unfortunately, it comes with lot of dependencies with different license each!! Still, it lacks of a real free database support.
Dependencies and all of their different editions make Gambas fractional, some time no backward compatible. An improvement could be a dedicated linux, look at GambOs!!
Most of the other languages do not have a modern, simple GUI too, nor a free database.
Java is not free for commercial productions.
Python, Perl and C have GTK but the database. Perl is pure script: programmers some time
do not want to share their source code.
My choice is C. For the free database...make your own!!

Microsoft have just announced "everyone’s favorite VB6 Runtime will continue to work" in Windows 10.
VB6programming and VBA programming continue.

But Microsoft still won't open source VB6 programming.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.