From 9772c6b20671235a148a22b141af31bc3afd0844 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 17 May 2024 16:34:52 -0500 Subject: [PATCH 01/11] Add draft for build systems --- .../modules/compilation-model/buildsystems.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/modules/compilation-model/buildsystems.md diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md new file mode 100644 index 0000000..7fa4159 --- /dev/null +++ b/sources/modules/compilation-model/buildsystems.md @@ -0,0 +1,110 @@ +## Module name: Build systems + +_Skeleton descriptions are typeset in italic text,_ +_so please don't remove these descriptions when editing the topic._ + +### Overview + +_Provides a short natural language abstract of the module’s contents._ +_Specifies the different levels of teaching._ + +------------------------------------------------------------------------ +Level Objective +----------------- ------------------------------------------------------ +Foundational --- Knowledge about build systems + +Main --- Usage of build system to compile a executable + +Advanced --- Usage of build system to compile a library or + add external libraries as a dependencies + +------------------------------------------------------------------------ + +### Motivation + +_Why is this important?_ +_Why do we want to learn/teach this topic?_ + +* Building complex C++ projects by hand or writing Make files is tricky +* Build systems can help to resolve dependencies +* Build systems can help do distribute C++ code and help other to compile the code +* Build systems can help to find and include libraries as dependencies +* All major C++ projects are distributed with build systems + +### Topic introduction + +_Very brief introduction to the topic._ + +Build systems are used to configure, build, and install complex C++ projects. + + +### Foundational: Knowledge about build systems + +#### Background/Required Knowledge + +A student: +* Should know about build systems + + +#### Student outcomes + +_A list of things "a student should be able to" after the curriculum._ +_The next word should be an action word and testable in an exam._ +_Max 5 items._ + +A student should be able to: + +1. To explain what a build system is +2. Know that a build systems resolves dependencies +3. Know that a build system support cross-platform compilation + +#### Caveats + +_This section mentions subtle points to understand, like anything resulting in +implementation-defined, unspecified, or undefined behavior._ + +None + +#### Points to cover + +_This section lists important details for each point._ + +* Mention that many build systems are available for C++. +* Mention benefits and challenges + +### Main: Usage of build system to compile a executable + +#### Background/Required Knowledge + +* All of the above. + +#### Student outcomes + +A student should be able to: + +1. Write a configuration file to compile a C++ program with a main method +2. Use the build system to generate the executable + +#### Caveats + +The instructions are restricted to the chosen build system and +not easily transferable. + + +#### Points to cover + +* Adding include paths to header files +* Adding compiler flags +* How to build Release and Debug builds + + +### Advanced + +_These are important topics that are not expected to be covered but provide +guidance where one can continue to investigate this topic in more depth._ + +* How to build libraries +* How to include libraries to the executable +* How to find external libraries and include them +* How to add support for different compilers +* How to add support for different operating systems From ac383ec48c5a4b208f60ebd6123821084529c909 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Fri, 26 Jul 2024 09:46:54 -0600 Subject: [PATCH 02/11] Update buildsystems.md Discussion with the US group --- .../modules/compilation-model/buildsystems.md | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 7fa4159..55e43a3 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -25,11 +25,12 @@ Advanced --- Usage of build system to compile a library or _Why is this important?_ _Why do we want to learn/teach this topic?_ -* Building complex C++ projects by hand or writing Make files is tricky +* Building complex C++ projects by hand is tricky * Build systems can help to resolve dependencies * Build systems can help do distribute C++ code and help other to compile the code * Build systems can help to find and include libraries as dependencies -* All major C++ projects are distributed with build systems +* Build systems faciliate project management +* All major C++ projects are distributed with build systems ### Topic introduction @@ -43,7 +44,7 @@ Build systems are used to configure, build, and install complex C++ projects. #### Background/Required Knowledge A student: -* Should know about build systems +* Should know how to compile and link C++ programs #### Student outcomes @@ -55,8 +56,8 @@ _Max 5 items._ A student should be able to: 1. To explain what a build system is -2. Know that a build systems resolves dependencies -3. Know that a build system support cross-platform compilation +2. To explain a build systems resolves dependencies +3. To explain a build system supports compilation for different operating systems and architectures #### Caveats @@ -69,8 +70,9 @@ None _This section lists important details for each point._ -* Mention that many build systems are available for C++. +* Mention that many build systems are available for C++ * Mention benefits and challenges +* Build system help to only compile the C++ files with code changes and not the complete project ### Main: Usage of build system to compile a executable @@ -82,8 +84,10 @@ _This section lists important details for each point._ A student should be able to: -1. Write a configuration file to compile a C++ program with a main method -2. Use the build system to generate the executable +1. Download a C++ package and build the package +2. Write a configuration file to compile a C++ executable +3. Pass compiler options via the build system +4. Use the build system to generate the executable #### Caveats @@ -96,6 +100,8 @@ not easily transferable. * Adding include paths to header files * Adding compiler flags * How to build Release and Debug builds +* Linking external libraries to the C++ project +* Support different operating systems, compilers, and architectures ### Advanced @@ -103,8 +109,7 @@ not easily transferable. _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ -* How to build libraries -* How to include libraries to the executable -* How to find external libraries and include them -* How to add support for different compilers -* How to add support for different operating systems +* How to build libraries +* Write a configuration file for your own library +* How to have external libraries be downloaded during the build process + From ecbec3b702563e64f9249d9f9dfc15bc99d5822f Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 26 Sep 2024 09:28:18 -0600 Subject: [PATCH 03/11] Typos --- sources/modules/compilation-model/buildsystems.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 55e43a3..fd6a97d 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -56,8 +56,8 @@ _Max 5 items._ A student should be able to: 1. To explain what a build system is -2. To explain a build systems resolves dependencies -3. To explain a build system supports compilation for different operating systems and architectures +2. To explain that a build systems resolves dependencies +3. To explain that a build system supports compilation for different operating systems and architectures #### Caveats From 646500521c217714e8b29b15961b58c6b37cb2b1 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 26 Sep 2024 09:29:22 -0600 Subject: [PATCH 04/11] More typos --- sources/modules/compilation-model/buildsystems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index fd6a97d..85e11d4 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -97,7 +97,7 @@ not easily transferable. #### Points to cover -* Adding include paths to header files +* Include paths to header files to the configuration * Adding compiler flags * How to build Release and Debug builds * Linking external libraries to the C++ project From f50e498b4aabf030e44ae061d310ed79a02f6d44 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Sun, 20 Oct 2024 21:00:59 -0600 Subject: [PATCH 05/11] Update buildsystems.md Mention unit testing --- sources/modules/compilation-model/buildsystems.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 85e11d4..5bd0fc0 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -112,4 +112,5 @@ guidance where one can continue to investigate this topic in more depth._ * How to build libraries * Write a configuration file for your own library * How to have external libraries be downloaded during the build process +* Mention that build systems provide support for unit testing From 430c317b53ce1a2950ff8859c554b5365fcf7c4b Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Sun, 20 Oct 2024 21:06:50 -0600 Subject: [PATCH 06/11] Update buildsystems.md Move building a lib and link it to a C++ executable to the main level --- sources/modules/compilation-model/buildsystems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 5bd0fc0..7666771 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -88,6 +88,7 @@ A student should be able to: 2. Write a configuration file to compile a C++ executable 3. Pass compiler options via the build system 4. Use the build system to generate the executable +5. Write a configuration file to compile a library and link the library to a C++ executable #### Caveats @@ -110,7 +111,6 @@ _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ * How to build libraries -* Write a configuration file for your own library * How to have external libraries be downloaded during the build process * Mention that build systems provide support for unit testing From ee55d0e2b732f281e0ce70687d48e10e65e87d55 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Sun, 20 Oct 2024 21:08:42 -0600 Subject: [PATCH 07/11] Update buildsystems.md --- sources/modules/compilation-model/buildsystems.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 7666771..5b5e4ac 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -15,8 +15,7 @@ Foundational --- Knowledge about build systems Main --- Usage of build system to compile a executable -Advanced --- Usage of build system to compile a library or - add external libraries as a dependencies +Advanced --- Add external libraries as a dependencies ------------------------------------------------------------------------ @@ -88,7 +87,7 @@ A student should be able to: 2. Write a configuration file to compile a C++ executable 3. Pass compiler options via the build system 4. Use the build system to generate the executable -5. Write a configuration file to compile a library and link the library to a C++ executable +5. Write a configuration file to compile a library and link the library to a C++ executable #### Caveats From cbbfbe2c3abd5beff8301c1277b3bc621496fd0b Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 31 Oct 2024 09:05:06 -0600 Subject: [PATCH 08/11] make it more precise --- sources/modules/compilation-model/buildsystems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 5b5e4ac..8e14fa0 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -101,7 +101,7 @@ not easily transferable. * Adding compiler flags * How to build Release and Debug builds * Linking external libraries to the C++ project -* Support different operating systems, compilers, and architectures +* Support compilation on different operating systems, compilers, and architectures ### Advanced From ae0227268e7ac7a9f115feea031602185ebca5f9 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 27 Mar 2025 09:31:31 -0600 Subject: [PATCH 09/11] More details --- .../compilation-model/translation-units.md | 106 +++++++++++++++++- .../external/graphical-user-interfaces.md | 104 +++++++++++++++++ 2 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 sources/modules/external/graphical-user-interfaces.md diff --git a/sources/modules/compilation-model/translation-units.md b/sources/modules/compilation-model/translation-units.md index 94141b3..e130183 100644 --- a/sources/modules/compilation-model/translation-units.md +++ b/sources/modules/compilation-model/translation-units.md @@ -3,4 +3,108 @@ _Skeleton descriptions are typeset in italic text,_ _so please don't remove these descriptions when editing the topic._ -This topic is currently under construction and will soon be filled with information :) +### Overview + +_Provides a short natural language abstract of the module’s contents._ +_Specifies the different levels of teaching._ + +------------------------------------------------------------------------ +Level Objective +----------------- ------------------------------------------------------ +Foundational + +Main --- + +Advanced --- + +------------------------------------------------------------------------ + +### Motivation + +_Why is this important?_ +_Why do we want to learn/teach this topic?_ + +### Topic introduction + +_Very brief introduction to the topic._ + +_TODO: +_introduce notion of object file + +C++ Compilation model allows the developer to seperate their +declarations and definitions into various files so as to: + +* organize code logically, +* facilitate reuse, +* reduce rebuild times, +* reduce file sizes and scopes, +* avoid naming collisions, +* and produce compiled libraries. + + +### Foundational: Building code from multiple files + +#### Background/Required Knowledge + +A student: + +1. Is able to define a variable, function, or class +2. Is able to access declarations from either module import or header inclusion + +Questions: +modules and/or functions? + + +#### Student outcomes + +_A list of things "a student should be able to" after the curriculum._ +_The next word should be an action word and testable in an exam._ +_Max 5 items._ + +A student should be able to: + +1. create a declaration for variables, functions, and classes separate from their definitions +2. compile and link code from multiple implementation files +3. explain how includes or imports work within their translation unit + +#### Caveats + +_This section mentions subtle points to understand, like anything resulting in +implementation-defined, unspecified, or undefined behavior._ + +#### Points to cover + +_This section lists important details for each point._ + +Declarations and definitions can be within same file + +### Main: Organizing code across multiple translation units + +#### Background/Required Knowledge + +* All of the above. + +#### Student outcomes + +A student should be able to: + +1. package code into libraries +2. explain trade-offs for placing code in header files vs implementation files + +#### Caveats + +#### Points to cover + +### Advanced + +_These are important topics that are not expected to be covered but provide +guidance where one can continue to investigate this topic in more depth._ + +A student should be able to: + +1. explain how an anonymous namespace functions within their translation unit +2. One-definition-rule shennanigans +3. Pimpl pattern +4. Template definitions in translation unit it's used in? + + diff --git a/sources/modules/external/graphical-user-interfaces.md b/sources/modules/external/graphical-user-interfaces.md new file mode 100644 index 0000000..754176e --- /dev/null +++ b/sources/modules/external/graphical-user-interfaces.md @@ -0,0 +1,104 @@ +## External libraries: Desktop Graphical User Interfaces {#extern-gui} + +_Skeleton descriptions are typeset in italic text,_ +_so please don't remove these descriptions when editing the topic._ + +### Overview + +_Provides a short natural language abstract of the module’s contents._ +_Specifies the different levels of teaching._ + +------------------------------------------------------------------------ +Level Objective +----------------- ------------------------------------------------------ +Foundational: Basic use of separate compilation + +Main: Command of supporting mechanisms and tools + +Advanced: Technicalities and tools + +------------------------------------------------------------------------ + +### Motivation + +_Why is this important?_ +_Why do we want to learn/teach this topic?_ + +For some applications a graphical user interface is beneficial. However, graphical user inerfaces are not part of the C++ standard and external libaries are needed. We provide generic teaching goals and do not focus on a specific external library. Some mentionable libraries are: [Qt](https://www.qt.io/), [Cairo](https://www.cairographics.org/), and [wxWidgets](https://www.wxwidgets.org/). + +### Topic introduction + +_Very brief introduction to the topic._ + +### Foundational: Basic use of separate compilation + +#### Background/Required Knowledge + +A student: + +1. should know linking libraries +2. should know [header files](../compilation-model/headers.md) +3. should know about [build systems](../compilation-model/buildsystems.md) + +#### Student outcomes + +_A list of things "a student should be able to" after the curriculum._ +_The next word should be an action word and testable in an exam._ +_Max 5 items._ + +A student should be able to: + +1. link against the external library +2. write an application with one window +3. add simple widgets like text boxes and buttons to the window +4. catch events of buttons or other elements +5. explain the mechanicsm of event-driven programming + +#### Points to cover + +* use basic API functions +* layout of the window +* handle events by callbacks + +#### Caveats + +_This section mentions subtle points to understand, like anything resulting in +implementation-defined, unspecified, or undefined behavior._ + +* programming user interfaces in C++ and in general require plenty of boiler plate code +* API calls are specific to one library and might not be transferable to other libraries +* Some libraries are written in C + +### Main: Command of supporting mechanisms and tools + +#### Background/Required Knowledge + +* All of the above. + +#### Student outcomes + +A student should be able to: + +1. add more advanced elements, like tables or images +2. handle multiple windows +3. show error and warning popups +4. use different forms of IO, like keyboard, mouse, or touchpad +5. explain basic of fonts and accesibilty + +#### Caveats + +* programming user interfaces is rather complex and might not applicable for most students + +#### Points to cover + +* More advanced API calls and design patterns + +### Advanced: Technicalities and tools + +_These are important topics that are not expected to be covered but provide +guidance where one can continue to investigate this topic in more depth._ + +* Internationalization +* Font desginers +* Hardware accleration +* Custom widget generation From eee6e791e05069db0049e83a6505347e2d98e612 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 27 Mar 2025 09:33:29 -0600 Subject: [PATCH 10/11] Spell check --- .../modules/external/graphical-user-interfaces.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/modules/external/graphical-user-interfaces.md b/sources/modules/external/graphical-user-interfaces.md index 754176e..fd05f02 100644 --- a/sources/modules/external/graphical-user-interfaces.md +++ b/sources/modules/external/graphical-user-interfaces.md @@ -24,7 +24,7 @@ Advanced: Technicalities and tools _Why is this important?_ _Why do we want to learn/teach this topic?_ -For some applications a graphical user interface is beneficial. However, graphical user inerfaces are not part of the C++ standard and external libaries are needed. We provide generic teaching goals and do not focus on a specific external library. Some mentionable libraries are: [Qt](https://www.qt.io/), [Cairo](https://www.cairographics.org/), and [wxWidgets](https://www.wxwidgets.org/). +For some applications a graphical user interface is beneficial. However, graphical user interfaces are not part of the C++ standard and external libraries are needed. We provide generic teaching goals and do not focus on a specific external library. Some mentionable libraries are: [Qt](https://www.qt.io/), [Cairo](https://www.cairographics.org/), and [wxWidgets](https://www.wxwidgets.org/). ### Topic introduction @@ -52,7 +52,7 @@ A student should be able to: 2. write an application with one window 3. add simple widgets like text boxes and buttons to the window 4. catch events of buttons or other elements -5. explain the mechanicsm of event-driven programming +5. explain the mechanics of event-driven programming #### Points to cover @@ -82,8 +82,8 @@ A student should be able to: 1. add more advanced elements, like tables or images 2. handle multiple windows 3. show error and warning popups -4. use different forms of IO, like keyboard, mouse, or touchpad -5. explain basic of fonts and accesibilty +4. use different forms of IO, like keyboard, mouse, or touch pad +5. explain basic of fonts and accessibility #### Caveats @@ -99,6 +99,6 @@ _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ * Internationalization -* Font desginers -* Hardware accleration +* Font designers +* Hardware acceleration * Custom widget generation From b99d2c1754054e602d3938f03154d0d652a41b92 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 27 Mar 2025 11:29:17 -0600 Subject: [PATCH 11/11] Typos --- sources/modules/external/graphical-user-interfaces.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/modules/external/graphical-user-interfaces.md b/sources/modules/external/graphical-user-interfaces.md index fd05f02..b63a124 100644 --- a/sources/modules/external/graphical-user-interfaces.md +++ b/sources/modules/external/graphical-user-interfaces.md @@ -11,11 +11,11 @@ _Specifies the different levels of teaching._ ------------------------------------------------------------------------ Level Objective ----------------- ------------------------------------------------------ -Foundational: Basic use of separate compilation +Foundational: Basic us of desktop graphical user interfaces -Main: Command of supporting mechanisms and tools +Main: Different forms of IO and accessibility -Advanced: Technicalities and tools +Advanced: Internationalization and customization ------------------------------------------------------------------------ @@ -30,7 +30,7 @@ For some applications a graphical user interface is beneficial. However, graphic _Very brief introduction to the topic._ -### Foundational: Basic use of separate compilation +### Foundational: Basic use of desktop graphical user interfaces #### Background/Required Knowledge @@ -69,7 +69,7 @@ implementation-defined, unspecified, or undefined behavior._ * API calls are specific to one library and might not be transferable to other libraries * Some libraries are written in C -### Main: Command of supporting mechanisms and tools +### Main: Different forms of IO and accessibility #### Background/Required Knowledge