Welcome in the Buggles' World

You just started the Programmer's Learning Machine. This is a Learning Management System aiming at teaching the art of computer programming through interactive exercises. It is constituted by a set of exercises grouped by lessons, allowing you to practice at your own pace. Currently, the environment is configured to be programmed in the [!thelang/] programming language, but you can change it from the Language menu if you want, or by clicking on the [!thelang/] icon at the right of the status bar below.

In this first lesson, the buggles will lead your first steps in programming.

The buggles? What is this??

The buggles are little animals obeying any order you may give them. In each exercise, you have to provide them with the right instructions so that the world turns into the objective of the exercise. For example in this exercise, you should instruct your buggle to move forward once. You can see that by checking the difference between the World view and the Objective one. Depending on the exercise (and your settings in the Language menu), your code must be written in either C, Java, Python or Scala.

Working environment

Before going any further, get familiar with the working environment. Have a look at the several elements composing the main window, move your mouse over them to show the tooltip, and experiment with the elements to see what they do. The white area below is the console: this is where errors and messages get displayed.

If your code contains errors (and code always do at some point), the computer will display error messages in the console. You obviously have to fix the errors to pass the exercises. The messages that get displayed may sound scary at first glance, but don't panic. The compiler is only somehow limited in its communication abilities, but he's not mean. If you look closer, the solution to solve your issue is written in the middle of those cryptic messages. You will see, with a bit of habit, we get used to it.

What am I supposed to do?

It's time to write your first program. Simply ask your buggle to move one step forward using the Source Code pane. For that, simply write the following code (clicking on the interactive controls is not enough: You have to write the code after experimenting interactively).

[!java|scala|python]forward()[!java];[/!][/!][!c]stepForward();[/!]
[!java|c]

Do not forget the final ; which tells the compiler that the instruction is over (yes, computers are so dumb that they cannot guess obvious stuff like this).

[/!]

Once done, click on run. You can proceed to next exercise once it works.