More Practice Badges#

Note

these are listed by the date they were posted

More practice exercises are a chance to try new dimensions of the concepts that we cover in class.

Note

Activities will appear here once the semester begins

2023-01-24#

related notes

Activities:

  1. Review the notes after I post them.

  2. Fill in the first two columns of your KWL chart.

  3. review git and github vocabulary (include link in your badge PR)

  4. Read more about version control in general and add a “version control” row to your KWL chart with all 3 columns filled in.

2023-01-26#

related notes

Activities:

  1. review notes after they are posted, both rendered and the raw markdown include links to each in your badge PR

  2. read Chapter 1, “Decoding your confusion while coding” in The Programmer’s Brain add a file called brain.md to your kwl repo that summarizes your thoughts on the chapter and how, if at all, it changes how you think about debugging and learning to program.

  3. map out your computing knowledge and add it to your kwl chart repo in a file called prior-knowledge-map. Use mermaid syntax, to draw your map. GitHub can render it for you including while you work using the preview button.

  4. complete the syllabus quiz. If you get less than 100%, submit an FAQ for the course website in your KWL repo in a file named syllabus-faq.md about something that confused you with your best guess at the correct answer. If you get 100%, make a note in your badge PR.

2023-01-31#

related notes

Activities:

  1. Read the notes. If you have any questions, post an issue on the course website repo.

  2. Using your terminal, download your KWL repo . Include the command used in your badge PR.

  3. Try using setting up git using your favorite IDE or GitHub Desktop. Make a file gitoffline.md and include some notes of how it went. Was it hard? easy? what did you figure out or get stuck on.

  4. Reorganize 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 (will be in notes) in a new file, terminal.md in your kwl repo. 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.

### Terminal File moving reflection
1. Did this get easier toward the end?
1. Use the `history` to see which commands you used and how many times each, make a table below.
1. Did you have to look up how to do anything we had not done in class?
1. When do you think that using the terminal will be better than using your GUI file explorer?
1. What questions/challenges/ relfections do you have after this?
1. What kinds of things might you want to write a bash script for given what you know in bash so far? come up with 1-2 scenarios

2023-02-02#

related notes

Activities:

  1. Review the notes

  2. Find your team’s page on GitHub. It is named like Spring2023-group-# join the discussion that I started on your page.

  3. Download the course website repo via terminal. Append the commands used to a terminalwork.md

  4. 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 your gitcommit.md. Compare what happens based on what you can see on GitHub and what you can see with git status.

  5. Complete the classmate issue in your inclass repo from today. Find a partner from within your assigned team by posting on your team’s page. Link to your commits on your badge issue.

  6. Try using git using your favorite IDE and GitHub Desktop. You can either do the other tasks for this badge, work on a different badge, or add & commit some random files in your inclass repo. Answer the questions below in gitcompare3ways.md.

Questions:

## Reflection

1. What IDE did you use?
1. Was the IDE or GitHub better for you? Why?
1. Compare and contrast using git on the terminal and through your IDE. When would each be better/worse?  
1. Did using a more visual representation help you understand better? 
1. Describe the staging area (what happens after git add) in your own words. Provide an analogy for it using a hobby  or interest of yours.  
2. What programming concepts is the staging area similar to? 
2. what step is the hardest for you to remember? what do you think might help you? 

2023-02-07#

related notes

Activities:

  1. Read today’s notes

  2. Update your KWL chart with the new items and any learned items.

  3. Learn about GitHub forks (you can also use other resources)

  4. add branches-forks.md to your KWL repo and describe how branches work, what a fork is and how they relate to one another. If you use other resources, include them in your file.

2023-02-09#

related notes

Activities:

  1. Create a merge conflict in your github in class repo and resolve it using your favorite IDE, then create one and resolve it on GitHub in browser. Describe how you created it, show the files, and describe how your IDE helps or does not help in ide_merge_conflict.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)

  2. create an issue on your group repo for a resource you want to review. Make sure that your contribution does not overlap with one that another member is going to post.

  3. clone your group repo.

  4. work offline and add your contribution and then open a PR. Your reivew should help a classmate decide if that reference material will help them or not.

  5. review a class mate’s PR.

2023-02-14#

related notes

Activities:

  1. Read today’s notes when they are posted.

  2. Add to your software.md a section about if that project does or does not adhere to the unix philosophy and why.

  3. create methods.md and answer the following:

- which of the three methods for studying a system do you use most often when debugging? 
- which do you use when you are trying to understand something new? 
- do you think the ones you use most often are consistently the effective? why or why not? When do they work or not work? 
- what are you most interested in trying that might be different?

2023-02-16#

related notes

Activities:

  1. Make your kwl repo into a jupyter book. Review the notes carefully for what files are required to make jupyter-book build run. Ignore your build directory.

  2. Add one of the following features to your kwl repo:

  3. Learn about the documentation ecosystem in another language that you know. In docs.md include a summary of your findings and compare and contrast it to jupyter book/sphinx. Include a bibliography of the sources you used. You can use this generator for informal sources and google scholar for formal sources.

