BASIC programming with Gambas for the beginner programmer | Opensource.com
BASIC programming with Gambas for the beginner programmer
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: