24. how does timing work#

Note

this will be filled in later, because I am sick

View versions from past semesters if you need:

cd Documents/inclass/systems/

ls
fall24-brownsarahm	greet.py		test
gh-inclass-brownsarahm	nand2tetris		tiny-book
gh repo clone compsys-progtools/fall2024
Cloning into 'fall2024'...
remote: Enumerating objects: 2511, done.
remote: Counting objects: 100% (538/538), done.
remote: Compressing objects: 100% (108/108), done.
remote: Total 2511 (delta 433), reused 531 (delta 430), pack-reused 1973 (from 1)
Receiving objects: 100% (2511/2511), 85.97 MiB | 5.15 MiB/s, done.
Resolving deltas: 100% (1777/1777), done.
cd fall2
-bash: cd: fall2: No such file or directory
cd fall24
-bash: cd: fall24: No such file or directory
cd fall2024/

cat _pr
_practice/ _prepare/  
cat _practice/2024-
2024-09-05.md  2024-09-19.md  2024-10-03.md  2024-10-22.md  2024-11-06.md  2024-11-19.md
2024-09-10.md  2024-09-24.md  2024-10-08.md  2024-10-24.md  2024-11-07.md  2024-11-21.md
2024-09-12.md  2024-09-26.md  2024-10-10.md  2024-10-29.md  2024-11-12.md  2024-11-26.md
2024-09-17.md  2024-10-01.md  2024-10-17.md  2024-10-31.md  2024-11-14.md  
cat _practice/2024-11-26.md 
1. Describe a type of project where it would be worth it for you to learn a language you have never used before in {index}`newlanguage.md` This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project. Your justifiction must come from sources used in class and be based in factual evidence about the language. 
2. Learn about one of the following languages that you have not used before: [R](https://www.r-project.org/), [Julia](https://julialang.org/), [Clojure](https://clojure.org/guides/getting_started), [Zig](https://ziglang.org/), [Go](https://go.dev/), [erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) or another language you are curious about that appeared in the Developer survey. For example you might be interest in the [top paying languages](https://survey.stackoverflow.co/2023/#technology-top-paying-technologies). Use the official documentation.  Answer the following questions in {index}`languagelearning.md`:

    ```
    1. What is this language designed for?
    2. What Programming paradigm(s) does it support?
    3. Give at least 1 example of a programming language that experience in would make it **easy** to learn this language and explain why. 
    4. Give at least 1 example of a programming language that experience in would make it **hard** to learn this language and explain why. 
    5. What is its most unique feature(s)?
    ```

hint: for questions 3 & 4, for example learning Python first does not make it easy to learn C++, but learning C makes it very easy to learn C++ (but I have not filled in explanations). 

## Explore badge option 

Actually try out one of the langauges above in a new repo created from [this asssignment](https://classroom.github.com/a/BXneBgx8). 

**work on a branch and commit after each step**

1. Setup the devcontainer to provide the compiler/interpreter for the language of your choice. See [features](https://containers.dev/features)
2. Add top extensions related to the language to the devcontainer. 
3. Add a [gitignore](https://github.com/github/gitignore) file for that language
4. Write a hello world type program in the language and make sure it runs. 
5. Use the official documentation to figure out a common task in the language and write an example program that completes something typical for that language (eg a sort data analysis in R). You may use GitHub Co-pilot in the code space to help write the code, but you should justify the task you ask it to do. Commit any generated code immediately with the message "code from copilot via <prompt>" and your prompt filled in.  
6. Test your understanding of the code by trying to modify it, and make commits describing what you changed and why. 
7. Fill in the prompts in the README (follow the comments) and Answer the questions in the README of the template repo.```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
gh repo view --web
Opening github.com/compsys-progtools/fall2024 in your browser.
time grep "index" _practice/*
_practice/2024-09-10.md:1. read Chapter 1, "Decoding your confusion while coding" in [The Programmer's Brain](https://www.manning.com/books/the-programmers-brain#toc) add a file called {index}`brain.md` to your kwl repo that summarizes your thoughts on the chapter. Do you think this information will help you approach learning more effectively? why or why not? How, if at all, does it changes how you think about debugging and learning to program? Give examples of how you have encountered the different types of confusion in your prior programming experiences. (to help you get good strategies and prime for things we will see in the next few weeks)
_practice/2024-09-10.md:3. map out your computing knowledge and add it to your kwl chart repo in a file called {index}`prior-knowledge-map.md`. Use [mermaid](https://mermaid-js.github.io/mermaid/#/) syntax, to draw your map. GitHub can render it for you including while you work using the preview button. (what we will learn will connect a lot of ideas, mapping out where you start, sets you up for success)
_practice/2024-09-12.md:3. Try using setting up git using your favorite IDE or GitHub Desktop. Make a file {index}`gitoffline.md` and include some notes of how it went. Was it hard? easy? what did you figure out or get stuck on? Is the terminology consistent or does it use different terms?
_practice/2024-09-12.md:2. **lab** Explore the difference between git add and git commit: try committing and pushing without adding, then add and push without committing. Describe what happens in each case in a file called {index}`gitcommit_tips.md`. Compare what happens based on what you can see on GitHub and what you can see with git status. Write a scenario with examples of how a person might make mistakes with git add and commit and what to look for to get unstuck. 
_practice/2024-09-17.md:1. Create a merge conflict in your KWL repo on the branch for this issue and resolve it using your favorite IDE, then create one and resolve it on GitHub in browser (this requires the merge conflict to occur on a PR). Describe how you created it, show the files, and describe how your IDE helps or does not help in {index}`merge_conflict_comparison.md`. Give advice for when you think someone should resolve a merge conflict in GitHub vs using an IDE. (if you do not regulary use an, IDE, try VSCode) *You can put content in the file for this step for the purpose of making the merge conflicts for this exercise.* 
_practice/2024-09-17.md:3. In {index}`branches-forks.md` in your KWL repo, compare and contrast branches and forks; be specific about their relationship. You may use mermaid diagrams if that helps you think through or communicate the ideas. If you use other resources, include them in your file as markdown links.
_practice/2024-09-19.md:2. Get set up so that you can contribute to the course website repo from your local system. Note: you can pull from the `compsys-progtools/fall2024` repo, but you do not not have push permission, so there is more to do than clone.  Append the commands used and the contents of your `fll2024/.git/config`to a {index}`git-remote-practice.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) and add headings to the sections. 
_practice/2024-09-19.md:3.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file (from the command line, not copy&paste), {index}`gitlog-compare.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks)  and then add text to the file describing a use case where that format in particular would be helpful.
_practice/2024-09-24.md:4.  Organize a folder on your computer ( good candidate may be  desktop or downloads folder), using only a terminal to make new directories, move files, check what's inside them, etc. Answer reflection questions in a new file, {index}`terminal_organization_adv.md` in your kwl repo. Tip: Start with a file explorer open, but then try to close it, and use only command line tools to explore and make your choices. If you get stuck, look up additional commands to do acomplish your goals.  
_practice/2024-09-26.md:1. Most real projects partly adhere and at least partly deviate from any major design philosophy or paradigm. Add a `## Unix Philosophy` section to your {index}`software.md` about how that project adheres to and deviates from the unix philosophy. Be specific, using links to specific lines of code or specific sections in the documentation that support your claims. Provide at least one example of both adhering and deviating from the philosophy and three total examples (that is 2 examples for one side and one for the other).  You can see what badge `software.md` was previously assigned in and the original instructions [on the KWL file list](https://compsys-progtools.github.io/spring2024/genindex.html).
_practice/2024-10-01.md:1. Explore the [tools for conventional commits](https://www.conventionalcommits.org/en/about/#tooling-for-conventional-commits) and then pick one to try out. Work on the branch for this badge and use one of the tools that helps making conventional commits (eg in VSCode or a CLI for it)for a series of commits adding "features" and "bug fixes" telling the story of a code project in a file called {index}`commit-story.md`.  For each edit, add short phrases like 'new feature 1', or 'next bug fix' to the single file each time, but use conventional commits for each commit. In total make at least 5 different types of changes (types per conventional commits standard) including 2 breaking changes and at least 10 total commits to the file. 
_practice/2024-10-01.md:2.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file, {index}`gitlog-compare.md`. Using a text editor, wrap each log with three backticks to make them "code blocks"  and then add text to the file describing a use case where that format in particular would be helpful. **do this after the above so that your git log examples include your conventional commits**
_practice/2024-10-08.md:1. Read about different workflows in git and add responses to the below in a {index}`workflows.md` in your kwl repo. Two good places to read from are [Git Book](https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#ch05-distributed-git) and the [atlassian Docs](https://www.atlassian.com/git/tutorials/comparing-workflows)
_practice/2024-10-08.md:3. Add the hash of the content of your completed {index}`workflows.md` file and put that in the comment of your badge PR for this badge. *Try to do this from your local CLI, but full credit even if you use the website interface*
_practice/2024-10-10.md:3. Analyze the xor hashing algorithm in the notes to determine which properties of a cryptographic hash are/not met. Include your analysis in {index}`xorhash.md`
_practice/2024-10-10.md:4. find 2 more real world examples of using other number systems (either different bases or different symbols and bases) **not mentioned in class** that are currently used. Describe the number system and its usage in {index}`numbers.md`. Include links to your sources and be sure that the sources are trustworthy. 
_practice/2024-10-10.md:5. Calculate the maximum number of git objects that a repo can have without requiring you to use more than the minimum number of characters to refer to any object and include that number in  {index}`gitcounts_scenarios.md`  with a title `# Git counts`. Describe 3 scenarios that would get you to that number of objects in terms of what types of objects would exist. For example, what is the maximum number of commits you could have without exceeding that number? How could you get to that number of objects in the fewest number of commits? What might be a typical way to get there? Assume normal git use with porcelain commands, not atypical cases with plubming commands. *If you get stuck, outline what you know and then request a review.* 
_practice/2024-10-10.md:7. Learn more about how git is working on changing from SHA-1 to SHA-256 and answer the transition questions below {index}`gittransition.md`
_practice/2024-10-17.md:1. Read more details about [git internals](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) to review what we did in class in greater detail. Make a file {index}`gitplumbingdetail.md` and create a a table or mermaid diagram that shows the relationship between at least **three** porcelain commands and their corresponding plumbing commands (generally more than one each). 
_practice/2024-10-17.md:2. Create {index}`gitislike.md` and explain main git operations we have seen (add, commit, push) in your own words in a way that will either help you remember or how you would explain it to someone else at a high level. This might be analogies or explanations using other programming concepts or concepts from a hobby.
_practice/2024-10-24.md:1. Answer the following in {index}`hpc.md` of your KWL repo:  (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
_practice/2024-10-29.md:1. On Seawulf, modfiy {index}`main.c` from class to accept the integer as a command line argument instead of via input while running the program. [See this tutorial for an example](http://crasseux.com/books/ctutorial/argc-and-argv.html). 
_practice/2024-10-29.md:2. Write a bash script {index}`demo_test.sh` that runs your compiled program for each integer from 10 to 30 (syntax for a range is `{start..end}` so this would be `{10..30}`)
_practice/2024-10-29.md:3. Write an sbatch script, {index}`batchrun.sh` to run your script  on a compute node and save the output to a file. The sbatch script should compile and link the program and then call the script. [see the options](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch)
_practice/2024-10-31.md:1. In {index}`bestide.md`, compare two IDEs using your group's table from class, to evaluate each of them.  Your review should have an introduction that justifies the ranking and defines the criteria, a section describing each IDE with respect to all of the criteria and your overall experience with that IDE, and a conclusion that explains which of the 3 is the best based on your evaluation. 
_practice/2024-10-31.md:2. Configure your VS Code preferences to your github account. add {index}`settingssync.md` with a description of what settings you customized and synced and reflect on why this is an important feature and what prerequisites to it might be.
_practice/2024-11-06.md:1. Run and examine how rect.hack and max.hack in the `nand2tetris/projects/05/` folder work. Make notes and answer the questions below in {index}`assemblyexplore.md`.
_practice/2024-11-07.md:1. Write a C program to compare values as doubles and as float (single precision/32bit) to see that this comparison issue is related to the IEEE standard and is not language specific.  Make notes and comparison around its behavior and include the program in a code cell in  {index}`cdouble.md`
_practice/2024-11-07.md:2. In {index}`floatexpt.md` design an experiment using the `fractions.Fraction` class in Python that helps illustrate why `.1*3 == .3` evaluates to `False` but `.1*4 ==.4` evaluates to `True`. Your file must include both code and interpretation of the results.
_practice/2024-11-12.md:1. While we saw many types of gates today, but we actually could get all of the operations needed using only NAND gates. Work out how to use NAND gates to implement a half adder and describe it in {index}`nandhalf.md`
_practice/2024-11-12.md:2. In {index}`addertypes.md` compare ripple adders and lookahead adders.
_practice/2024-11-14.md:2. Read about [systems abstractions](https://cacm.acm.org/opinion/articles/259395-systems-abstractions/fulltext) in CACM and answer reflection questions below in {index}`systemsabstractions.md` based on the systems abstraction reading:
_practice/2024-11-26.md:1. Describe a type of project where it would be worth it for you to learn a language you have never used before in {index}`newlanguage.md` This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project. Your justifiction must come from sources used in class and be based in factual evidence about the language. 
_practice/2024-11-26.md:2. Learn about one of the following languages that you have not used before: [R](https://www.r-project.org/), [Julia](https://julialang.org/), [Clojure](https://clojure.org/guides/getting_started), [Zig](https://ziglang.org/), [Go](https://go.dev/), [erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) or another language you are curious about that appeared in the Developer survey. For example you might be interest in the [top paying languages](https://survey.stackoverflow.co/2023/#technology-top-paying-technologies). Use the official documentation.  Answer the following questions in {index}`languagelearning.md`:

real	0m0.024s
user	0m0.003s
sys	0m0.010s
time grep "index" _practice/*
_practice/2024-09-10.md:1. read Chapter 1, "Decoding your confusion while coding" in [The Programmer's Brain](https://www.manning.com/books/the-programmers-brain#toc) add a file called {index}`brain.md` to your kwl repo that summarizes your thoughts on the chapter. Do you think this information will help you approach learning more effectively? why or why not? How, if at all, does it changes how you think about debugging and learning to program? Give examples of how you have encountered the different types of confusion in your prior programming experiences. (to help you get good strategies and prime for things we will see in the next few weeks)
_practice/2024-09-10.md:3. map out your computing knowledge and add it to your kwl chart repo in a file called {index}`prior-knowledge-map.md`. Use [mermaid](https://mermaid-js.github.io/mermaid/#/) syntax, to draw your map. GitHub can render it for you including while you work using the preview button. (what we will learn will connect a lot of ideas, mapping out where you start, sets you up for success)
_practice/2024-09-12.md:3. Try using setting up git using your favorite IDE or GitHub Desktop. Make a file {index}`gitoffline.md` and include some notes of how it went. Was it hard? easy? what did you figure out or get stuck on? Is the terminology consistent or does it use different terms?
_practice/2024-09-12.md:2. **lab** Explore the difference between git add and git commit: try committing and pushing without adding, then add and push without committing. Describe what happens in each case in a file called {index}`gitcommit_tips.md`. Compare what happens based on what you can see on GitHub and what you can see with git status. Write a scenario with examples of how a person might make mistakes with git add and commit and what to look for to get unstuck. 
_practice/2024-09-17.md:1. Create a merge conflict in your KWL repo on the branch for this issue and resolve it using your favorite IDE, then create one and resolve it on GitHub in browser (this requires the merge conflict to occur on a PR). Describe how you created it, show the files, and describe how your IDE helps or does not help in {index}`merge_conflict_comparison.md`. Give advice for when you think someone should resolve a merge conflict in GitHub vs using an IDE. (if you do not regulary use an, IDE, try VSCode) *You can put content in the file for this step for the purpose of making the merge conflicts for this exercise.* 
_practice/2024-09-17.md:3. In {index}`branches-forks.md` in your KWL repo, compare and contrast branches and forks; be specific about their relationship. You may use mermaid diagrams if that helps you think through or communicate the ideas. If you use other resources, include them in your file as markdown links.
_practice/2024-09-19.md:2. Get set up so that you can contribute to the course website repo from your local system. Note: you can pull from the `compsys-progtools/fall2024` repo, but you do not not have push permission, so there is more to do than clone.  Append the commands used and the contents of your `fll2024/.git/config`to a {index}`git-remote-practice.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) and add headings to the sections. 
_practice/2024-09-19.md:3.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file (from the command line, not copy&paste), {index}`gitlog-compare.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks)  and then add text to the file describing a use case where that format in particular would be helpful.
_practice/2024-09-24.md:4.  Organize a folder on your computer ( good candidate may be  desktop or downloads folder), using only a terminal to make new directories, move files, check what's inside them, etc. Answer reflection questions in a new file, {index}`terminal_organization_adv.md` in your kwl repo. Tip: Start with a file explorer open, but then try to close it, and use only command line tools to explore and make your choices. If you get stuck, look up additional commands to do acomplish your goals.  
_practice/2024-09-26.md:1. Most real projects partly adhere and at least partly deviate from any major design philosophy or paradigm. Add a `## Unix Philosophy` section to your {index}`software.md` about how that project adheres to and deviates from the unix philosophy. Be specific, using links to specific lines of code or specific sections in the documentation that support your claims. Provide at least one example of both adhering and deviating from the philosophy and three total examples (that is 2 examples for one side and one for the other).  You can see what badge `software.md` was previously assigned in and the original instructions [on the KWL file list](https://compsys-progtools.github.io/spring2024/genindex.html).
_practice/2024-10-01.md:1. Explore the [tools for conventional commits](https://www.conventionalcommits.org/en/about/#tooling-for-conventional-commits) and then pick one to try out. Work on the branch for this badge and use one of the tools that helps making conventional commits (eg in VSCode or a CLI for it)for a series of commits adding "features" and "bug fixes" telling the story of a code project in a file called {index}`commit-story.md`.  For each edit, add short phrases like 'new feature 1', or 'next bug fix' to the single file each time, but use conventional commits for each commit. In total make at least 5 different types of changes (types per conventional commits standard) including 2 breaking changes and at least 10 total commits to the file. 
_practice/2024-10-01.md:2.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file, {index}`gitlog-compare.md`. Using a text editor, wrap each log with three backticks to make them "code blocks"  and then add text to the file describing a use case where that format in particular would be helpful. **do this after the above so that your git log examples include your conventional commits**
_practice/2024-10-08.md:1. Read about different workflows in git and add responses to the below in a {index}`workflows.md` in your kwl repo. Two good places to read from are [Git Book](https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#ch05-distributed-git) and the [atlassian Docs](https://www.atlassian.com/git/tutorials/comparing-workflows)
_practice/2024-10-08.md:3. Add the hash of the content of your completed {index}`workflows.md` file and put that in the comment of your badge PR for this badge. *Try to do this from your local CLI, but full credit even if you use the website interface*
_practice/2024-10-10.md:3. Analyze the xor hashing algorithm in the notes to determine which properties of a cryptographic hash are/not met. Include your analysis in {index}`xorhash.md`
_practice/2024-10-10.md:4. find 2 more real world examples of using other number systems (either different bases or different symbols and bases) **not mentioned in class** that are currently used. Describe the number system and its usage in {index}`numbers.md`. Include links to your sources and be sure that the sources are trustworthy. 
_practice/2024-10-10.md:5. Calculate the maximum number of git objects that a repo can have without requiring you to use more than the minimum number of characters to refer to any object and include that number in  {index}`gitcounts_scenarios.md`  with a title `# Git counts`. Describe 3 scenarios that would get you to that number of objects in terms of what types of objects would exist. For example, what is the maximum number of commits you could have without exceeding that number? How could you get to that number of objects in the fewest number of commits? What might be a typical way to get there? Assume normal git use with porcelain commands, not atypical cases with plubming commands. *If you get stuck, outline what you know and then request a review.* 
_practice/2024-10-10.md:7. Learn more about how git is working on changing from SHA-1 to SHA-256 and answer the transition questions below {index}`gittransition.md`
_practice/2024-10-17.md:1. Read more details about [git internals](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) to review what we did in class in greater detail. Make a file {index}`gitplumbingdetail.md` and create a a table or mermaid diagram that shows the relationship between at least **three** porcelain commands and their corresponding plumbing commands (generally more than one each). 
_practice/2024-10-17.md:2. Create {index}`gitislike.md` and explain main git operations we have seen (add, commit, push) in your own words in a way that will either help you remember or how you would explain it to someone else at a high level. This might be analogies or explanations using other programming concepts or concepts from a hobby.
_practice/2024-10-24.md:1. Answer the following in {index}`hpc.md` of your KWL repo:  (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
_practice/2024-10-29.md:1. On Seawulf, modfiy {index}`main.c` from class to accept the integer as a command line argument instead of via input while running the program. [See this tutorial for an example](http://crasseux.com/books/ctutorial/argc-and-argv.html). 
_practice/2024-10-29.md:2. Write a bash script {index}`demo_test.sh` that runs your compiled program for each integer from 10 to 30 (syntax for a range is `{start..end}` so this would be `{10..30}`)
_practice/2024-10-29.md:3. Write an sbatch script, {index}`batchrun.sh` to run your script  on a compute node and save the output to a file. The sbatch script should compile and link the program and then call the script. [see the options](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch)
_practice/2024-10-31.md:1. In {index}`bestide.md`, compare two IDEs using your group's table from class, to evaluate each of them.  Your review should have an introduction that justifies the ranking and defines the criteria, a section describing each IDE with respect to all of the criteria and your overall experience with that IDE, and a conclusion that explains which of the 3 is the best based on your evaluation. 
_practice/2024-10-31.md:2. Configure your VS Code preferences to your github account. add {index}`settingssync.md` with a description of what settings you customized and synced and reflect on why this is an important feature and what prerequisites to it might be.
_practice/2024-11-06.md:1. Run and examine how rect.hack and max.hack in the `nand2tetris/projects/05/` folder work. Make notes and answer the questions below in {index}`assemblyexplore.md`.
_practice/2024-11-07.md:1. Write a C program to compare values as doubles and as float (single precision/32bit) to see that this comparison issue is related to the IEEE standard and is not language specific.  Make notes and comparison around its behavior and include the program in a code cell in  {index}`cdouble.md`
_practice/2024-11-07.md:2. In {index}`floatexpt.md` design an experiment using the `fractions.Fraction` class in Python that helps illustrate why `.1*3 == .3` evaluates to `False` but `.1*4 ==.4` evaluates to `True`. Your file must include both code and interpretation of the results.
_practice/2024-11-12.md:1. While we saw many types of gates today, but we actually could get all of the operations needed using only NAND gates. Work out how to use NAND gates to implement a half adder and describe it in {index}`nandhalf.md`
_practice/2024-11-12.md:2. In {index}`addertypes.md` compare ripple adders and lookahead adders.
_practice/2024-11-14.md:2. Read about [systems abstractions](https://cacm.acm.org/opinion/articles/259395-systems-abstractions/fulltext) in CACM and answer reflection questions below in {index}`systemsabstractions.md` based on the systems abstraction reading:
_practice/2024-11-26.md:1. Describe a type of project where it would be worth it for you to learn a language you have never used before in {index}`newlanguage.md` This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project. Your justifiction must come from sources used in class and be based in factual evidence about the language. 
_practice/2024-11-26.md:2. Learn about one of the following languages that you have not used before: [R](https://www.r-project.org/), [Julia](https://julialang.org/), [Clojure](https://clojure.org/guides/getting_started), [Zig](https://ziglang.org/), [Go](https://go.dev/), [erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) or another language you are curious about that appeared in the Developer survey. For example you might be interest in the [top paying languages](https://survey.stackoverflow.co/2023/#technology-top-paying-technologies). Use the official documentation.  Answer the following questions in {index}`languagelearning.md`:

real	0m0.012s
user	0m0.003s
sys	0m0.007s
time grep "index" _practice/*
_practice/2024-09-10.md:1. read Chapter 1, "Decoding your confusion while coding" in [The Programmer's Brain](https://www.manning.com/books/the-programmers-brain#toc) add a file called {index}`brain.md` to your kwl repo that summarizes your thoughts on the chapter. Do you think this information will help you approach learning more effectively? why or why not? How, if at all, does it changes how you think about debugging and learning to program? Give examples of how you have encountered the different types of confusion in your prior programming experiences. (to help you get good strategies and prime for things we will see in the next few weeks)
_practice/2024-09-10.md:3. map out your computing knowledge and add it to your kwl chart repo in a file called {index}`prior-knowledge-map.md`. Use [mermaid](https://mermaid-js.github.io/mermaid/#/) syntax, to draw your map. GitHub can render it for you including while you work using the preview button. (what we will learn will connect a lot of ideas, mapping out where you start, sets you up for success)
_practice/2024-09-12.md:3. Try using setting up git using your favorite IDE or GitHub Desktop. Make a file {index}`gitoffline.md` and include some notes of how it went. Was it hard? easy? what did you figure out or get stuck on? Is the terminology consistent or does it use different terms?
_practice/2024-09-12.md:2. **lab** Explore the difference between git add and git commit: try committing and pushing without adding, then add and push without committing. Describe what happens in each case in a file called {index}`gitcommit_tips.md`. Compare what happens based on what you can see on GitHub and what you can see with git status. Write a scenario with examples of how a person might make mistakes with git add and commit and what to look for to get unstuck. 
_practice/2024-09-17.md:1. Create a merge conflict in your KWL repo on the branch for this issue and resolve it using your favorite IDE, then create one and resolve it on GitHub in browser (this requires the merge conflict to occur on a PR). Describe how you created it, show the files, and describe how your IDE helps or does not help in {index}`merge_conflict_comparison.md`. Give advice for when you think someone should resolve a merge conflict in GitHub vs using an IDE. (if you do not regulary use an, IDE, try VSCode) *You can put content in the file for this step for the purpose of making the merge conflicts for this exercise.* 
_practice/2024-09-17.md:3. In {index}`branches-forks.md` in your KWL repo, compare and contrast branches and forks; be specific about their relationship. You may use mermaid diagrams if that helps you think through or communicate the ideas. If you use other resources, include them in your file as markdown links.
_practice/2024-09-19.md:2. Get set up so that you can contribute to the course website repo from your local system. Note: you can pull from the `compsys-progtools/fall2024` repo, but you do not not have push permission, so there is more to do than clone.  Append the commands used and the contents of your `fll2024/.git/config`to a {index}`git-remote-practice.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) and add headings to the sections. 
_practice/2024-09-19.md:3.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file (from the command line, not copy&paste), {index}`gitlog-compare.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks)  and then add text to the file describing a use case where that format in particular would be helpful.
_practice/2024-09-24.md:4.  Organize a folder on your computer ( good candidate may be  desktop or downloads folder), using only a terminal to make new directories, move files, check what's inside them, etc. Answer reflection questions in a new file, {index}`terminal_organization_adv.md` in your kwl repo. Tip: Start with a file explorer open, but then try to close it, and use only command line tools to explore and make your choices. If you get stuck, look up additional commands to do acomplish your goals.  
_practice/2024-09-26.md:1. Most real projects partly adhere and at least partly deviate from any major design philosophy or paradigm. Add a `## Unix Philosophy` section to your {index}`software.md` about how that project adheres to and deviates from the unix philosophy. Be specific, using links to specific lines of code or specific sections in the documentation that support your claims. Provide at least one example of both adhering and deviating from the philosophy and three total examples (that is 2 examples for one side and one for the other).  You can see what badge `software.md` was previously assigned in and the original instructions [on the KWL file list](https://compsys-progtools.github.io/spring2024/genindex.html).
_practice/2024-10-01.md:1. Explore the [tools for conventional commits](https://www.conventionalcommits.org/en/about/#tooling-for-conventional-commits) and then pick one to try out. Work on the branch for this badge and use one of the tools that helps making conventional commits (eg in VSCode or a CLI for it)for a series of commits adding "features" and "bug fixes" telling the story of a code project in a file called {index}`commit-story.md`.  For each edit, add short phrases like 'new feature 1', or 'next bug fix' to the single file each time, but use conventional commits for each commit. In total make at least 5 different types of changes (types per conventional commits standard) including 2 breaking changes and at least 10 total commits to the file. 
_practice/2024-10-01.md:2.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file, {index}`gitlog-compare.md`. Using a text editor, wrap each log with three backticks to make them "code blocks"  and then add text to the file describing a use case where that format in particular would be helpful. **do this after the above so that your git log examples include your conventional commits**
_practice/2024-10-08.md:1. Read about different workflows in git and add responses to the below in a {index}`workflows.md` in your kwl repo. Two good places to read from are [Git Book](https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#ch05-distributed-git) and the [atlassian Docs](https://www.atlassian.com/git/tutorials/comparing-workflows)
_practice/2024-10-08.md:3. Add the hash of the content of your completed {index}`workflows.md` file and put that in the comment of your badge PR for this badge. *Try to do this from your local CLI, but full credit even if you use the website interface*
_practice/2024-10-10.md:3. Analyze the xor hashing algorithm in the notes to determine which properties of a cryptographic hash are/not met. Include your analysis in {index}`xorhash.md`
_practice/2024-10-10.md:4. find 2 more real world examples of using other number systems (either different bases or different symbols and bases) **not mentioned in class** that are currently used. Describe the number system and its usage in {index}`numbers.md`. Include links to your sources and be sure that the sources are trustworthy. 
_practice/2024-10-10.md:5. Calculate the maximum number of git objects that a repo can have without requiring you to use more than the minimum number of characters to refer to any object and include that number in  {index}`gitcounts_scenarios.md`  with a title `# Git counts`. Describe 3 scenarios that would get you to that number of objects in terms of what types of objects would exist. For example, what is the maximum number of commits you could have without exceeding that number? How could you get to that number of objects in the fewest number of commits? What might be a typical way to get there? Assume normal git use with porcelain commands, not atypical cases with plubming commands. *If you get stuck, outline what you know and then request a review.* 
_practice/2024-10-10.md:7. Learn more about how git is working on changing from SHA-1 to SHA-256 and answer the transition questions below {index}`gittransition.md`
_practice/2024-10-17.md:1. Read more details about [git internals](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) to review what we did in class in greater detail. Make a file {index}`gitplumbingdetail.md` and create a a table or mermaid diagram that shows the relationship between at least **three** porcelain commands and their corresponding plumbing commands (generally more than one each). 
_practice/2024-10-17.md:2. Create {index}`gitislike.md` and explain main git operations we have seen (add, commit, push) in your own words in a way that will either help you remember or how you would explain it to someone else at a high level. This might be analogies or explanations using other programming concepts or concepts from a hobby.
_practice/2024-10-24.md:1. Answer the following in {index}`hpc.md` of your KWL repo:  (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
_practice/2024-10-29.md:1. On Seawulf, modfiy {index}`main.c` from class to accept the integer as a command line argument instead of via input while running the program. [See this tutorial for an example](http://crasseux.com/books/ctutorial/argc-and-argv.html). 
_practice/2024-10-29.md:2. Write a bash script {index}`demo_test.sh` that runs your compiled program for each integer from 10 to 30 (syntax for a range is `{start..end}` so this would be `{10..30}`)
_practice/2024-10-29.md:3. Write an sbatch script, {index}`batchrun.sh` to run your script  on a compute node and save the output to a file. The sbatch script should compile and link the program and then call the script. [see the options](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch)
_practice/2024-10-31.md:1. In {index}`bestide.md`, compare two IDEs using your group's table from class, to evaluate each of them.  Your review should have an introduction that justifies the ranking and defines the criteria, a section describing each IDE with respect to all of the criteria and your overall experience with that IDE, and a conclusion that explains which of the 3 is the best based on your evaluation. 
_practice/2024-10-31.md:2. Configure your VS Code preferences to your github account. add {index}`settingssync.md` with a description of what settings you customized and synced and reflect on why this is an important feature and what prerequisites to it might be.
_practice/2024-11-06.md:1. Run and examine how rect.hack and max.hack in the `nand2tetris/projects/05/` folder work. Make notes and answer the questions below in {index}`assemblyexplore.md`.
_practice/2024-11-07.md:1. Write a C program to compare values as doubles and as float (single precision/32bit) to see that this comparison issue is related to the IEEE standard and is not language specific.  Make notes and comparison around its behavior and include the program in a code cell in  {index}`cdouble.md`
_practice/2024-11-07.md:2. In {index}`floatexpt.md` design an experiment using the `fractions.Fraction` class in Python that helps illustrate why `.1*3 == .3` evaluates to `False` but `.1*4 ==.4` evaluates to `True`. Your file must include both code and interpretation of the results.
_practice/2024-11-12.md:1. While we saw many types of gates today, but we actually could get all of the operations needed using only NAND gates. Work out how to use NAND gates to implement a half adder and describe it in {index}`nandhalf.md`
_practice/2024-11-12.md:2. In {index}`addertypes.md` compare ripple adders and lookahead adders.
_practice/2024-11-14.md:2. Read about [systems abstractions](https://cacm.acm.org/opinion/articles/259395-systems-abstractions/fulltext) in CACM and answer reflection questions below in {index}`systemsabstractions.md` based on the systems abstraction reading:
_practice/2024-11-26.md:1. Describe a type of project where it would be worth it for you to learn a language you have never used before in {index}`newlanguage.md` This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project. Your justifiction must come from sources used in class and be based in factual evidence about the language. 
_practice/2024-11-26.md:2. Learn about one of the following languages that you have not used before: [R](https://www.r-project.org/), [Julia](https://julialang.org/), [Clojure](https://clojure.org/guides/getting_started), [Zig](https://ziglang.org/), [Go](https://go.dev/), [erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) or another language you are curious about that appeared in the Developer survey. For example you might be interest in the [top paying languages](https://survey.stackoverflow.co/2023/#technology-top-paying-technologies). Use the official documentation.  Answer the following questions in {index}`languagelearning.md`:

real	0m0.012s
user	0m0.004s
sys	0m0.007s
time grep "index" _practice/*
_practice/2024-09-10.md:1. read Chapter 1, "Decoding your confusion while coding" in [The Programmer's Brain](https://www.manning.com/books/the-programmers-brain#toc) add a file called {index}`brain.md` to your kwl repo that summarizes your thoughts on the chapter. Do you think this information will help you approach learning more effectively? why or why not? How, if at all, does it changes how you think about debugging and learning to program? Give examples of how you have encountered the different types of confusion in your prior programming experiences. (to help you get good strategies and prime for things we will see in the next few weeks)
_practice/2024-09-10.md:3. map out your computing knowledge and add it to your kwl chart repo in a file called {index}`prior-knowledge-map.md`. Use [mermaid](https://mermaid-js.github.io/mermaid/#/) syntax, to draw your map. GitHub can render it for you including while you work using the preview button. (what we will learn will connect a lot of ideas, mapping out where you start, sets you up for success)
_practice/2024-09-12.md:3. Try using setting up git using your favorite IDE or GitHub Desktop. Make a file {index}`gitoffline.md` and include some notes of how it went. Was it hard? easy? what did you figure out or get stuck on? Is the terminology consistent or does it use different terms?
_practice/2024-09-12.md:2. **lab** Explore the difference between git add and git commit: try committing and pushing without adding, then add and push without committing. Describe what happens in each case in a file called {index}`gitcommit_tips.md`. Compare what happens based on what you can see on GitHub and what you can see with git status. Write a scenario with examples of how a person might make mistakes with git add and commit and what to look for to get unstuck. 
_practice/2024-09-17.md:1. Create a merge conflict in your KWL repo on the branch for this issue and resolve it using your favorite IDE, then create one and resolve it on GitHub in browser (this requires the merge conflict to occur on a PR). Describe how you created it, show the files, and describe how your IDE helps or does not help in {index}`merge_conflict_comparison.md`. Give advice for when you think someone should resolve a merge conflict in GitHub vs using an IDE. (if you do not regulary use an, IDE, try VSCode) *You can put content in the file for this step for the purpose of making the merge conflicts for this exercise.* 
_practice/2024-09-17.md:3. In {index}`branches-forks.md` in your KWL repo, compare and contrast branches and forks; be specific about their relationship. You may use mermaid diagrams if that helps you think through or communicate the ideas. If you use other resources, include them in your file as markdown links.
_practice/2024-09-19.md:2. Get set up so that you can contribute to the course website repo from your local system. Note: you can pull from the `compsys-progtools/fall2024` repo, but you do not not have push permission, so there is more to do than clone.  Append the commands used and the contents of your `fll2024/.git/config`to a {index}`git-remote-practice.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) and add headings to the sections. 
_practice/2024-09-19.md:3.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file (from the command line, not copy&paste), {index}`gitlog-compare.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks)  and then add text to the file describing a use case where that format in particular would be helpful.
_practice/2024-09-24.md:4.  Organize a folder on your computer ( good candidate may be  desktop or downloads folder), using only a terminal to make new directories, move files, check what's inside them, etc. Answer reflection questions in a new file, {index}`terminal_organization_adv.md` in your kwl repo. Tip: Start with a file explorer open, but then try to close it, and use only command line tools to explore and make your choices. If you get stuck, look up additional commands to do acomplish your goals.  
_practice/2024-09-26.md:1. Most real projects partly adhere and at least partly deviate from any major design philosophy or paradigm. Add a `## Unix Philosophy` section to your {index}`software.md` about how that project adheres to and deviates from the unix philosophy. Be specific, using links to specific lines of code or specific sections in the documentation that support your claims. Provide at least one example of both adhering and deviating from the philosophy and three total examples (that is 2 examples for one side and one for the other).  You can see what badge `software.md` was previously assigned in and the original instructions [on the KWL file list](https://compsys-progtools.github.io/spring2024/genindex.html).
_practice/2024-10-01.md:1. Explore the [tools for conventional commits](https://www.conventionalcommits.org/en/about/#tooling-for-conventional-commits) and then pick one to try out. Work on the branch for this badge and use one of the tools that helps making conventional commits (eg in VSCode or a CLI for it)for a series of commits adding "features" and "bug fixes" telling the story of a code project in a file called {index}`commit-story.md`.  For each edit, add short phrases like 'new feature 1', or 'next bug fix' to the single file each time, but use conventional commits for each commit. In total make at least 5 different types of changes (types per conventional commits standard) including 2 breaking changes and at least 10 total commits to the file. 
_practice/2024-10-01.md:2.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file, {index}`gitlog-compare.md`. Using a text editor, wrap each log with three backticks to make them "code blocks"  and then add text to the file describing a use case where that format in particular would be helpful. **do this after the above so that your git log examples include your conventional commits**
_practice/2024-10-08.md:1. Read about different workflows in git and add responses to the below in a {index}`workflows.md` in your kwl repo. Two good places to read from are [Git Book](https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#ch05-distributed-git) and the [atlassian Docs](https://www.atlassian.com/git/tutorials/comparing-workflows)
_practice/2024-10-08.md:3. Add the hash of the content of your completed {index}`workflows.md` file and put that in the comment of your badge PR for this badge. *Try to do this from your local CLI, but full credit even if you use the website interface*
_practice/2024-10-10.md:3. Analyze the xor hashing algorithm in the notes to determine which properties of a cryptographic hash are/not met. Include your analysis in {index}`xorhash.md`
_practice/2024-10-10.md:4. find 2 more real world examples of using other number systems (either different bases or different symbols and bases) **not mentioned in class** that are currently used. Describe the number system and its usage in {index}`numbers.md`. Include links to your sources and be sure that the sources are trustworthy. 
_practice/2024-10-10.md:5. Calculate the maximum number of git objects that a repo can have without requiring you to use more than the minimum number of characters to refer to any object and include that number in  {index}`gitcounts_scenarios.md`  with a title `# Git counts`. Describe 3 scenarios that would get you to that number of objects in terms of what types of objects would exist. For example, what is the maximum number of commits you could have without exceeding that number? How could you get to that number of objects in the fewest number of commits? What might be a typical way to get there? Assume normal git use with porcelain commands, not atypical cases with plubming commands. *If you get stuck, outline what you know and then request a review.* 
_practice/2024-10-10.md:7. Learn more about how git is working on changing from SHA-1 to SHA-256 and answer the transition questions below {index}`gittransition.md`
_practice/2024-10-17.md:1. Read more details about [git internals](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) to review what we did in class in greater detail. Make a file {index}`gitplumbingdetail.md` and create a a table or mermaid diagram that shows the relationship between at least **three** porcelain commands and their corresponding plumbing commands (generally more than one each). 
_practice/2024-10-17.md:2. Create {index}`gitislike.md` and explain main git operations we have seen (add, commit, push) in your own words in a way that will either help you remember or how you would explain it to someone else at a high level. This might be analogies or explanations using other programming concepts or concepts from a hobby.
_practice/2024-10-24.md:1. Answer the following in {index}`hpc.md` of your KWL repo:  (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
_practice/2024-10-29.md:1. On Seawulf, modfiy {index}`main.c` from class to accept the integer as a command line argument instead of via input while running the program. [See this tutorial for an example](http://crasseux.com/books/ctutorial/argc-and-argv.html). 
_practice/2024-10-29.md:2. Write a bash script {index}`demo_test.sh` that runs your compiled program for each integer from 10 to 30 (syntax for a range is `{start..end}` so this would be `{10..30}`)
_practice/2024-10-29.md:3. Write an sbatch script, {index}`batchrun.sh` to run your script  on a compute node and save the output to a file. The sbatch script should compile and link the program and then call the script. [see the options](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch)
_practice/2024-10-31.md:1. In {index}`bestide.md`, compare two IDEs using your group's table from class, to evaluate each of them.  Your review should have an introduction that justifies the ranking and defines the criteria, a section describing each IDE with respect to all of the criteria and your overall experience with that IDE, and a conclusion that explains which of the 3 is the best based on your evaluation. 
_practice/2024-10-31.md:2. Configure your VS Code preferences to your github account. add {index}`settingssync.md` with a description of what settings you customized and synced and reflect on why this is an important feature and what prerequisites to it might be.
_practice/2024-11-06.md:1. Run and examine how rect.hack and max.hack in the `nand2tetris/projects/05/` folder work. Make notes and answer the questions below in {index}`assemblyexplore.md`.
_practice/2024-11-07.md:1. Write a C program to compare values as doubles and as float (single precision/32bit) to see that this comparison issue is related to the IEEE standard and is not language specific.  Make notes and comparison around its behavior and include the program in a code cell in  {index}`cdouble.md`
_practice/2024-11-07.md:2. In {index}`floatexpt.md` design an experiment using the `fractions.Fraction` class in Python that helps illustrate why `.1*3 == .3` evaluates to `False` but `.1*4 ==.4` evaluates to `True`. Your file must include both code and interpretation of the results.
_practice/2024-11-12.md:1. While we saw many types of gates today, but we actually could get all of the operations needed using only NAND gates. Work out how to use NAND gates to implement a half adder and describe it in {index}`nandhalf.md`
_practice/2024-11-12.md:2. In {index}`addertypes.md` compare ripple adders and lookahead adders.
_practice/2024-11-14.md:2. Read about [systems abstractions](https://cacm.acm.org/opinion/articles/259395-systems-abstractions/fulltext) in CACM and answer reflection questions below in {index}`systemsabstractions.md` based on the systems abstraction reading:
_practice/2024-11-26.md:1. Describe a type of project where it would be worth it for you to learn a language you have never used before in {index}`newlanguage.md` This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project. Your justifiction must come from sources used in class and be based in factual evidence about the language. 
_practice/2024-11-26.md:2. Learn about one of the following languages that you have not used before: [R](https://www.r-project.org/), [Julia](https://julialang.org/), [Clojure](https://clojure.org/guides/getting_started), [Zig](https://ziglang.org/), [Go](https://go.dev/), [erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) or another language you are curious about that appeared in the Developer survey. For example you might be interest in the [top paying languages](https://survey.stackoverflow.co/2023/#technology-top-paying-technologies). Use the official documentation.  Answer the following questions in {index}`languagelearning.md`:

real	0m0.012s
user	0m0.004s
sys	0m0.007s
time grep "index" _practice/*
_practice/2024-09-10.md:1. read Chapter 1, "Decoding your confusion while coding" in [The Programmer's Brain](https://www.manning.com/books/the-programmers-brain#toc) add a file called {index}`brain.md` to your kwl repo that summarizes your thoughts on the chapter. Do you think this information will help you approach learning more effectively? why or why not? How, if at all, does it changes how you think about debugging and learning to program? Give examples of how you have encountered the different types of confusion in your prior programming experiences. (to help you get good strategies and prime for things we will see in the next few weeks)
_practice/2024-09-10.md:3. map out your computing knowledge and add it to your kwl chart repo in a file called {index}`prior-knowledge-map.md`. Use [mermaid](https://mermaid-js.github.io/mermaid/#/) syntax, to draw your map. GitHub can render it for you including while you work using the preview button. (what we will learn will connect a lot of ideas, mapping out where you start, sets you up for success)
_practice/2024-09-12.md:3. Try using setting up git using your favorite IDE or GitHub Desktop. Make a file {index}`gitoffline.md` and include some notes of how it went. Was it hard? easy? what did you figure out or get stuck on? Is the terminology consistent or does it use different terms?
_practice/2024-09-12.md:2. **lab** Explore the difference between git add and git commit: try committing and pushing without adding, then add and push without committing. Describe what happens in each case in a file called {index}`gitcommit_tips.md`. Compare what happens based on what you can see on GitHub and what you can see with git status. Write a scenario with examples of how a person might make mistakes with git add and commit and what to look for to get unstuck. 
_practice/2024-09-17.md:1. Create a merge conflict in your KWL repo on the branch for this issue and resolve it using your favorite IDE, then create one and resolve it on GitHub in browser (this requires the merge conflict to occur on a PR). Describe how you created it, show the files, and describe how your IDE helps or does not help in {index}`merge_conflict_comparison.md`. Give advice for when you think someone should resolve a merge conflict in GitHub vs using an IDE. (if you do not regulary use an, IDE, try VSCode) *You can put content in the file for this step for the purpose of making the merge conflicts for this exercise.* 
_practice/2024-09-17.md:3. In {index}`branches-forks.md` in your KWL repo, compare and contrast branches and forks; be specific about their relationship. You may use mermaid diagrams if that helps you think through or communicate the ideas. If you use other resources, include them in your file as markdown links.
_practice/2024-09-19.md:2. Get set up so that you can contribute to the course website repo from your local system. Note: you can pull from the `compsys-progtools/fall2024` repo, but you do not not have push permission, so there is more to do than clone.  Append the commands used and the contents of your `fll2024/.git/config`to a {index}`git-remote-practice.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) and add headings to the sections. 
_practice/2024-09-19.md:3.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file (from the command line, not copy&paste), {index}`gitlog-compare.md`. Then, using a text editor (or IDE), wrap each log with three backticks to make them [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks)  and then add text to the file describing a use case where that format in particular would be helpful.
_practice/2024-09-24.md:4.  Organize a folder on your computer ( good candidate may be  desktop or downloads folder), using only a terminal to make new directories, move files, check what's inside them, etc. Answer reflection questions in a new file, {index}`terminal_organization_adv.md` in your kwl repo. Tip: Start with a file explorer open, but then try to close it, and use only command line tools to explore and make your choices. If you get stuck, look up additional commands to do acomplish your goals.  
_practice/2024-09-26.md:1. Most real projects partly adhere and at least partly deviate from any major design philosophy or paradigm. Add a `## Unix Philosophy` section to your {index}`software.md` about how that project adheres to and deviates from the unix philosophy. Be specific, using links to specific lines of code or specific sections in the documentation that support your claims. Provide at least one example of both adhering and deviating from the philosophy and three total examples (that is 2 examples for one side and one for the other).  You can see what badge `software.md` was previously assigned in and the original instructions [on the KWL file list](https://compsys-progtools.github.io/spring2024/genindex.html).
_practice/2024-10-01.md:1. Explore the [tools for conventional commits](https://www.conventionalcommits.org/en/about/#tooling-for-conventional-commits) and then pick one to try out. Work on the branch for this badge and use one of the tools that helps making conventional commits (eg in VSCode or a CLI for it)for a series of commits adding "features" and "bug fixes" telling the story of a code project in a file called {index}`commit-story.md`.  For each edit, add short phrases like 'new feature 1', or 'next bug fix' to the single file each time, but use conventional commits for each commit. In total make at least 5 different types of changes (types per conventional commits standard) including 2 breaking changes and at least 10 total commits to the file. 
_practice/2024-10-01.md:2.  [learn about options for how git can display commit history](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History).  Try out a few different options.  Choose two, write them both to a file, {index}`gitlog-compare.md`. Using a text editor, wrap each log with three backticks to make them "code blocks"  and then add text to the file describing a use case where that format in particular would be helpful. **do this after the above so that your git log examples include your conventional commits**
_practice/2024-10-08.md:1. Read about different workflows in git and add responses to the below in a {index}`workflows.md` in your kwl repo. Two good places to read from are [Git Book](https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows#ch05-distributed-git) and the [atlassian Docs](https://www.atlassian.com/git/tutorials/comparing-workflows)
_practice/2024-10-08.md:3. Add the hash of the content of your completed {index}`workflows.md` file and put that in the comment of your badge PR for this badge. *Try to do this from your local CLI, but full credit even if you use the website interface*
_practice/2024-10-10.md:3. Analyze the xor hashing algorithm in the notes to determine which properties of a cryptographic hash are/not met. Include your analysis in {index}`xorhash.md`
_practice/2024-10-10.md:4. find 2 more real world examples of using other number systems (either different bases or different symbols and bases) **not mentioned in class** that are currently used. Describe the number system and its usage in {index}`numbers.md`. Include links to your sources and be sure that the sources are trustworthy. 
_practice/2024-10-10.md:5. Calculate the maximum number of git objects that a repo can have without requiring you to use more than the minimum number of characters to refer to any object and include that number in  {index}`gitcounts_scenarios.md`  with a title `# Git counts`. Describe 3 scenarios that would get you to that number of objects in terms of what types of objects would exist. For example, what is the maximum number of commits you could have without exceeding that number? How could you get to that number of objects in the fewest number of commits? What might be a typical way to get there? Assume normal git use with porcelain commands, not atypical cases with plubming commands. *If you get stuck, outline what you know and then request a review.* 
_practice/2024-10-10.md:7. Learn more about how git is working on changing from SHA-1 to SHA-256 and answer the transition questions below {index}`gittransition.md`
_practice/2024-10-17.md:1. Read more details about [git internals](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects) to review what we did in class in greater detail. Make a file {index}`gitplumbingdetail.md` and create a a table or mermaid diagram that shows the relationship between at least **three** porcelain commands and their corresponding plumbing commands (generally more than one each). 
_practice/2024-10-17.md:2. Create {index}`gitislike.md` and explain main git operations we have seen (add, commit, push) in your own words in a way that will either help you remember or how you would explain it to someone else at a high level. This might be analogies or explanations using other programming concepts or concepts from a hobby.
_practice/2024-10-24.md:1. Answer the following in {index}`hpc.md` of your KWL repo:  (to think about how the design of the system we used in class impacts programming and connect it to other ideas taught in CS)
_practice/2024-10-29.md:1. On Seawulf, modfiy {index}`main.c` from class to accept the integer as a command line argument instead of via input while running the program. [See this tutorial for an example](http://crasseux.com/books/ctutorial/argc-and-argv.html). 
_practice/2024-10-29.md:2. Write a bash script {index}`demo_test.sh` that runs your compiled program for each integer from 10 to 30 (syntax for a range is `{start..end}` so this would be `{10..30}`)
_practice/2024-10-29.md:3. Write an sbatch script, {index}`batchrun.sh` to run your script  on a compute node and save the output to a file. The sbatch script should compile and link the program and then call the script. [see the options](https://web.uri.edu/hpc-research-computing/using-seawulf/#sbatch)
_practice/2024-10-31.md:1. In {index}`bestide.md`, compare two IDEs using your group's table from class, to evaluate each of them.  Your review should have an introduction that justifies the ranking and defines the criteria, a section describing each IDE with respect to all of the criteria and your overall experience with that IDE, and a conclusion that explains which of the 3 is the best based on your evaluation. 
_practice/2024-10-31.md:2. Configure your VS Code preferences to your github account. add {index}`settingssync.md` with a description of what settings you customized and synced and reflect on why this is an important feature and what prerequisites to it might be.
_practice/2024-11-06.md:1. Run and examine how rect.hack and max.hack in the `nand2tetris/projects/05/` folder work. Make notes and answer the questions below in {index}`assemblyexplore.md`.
_practice/2024-11-07.md:1. Write a C program to compare values as doubles and as float (single precision/32bit) to see that this comparison issue is related to the IEEE standard and is not language specific.  Make notes and comparison around its behavior and include the program in a code cell in  {index}`cdouble.md`
_practice/2024-11-07.md:2. In {index}`floatexpt.md` design an experiment using the `fractions.Fraction` class in Python that helps illustrate why `.1*3 == .3` evaluates to `False` but `.1*4 ==.4` evaluates to `True`. Your file must include both code and interpretation of the results.
_practice/2024-11-12.md:1. While we saw many types of gates today, but we actually could get all of the operations needed using only NAND gates. Work out how to use NAND gates to implement a half adder and describe it in {index}`nandhalf.md`
_practice/2024-11-12.md:2. In {index}`addertypes.md` compare ripple adders and lookahead adders.
_practice/2024-11-14.md:2. Read about [systems abstractions](https://cacm.acm.org/opinion/articles/259395-systems-abstractions/fulltext) in CACM and answer reflection questions below in {index}`systemsabstractions.md` based on the systems abstraction reading:
_practice/2024-11-26.md:1. Describe a type of project where it would be worth it for you to learn a language you have never used before in {index}`newlanguage.md` This should be based in what types of features for the language your project would require and/or what would contribute to the long term health of the project. Your justifiction must come from sources used in class and be based in factual evidence about the language. 
_practice/2024-11-26.md:2. Learn about one of the following languages that you have not used before: [R](https://www.r-project.org/), [Julia](https://julialang.org/), [Clojure](https://clojure.org/guides/getting_started), [Zig](https://ziglang.org/), [Go](https://go.dev/), [erlang](https://www.erlang.org/), [Elixir](https://elixir-lang.org/) or another language you are curious about that appeared in the Developer survey. For example you might be interest in the [top paying languages](https://survey.stackoverflow.co/2023/#technology-top-paying-technologies). Use the official documentation.  Answer the following questions in {index}`languagelearning.md`:

real	0m0.012s
user	0m0.004s
sys	0m0.006s
ssh -i ~/.ssh/seawulf
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address]
           [-c cipher_spec] [-D [bind_address:]port] [-E log_file]
           [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file]
           [-J destination] [-L address] [-l login_name] [-m mac_spec]
           [-O ctl_cmd] [-o option] [-P tag] [-p port] [-R address]
           [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
           destination [command [argument ...]]
       ssh [-Q query_option]
ssh -i ~/.ssh/seawulf brownsarahm@seawulf.uri.edu
Last login: Tue Oct 29 12:49:18 2024 from 172.20.105.68
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
interactive
salloc: Granted job allocation 27999
salloc: Waiting for resource configuration
salloc: Nodes n005 are ready for job
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
ls
bash-lesson.tar.gz                           SRR307023_1.fastq  SRR307026_1.fastq  SRR307029_1.fastq
compilec                                     SRR307023_2.fastq  SRR307026_2.fastq  SRR307029_2.fastq
dmel-all-r6.19.gtf                           SRR307024_1.fastq  SRR307027_1.fastq  SRR307030_1.fastq
dmel_unique_protein_isoforms_fb_2016_01.tsv  SRR307024_2.fastq  SRR307027_2.fastq  SRR307030_2.fastq
example                                      SRR307025_1.fastq  SRR307028_1.fastq
gene_association.fb                          SRR307025_2.fastq  SRR307028_2.fastq
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
mkdir time
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
cd time/
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
nano sq_sum_threaded.c
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
gcc -pthread -Wall -g -o sqsum sq_sum_threaded.c -lm
sq_sum_threaded.c: In function ‘square’:
sq_sum_threaded.c:10:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   int xi = (int)x;
            ^
sq_sum_threaded.c: In function ‘main’:
sq_sum_threaded.c:19:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     pthread_create(&ths[i], NULL, square, (void*)(i + 1));
                                           ^
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
./sqsum 
accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
for i in {1..1000}
> do
> ./sqsum 
> done | sort | uniq -c 
   1000 accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
cat sq
sqsum              sq_sum_threaded.c  
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
cat sq_sum_threaded.c 
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>

/* single global variable */
/* shared, accessible, modifiable by all threads */
int accum = 0;

void* square(void* x) {
  int xi = (int)x;
  accum += xi * xi;
  return NULL; /* nothing to return, prevent warning */
}

int main(int argc, char** argv) {
  int i;
  pthread_t ths[20];
  for (i = 0; i < 20; i++) {
    pthread_create(&ths[i], NULL, square, (void*)(i + 1));
  }

  for (i = 0; i < 20; i++) {
    void* res;
    pthread_join(ths[i], &res);
  }

  printf("accum = %d\n", accum);
  return 0;
}
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
cp sq_sum_threaded.c sq_sum_locked.c 
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
nano sq_sum_locked.c 
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
gcc -pthread -Wall -g -o sqsum sq_sum_locked.c -lm
sq_sum_locked.c: In function ‘square’:
sq_sum_locked.c:11:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     int xi = (int)x;
              ^
sq_sum_locked.c: In function ‘main’:
sq_sum_locked.c:25:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     pthread_create(&ths[i], NULL, square, (void*)(i + 1));
                                           ^
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
gcc -pthread -Wall -g -o sqsuml sq_sum_locked.c -lm
sq_sum_locked.c: In function ‘square’:
sq_sum_locked.c:11:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     int xi = (int)x;
              ^
sq_sum_locked.c: In function ‘main’:
sq_sum_locked.c:25:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     pthread_create(&ths[i], NULL, square, (void*)(i + 1));
                                           ^
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
gcc -pthread -Wall -g -o sqsum sq_sum_threaded.c -lm
sq_sum_threaded.c: In function ‘square’:
sq_sum_threaded.c:10:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   int xi = (int)x;
            ^
sq_sum_threaded.c: In function ‘main’:
sq_sum_threaded.c:19:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     pthread_create(&ths[i], NULL, square, (void*)(i + 1));
                                           ^
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
for i in {1..1000}; do ./sqsuml ; done | sort | uniq -c 
   1000 accum = 2870
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
exit
logout
salloc: Relinquishing job allocation 27999
[```

+++{"lesson_part": "main"}

```{code-cell} bash
:tags: ["skip-execution"]
exit
logout
Connection to seawulf.uri.edu closed.
cd ..

mkdir time

cd time

nano sq_sum_threaded.c

gcc -pthread -Wall -g -o sqsum sq_sum_threaded.c -lm
sq_sum_threaded.c:10:12: warning: cast to smaller integer type 'int' from 'void *' [-Wvoid-pointer-to-int-cast]
  int xi = (int)x;
           ^~~~~~
sq_sum_threaded.c:19:43: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
    pthread_create(&ths[i], NULL, square, (void*)(i + 1));
                                          ^~~~~~~~~~~~~~
2 warnings generated.
./sqsum
accum = 2865
./sqsum
accum = 2870
./sqsum
accum = 2754
./sqsum
accum = 2860
./sqsum
accum = 2861
./sqsum
accum = 2286
./sqsum
accum = 2870
./sqsum
accum = 2796
for i in {1..1000}
> > do
-bash: syntax error near unexpected token `>'
> ./sqsum

for i in {1..1000};  do
> ./sqsum
> done | sort |uniq -c
for i in {1..1000};  do ./sqsum; done 

for i in {1..1000};  do ./sqsum; done 

./sqsum

./sqsum

./sqsum

gcc -pthread -Wall -g -o sqsum sq_sum_threaded.c -lm
sq_sum_threaded.c:10:12: warning: cast to smaller integer type 'int' from 'void *' [-Wvoid-pointer-to-int-cast]
  int xi = (int)x;
           ^~~~~~
sq_sum_threaded.c:19:43: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
    pthread_create(&ths[i], NULL, square, (void*)(i + 1));
                                          ^~~~~~~~~~~~~~
2 warnings generated.
./sqsum
accum = 2861
for i in {1..1000}
> > > do
-bash: syntax error near unexpected token `>'
for i in {1..1000};  do ./sqsum; done | sort | uniq -c 
   1 accum = 2325
   1 accum = 2375
   1 accum = 2410
   1 accum = 2465
   1 accum = 2500
   1 accum = 2620
   1 accum = 2645
   1 accum = 2667
   1 accum = 2674
   1 accum = 2720
   1 accum = 2746
   1 accum = 2747
   1 accum = 2749
   1 accum = 2750
   1 accum = 2756
   1 accum = 2760
   1 accum = 2763
   1 accum = 2770
   1 accum = 2784
   1 accum = 2787
   3 accum = 2789
   1 accum = 2792
   1 accum = 2796
   1 accum = 2799
   3 accum = 2804
   1 accum = 2806
   2 accum = 2808
   1 accum = 2815
   1 accum = 2816
   1 accum = 2817
   1 accum = 2819
   4 accum = 2820
   1 accum = 2821
   4 accum = 2824
   3 accum = 2825
   1 accum = 2828
   5 accum = 2829
   2 accum = 2830
   3 accum = 2832
   2 accum = 2833
   5 accum = 2834
   2 accum = 2836
   3 accum = 2840
   5 accum = 2841
   6 accum = 2844
   8 accum = 2845
   6 accum = 2849
   2 accum = 2850
   3 accum = 2853
  22 accum = 2854
   5 accum = 2856
   7 accum = 2857
   4 accum = 2860
  17 accum = 2861
   6 accum = 2865
  24 accum = 2866
  40 accum = 2869
 774 accum = 2870
## Prepare for Next Class 

```{include} ../_prepare/2024-12-05.md

24.1. Badges#

  1. Update your KWL chart.

  2. Simulate a more computationally intensive program using the sleep function in C and compare the time of a threaded vs single threaded (ie serial, no intentional threading) version of the program. Include your two programs and the bash script to show how you tested it with notes on the performance in threaded.md (to better illustrate the impact of the threads)

  1. Update your KWL chart.

  2. Simulate a more computationally intensive program using the sleep function in C and compare the time of a threaded vs single threaded (ie serial, no intentional threading) version of the program. Include your two programs and the bash script to show how you tested it with notes on the performance in threaded.md (to better illustrate the impact of the threads)

  3. Learn about the system libraries in two languages (one can be C/C++ or Python, one must be something else). Find the name(s) of the library or libraries. In systeminteraction.md summarize what types of support are shared or different? What does that tell you about the language?

  4. Research examples of programs using multi-threading besides splitting up a single calculation for time reasons, include three examples in whymultithread.md. You can use any tool to start, but you must include links to high quality sources and have accurate answers.

24.2. Experience Report Evidence#

24.3. Questions After Today’s Class#