2023-02-21#

related notes

Activities:

  1. Review the notes

  2. Update your kwl chart with what you have learned or new questions

  3. Practice with git log and redirects to write the commit history of your main branch for your kwl chart to a file gitlog.txt and commit that file to your kwl repo.

  4. Read about different workflows in git and add responses to the below in a workflows.md in your kwl repo. Two good places to read from are Git Book and the atlassian Docs

  5. Contribute either a cheatsheet item, or additional resource/reference to your group repo.

  6. Complete one peer review of a team mate’s contribution

## Workflow Reflection

1. Why is it important that git can be used with different workflows?
1. Which workflow do you think you would like to work with best and why?
1. Describe a scenario that might make it better for the whole team to use a workflow other than the one you prefer.  

2023-02-23#

related notes

Activities:

  1. Review the notes

  2. Read about git internals to review what we did in class in greater detail. Make gitplumbingdetail.md. Create a visualization that is compatible with version control (eg can be viewed in plain text and compared line by line, such as table or mermaid graph) that shows the relationship between at least three porcelain commands and their corresponding plumbing commands.

  3. Create 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.

  4. Contribute to your group repo and review a classmate’s contribution. Include a link to your contribution and review in your badge PR comment using markdown link syntax. (view the raw version of this issue page for the git internals link above for an example)

2023-03-02#

related notes

Activities:

  1. Read the notes and repeat the activity if needed

  2. use git cat-file over the objects to draw a graph diagram of your current status in your test directory include your drawing in test_repo_map.md using mermaid syntax to diagram it. Name each node in your graph with 5-7 characters of the hash and the type. eg 0c913 commit

  3. Add “version 3” to the test.txt file and hash that object

  4. Add that to the staging area

  5. Add the tree from the first commit to the staging area as a subdirectory with git read-tree --prefix=back <hash>

  6. Write the new tree

  7. Make a commit with message “Commit 3” point to that tree and have your second commit as its parent.

  8. Update your diagram in test_repo_map.md after the following.

2023-03-07#

related notes

Activities:

  1. Learn more about how git is working on changing from SHA-1 to SHA-256 and answer the transition questions below) gittransition.md

  2. find 2 more real world examples of using other number systems (either different bases or different symbols and bases) that are current. Describe them in numbers.md

## transition questions
1. Why make the switch?
3. What impact will the switch have on how git works?
4. Which developers will have the most work to do because of the switch?

2023-03-09#

related notes

Activities:

  1. Update your KWL Chart learned column with what you’ve learned

  2. Write a bash script that can generate a file in your KWL repo with a list of all of your PRs and PR reviews. Save the script as groupcontributions.sh and its output as group_contributions-YYYY-MM-DD.md

2023-03-21#

related notes

Activities:

  1. File permissions are represented numerically often in octal, by transforming the permissions for each level (owner, group, all) as binary into a number. Add octal-practice.md to your KWL repo and answer the following.

    1. Transform the permissions [`r--`, `rw-`, `rwx`] to octal, by treating it as three bits.
    1. Transform the permission we changed our script to `rwxr-xr-x` to octal.
    1. What permissions would we want (both long and in octal) would allow only the owner to run a file?
    1. Which of the following would prevent a file from being edited by other people 777 or 755?
    
  2. create a midterm.md file in your kwl repo with 10 mutliple choice questions that cover topics from at least 5 different class sessions. Each question should have 4 options, 1 correct and 3 that represent a reasonable, but incorrect idea someone may have. All 10 questions should check understanding of key concepts, not only terminology or the name of a command. For each option explain why it is/not correct in a way that would help clarify someone’s confusion if they had picked that answer instead of the correct answer. Use the following syntax:

Question text 

- [ ] a wrong answer
- [ ] another wrong 
- [x] correct answer marked with x
- [ ] another wong

---

- explanation for first wrong
- explanation for second wrong
- key point about correct
- explantion for third wrong 

---

Next question 

2023-03-23#

related notes

Activities:

  1. Explore the IDE you use most and add frequentide.md to your kwl with notes about which features it does/not have based on what you learned in the in-class activity.

  2. Compare at least 3 IDEs for working in a single language. Your comparison should be based on first hand experience using each of the IDEs. Complete the same task in each tool. Create favoriteide.md to define and justify your preferred IDE. Include a ranked list of your criteria(which attributes and features) with justification/explanation of your ranking of these criteria. Then describe how each of the three IDEs meets/does not meet those criteria, and a conclusion of which IDE is the best based on your criteria.

2023-03-28#

related notes

