Skip to content

14 Days: A Beginner’s Guide to Coding

It’s always a good time to learn something new! And maybe you have some free time on your hands now? We know our screen time is up to 23 hours and 47 minutes a day so let’s put that inevitable extra screen time to good use and learn a new skill – programming. If you are going to add programming to your skillset, it’s logical to begin with a language that makes it simple to learn the basics of programming. Let me show you a learning path you can follow over 14 days that is aimed at giving you a confident and capable to start to programming. After 14 days, you will have the basic skills to begin creating your own apps. And using Xojo, with the check of a box, you can build those apps for Mac, Windows and Linux and after that, use your new skills to develop web, iOS and Raspberry Pi apps!

Day 1: Wet your Feet!

Download Xojo in your platform of choice (Mac, Windows or Linux). It’s free and you can use it as long as you want to run and debug (that means find errors) your apps within Xojo. 

Tip: You can find the Xojo System Requirements for your operating system (OS) of choice here.

Once downloaded, start the Xojo IDE (Independent Development Environment, ie the Xojo app) and you will be presented with a window giving you access many of Xojo’s free resources. If this is your first contact with Xojo, the Getting Started section is a good place to start.

If you’re interested in developing Desktop apps, point your browser here and follow the tutorial steps. You can do the same both for Web and iOS projects if you want to start there!

Tip: You can find QuickStart Guides in other languages, plus other resources like User Manuals, Courses, Tutorials & videos. So, if your prefer to learn in your native Spanish, German, Italian or French, visit the International section in the Xojo Dev Center.

The Tutorials take about an hour to complete and focus on familiarizing you with the main IDE areas in Xojo, the Editors and how to layout and interact with some of the native controls available and ready for use in your apps.

Through these Tutorials you’ll also start to learn some main concepts, like Properties, Events, and even write your first lines of code in Xojo programming language!

Tip: After completing the Tutorial, try to reproduce the project without relying on the documentation, make variations and try to understand how all the pieces fit together. Doing is a great way to learn, so try to do your own simple project from scratch. Or check out these 2 minute Hello World! examples for your OS of choice.

After that, my advice is to watch some of the many Xojo videos. This Intro to Xojo video is a good one to gather some more basics. And you can find more beginner videos in this Getting Started with Xojo playlist.

Day 2: Getting Programming Basics

Whether you know other programming languages or if this is your first language to learn, understanding the fundamentals of programming will give you a leg up. I strongly recommend that you download the free “Introduction to Programming with Xojo” textbook (available in PDF and iBooks formats).

This book will introduce you to more of the Xojo language and walk you through writing projects, complete with code snippets, that will help you grasp the basic concepts behind: variables, programming structures like loops, functions and parameters, plus you’ll get your first contact with the Xojo Debugger (the Debugger allows you to find and fix bugs in your app).

Tip: Don’t get discouraged if you don’t know a word or concept. You are learning a new language after all. Take a moment and look things up in Wikipedia or the Xojo Dev Center.

You don’t need to finish the book on day 2. It will take some time to get through the content and all the examples. The important thing is not how much you advance in one day, but to understand and retain what you learned! Don’t get down if you feel like you still don’t understand what the code does; it’s only day 2!

Day 3: Going Through the User Guide

Hopefully some broader aspects of coding are coming into focus, so let’s drill down into Xojo itself and see what the IDE has to offer. To do this you’ll want the User Guide. At this point, maybe some of the chapters are familiar to you, go through them and focus on those chapters and sections that are really new to you!

As with the “Introduction to Programming with Xojo” book, you don’t have to read the whole User Guide in one day! (You should not do that, in fact.) Read both while you advance developing your own little apps to put into practice what you have learned. These don’t need to be complex apps, they just help you get used to the IDE, the Code and Layout Editors, the Inspector Panel and the Debugger.

Tip: Keep watching the videos in the Getting Started playlist in the Xojo YouTube channel. Go ahead and click Subscribe so you can receive notifications when we upload new videos! Now is also a good time to start watching the videos in the Quick Tutorials playlist, covering topics for Desktop, Web and iOS development with Xojo.

Day 4: Get Object Oriented!

There are many Object Oriented programming languages out there and OOP languages offer many advantages. As you have hopefully discovered, the Xojo language is easy to grasp and start using. This is partly because Xojo is Object Oriented.

Tip: Object-Oriented programming (OOP) is a style of programming based on “objects”, which are data structures that contain data (properties) and code (methods). These data structures are called “classes”. Classes are the fundamental building blocks of all Xojo applications.

