Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
# These are supported funding model platforms

github: CodeYourFuture
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: https://codeyourfuture.io/donate
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: CYF
url: [email protected]
Expand All @@ -8,7 +8,7 @@ contact_links:
about: Join CYF here
- name: CYF Slack
url: codeyourfuture.slack.com
about: Come to #cyf-syllabus-tech and chat
about: Come to #cyf-curriculum and chat
- name: CYF Tech Ed
url: https://github.com/orgs/CodeYourFuture/teams/mentors
about: CYF mentors on Github
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/pd-assignment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PD Coursework
description: Assign a piece of PD coursework
title: "[PD] <title>"
labels: [PD, 🏝 Priority Stretch, 🐇 Size Small]
labels: [PD, 🏝 Priority Stretch, 🐇 Size Small, 📅 Sprint 1]
body:
- type: markdown
attributes:
Expand Down
32 changes: 20 additions & 12 deletions .github/ISSUE_TEMPLATE/tech-ed-assignment.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
name: Tech Ed Coursework
description: Assign a piece of technical coursework
title: "[TECH ED] <title>"
labels: [Tech Ed, 🏕 Priority Mandatory, 🐂 Size Medium]
title: "<title>"
labels: [Tech Ed, 🏕 Priority Mandatory, 🐂 Size Medium, 📅 Sprint 1]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to assign this coursework!
Thanks for taking the time to assign this coursework!

To support our trainees with planning and prioritising their own learning journey, we want our coursework assignments to be more informative.
To support our trainees with planning and prioritising their own learning journey, we want our coursework assignments to be more informative.
We don't just want to tell them what to do, we want to tell them stuff like:
- why we are doing it
- what it's "for" (problem-solving, debugging, etc)
- how long they should spend on it, maximum
- how to get help
- how to review it with answers
- how to get help
- how to review it with answers
- how to get it reviewed from mentors and peers
- type: input
attributes:
label: Link to the coursework
validations:
required: true
- type : textarea
attributes:
label: Learning Objectives
description: https://common.codeyourfuture.io/common-theme/shortcodes/objectives/
placeholder: |
<!--{{<objectives}}-->
- [ ] CYF format, task list formatting
<!--{{</objectives}}-->
- type: textarea
attributes:
label: Why are we doing this?
Expand All @@ -37,14 +45,14 @@ body:
attributes:
label: How to get help
description: State simply how trainees can get help with this assignment
placeholder: |
value: |
Share your blockers in your class channel
https://syllabus.codeyourfuture.io/guides/asking-questions
https://curriculum.codeyourfuture.io/guides/getting-help/asking-questions/
- type: textarea
attributes:
label: How to submit
description: State in clear steps how a trainee can submit this assignment.
placeholder: |
value: |
Fork the repo to your own GitHub account
Make regular small commits with clear messages
When you are ready, open a Pull Request to the CYF repo
Expand Down Expand Up @@ -72,9 +80,9 @@ body:
1. Update labels
- priority -- is this coursework key, mandatory, or stretch? Pick one.
- size -- help trainees plan their time with rough estimation. Pick one
- topics -- add all that seem relevant to you.
2. Add to milestone
- week 1,2,3,4
- topics -- add all that seem relevant to you.
2. Add a Sprint label to add to the backlog view
- sprint 1,2,3,4

Once your ticket is complete, you may like to add it to the example project board attached to this repo.
This is so you understand how trainees will use your work. Nobody has built a board copier yet, so trainees will be doing this step themselves.
20 changes: 12 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@

You must title your PR like this:

COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
Region | Cohort | FirstName LastName | Sprint | Assignment Title

For example,

NW4 | Carol Owen | HTML-CSS-Module | Week1
London | 25-ITP-May | Carol Owen | Sprint 1 | Alarm Clock

Complete the task list below this message.
If your PR is rejected, check the task list.
Fill in the template below - remove any sections that don't apply.

Complete the self checklist - replace each empty box in the checklist [ ] with a [x].

Add the label "Needs Review" and you will get review.

Respond to volunteer reviews until the volunteer marks it as "Complete".

-->

## Learners, PR Template

Self checklist

