├── dac2021.jpg
├── enroll_1.png
├── enroll_2.png
├── enroll_3.png
├── youtube.jpg
├── CONTRIBUTING.md
└── README.md
/dac2021.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devadvent/readme/HEAD/dac2021.jpg
--------------------------------------------------------------------------------
/enroll_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devadvent/readme/HEAD/enroll_1.png
--------------------------------------------------------------------------------
/enroll_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devadvent/readme/HEAD/enroll_2.png
--------------------------------------------------------------------------------
/enroll_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devadvent/readme/HEAD/enroll_3.png
--------------------------------------------------------------------------------
/youtube.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devadvent/readme/HEAD/youtube.jpg
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # 📖 Guide to participate in the contest
4 |
5 | ## Short guide |---|
6 |
7 | 1. Every day I upload a new puzzle as public repository to the [devadvent account](https://github.com/devadvent)
8 | 2. That puzzle has a description of what it is about and a link to _GitHub classrooms_
9 | 3. Everyone with a GitHub account can click on the link where a repository based on the puzzle is created
10 | 4. You can then clone that repository and make the changes necessary to solve the puzzle
11 | 5. Some puzzle have tests. These are used to evaluate if the puzzle is solved to satisfaction.
12 | 6. Once you solved and successfully tested the puzzle, push the content to the `main` branch.
13 | 7. Done. I will see this and take your solution into account for winning the daily prize.
14 | 8. I will contact you through Twitter to announce your prize in case you are the selected winner
15 |
16 | ## Long guide |-------------------|
17 |
18 | ### Entering the competition
19 |
20 | In order to enter the competition, select the current puzzle from the [list of puzzles](https://github.com/devadvent) for the current day.
21 |
22 | - `2021-puzzle-1` is December 1st
23 | - `2021-puzzle-2` is December 2nd
24 | - `2021-puzzle-3` is December 3rd
25 | - etc.
26 |
27 | In the `README.md` of each repository is a `Link` section at the very bottom of the description with a URL to click.
28 |
29 | Click that link, and then `Accept this assignment`:
30 | 
31 |
32 | This will create a clone of the template repository for you.
33 | 
34 |
35 | This might take a few seconds. You have to reload the site manually. Once you've done that, something like this appears:
36 | 
37 |
38 | **THAT** is the link of YOUR repository to work on.
39 |
40 | ### Cloning the repository
41 |
42 | In order to clone the repository to your laptop, enter the following command (using **YOUR** link):
43 |
44 | ```bash
45 | git clone https://github.com/devadvent/puzzle-1-yourusername
46 | ```
47 |
48 | ### Install the dependencies
49 |
50 | Most puzzles will need you to install project dependencies to run it. The command will be the same for **all puzzles**. It depends if you use Yarn or NPM:
51 |
52 | ```bash
53 | yarn install
54 | ```
55 |
56 | or
57 |
58 | ```bash
59 | npm install
60 | ```
61 |
62 | ### ⚙️ Run the code
63 |
64 | Run the code with
65 |
66 | **Yarn:**
67 |
68 | ```bash
69 | yarn dev
70 | ```
71 |
72 | **NPM:**
73 |
74 | ```bash
75 | npm run dev
76 | ```
77 |
78 | ### Creating your solution for the puzzle
79 |
80 | I try to make each puzzle relatively easy, so that also beginners can participate.
81 |
82 | Every puzzle comes with a story behind it and some technical explanation for what is expected from a working solution.
83 |
84 | ### Test your solution
85 |
86 | As most puzzles will have tests, it makes sense to run the tests before submitting your results. This runs a series of tests on your code to determine whether it does what it is supposed to.
87 |
88 | Running tests is the same for **all puzzles**. It depends if you use Yarn or NPM:
89 |
90 | ```bash
91 | yarn test
92 | ```
93 |
94 | **NPM:**
95 |
96 | ```bash
97 | npm test
98 | ```
99 |
100 | ### Add your Twitter handle
101 |
102 | In order to be able to win, follow me [@themarcba](https://twitter.com/themarcba) and add your Twitter handle to the `twitter.js` file of your project.
103 |
104 | ### Submit your solution
105 |
106 | To submit your solution, you just need to push the changes to your `main` branch.
107 |
108 | ```bash
109 | git add .
110 | git commit -am 'Your commit message'
111 | git push origin main
112 | ```
113 |
114 | Done ✨
115 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # 🎅 Dev Advent Calendar
4 |
5 | [](https://www.youtube.com/watch?v=AmtkdsTcHTo)
6 |
7 | ## The idea 💡
8 |
9 | The **Dev Advent Calendar** is an initiative by [@themarcba](https://twitter.com/themarcba) in order to give back to the community and learn something on the way.
10 |
11 | For every day from the **1st to the 24th of December**, I will push an Xmas-themed coding puzzle as a repository to this organization. A demo puzzle is at [devadvent/2021-puzzle-0](https://github.com/devadvent/2021-puzzle-0).
12 |
13 | Your code will remain private and can only be seen by me. However, I might show the code of the accepted solution in a repository or on my Twitter feed ([@themarcba](https://twitter.com/themarcba)).
14 |
15 | For every puzzle, the winner will be picked **at random** from **all valid solutions**. Most puzzles will provide tests, so you can verify your solution with `yarn test`/`npm test`. (More to this, check out the [guide on how to participate](CONTRIBUTING.md))
16 |
17 | **Only solutions that pass all tests are considered for winning the daily prize.**
18 |
19 | ## The prizes 🏆
20 |
21 | Some prizes are donations from generous people and companies, some are provided by me personally.
22 | They range from ebooks, courses, and swag - to conference tickets.
23 |
24 | The prize that is to be won every day will be announced together with the winner within the next days of the puzzle. (I'll try to do it right the next day, but no guarantees)
25 |
26 | If one day there are **no valid submissions**, the prize for that day goes into the jackpot and will be given to the next winner.
27 |
28 | ## Code Quality 📐
29 |
30 | Always try to do your best work, and to make your code as readable as possible.
31 |
32 | **HOWEVER** ❗ I will **not** judge your code on how you solved a certain problem or which method you used. The point of all of this is to have fun and write some code.
33 |
34 | ## Rules ☝️
35 |
36 | - ✅ You **can** and are even **encouraged** to participate on multiple (heck, even ALL) of the puzzles.
37 | - ⚠️ If the puzzle has tests, they **all need to pass** in order to qualify for the prize.
38 | - 🚫 **Don't** upload multiple submissions for the same puzzle.
39 | - 🚫 **Don't** modify or remove any tests.
40 |
41 | ## Participate 🚀
42 |
43 | Participating requires you to have a GitHub account.
44 | You can find detailed instructions on how to participate in [this guide 📖](CONTRIBUTING.md)
45 |
46 | # 🧩 Puzzles
47 |
48 | ## Day 1
49 |
50 |
51 |
52 | Weeks before Christmas, Santa's reindeers start practicing their flying in order to be fit for the big night. Unfortunately, one of them (Rudolf) crashed and landed in the forest 🌲
53 |
54 | Now, Santa 🎅 needs YOUR help to find him.
55 |
56 | [https://github.com/devadvent/puzzle-1](https://github.com/devadvent/puzzle-1)
57 |
58 | 📊 99 submissions / 71 valid solutions
59 |
60 | 🏆 Winner: [@nuenanas](https://twitter.com/nuenanas)
61 |
62 | ## Day 2
63 |
64 |
65 | The Elf Coffee Shop ElfCup with straw needs your help to create the menu for the newly reopened place where the elves get their daily cup of _whatever drink tickles their fancy_.
66 |
67 | [https://github.com/devadvent/puzzle-2](https://github.com/devadvent/puzzle-2)
68 |
69 | 📊 76 submissions / 53 valid solutions
70 |
71 | 🏆 Winner: [@hrexandro](https://twitter.com/hrexandro)
72 |
73 | ## Day 3
74 |
75 |
76 | Due to the high demand ata the Elf Coffeee Shop ElfCup, the savy entrepreneur hired someone to make an app where elves can order their drink, and it would be delivered home, or to their workplace.
77 |
78 | [https://github.com/devadvent/puzzle-3](https://github.com/devadvent/puzzle-3)
79 |
80 | 📊 53 submissions / 40 valid solutions
81 |
82 | 🏆 Winner: [@\_JohnBooks](https://twitter.com/_JohnBooks)
83 |
84 | ## Day 4
85 |
86 |
87 | 📊 42 submissions / 33 valid solutions
88 |
89 | 🏆 Winner: [@chamoyadafr](https://twitter.com/chamoyadafr)
90 |
91 | You might not know this, but the Elf Post Service 📯 (ECS) is the largest parcel organization in the world. (For obvious reasons though, now that you think about, right?). They are ecologically responsible, so they continuously try to make everything more efficient, they need your help fitting each present in the smallest possible box.
92 |
93 | [https://github.com/devadvent/puzzle-4](https://github.com/devadvent/puzzle-4)
94 |
95 | ## Day 5
96 |
97 |
98 | 📊 52 submissions / 45 valid solutions
99 |
100 | 🏆 Winner: [@\_\_\_\_baran](https://twitter.com/____baran)
101 |
102 | The elves are about to prepare bags of candy that they want to add to each present this year, it's your job to create a program that creates bags of candy with no repeating candy in each bag.
103 |
104 | [https://github.com/devadvent/puzzle-5](https://github.com/devadvent/puzzle-5)
105 |
106 | ## Day 6
107 |
108 |
109 | You might have heard from the song Santa Claus is Coming to Town the lines:
110 |
111 | He's making a list. He's checking it twice. He's gonna find out who's naughty or nice
112 |
113 | Well, that is exactly what the task is: Write a program that checks a list of kids and analyze whether they were naughty or nice, so that Santa knows if they deserve candy and toys, or coal...
114 |
115 | [https://github.com/devadvent/puzzle-6](https://github.com/devadvent/puzzle-6)
116 |
--------------------------------------------------------------------------------