Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 📝 add exercises #24

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

docs: 📝 add exercises #24

wants to merge 3 commits into from

Conversation

signekb
Copy link
Member

@signekb signekb commented Jan 19, 2025

Description

This PR adds exercises. Somehow, it ended up with four exercises, which might be too much. What do you think?

Closes #10

This PR needs an in-depth review.

Checklist

  • Formatted Markdown
  • Ran just run-all

Comment on lines +56 to +73
::: callout-tip
## See the history of changes

If you want to see the history of changes to the file, go to the file
and click the "History" button on the right side of the screen. This
will show you all the changes that have been made to the file along with
the commit messages.

Since you have made two commits to the file, you should see two entries
in the history. You can click on each entry to see the changes that were
made in that commit.

This also shows the importance of meaningful commit messages. Imagine if
all the commit messages were "Update file.md". Then, it would be hard to
know what changes were made in each commit. By contrast, if the commits
have meaningful messages, it would be much more easy to get an overview
of the changes that have been made.
:::
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was a nice addition - so they try actually looking at the history they made - but I think this exercise became quite/too long?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a tip, make it an exercise! 😁

And more exercises are fine, it's easy to remove than it is to grow, and we can always put them to the side/use as extras.


{{< text_snippet sticky_up >}}

## Exercise: Close your issue
Copy link
Member Author

@signekb signekb Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this a separate exercise so the fastest wouldn't start closing their issues before the rest had time to comment/interact.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could join the closing issue and delete file into one exercise called "cleaning up" or something.

Comment on lines +25 to +40
First, we want to add a file to the repository.

1. Go to the repository on GitHub.
2. In the code tab, click "Add file" and then "Create new file".
3. In the "Name your file..." field, type a name for your file. For
simplicity, let's call it your name and make it a Markdown file. For
example, "your-name.md".
4. Click the green "Commit changes" button and fill in the commit
message. For example, "Add file with my name". You don't need to
fill in the extended description. Keep the "Commit directly to the
`main` branch" option selected.
5. When you have filled in the commit message, click the green "Commit
changes" button.
6. Go back to the repository and check that your file has been added.

You have now made your first commit to the repository! :tada:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could be a part of the code along instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, these steps could be, but the basic steps can stay the same. See comment above about "problem to solve"

Copy link
Member

@lwjohnst86 lwjohnst86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice start! Some comments ☺️

Comment on lines +23 to +25
## Exercise: Add a new file and modify the content

First, we want to add a file to the repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the format of the vscode snippet exercise to match the other websites ☺️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It helps that exercises have some problem to solve rather than "do this", "but why", "because". Maybe it could be like the exercises you thought of for git4cats, where we get them to find a recipe they like and put it on the repo as a new file.

Comment on lines +56 to +73
::: callout-tip
## See the history of changes

If you want to see the history of changes to the file, go to the file
and click the "History" button on the right side of the screen. This
will show you all the changes that have been made to the file along with
the commit messages.

Since you have made two commits to the file, you should see two entries
in the history. You can click on each entry to see the changes that were
made in that commit.

This also shows the importance of meaningful commit messages. Imagine if
all the commit messages were "Update file.md". Then, it would be hard to
know what changes were made in each commit. By contrast, if the commits
have meaningful messages, it would be much more easy to get an overview
of the changes that have been made.
:::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a tip, make it an exercise! 😁

And more exercises are fine, it's easy to remove than it is to grow, and we can always put them to the side/use as extras.


{{< text_snippet sticky_up >}}

## Exercise: Close your issue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could join the closing issue and delete file into one exercise called "cleaning up" or something.

Comment on lines +25 to +40
First, we want to add a file to the repository.

1. Go to the repository on GitHub.
2. In the code tab, click "Add file" and then "Create new file".
3. In the "Name your file..." field, type a name for your file. For
simplicity, let's call it your name and make it a Markdown file. For
example, "your-name.md".
4. Click the green "Commit changes" button and fill in the commit
message. For example, "Add file with my name". You don't need to
fill in the extended description. Keep the "Commit directly to the
`main` branch" option selected.
5. When you have filled in the commit message, click the green "Commit
changes" button.
6. Go back to the repository and check that your file has been added.

You have now made your first commit to the repository! :tada:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, these steps could be, but the basic steps can stay the same. See comment above about "problem to solve"

Comment on lines +42 to +54
Now that we have created a file, let's modify it:

1. Go to the file on GitHub
2. Click the pencil icon on the right side of the screen ("Edit this
file") to edit the file
3. Make a change to the file by adding a new line of text. For example,
"This is a new line of text."
4. Now, commit the changes as you did before by clicking the green
"Commit changes" button and filling in the commit message. When you
have filled in the commit message, click the green "Commit changes"
button.
5. Go back to the file on GitHub and check that your changes have been
made.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my experience and the feedback I've gotten, multiple part exercises don't work too well. Keep them smaller and shorter for intro sessions. Or rather, keep the exercise more targeted in scope. This exercise is doing several things.

Comment on lines +107 to +113
Lastly, let's delete the file:

1. Go to the file.
2. On the same line as the file name, click the button with the three
dots, saying "More file actions". Click it, scroll down and click
"Delete file".
3. Commit the changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment below, this could be moved down.

Comment on lines +79 to +80
Now it's time to make edits to the file itself. We want to rename the
file and move it to a new location in the repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above about "problem to solve"

Comment on lines +125 to +149
## Exercise: Create an issue and interact with another's issue

Let's create your first issue!

1. In the repository on GitHub, click the "Issues" tab.
2. Click the green "New issue" button.
3. Fill in the title and the description. This could be anything you
want to work on or discuss. For example, it could be about something
you think should be added (a new file or a new section to a file) or
something you think should be changed. It could also be a discussion
issue where you ask for feedback on something.
4. Click the green "Create" button, to create the issue.

Now, you have created your first issue! :partying_face:

Now, let's interact with another's issue:

1. Go back to the "Issues" tab in the repository.
2. Click on an issue that someone else has created.
3. Read the issue and the comments that have been made.
4. Scroll down to the bottom of the page and write a comment in the
comment field. You can ask a question, give feedback, or suggest a
solution to the issue.
5. When you have written your comment, click the green "Comment" button
to post the comment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a code-along, with the "cleaning up" exercise being the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

Exercises
2 participants