- [ ] I have committed my files one by one, on purpose, and for a reason
- [ ] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
- [ ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
- [ ] My changes meet the requirements of the task
- [ ] I have tested my changes
- [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/contributing/)
- [ ] My changes meet the [requirements](./README.md) of this task
- [ ] My changes follow the [style guide](https://curriculum.codeyourfuture.io/guides/reviewing/style-guide/)

## Changelist

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/validate-pr-metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate PR Metadata
on:
pull_request_target:
types:
- labeled
- unlabeled
- opened
- edited
- reopened

jobs:
validate_pr_metadata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CodeYourFuture/actions/validate-pr-metadata@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 changes: 0 additions & 52 deletions HOW_TO_REVIEW.md

This file was deleted.

9 changes: 9 additions & 0 deletions Sprint-3/dead-code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Refactoring Dead Code

Here are two example of code that has not been built efficiently. Both files have dead code in them, it's your job to go back through this existing code, identify the dead code, and remove it so the code is ready for production.

## Instructions

1. Work through each `exercise` file inside this directory.
2. Delete the dead code.
3. Commit your changes and make a PR when done.
16 changes: 16 additions & 0 deletions Sprint-3/dead-code/exercise-1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Find the instances of unreachable and redundant code - remove them!

let testName = "Jerry";
const greeting = "hello";

function sayHello(greeting, name) {
const greetingStr = greeting + ", " + name + "!";
return `${greeting}, ${name}!`;
console.log(greetingStr);
}

testName = "Aman";

const greetingMessage = sayHello(greeting, testName);

console.log(greetingMessage); // 'hello, Aman!'
27 changes: 27 additions & 0 deletions Sprint-3/dead-code/exercise-2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Remove the unused code that does not contribute to the final console log

const pets = ["parrot", "hamster", "horse", "dog", "hamster", "cat", "hamster"];
const capitalisedPets = pets.map((pet) => pet.toUpperCase());
const petsStartingWithH = pets.filter((pet) => pet[0] === "h");

function logPets(petsArr) {
petsArr.forEach((pet) => console.log(pet));
}

function countAndCapitalisePets(petsArr) {
const petCount = {};

petsArr.forEach((pet) => {
const capitalisedPet = pet.toUpperCase();
if (petCount[capitalisedPet]) {
petCount[capitalisedPet] += 1;
} else {
petCount[capitalisedPet] = 1;
}
});
return petCount;
}

const countedPetsStartingWithH = countAndCapitalisePets(petsStartingWithH);

console.log(countedPetsStartingWithH); // { 'HAMSTER': 3, 'HORSE': 1 } <- Final console log
29 changes: 21 additions & 8 deletions debugging/book-library/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,24 @@ function submit() {
alert("Please fill all fields!");
return false;
} else {
let book = new Book(title.value, title.value, pages.value, check.checked);
library.push(book);
const alreadyExists = myLibrary.some(
(book) => book.title === title.value);
if (alreadyExists) {
alert("This book is already in your library!");
return;
}
}
let book = new Book(title.value, author.value, pages.value, check.checked);
myLibrary.push(book);
render();

//clear the form after submit
title.value = "";
author.value = "";
pages.value = "";
check.checked = false;
}
}


function Book(title, author, pages, check) {
this.title = title;
Expand All @@ -54,7 +67,7 @@ function render() {
let table = document.getElementById("display");
let rowsNumber = table.rows.length;
//delete old table
for (let n = rowsNumber - 1; n > 0; n-- {
for (let n = rowsNumber - 1; n > 0; n--) {
table.deleteRow(n);
}
//insert updated row and cells
Expand All @@ -77,9 +90,9 @@ function render() {
wasReadCell.appendChild(changeBut);
let readStatus = "";
if (myLibrary[i].check == false) {
readStatus = "Yes";
} else {
readStatus = "No";
} else {
readStatus = "Yes";
}
changeBut.innerText = readStatus;

Expand All @@ -89,12 +102,12 @@ function render() {
});

//add delete button to every row and render again
let delButton = document.createElement("button");
let delBut = document.createElement("button");
delBut.id = i + 5;
deleteCell.appendChild(delBut);
delBut.className = "btn btn-warning";
delBut.innerHTML = "Delete";
delBut.addEventListener("clicks", function () {
delBut.addEventListener("click", function () {
alert(`You've deleted title: ${myLibrary[i].title}`);
myLibrary.splice(i, 1);
render();
Expand Down
Loading