To speed up that way of thinking, I strongly recommend you that you watch the “Object-Oriented Programming Concepts” and “Advanced Object-Oriented Programming Concepts” videos.

You want to start thinking and writing code so you can reuse it and evolve it without breaking what you have already done. Here is a good (and short!) tutorial that puts this into practice. It will teach you how to do one of the first things most developers want to do – modify the behavior of an existing control so it fits a specific need or create your own controls.

Day 5: Take a look at the Examples!

At this point you should feel pretty comfortable using the Xojo IDE and writing simple apps using the Xojo language.

Tip: Not quite comfortable yet? Take an extra day and do something fun. Make a Klingon Translator, Asteroid Run or try one of these #JustCode Challenges.

Though I am sure your practice apps have grown more sophisticated each day; there are probably still a lot of gaps in your coding knowledge. This is a good time to check out the Example projects provided with the Xojo download. There are 400 project examples, and you can find them listed and categorized here by topic or area of interest. If you are looking for an example about how to do something specific, these can be a good starting point. You can use the example code “as-is”, modify the code to adapt it to your particular needs or simply to learn a particular technique: files, databases, internet, communication, menus, controls…

Day 6: Databases

Xojo is both an IDE and a programming language, but most of today’s apps make use of a wide variety of technologies too…like databases. For a lot of projects, databases are a must.

Tip: A database is “an organized collection of data generally stored and accessed electronically from a computer system.” Xojo comes bundled with the SQLite database and supports PostgreSQL, MySQL, Microsoft SQL Server and Oracle databases. Plus, you can use ODBC to connect to other databases such as Access, FoxPro, FileMaker, Firebird and even IBM iSeries.

So if you need to use databases, Xojo has got you covered. The Xojo framework is large enough so you can find the classes you need, ready to use. And the Dev Center, the Examples folder and the Xojo Forum have what you need to get your database project up and running. Since Xojo comes bundled with SQLite, that’s a great place to start. I’d recommend the “SQLite Basics” and “SQLiteDatabase and iOSSQLiteDatabase for Beginners” lessons that will teach you from the ground up, no previous experience working with databases is required.

Bonus: See why SQLite Rocks!

In addition, there are 11 videos in the Xojo Database playlist, topics range from designing a database, to the creation of a database based application, PostgreSQL, ODBC, or even creating REST web services in order to work with remote databases from mobile devices.

Many database-based apps require generating reports at some point, and Xojo includes its own Report Editor. Open any of the included examples or start your own “testing project” from scratch in order to learn how to work with reports in Xojo. Here you can find a good tutorial in video to master Reports with Xojo.

Day 7: Create Your Own Project

Start creating your own project from scratch.

Tip: Start simple, something basic that can grow with you as a developer – a notes app, a shopping list, a time tracker…

Today is not about reproducing examples, but rather putting together all the pieces you’ve learned so far to make a new app. Sure you’ll may have questions about how to do something, and if this is the case, try using the multiple help features in the Xojo IDE. For example:

  • Autocompletion: Start typing and the IDE will help you to autocomplete the name of a function, method, class or object instance. You don’t have to remember every class or object property, press the tab key and a popup menu will list them for you.
  • Controls: Remember that the lower area of the Library panel offers information about the purpose of every user interface (UI) control, and that they are grouped by functionality; you only need to put the mouse pointer over to get a description about what they do.
  • Event Handlers: Not sure about the Event Handler you need to implement in a control so it reacts to the user’s actions as you expect? The Add Handler panel is very descriptive about the mission of every supported Event for a particular control. Just go through them and read the provided information.
  • Contextual help is everywhere: put the mouse pointer over the name of a function and you’ll see the expected parameters and their types.
  • Global Help: Of course you can access the global help to get to the documentation for all the available Classes, concepts, datatype and language keywords among other topics. In addition, the documentation is full of example code snippets you can simply copy and paste in the Code Editor to implement (probably with some modifications to adapt it to your app).

Day 8: Don’t Get Stuck

It’s inevitable that you will reach a point when the information available is not enough to solve a particular problem you may be facing. When that happens, I recommend accessing the Xojo Forum (if you haven’t done already) and post your question there. Don’t be shy, the Xojo community is one of the best developer groups you can find.

It’s likely you’re not the first one facing a particular problem and you may find your question and the answer already in the Forum! With the right search the solution could be in front of you in a few seconds!

