In July 2018, we launched the learn website. In the meantime, many improvements have been made to the website. In this blog post, we’re going to review them.
Course updates #
When the learn website was launched, it included the following courses:
- “Introduction to Ada”
- “Introduction to SPARK”
- “Ada for the C++ or Java Developer”
Since then, we added four courses:
“SPARK Ada for the MISRA C Developer”: a course that presents the SPARK technology through an example-driven comparison with the rules in the widely known MISRA C subset of the C language.
“Introduction to GNAT Toolchain”: a course that presents an introduction to the GNAT toolchain, including first steps to get started with the toolchain and some details on the project manager (GPRbuild) and the integrated development environment (GNAT Studio).
“Introduction to Ada: Laboratories”: a collection of interactive exercises for the “Introduction to Ada” course.
“Ada for the Embedded C Developer”: a course for C developers with good knowledge of embedded applications; it introduces developers to the Ada languages by comparing it to C and also introduces the SPARK subset, which removes a few features with undefined behavior.
Infrastructure updates #
This is by far not everything! Many changes happened to the website itself.
In May 2020, we integrated a major refactoring of the website infrastructure. The widget extension plug-in for Sphinx, which is used for the source-code examples on the website, has been refactored into multiple files and modules to allow better maintainability and readability. Also, major parts of the website’s frontend have been rewritten in Typescript.
This refactoring made it easier to improve the online editor used for source-code snippets. For example, a new feature that the editor now has is the option to use tabbed view of source-code files.
Also, there’s a download button on the editor. Now, users can download individual source-code examples as zip files for further experimentation on their machines. Even better: if they use the editor to make changes to those examples, they can download the changed version as well!
Offline reading updates #
While the learn website was launched as an interactive website, we always had the vision of supporting offline reading as well. The first step in that direction was made in January 2020, when we added the option of downloading courses as PDF files. This allows readers to read the contents when not connected to the website or print courses on paper.
A major disadvantage still existed in those PDF files: as no “run button” was available in those files, it was impossible to view the output of the source-code examples. In many cases, this information can be valuable to better understand what the source-code is actually doing. Therefore, in February 2021, we integrated the build and runtime output of each source-code example to those PDF files.
Note that most books on Ada programming — or even on programming languages in general — usually don’t include the build and runtime output of source-code examples. In that sense, the PDF books offered by learn.adacore.com are unique and, perhaps, easier to understand than other books.
Reading PDF files on larger screens, such as computer monitors, is acceptable in most cases. However, on devices with a small screen — such as smartphones, e‑book readers and some tablets — reading PDF books might be difficult, for the font might be simply too small. Because PDF files are primarily created for printing, the font size is not adjustable. There are, however, formats that target electronic reading, so that readers can adjust the font size — or even background color and font type — to their liking. Therefore, in November 2021, we introduced support for two e‑book formats:
EPUB, which is widely used in many e‑book readers, including Google Play Books, and
MOBI, which is used on Amazon Kindle devices.
Now, readers can select one of those three formats when downloading courses for offline reading.
A major drawback of offline formats is that hyperlinks don’t work well within the same application. For example, if someone is reading the PDF version of the “Ada for the Embedded C Developer” course, and they click on a link that refers to a section of the “Introduction to Ada” course, that click will switch from the PDF reading application to a browser, which will then open a page of the learn website. This process of switching applications is suboptimal. We can, however, circumvent this issue by packing all books into a single book. Therefore, in December 2021, we introduced the “Learning Ada” book. This book contains the complete contents of the learn.adacore.com website, and hyperlinks between courses work fine as expected. (Of course, “Learning Ada” is available in all three formats: PDF, EPUB and MOBI.)
As you can see, many things have changed since the learn website was launched, and we’re working on adding even more stuff in the future. Keep tuned!