about
12/11/2022
Basic Track Summary
BasicBites Repository

Basic Track Summary

Platforms, Programming, and Object Models

Basic Bites Index Platform OS models Memory Virtual memory Scheduling Work scheduling I/O I/O models System Res System-wide shared resources Programming Program models Execution Native vs. Managed Types Copy, Move, Reference Functions Functions, methods, lambdas Safety Avoiding undefinded behavior Platform API Access to OS API Structure Code structures Functions Functions, methods, lambdas Object Model Instance semantics Lifetime Construction to Destruction Res Mgmt Alloc & Dealloc Ownership Single owner, borrowing Summary Native vs Managed Native Pros & cons Managed Pros & cons    
Figure 1. Snippet of C++ using Windows API
"Start where you are, use what you have, do what you can."
- Arthur Ashe

To design and implement software effectively you need models of how the target platform behaves and how your program structures data and operates on it in the context of its platform. The purpose of these "Basic Bites" pages is to provide simplified bite-sized models that help you reason about consequences of the target platform and language you choose for implementation.

Table 1. Basics Resources from this site

ResourceContents
Basic Bites Dozens of Bites about platform and code basics
First Basic Bite
Related Content
Design Bites A few Bites about software design
First Design Bite
Deployment Bites Bites about deployment tools and deployment processes
First Deployment Bite

Note: You can access any Basic Bites page from either the link in Table 1. or the Basic Bites Index in the header above. Or, you can access Bites from the SiteMap. Some pages have no content now, but that's coming. The code shown above on the right is a member function of a Process class used to create Windows processes and configure what happens when a process terminates. It makes calls into the Windows API accessed by #include <windows.h>. All of the tokens inside the code block are part of the Windows API, declared in Windows.h or one of the several header files it includes.

Table 2. - Recommendations

Topic Content
First steps Things you can do to get started easily, e.g., "hello world" in online execution platforms, and using git to manage code and update repositories.
Tool recommendations Which tools should you use for the platform and language you will be targeting?
 
After writing your first few programs, it is likely that resources in Table 2. will speed up your progress understanding and using Rust and C++. The table contains intermediate to advanced materials written in plain language.
 

Table 3. - Other Resources

Topic Content
Tooling
Using Visual Studio Code to create and build C++, Rust, and C# code.
Videos Available for C++ and Rust. Initially skip BuildOn videos. Videos are longer than optimal - planning to make shorter ones.
 
For more experienced developers there are a lot of language details in the Rust and C++ Stories. You can pick and choose the details you want from the Site Map. Look for the specific Story chapters and Bites and specific code repositories that interest you.

Recommended First Steps

Here's an opinionated take on getting started. If it helps, great, otherwise forge your own path.

Table 4. - Getting Started

Step To Do
1. - Acquire Tools In Tooling scroll to section 3. Development Process. The first row shows how to download and install tools to build C#, C++, and Rust. That works for Windows, Linux, and MacOS. Cheers!
2. - write hello world
  • C# - open dotnet fiddle, modify default "hello" and execute.
  • C++ - open onlinegdb, modify default "hello" and execute.
  • Rust - open Rust Playground, enter "hello" and execute.
    The first time you use the editor it will have a hello program. After that it will open with the last code you entered.
3. - probe code features Frequently, when you look at a new type or feature of the language, use web execution engines in step 2. to try out the new thing and twist it a bit to see what happens. Save your code to clipboard [ctrl-c] and paste [ctrl-v] into a file or snippet (see step 5.)
4. - install git  download from github or download from git-scm.com
git commands - Josh Hibbert
git commands - git-scm
git Cheat Sheet
git walkthru from this site
When I've changed something in a local repository I use a terminal and emit:
  • git status
  • git add [some things shown in status or "-A" for everything]
  • git commit -m"[some message about the change]" - that saves locally
  • git push origin branch - save to remote repository
Here, origin identifies a remote repository [git remote add origin url] and branch is the name of a git branch [default: main, earlier default: master]
Details Figure 1. Git Process
5. - open github account If you don't already have one, open an account - it's free.
You can save code you've worked on in a github code snippet. Make a snippet repository locally and save your first snippet there. Make a github snippet repository and push your local repository every time you add new code.
Now, git is widely used and essential for interacting with github - no suprise there. It takes a bit of use to find your way, but will soon become automatic for the easy things, probably 95% of what you do with git.

Recommended Tool Chains

On Windows, Visual Studio, developed by Microsoft, is the usual choice for C++ and C#. It's large and capable with many templates for different kinds of projects, e.g., executable, library, ... Visual Studio Code was also developed by Microsoft, but is very different. It is a light-weight code editor that can be hooked to tool chains using extensions. However, I use it as an editor and build in an attached terminal window using CMake for C++, cargo for Rust, and dotnet CLI for C#. Visual Studio runs only on Windows; Visual Studio Code runs on Windows, Linux, and MacOS.

Table 5. - Edit and Build Tools:

Lang\Platform Windows Linux MacOS
C++ Visual Studio, Visual Studio Code, CMake Visual Studio Code, CMake Visual Studio Code, CMake
Rust Visual Studio Code, cargo Visual Studio Code, cargo Visual Studio Code, cargo
C# Visual Studio, Visual Studio Code, dotnet CLI Visual Studio Code, dotnet CLI Visual Studio Code, dotnet CLI
Online execution tools are available and listed on each of the language track pages. They are useful for small probes of language syntax, but are not able to handle large project code bases, like the tools listed above.
  Next Prev Pages Sections About Keys