Tip: Ask for help after you tried everything you already know and after looking for the answer in the Xojo Dev Center! People appreciate that you have tried to figure it out on your own first and it helps to let them know what you have already tried that didn’t work.

Day 9: Be Cross-Platform

Remember that Xojo is a cross-platform development tool. That means that if you are developing a Desktop app for Windows, you can build that app for Mac and Linux with the check of a box. 

Yes, this is as great as it sounds – write one app and deploy it for 3 operating systems! But, you will likely need to do some amount of testing (and debugging) on each OS. Don’t worry though, you don’t have to have a Mac and a Windows and a Linux computer to test your cross-platform app. There are several solutions that let you create virtual machines running on other operating systems. For example, you can choose between Parallels, VMware Fusion or VirtualBox on macOS. Any of these will let you install Windows and/or Linux on your Mac computer. 

Creating a cross-platform app also means that you will need to make sure that the user interface behaves as expected on each different operating system. At some point, your app might need to change slightly for a particular operating system. For example, on Windows you might want to use the Registry, but on Mac you might want to use a plist. You can handle these special cases using conditional compilation. You can also use Target Attributes in the Attributes section of the Inspector Panel for items like classes, methods or properties, to decide what should be compiled for a particular target.

Day 10: Advanced Topics

As you move on in your 14 day learning path, let’s focus on more advanced topics for the development of more complex products. For example, XojoScript lets you execute new Xojo code dynamically in an already compiled application, or you could automate your builds or script the Xojo IDE itself.

From the code and language sides, you should definitely learn about Design Patterns. The Xojo Blog has some great introductory posts about the Singleton and Observer Design Patterns, among others.

Tip: “Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved.”

Wikipedia

Take a look at Modules, Interfaces, Delegates, Enumerations, Declares and the related Xojo data types that let you access external libraries from your code. Is also a good point in time to explore differences like Internal or External project Items, adding your own properties to the Inspector Panel, and the use of Git, SVN or other source control solutions.

In addition to debugging your apps, the IDE also includes a feature that will Analyze and Profile the execution of your project, letting you know where your app bottlenecks are (if any) so you can put your efforts on optimizing that portions of code.

Tip: The Xojo Blog has a lot of posts that offer examples on more advanced concepts and topics.

Day 11: Localization

It is fine if you intend for your applications to be run only by users in a particular country, but if you want to reach the most users base possible then you’ll want to start thinking about localization. This encompasses both the strings of text used in your app user interface, messages, dialogs, and other topics like numeric representation, currency symbol, starting and ending days of the week…

With Xojo you have at your disposal a good number of features that will help you with this, from formating properties in controls accepting user input, to methods and functions letting you making the right conversion using locales. And when it comes to localizing your app strings, you can rely on the utility Lingua.

You can find a lot of useful information about Localization here.

Day 12: Refactorization

Compare the code you wrote the first days with the one you’re writing now with all the already acquired knowledge. I bet you’ll find something that can be done better. Do it! Don’t hesitate to rewrite your code and optimize it so it runs faster, better and is more reusable (and easy to maintain and evolve).

This is known as refactorization, and there are many books focused on the topic. the Xojo IDE includes some options that will help you to do that, mostly from the contextual menu, every time you select an item in the Navigator a block of code or even using the Search and Replace panel.

Day 13: Make the Xojo IDE Fit You

As you spend more time using Xojo, you’ll feel the need to change some preferences so it best fits the way you use it. Take a deep look at the Preference panels; you can chose your code font of choice, the keyboard shortcuts you prefer to use, the Navigator behavior, you can even choose your theme for the IDE.

These preferences, among others, will let you feel more comfortable and even code faster! For example, what if you prefer to have the Inspector Panel and Library in their own floating panels? Would that make a difference for you? And what if you edit the keyboard shortcuts so they fit better with the layout of your keyboard?

From the Xojo Blog: Navigator Keyboard Shortcuts and Menu Shortcut Editor

Day 14: Keep Learning!

Don’t stop here, coding is a journey! As you advance writing code, you’ll feel the need to learn new things, and there are tons of resources at your disposal!

A good place to visit is the Community Portal and also the Open Source section of the Xojo Dev Center. Here you’ll find a good number of ready to use libraries from other reputed Xojo developers, ready to download, inspect and, thus, to learn from!


We hope you have enjoyed our 14 day coding adventure. Tweet to us @xojo and let us know how it’s going and if you have any questions, reach out to us at hello@xojo.com.