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.

2024-01-23#

related notes

Activities:

  1. Review the notes after I post them.

  2. Fill in the first two columns of your KWL chart (on a branch for this badge).

  3. review git and github vocabulary be sure to edit a file and make an issue or PR (include link in your badge PR comment)

2024-01-25#

related notes

Activities:

the text in () below is why each step is assigned

  1. review today’s notes after they are posted, both rendered and the raw markdown versions. Include links to both views in your badge PR comment. (to review + there are hints for some of the following there)

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

  3. Make a concept map of your current understanding of git and github git-basics-map.md. Use mermaid syntax, to draw your map. GitHub can render it for you including while you work using the preview button. (review what we have learned so far; think about connections + learn a new tool)

  4. Read more about version control in general and add a “version control” row to your KWL chart with all 3 columns filled in. (git is version control, but not the only one)

2024-01-30#

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 comment. Be sure it is not inside another repository.

  3. Try using setting up git using your favorite IDE’s git integration (not its terminal) or GitHub Desktop. Make a file gitgui.md and include some notes of how it went. Give the file a heading like # Setting up <tool name> with the actual tool name you setup in the title (eg Github Desktop or VSCode source control panel or …). Was it hard? easy? what did you figure out or get stuck on? Is the terminology consistent to the terminal or does it use different terms?

  4. Design a small demo to illustrate the difference between git add and git commit and how they impact git push. Write your demo in stage_commit.md. Compare what happens based on what you can see on GitHub and what you can see with git status. Denote what you can tell about each case from the terminal and what you can tell from GitHub.com. For this demo, test things either using the files for this badge in your KWL repo or create a new sandbox repo where your account (not the course) is the owner.

2024-02-01#

related notes

Activities:

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

  2. Learn about GitHub forks and more about git branches(you can also use other resources)

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

2024-02-06#

related notes

Activities:

badge steps marked lab are steps that you will be encouraged to use lab time to work on. For this one in particular, I am going to give you the messy repo in lab.

  1. Update your KWL chart with any learned items.

  2. Get set up so that you can pull from the course website repo and push to your own fork of the class website by cloning the main repo, then forking it and adding your fork as an additional remote. Append the commands used and the contents of your spring2024/.git/configto a terminalpractice.md (hint: history outputs recent commands and redirects can work with any command, not only echo). Based on what you know so far about forks and branches, what advantage does this setup provide? (answer in the terminal_practice.md)

  3. lab Organize the provided messy folder (details will be provided in lab time). Commit and push the changes. Clone that repo locally.

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