Activities:

  1. Describe a type of project where it would be worth it for you to learn a language you have never used before in 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.

  2. Try out/learn about one of the following languages that you have not used before, do something small that is typical of that language (eg a toy data analysis in R): R, Julia, Clojure, Stan, Go. Try to use official documentation only to figure out a toy task to do. Answer the following questions in languagelearning.md:

    1. What is this language designed for?
    1. What Programming paradigm(s) does it support?
    1. What language would make it easy to learn this language? Why?
    1. What language would make it hard for someone to learn this language? Why?
    1. What is its most unique feature(s)?
    1. Include your small code bit (with comments!)
    1. How was it trying to figure out this langauge
    

2023-04-04#

related notes

Activities:

note: this is integrative3

  1. Update more rows on your KWL Chart based on what we did today.

  2. Contribute to your group repo and review a team mate’s PR

  3. Install gcc locally and practice using it. Repeat steps we did in class on your computer and then change the order of parameters; try skipping steps to produce errors, etc. Export the list of variations you tried and summarize what you learned as a list of tips and reminders on what the parameters do/why/when you would need them (or not) in {index} gcctips.md. (to reinforce what we learned)

  4. Write two short programs that do the same thing in different ways and compile them both to assembly (eg using a for vs while loop to sum numbers up to a number). Check the assembly to see if they produce the same thing or if it’s different. Save your code (in code blocks) and notes about your findings in assemblycompare.md

  5. On Seawulf, modfiy 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.

  6. Write a bash script 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})

  7. Create an sbatch script 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

  8. use scp to download your modified main, script files, and output to your local computer and include them in your kwl repo.

  9. Answer the following in 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)

    1. What kinds of things would your code need to do if you were going to run it on an HPC system?
    2. What Sbatch options seem the most helpful?
    3. How might you go about setting the time limits for a script? How could you estimate how long it will take?
    

2023-03-30#

related notes

Activities:

2023-04-06#

related notes

Activities:

  1. Add bitwise.md to your kwl and write the bitwise operations required for the following transformations:

    4 -> 128
    12493 - > -12494
    127 -> 15
    7 -> 56
    4 -> -5
    
  2. For the following figure out the bitwise operator:

    45 (_) 37 = 37
    45 (_) 37 = 45
    3 (_) 5 = 7
    6 (_) 8 = 0
    10 (_) 5 = 15
    
  3. Create readingbytes.md and answer the following:

    - if a file had the following binary contents, what would it display in the terminal? Describe how you can figure this out manually and check it using C or Python. '01110011011110010111001101110100011001010110110101110011'
    - What is the contents of the `sample.bn` if ther reesult of`cat sample.bn` is: ` ¢¶"*`
    
  4. Read about integer overflow and describe what it is, use an example assuming an 8 bit system, and how integer overflow is handled in Python, C, Javascript, and one other language of your choice in overflow_languages.md

  5. Contribute a new, not previously posted, use of bitwise operators to the discussion

2023-04-11#

related notes

Activities:

Free. You may do the following as a bonus practice badge though.

  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 it in a code cell in cdouble.md

  2. In floatexpt.md design an experiment using the fractions.Fraction class in python that shows helps illustrate how .1*3 == .3 evaluates to False but .1*4 ==.4 evaluates to True.

2023-04-13#

related notes

Activities:

  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 nandhalf.md

check that what they describe does the same as an and and an xor, be sure they show how they match.

  1. In addertypes.md compare ripple adders and lookahead adders.

    1. Give a synopsis of each adder type
    1. Compare them in terms of time (assume that each gate requires one unite of time)
    1. Compare them in terms of space/cost by counting the total number of gates required.
    
  2. Compare the 2 bit multiplier to the full adder in multiplication.md. Use comparison with the full adder to explain how the 2bit multiplier works works, relative to the fact that multiplication can be thought of like repeated addition.

2023-04-20#

related notes

Activities:

this is integrative-2

  1. Create in_five_years.md and answer the following two questions: What do you think you will remember from this class in five years? What parts of this course’s content do you think will change the most in five years?

  2. Reflect on how this course impacts programming/debugging skills in skillup.md. You can write this as how you think your own skill has improved or as if you are convincing another student to take this class. Touch on at least three topics.

  3. Submit a PR with either advice to future students on how to succeed in the course or on why a student should take this course. Each of those is linked to where you should add your advice.

2023-04-25#

related notes

Activities:

  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 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.

2023-04-27#

related notes

Activities:

integrative-3 Write multiple choice questions that assess understanding of concepts from after spring break.

  • If solo, write 10 questions.

  • If in a team (max 4 people), write 5 per person.

  • If you were not in class today, you must work solo and submit in your KWL repo in a file final.md.

Each question should have 4 options, 1 correct and 3 that represent a reasonable, but incorrect idea someone may have. All 10 questions should check understanding of key concepts, not only terminology or the name of a command. For each option explain why it is/not correct in a way that would help clarify someone’s confusion if they had picked that answer instead of the correct answer. Use the following syntax(correct answer can be in any position):

Question text 


- [ ] a wrong answer
- [ ] another wrong 
- [x] correct answer marked with x
- [ ] another wong


---


- explanation for first wrong
- explanation for second wrong
- key point about correct
- explantion for third wrong 


---


Next question