Our first day we're going to focus on getting used to the Quorum Studio interface and running some simple programs. Quorum Studio is an Integrated Development Environment (IDE). That means it's a program designed to help us write programs.
First things first, open Quorum Studio.
From the Windows start menu search for Quorum Studio and launch the app.
If you need to increase the font size you can use the Ctrl + = shortcut to make the text bigger. The Ctrl + - shortcut will make the text smaller.
If you are looking for other Quorum Studio keyboard shortcuts you can try this page (which is the same as the Quorum Studio Hotkeys Info button at the top of this page).
For our very first program we're going to create a console project.
Select File from the main menu (alt+f) and then New Project (ctrl+n). This will open up the New Project Dialog.
Make sure the General tab is selected in the dialog and select the Console option.
In the Project Name text box enter a name like "Hello World" for this project. Select the OK button at the bottom-right of the dialog.
Select the left-hand tool palette by clicking it or by pressing the ctrl+1 shortcut. Make sure the Projects tab is selected.
Expand your new project. Inside the project you should see a SourceCode folder.
Inside the SourceCode folder you should see the Main.quorum file.
Select the Main.quorum file. A blank file will open up in the editor.
Move the focus to the editor by clicking in the editor window or by pressing the ctrl+2 shortcut.
Add the following line of code to your Main.quorum file:
output "hello world"
While this is a simple program. This is also one of the most famous programs in all of computer science. This is the traditional first program to write in a new language. This program is so well-known that it even has a dedicated Wikipedia page! You can check it out here.
To run your program you can either click the green play button in the main toolbar over the editor window or press ctrl+r.
The output of the program will be displayed in the Output palette. Navigate to it by click the palette in the bottom of the screen or by pressing ctrl+3.
Select the Console tab to view your program's output. It should resemble the following:
Building Hello
Running Hello
Build Successful in 4.62 seconds
hello world
The output of the program says "hello world" because we told the program to output that. Let's modify the program so that it greets you instead of the entire world.
Click the editor window or navigate to it by pressing ctrl+2. Change the program by replacing the word "world" with your first name.
Run the program again by clicking the green play button in the main toolbar or by pressing ctrl+r.
Check out the console output (ctrl+3) to see that the program is now greeting you by your name.
Now that we've seen a program successfully run in Quorum, let's see what it looks like when your program has errors in it.
Click the editor window or navigate to it by pressing ctrl+2. Delete the second quotation mark in your program.
Run the program again by clicking the green play button in the main toolbar or by pressing ctrl+r. What happens?
Navigate to the Console tab by clicking or pressing ctrl+3 and read the error message.
Note that the error message is giving you some important information. It is telling you what compiler thinks the error is. It's also telling you which line number of the program it found it on.
Ok, let's correct the intentional mistake we made.
Click the editor window or navigate to it by pressing ctrl+2. Add a second quotation mark to the end of the line that matches the quotation mark before the word hello.
Run the program again by clicking the green play button in the main toolbar or by pressing ctrl+r to verify the program successfully runs again.
Return to the editor and think of a new way to break the program. Modify the program to introduce a new bug.
Run the program again by clicking the green play button in the main toolbar or by pressing ctrl+r and examine the error message your bug triggered.
Rinse and repeat and see how many different error messages you create with this simple one line program.
This lab demonstrated the basics of programming in Quorum Studio. You created a new project, wrote a simple (but famous) program, and successfully ran it. You also modified your program to intentionally introduce bugs into it. You examined what the output looks like when your program has mistakes in it.
It's important to remember that mistakes are an important part of programming. Bugs are common when writing professional code and identifying and fixing bugs is an important skill to develop.