From ef0220faf5282f063eb18ab89a4255af1740f150 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Mon, 1 May 2023 08:06:23 -0400 Subject: subdirs --- 00.md | 86 --------------------------- 00/README.md | 86 +++++++++++++++++++++++++++ 01.md | 191 ----------------------------------------------------------- 01/README.md | 191 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 277 insertions(+), 277 deletions(-) delete mode 100755 00.md create mode 100755 00/README.md delete mode 100755 01.md create mode 100755 01/README.md diff --git a/00.md b/00.md deleted file mode 100755 index 893a935..0000000 --- a/00.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -author: Adam T. Carpenter, Carpenter Tutoring ---- - -# Computational problem solving with _Rust_ - -## Introduction - -``` -~~~fsays -Welcome! -~~~ -``` - -[practice of computing using python](https://www.pearson.com/en-us/subject-catalog/p/practice-of-computing-using-python-the/p200000003329/9780137524839) - -[rust book](https://doc.rust-lang.org/book/) - ---- - -# What is this course? - -This course will focus on computational problem solving using Rust as a first -language. _It aims to provide students with the knowledge and skills to write -programs to solve problems._ - -Consider this an introductory, "101"-level computer science course on -programming fundamentals taught by Carpenter Tutoring. - ---- - -# Who is this course for? - -- people in school who are new to computer programming -- people with careers who want to use programming to get work done -- people who tinker with machines and want to experiment with programming - -Computer programming is for everyone, not just a select few ("programmers"). -Text processing and number crunching i.e., working with data, are two primary -instigators for computer programming. Everyone will likely find these things -useful. - -_This course is for everyone who wants to solve problems using computers._ - ---- - -# Who is this course _not_ for? - -- people who are already proficient in programming -- programmers who want to pick up Rust fast -- people who aren't interested in learning something hard to make life easy - ---- - -# Materials - -This course is a translation from one language to another. Instead of being -taught in Python, it's being taught in Rust. - -[Practice of Computing Using Python](https://www.pearson.com/en-us/subject-catalog/p/practice-of-computing-using-python-the/P200000003329/9780137524839) - -The above textbook is used for course framework and method. The syntax and other -language content comes from the [Rust Book](https://doc.rust-lang.org/book/). - ---- - -# Who am I? - -- Bachelor's of Science from College of William and Mary, majoring in CS -- Nearly five years employed as software engineer focusing on server-side - automation and support self-service -- Using Rust productively for over three years - -[Bio](https://www.53hor.net/info) - -[Carpenter Tutoring](https://carpentertutoring.com) - ---- - -# Setup and resources - -[The playground](https://play.rust-lang.org) - -[Getting started/installation](https://www.rust-lang.org/learn/get-started) - -[Docs, books, and self-learning](https://www.rust-lang.org/learn) diff --git a/00/README.md b/00/README.md new file mode 100755 index 0000000..893a935 --- /dev/null +++ b/00/README.md @@ -0,0 +1,86 @@ +--- +author: Adam T. Carpenter, Carpenter Tutoring +--- + +# Computational problem solving with _Rust_ + +## Introduction + +``` +~~~fsays +Welcome! +~~~ +``` + +[practice of computing using python](https://www.pearson.com/en-us/subject-catalog/p/practice-of-computing-using-python-the/p200000003329/9780137524839) + +[rust book](https://doc.rust-lang.org/book/) + +--- + +# What is this course? + +This course will focus on computational problem solving using Rust as a first +language. _It aims to provide students with the knowledge and skills to write +programs to solve problems._ + +Consider this an introductory, "101"-level computer science course on +programming fundamentals taught by Carpenter Tutoring. + +--- + +# Who is this course for? + +- people in school who are new to computer programming +- people with careers who want to use programming to get work done +- people who tinker with machines and want to experiment with programming + +Computer programming is for everyone, not just a select few ("programmers"). +Text processing and number crunching i.e., working with data, are two primary +instigators for computer programming. Everyone will likely find these things +useful. + +_This course is for everyone who wants to solve problems using computers._ + +--- + +# Who is this course _not_ for? + +- people who are already proficient in programming +- programmers who want to pick up Rust fast +- people who aren't interested in learning something hard to make life easy + +--- + +# Materials + +This course is a translation from one language to another. Instead of being +taught in Python, it's being taught in Rust. + +[Practice of Computing Using Python](https://www.pearson.com/en-us/subject-catalog/p/practice-of-computing-using-python-the/P200000003329/9780137524839) + +The above textbook is used for course framework and method. The syntax and other +language content comes from the [Rust Book](https://doc.rust-lang.org/book/). + +--- + +# Who am I? + +- Bachelor's of Science from College of William and Mary, majoring in CS +- Nearly five years employed as software engineer focusing on server-side + automation and support self-service +- Using Rust productively for over three years + +[Bio](https://www.53hor.net/info) + +[Carpenter Tutoring](https://carpentertutoring.com) + +--- + +# Setup and resources + +[The playground](https://play.rust-lang.org) + +[Getting started/installation](https://www.rust-lang.org/learn/get-started) + +[Docs, books, and self-learning](https://www.rust-lang.org/learn) diff --git a/01.md b/01.md deleted file mode 100755 index 0949931..0000000 --- a/01.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -author: Adam T. Carpenter, Carpenter Tutoring ---- - -# Computational problem solving with _Rust_ - -## The study of computer science - -``` -~~~fsays -Not just for computer scientists -~~~ -``` - -[practice of computing using python](https://www.pearson.com/en-us/subject-catalog/p/practice-of-computing-using-python-the/p200000003329/9780137524839) - -[rust book](https://doc.rust-lang.org/book/) - ---- - -# Why computer science? - -Computers are "more universally applicable than any other commodity in history." -(Punch & Enbody) - -There is no other machine with as many diverse uses as the computer. A -reprogrammable machine is a machine that works for _you_. - -## Not just computer programming - -- theory of computation -- efficiency -- algorithms and data structures -- parallelism -- software engineering - -_Computer programming is a great way to begin exploring these fields_ - ---- - -# Difficulty in first-time programming - -It's like learning how to write poetry in a foreign language. You need: - -- fluency: the vocabulary and grammar to read and write the language -- ability: the skill to rhyme, write in verse, _make poetry_ - -Learning to program has similar roadblocks. You need: - -- syntax and semantics: the structure of Rust as a language -- problem solving: the skill to transform your problem into a solution - ---- - -# Good programs are essays - -Programming is writing how _you_ think a problem should be solved. - -A program is your thoughts! - -## 1. Think before you program - -Writing a program should describe your thoughts well. - -Not just for computers, but for other human beings! You're going to read your -program over and over again. Eventually you'll inevitably write programs in a -group. Then others will need to read it too. - -## 2. A program is a human-readable essay on problem solving (that also runs on a computer) - ---- - -# The promise - -A program, or an essay on problem-solving, has impact because it can be executed -on a computer. Your problem-solving thoughts - -- are executable -- are repeatable -- are independent of you - -Programming is a leap forward in the way the printing press was hundreds of -years ago. - ---- - -# Choosing a language - -The variety of languages is enormous, each one with a specific intended purpose. - -## Why Rust? "performance, reliability, productivity" - -- useful types and memory guarantees -- makes it easy to write concurrent programs -- has a friendly compiler and helpful borrow checker -- provides good documentation -- offers great standard library and third-party libraries - -Thanks to middle school math, most folks have the prerequisite knowledge to -understand variables, functions, and types. - -## Why not C, Java, Python, etc.? - -Some of these languages force you to think about computer organization. Others -may direct you into an object-oriented programming mindset. Still others promote -dynamic type conversion or make it easy to dereference null values. - -The most important reason for using Rust is it helps prevent you from making -mistakes, regardless of your skill level. - ---- - -# Is Rust the best language? - -If you don't already know you'll soon learn there is no "best language." - -All languages compromise on something; Each has its strengths and weaknesses. - -Rust is a good, _general-purpose_ programming language with _broad_ -_applications_. - -Once you've gotten started, you'll be better equipped to explore other languages -that may be better suited to solving your specific problems. - ---- - -# Computation and computers - -_Computation_ is the manipulation of data by humans or machines - -...be that data numbers, letters, or other symbols. - -A _computer_ is something that does computation - -Note this does not specify _how_ the computation is accomplished. However, there -are some things that every computer needs in order to do its job. - -- accept data as input -- manipulate data (do computation on the input) -- output data - ---- - -# Mechanical and electronic computers - -_Computer_ used to be a job description for human beings! - -General-purpose, reprogrammable, electronic digital computers first appeared in -the 20th century. - -The basis of every digital computer is an on-off switch. The technology behind -these "switches" has evolved from mechanical relays to vacuum tubes to -transistors. - -_Transistors_, the tiny electronic switches powering modern computers, are -either on or off. Just like a light switch, when turned on, they allow -electricity to flow. Using switches to power other switches, you can create -circuits that represent logic. - ---- - -# Example: a three-pole light switch - -``` -~~~graph-easy --as boxart -[hall switch] .. off ..> [ceiling lamp] -[den switch] - on -> [ceiling lamp] -[hall switch] <-> [den switch] -~~~ -``` - -``` -~~~graph-easy --as boxart -[hall switch] - on -> [*ceiling lamp*] { border: bold; } -[den switch] - on -> [*ceiling lamp*] { border: bold; } -[hall switch] <-> [den switch] -~~~ -``` - -Note: this is actually an XNOR gate, but we'll talk more about logical operators -later. - ---- - -# Replace light with truth - -Off: false, 0 - -On: true, 1 - -Both switches off: light off, false, 0 diff --git a/01/README.md b/01/README.md new file mode 100755 index 0000000..0949931 --- /dev/null +++ b/01/README.md @@ -0,0 +1,191 @@ +--- +author: Adam T. Carpenter, Carpenter Tutoring +--- + +# Computational problem solving with _Rust_ + +## The study of computer science + +``` +~~~fsays +Not just for computer scientists +~~~ +``` + +[practice of computing using python](https://www.pearson.com/en-us/subject-catalog/p/practice-of-computing-using-python-the/p200000003329/9780137524839) + +[rust book](https://doc.rust-lang.org/book/) + +--- + +# Why computer science? + +Computers are "more universally applicable than any other commodity in history." +(Punch & Enbody) + +There is no other machine with as many diverse uses as the computer. A +reprogrammable machine is a machine that works for _you_. + +## Not just computer programming + +- theory of computation +- efficiency +- algorithms and data structures +- parallelism +- software engineering + +_Computer programming is a great way to begin exploring these fields_ + +--- + +# Difficulty in first-time programming + +It's like learning how to write poetry in a foreign language. You need: + +- fluency: the vocabulary and grammar to read and write the language +- ability: the skill to rhyme, write in verse, _make poetry_ + +Learning to program has similar roadblocks. You need: + +- syntax and semantics: the structure of Rust as a language +- problem solving: the skill to transform your problem into a solution + +--- + +# Good programs are essays + +Programming is writing how _you_ think a problem should be solved. + +A program is your thoughts! + +## 1. Think before you program + +Writing a program should describe your thoughts well. + +Not just for computers, but for other human beings! You're going to read your +program over and over again. Eventually you'll inevitably write programs in a +group. Then others will need to read it too. + +## 2. A program is a human-readable essay on problem solving (that also runs on a computer) + +--- + +# The promise + +A program, or an essay on problem-solving, has impact because it can be executed +on a computer. Your problem-solving thoughts + +- are executable +- are repeatable +- are independent of you + +Programming is a leap forward in the way the printing press was hundreds of +years ago. + +--- + +# Choosing a language + +The variety of languages is enormous, each one with a specific intended purpose. + +## Why Rust? "performance, reliability, productivity" + +- useful types and memory guarantees +- makes it easy to write concurrent programs +- has a friendly compiler and helpful borrow checker +- provides good documentation +- offers great standard library and third-party libraries + +Thanks to middle school math, most folks have the prerequisite knowledge to +understand variables, functions, and types. + +## Why not C, Java, Python, etc.? + +Some of these languages force you to think about computer organization. Others +may direct you into an object-oriented programming mindset. Still others promote +dynamic type conversion or make it easy to dereference null values. + +The most important reason for using Rust is it helps prevent you from making +mistakes, regardless of your skill level. + +--- + +# Is Rust the best language? + +If you don't already know you'll soon learn there is no "best language." + +All languages compromise on something; Each has its strengths and weaknesses. + +Rust is a good, _general-purpose_ programming language with _broad_ +_applications_. + +Once you've gotten started, you'll be better equipped to explore other languages +that may be better suited to solving your specific problems. + +--- + +# Computation and computers + +_Computation_ is the manipulation of data by humans or machines + +...be that data numbers, letters, or other symbols. + +A _computer_ is something that does computation + +Note this does not specify _how_ the computation is accomplished. However, there +are some things that every computer needs in order to do its job. + +- accept data as input +- manipulate data (do computation on the input) +- output data + +--- + +# Mechanical and electronic computers + +_Computer_ used to be a job description for human beings! + +General-purpose, reprogrammable, electronic digital computers first appeared in +the 20th century. + +The basis of every digital computer is an on-off switch. The technology behind +these "switches" has evolved from mechanical relays to vacuum tubes to +transistors. + +_Transistors_, the tiny electronic switches powering modern computers, are +either on or off. Just like a light switch, when turned on, they allow +electricity to flow. Using switches to power other switches, you can create +circuits that represent logic. + +--- + +# Example: a three-pole light switch + +``` +~~~graph-easy --as boxart +[hall switch] .. off ..> [ceiling lamp] +[den switch] - on -> [ceiling lamp] +[hall switch] <-> [den switch] +~~~ +``` + +``` +~~~graph-easy --as boxart +[hall switch] - on -> [*ceiling lamp*] { border: bold; } +[den switch] - on -> [*ceiling lamp*] { border: bold; } +[hall switch] <-> [den switch] +~~~ +``` + +Note: this is actually an XNOR gate, but we'll talk more about logical operators +later. + +--- + +# Replace light with truth + +Off: false, 0 + +On: true, 1 + +Both switches off: light off, false, 0 -- cgit v1.2.3