# Terminal File moving reflection
1. How was this activity overall Did this get easier toward the end?
2. How was it different working on your own computer compared to the Codespace form? 
3. Did you have to look up how to do anything we had not done in class?
4. When do you think that using the terminal will be better than using your GUI file explorer?
5. What questions/challenges/ reflections do you have after this?
6. Append all of the commands you used in lab below. (not from your local computer's history, from the codespace history)

2024-02-08#

related notes

Activities:

  1. Explore the tools for conventional commits and then pick one to try out. 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 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.

  2. learn about options for how git can display commit history. Try out a few different options. Choose two, write them both to a file, 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

2024-02-15#

related notes

Activities:

  1. Review the notes, jupyterbook docs, and experiment with the jupyter-book CLI to determine what files are required to make jupyter-book build run. Make your kwl repo into a jupyter book. Set it so that the _build directory is not under version control. Complete basic customization setps for the necessary files and ensure that you do not add template files to your KWL repo.

  2. Learn about the documentation ecosystem in another language that you know using at least one official source and additional sources as you find helpful. In docs_ecosystems.md include a summary of your findings and compare and contrast it to jupyter book/sphinx. Include a bibtex based bibliography of the sources you used. You can use this generator for informal sources and google scholar for formal sources.

explore idea extend the conversion of your repo into a jupyter book by making links among pages, adding an intro, and adding a github action so that a pdf is generated and added to an orphan branch named gh-pages. Plus use at least 2 other jupyter book features from the docs, specify or discuss, your extended features with Dr. Brown in your proposal.

2024-02-20#

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. Learn about one of the following languages that you have not used before: R, Julia, Clojure, Zig, Go, erlang, Elixir or another language you are curious about that appeared in the Developer survey. For example you might be interest in the top paying languages. Use the official documentation. Answer the following questions in 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++.

Explore badge option#

Actually try out one of the langauges above in a new repo created from this asssignment.

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

  2. Add top extensions related to the language to the devcontainer.

  3. Add a 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.

  6. Test your understanding of the code by trying to modify it.

  7. Fill in the prompts in the README (follow the comments)

  8. Answer the questions in the README of the template repo.

2024-02-22#

related notes

Activities:

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

  2. create methods.md and answer the following:

- which of the three methods for studying a system do you use most often when debugging? Give an example
- which do you use when you are trying to understand something new? Is it the same as when you are debugging? why or why not
- do you think the ones you use most often are consistently effective? why or why not? When do they work or not work? (for either learning new thing or debugging)
- what are you most interested in trying that might be different for either learning new things or debugging?

2024-02-27#

related notes

Activities:

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

  2. Update your kwl chart with what you have learned or new questions in the want to know column

  3. Find the hash of the blob object that contains the content of your workflows.md file and put that in the comment of your badge PR for this badge.

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

2024-02-29#

related notes

Activities:

  1. Read more details about git internals to review what we did in class in greater detail. Make a file gitplumbingdetail.md and 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 (generally more than one each).

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

2024-03-05#

related notes

Activities:

  1. Practice using git to fix problem using a git command from the patching or debugging section of the docs. Create a log of what you did using the history or git log into a file git_debug_story.md. If you have a project in another class or another badge in this class that causes you to use one of these features in a real scenario, that can count. If not, for example, you could create a “bug” and then use bisect to find it.

  2. Create tagtypes.md with the template below. Include an experiment that shows which if either type of tag creates a new git object. There are two types, try creating one of each a lightwight tag (provide only the tag name- what we did in class) and an annotated (provide a name and a message with -m).

  3. Determine how many of the tags in the course website are annotated vs lightweight using. (You may need to use git pull --tags in your clone of the course website)

# Tags

<!-- short defintion/description in your own words of what a tag is and what it is for -->


## Comparing tag types 

<!-- include your experiment terminal history  and interpretation -->

## Inspecting tags

Course website tags by type: 
- annoted:
- lightweight: 
<!-- include lists of tags for each type -->

2024-03-07#

related notes

Activities:

  1. Analyze the xor hashing algorithm in the notes to determine which properties of a cryptographic hash are/not met. Include your analysis in xorhash.md

  2. 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 numbers.md. Include links to your sources and be sure that the sources are trustworthy.

  3. 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 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 many files could you have? 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.

  4. Read about the Learn more about the SHA-1 collision attach

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

gittransition#

# transition questions

1. Why make the switch? (in detail, not just *an attack*)
2. What impact will the switch have on how git works?
3. Which developers will have the most work to do because of the switch?

2024-03-19#

related notes

Activities:

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

  2. Write a bash script that updates your badges.json file and then generates your progress report using courseutils we will use this in lab on 3/25

  3. Update your action file for getting assignments to use the new courseutils (at compsys-progtools instead of introcompsys)

2024-03-21#

related notes

Activities:

The first three tasks are the practice task, Option A and Option B are pre-approved explore badges. Hover over one of them on your issue to create an independent issue to track it. Title the new issue Explore: IDE-X where X is A or B based on your choice. On the explore badge, when it is ready for submission, request a review from Dr. Brown.

  1. Examine 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. Try a new IDE and make some notes about how it was to learn in newide.md What is easy? hard? What could you apply from the ones you already use? Were there features you had trouble finding?

  3. Configure your VS Code preferences to your github account. add 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.

  4. (explore option A) 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. Describe the procedure you did to compare the IDEs. 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.

  5. (explore option B) Create a small repo owned by compsys named ide-USERNAME where USERNAME is your gh username with some example code, a vscode/codespace devcontainer file that installs CodeTour and your favorite extension(s). Write a CodeTour that walks someone through using your favorite extension to do something with the code. The example code can be any language, can be very simple, can even have a bug in it if that helps your example. You can use an-IDE integrated LLM (eg GitHub Co-pilot, not the chat version) to generate some code for this purpose if you do not have some available to you already, but you cannot share solutions to a course assignment without that instructor’s permission.

2024-03-26#

related notes

Activities:

  1. 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 a script will take?
    
  2. configure ssh keys for your github account

  3. Find 2 other encyrption algorithms that could be used wiht ssh (hint: try man ssh or read it online) and compare them in encyryption_compare. Your comparison should be enough to advise someone which is best and why, but need not get into the details.

  4. Read through this rsa encryption demo site site and use it to show what, for a particular public/private key pair (based on small primes) it would look like to pass a message, “It is spring now!” encrypted. (that is encypt it, and decrypt it with the site, show it’s encrypted version and the key pair and describe what would go where). Put your example in rsademo.md.

2024-03-28#

related notes

Activities:

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

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

  3. Write an sbatch script, 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

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

2024-04-02#

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.md to your KWL repo and answer the following. Try to think through it on your own, but you may look up the answers, as long as you link to (or ideally cite using jupyterbook citations) a high quality source.

    1. Describe how to transform the permissions [`r--`, `rw-`, `rwx`] to octal, by treating each set as three bits.
    1. Transform the permission we changed our script to `rwxr-xr-x` to octal.
    1. Which of the following would prevent a file from being edited by other people 777 or 755 and why?
    
  2. Run and examine how rect.hack and max.hack in the nand2tetris/projects/05/ folder work. Make notes and answer the questions below in assemblyexplore.md.

    1. What does rect.hack do?  
    2. What did you learn trying to figure out how it works?
    2. Write an excerpt of code in a high level compiled language that would compile into this `max.hack``. Try writing multiple different versions.
    

2024-04-04#

related notes

Activities:

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

  2. In floatexpt.md design an experiment using the fractions.Fraction class in Python that shows 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.

2024-04-09#

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

  2. 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.
    
  3. Add bitwise.md to your kwl and write the bitwise operations required for the following transformations (replace the (_) with a bitwise operator (&, |, ^, >>, <<, ~)):

    4 (_) 128
    12493 (_) -12494
    127 (_) 15
    7 (_) 56
    4 (_) -5
    45 (_) 37 = 37
    45 (_) 37 = 45
    3 (_) 5 = 7
    6 (_) 8 = 0
    10 (_) 5 = 15
    

2024-04-11#

related notes

Activities:

  1. Pick a component that is in the more detailed von Neumann (other than the ALU) and contribute an explanation of what it is to your group repo. Coordinate with your team so that each contribution is a different component by creating an issue stating what you will work on before contributing. Link to your PR in the group repo in your badge PR. All contributions should include a description of the component- what it does and how it is built- and it’s predecessors. All must include sources as markdown links.

  2. review a classmate’s PR providing feedback and either approving or requesting changes

  3. Work with your group mates to ensure both your PR and the one you reviewed get approved and merged.

  4. Read about systems abstractions in CACM and answer reflection questions below in systemsabstractions.md based on the systems abstraction reading:

1. What are your overall thoughts on this article?  (include how much is neew vs familar, easy vs hard to understand, etc)
2. How has you undertanding of these changed during this course.
3. Do you think you understand this article more now than you would have at the beginning of the semester
4. Write 3 questions and their answers that could be a quiz to see if someone understood or had misconceptions about the abstractions in this article.

2024-04-16#

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.

Questions#

What kind of tools did you use for a software defined radio?#

I worked with matlab batch processing implemented the processing of the data from scratch with C.

Will RAID ever be 100% fail proof?#

RAID configurations can be data failure proof as long as not too many drives die at the same time and that they are all replaced as soon as they fail.

Is the clock speed of a computer how fast the clock goes on and off? and is there ever an error that occours if the clock speed goes too slow?#

It is the frequency of the clock signal we will learn more about next week.

Do you think this area in computer science/software engineering is harder than other fields like data science or web development?#

I think they’re just different. Working with hardware is certainly a different pace.

Can these different types of ram not be included or are they in every computer?#

most modern computers have cache, RAM, ROM, and solid state storage. these are implemented with different types of physical memory.

If a computer has extensive resources would it be more effcient to never use DRAM and only use SRAM?#

This might be possible, but I am not sure.

What is EEPROM?#

Electrically Erasable Programmable Read Only memory

How does knowing the hardware/internal components of the computer help improve one’s understanding of what they’re trying to achieve as a developer for something like a program?#

It helps you think through how abstractions work and understanding what actually happens will help you deign more efficient code.

How much would it cost to fix a cable that a whale found itself tangled in?#

the cable is mostly burried. It gets damaged mostly by anchors of ships.

Is ROM still used in modern computers?#

Only for the very beginning of the boot sequence, but yes.

When does a kind of storage become absolete?#

That is a good question, but I do not have a precise answer.

When they go down to set the transatlantic cable how long does it take to get them back up?#

I do not know this and a quick search did not yeild results. Finding this is worth a commnity badge (could be expanded to an explore).

2024-04-18#

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.

2024-04-23#

related notes

Activities:

  1. Write solutions for each of the questions you did not get correct

2024-04-25#

related notes

Activities:

Your task is to help prevent students from carrying misconceptions on to future classes.

You may choose either one of these two formats. Your task is to clear misconceptions.

For every 4 conceptual level misconceptions you address, you can earn 1 review badge, up to a maximum of 3 badges across the two types.

You may discuss your work with class mates but must submit work individually and should explain the misconception in your own words

Each question will have 3 parts:

  • the question with answer options; 1 correct and 3 wrong

  • hint/replies that could be sent to a student that picked each option

  • an overall explanation of the misconception(s) with links to high quality external references and/or class notes.

You will work in a dedicated repo for this so that you work with a group. The repo’s README has more detailed instructions including an option for explore badges instead.