Course Notes & Articles
Additional Information, that Hopefully Matters
These are supplementary notes mainly for Incus Data course attendees. We have made these notes available to a wider audience as an experiment, to gauge if they add some value for you. In addition to course notes, we have included an eclectic collection of code examples, articles and other miscellanea from our trainers & staff. More…
Material may contain inadvertent errors, omissions, or be in draft form — caveat lector.
NO WARRANTIES, EXPRESS OR IMPLIED, ARE PROVIDED
[2017-11-18] Relative Rank of C99 Operators
C99 has fewer operators than C++, but the same operators have the same precedence relative to each other. The precedence by itself is not sufficient, which is why both C99 and C++ also provide every operator with an association attribute. The association describes whether the operators associate with their operands from left-to-right (the norm), or from right-to-left.
[2017-11-17] C Types and Operators Related to Pointers
Pointers (variables of a pointer type) and arrays (which result in a pointer type), are often mentioned together. This is not because they are similar, but because certain rules make it possible to apply the same operators to both typees. This is a summary of the main points.
[2017-11-16] Concepts of, and Operations on, Pointers
Pointer types and operations in C, are the most fundamental, most important, and most pervasive of its features. A complete and unambiguous understanding of these topics, is arguably, the most valuable skill any C/C++ programmer can master. Incorrect application of these rules, are complicit in many failing programs. All applicable C99 rules and supportive background are presented here, but not at introductory level. These rules also apply to C++, but the examples are in C99 syntax (many will not compile in C++).
[2017-11-18] Simple Reorganisation of Circle Calculator
Algorithmically similar programs, with the same functionality, can be organised differently. Some of the various organisational possibilities are demonstrated here, culminating with the most common practical organisation: multi-file projects. We have also included an option using simple encapsulation.
[2017-11-18] Fundamentals of C++ Structured Exception Handling
Like many modern languages, especially object-oriented languages, C++ provides a syntax and mechanism for handling runtime errors in a structured way, using a very common “throw-catch” paradigm — using the term exception as an abstraction for the concept.
[2017-11-18] C++ Compilation Background, Setup & Tools.
This document describes the first steps in creating C++ programs, with the GNU C++ compiler. Apart from directory and path specifications, these steps are applicable to MSYS2, Cygwin, Mingw-W64, Linux, Unix, Mac OS X — basically anywhere GCC is available.
[2017-11-18] Concepts and Ranking of C++ Operators
C++ has more operators than C — it is actually a superset of the C operators. This document is simply a convenient quick reference, with a few notes regarding some important operators and the types of their operands. Operator overloading is also summarised, along with the concepts and terminology related to operators and C/C++ expressions.
[2017-11-18] C-style Array Variables, Parameters and References
This article discusses pointer-to-array and reference-to-array types in C++. In particular, we pay attention to at least one useful application of this in C++11 and newer, which will reduce dependence on the C preprocessor.
[2017-11-18] Run-Time Type Information in C++
C++ offers some minimal dynamic type inspection under the umbrella term “RTTI”. Most programs do without, and several compilers either turn it off by default, or have a compile time option to en/disable it. There are not many options, and they are briefly presented here.
[2017-11-18] Simple Stack Abstract Type Implementation
Encapsulation is a useful feature of object-oriented languages, even without considering inheritance or polymorphism. This attempts to summarise many of the C++ syntax features related to encapsulation, using a simple Stack class, including a template version.
[2017-11-17] Concepts, Overview and Syntax of C++ Classes
C++ is an object-oriented language, even if the use of object-oriented features is optional. To implement object-oriented designs using classes, an understanding of the essential language components and syntax specific to C++ is required. This constitutes the minimum syntactical knowledge required before embarking on class templates.
C♯ 6, C♯ 7, Roslyn
[2017-11-27] Type Concepts, C# Pre-Defined Types & Literals
C# is statically typed. This means types for all values must be known at compile time. Types determine the storage, behaviour and attributes of values, so every value has a type. Literals are simply constant values, and as such must also have a type. Some .NET types are so common, that C# provides synonyms (aliases) for some, since it has not types of its own.
[2017-11-27] Fundamental C# Program Structure with Examples
Different structural organization of the same program behaviour, using circle calculations. Example programs, with commentary, performing the same tasks: asking for a radius, which it inputs and validates, followed by printing the area and circumference of a circle with that radius. Each is however organised differently, to illustrate the various options available. We start with the simplest organisation, and ends with an Object Oriented (OO) version, which obviously can only be appreciated fully, if you have some OO background.
[2017-11-25] Encapsulation of a Circle Example
Encapsulation is one of the main OOP concepts, which is summarised here, using a simple
Circle class. It is kept simple from an algorithmic perspective, so that the logic does
not obscure the syntax. We use it to illustrate many general object-oriented programming
features and syntax, as found in most OO languages, but also .NET & C# specialities, like
properties and indexers (special kind of properties), which are relatively rare in other
[2017-12-19] Perl Background, Features and Running Scripts
This is to enable a Perl newcomer to get started, using either Linux, MacOS, Windows, or a flavour of Unix. It introduces some global Perl concepts, terminology and good programming practices, in a modern context.
[2017-12-22] Values and Variable Definitions in Perl
After Getting Started with Perl, the next step is to learn about constants, literals and variable definitions. This part focuses on scalar (single value) literals and variables, using numbers and strings.
[2017-12-23] Java Overview with Relocatable JDK 8
This is to enable a Java™ newcomer to get started, using either Linux™, MacOS™, Windows™, or a flavour of Unix™ — wherever Java runs. It does in addition show how to get a relocatable JDK8 running without Administrator privileges on Windows. We avoid JDK9 since it is larger, less used, and is not a requirement for learning the Java language.
[2017-12-28] Primitive Types, Literals and Variable Definitions
All Java programs require values. Every value has a type. Some types are primitive, but the majority of types are reference types, i.e. class types. Specialised, but simple types, include enumerated types. We start by looking at some useful types, then we discuss literals of that type, followed by some practical variable definition syntax and use.
[2017-12-29] Selection, Iteration and Method Definitions
Non-trivial programs require a way to make decisions, and to repeat a set of instructions — control flow. To facilitate these requirements, Java provides a number of selection and iteration statements. Programs also need a way to group repeatable code, which are functions, but commonly called methods because of Java’s object-oriented nature.
[2018-01-11] Process to Create a Portable Node Environment
[2018-01-09] Process to Create a Relocatable Apache 2.4 with PHP 7.2
Several packaged versions of Apache and PHP (often bundled with MariaDB or MySQL) are available. You may, however, want more control, or to understand how to create your own version. This document describes the process to create a relocatable (portable) development environment with Apache and PHP.
[2017-11-19] Concepts and Principles of Program Building
Although newer build systems exist, GNU
Make is ubiquitous, and it does not hurt programmers to be, at least superficially,
aware of the fundamental concepts and features of Make. This article does not delve into the
more advanced features, but should nevertheless provide enough material for small and
medium projects. The examples are all for C99 (with commands using GNU's
[2017-11-19] Pre-increment vs Post-increment Operator in Loops
[2017-11-19] Fundamental Concepts of Text Pattern Matching
Regular expressions are everywhere — if you know where to look. They are a powerful and versatile way to extract information and manipulate text. This functionality is included in most good programmer's editors, dedicated command line utilities like grep, and even word processors. Yet we still find that many programmers have little or no skills in this area. This is an introduction to the basic concepts and syntax of regular expressions.
[2017-11-17] Fundamental Features and Structure of Object Files
Natively compiled languages like C, C++, and others, generate object files, and depend on a linker to produce an executable. While object files may be relatively portable, executables are native to the target operating system. Programmers using compiled languages, should have some understanding of object files, even if simplified.
More About This Site
PANDOC— Pages are created from Markdown files, using Pandoc and its Markdown extensions. Custom templates and style sheets were developed. On this site, the style sheets and web fonts are external, so your browser may cache it, reducing traffic. We can also create self-contained HTML pages where all resources are embedded using data URIs. These we normally release to attendees on our courses.
UPDATES— Material is regularly either added, or updated. The date associated with each page indicates its last update, not necessarily the date of publication. The same applies to this front page.