2023 icon indicating copy to clipboard operation
2023 copied to clipboard

Advent of Craft 2023

Advent Of Craft

Our Discord Linkedin

License Contributors CodeScene general CodeScene Code Health

Christmas is here! ๐ŸŽ…

Your journey as a developer has probably taken many turns.

You probably had to troubleshoot and refactor a piece of code that you still have nightmares about.

You might have been stuck in a team when you never have time to improve your code base because "We have to deliver more features".

Heck, you probably still are.

We feel you, and in the spirit of Christmas, you deserve a gift.

We have the privilege this year to bring to you the Advent of Craft. This is a journey into software craftsmanship.

Each day, you will be taken in a small aspect of software craftsmanship. Each day, you will have an exercise with a topic to look at in a small bite approach and hopefully you will learn something.

From refactoring to testing to reviewing, all aspects are going to be explored.

The objective of this journey is to learn new crafts and share with your peers, not to get lost in impossible algorithm exercises or to finish as fast as you can using chatGPT.

A repository is available and each day a topic will appear with a proposed solution for the day before.

We hope you enjoy the ride. Happy Crafting!

Advent Of Craft 2023

Join us on Discord

To facilitate the communication around challenges you can join us on Discord by simply clicking here.

Discord Advent Of Craft

Instructions

Here are the instructions for the journey

Challenges - 2023

Here are the different challenges :

  • Day 1: Make your production code easier to understand. Refactoring
  • Day 2: One level of indentation. Refactoring
  • Day 3: One dot per line. Refactoring
  • Day 4: Identify the behavior under test and rewrite the tests. Clean Testing
  • Day 5: No "for" loop authorized. Functional Programming
  • Day 6: Parameterize your tests. Clean Testing
  • Day 7: Simplify the run method by extracting the right behavior. Refactoring
  • Day 8: Using TDD rules, write a password validation program. T.D.D
  • Day 9: Fix the code. Design
  • Day 10: Dot not use "if" statement. Functional Programming
  • Day 11: Gather a dependency freshness metric. Design
  • Day 12: Make your code open for extension. Design
  • Day 13: Find a way to eliminate the irrelevant, and amplify the essentials of those tests. Clean Testing
  • Day 14: Do not use exceptions anymore. Functional Programming
  • Day 15: Put a code under tests. Clean Testing
  • Day 16: Make this code immutable. Functional Programming
  • Day 17: Design one test that has the impact of thousands. Clean Testing
  • Day 18: Automatically detect Linguistic Anti-Patterns (LAP). Design
  • Day 19: Loosing up dead weight. Functional Programming
  • Day 20: No more exceptions in our domain. Design
  • Day 21: Refactor the tests and production code to Output-Based tests. Clean Testing
  • Day 22: Design a diamond program using T.D.D and Property-Based Testing. T.D.D
  • Day 23: Refactor the code after putting it under test. Refactoring T.D.D Clean Testing Functional Programming
  • Day 24: Write the most complicated code you can. Refactoring
  • Day 25: Share with the world what you have learned.

Solutions

A solution proposal will be published here every day during the Advent Of Craft containing the code and a step by step guide.

  • Day 1: Make your production code easier to understand.
  • Day 2: One level of indentation.
  • Day 3: One dot per line.
  • Day 4: Identify the behavior under test and rewrite the tests.
  • Day 5: No "for" loop authorized.
  • Day 6: Parameterize your tests.
  • Day 7: Simplify the run method by extracting the right behavior.
  • Day 8: Using TDD rules, write a password validation program.
  • Day 9: Fix the code.
  • Day 10: Dot not use "if" statement.
  • Day 11: Gather a dependency freshness metric.
  • Day 12: Make your code open for extension.
  • Day 13: Find a way to eliminate the irrelevant, and amplify the essentials of those tests.
  • Day 14: Do not use exceptions anymore.
  • Day 15: Put a code under tests.
  • Day 16: Make this code immutable.
  • Day 17: Design one test that has the impact of thousands.
  • Day 18: Automatically detect Linguistic Anti-Patterns (LAP).
  • Day 19: Loosing up dead weight.
  • Day 20: No more exceptions in our domain.
  • Day 21: Refactor the tests and production code to Output-Based tests.
  • Day 22: Design a diamond program using T.D.D and Property-Based Testing.
  • Day 23: Refactor the code after putting it under test.
  • Day 24: Write the most complicated code you can.

Learning paths ๐Ÿš€

We have designed several learning paths based on the challenges that you can follow if you want to deep dive into a given concept:

  • Refactoring ๐Ÿš€
  • Clean Testing ๐Ÿงผ
  • Test-Driven Development ๐Ÿ”ด๐ŸŸข๐Ÿ”ต
  • Design ๐Ÿ›
  • Functional Programming ๐ŸŒ‹

Available languages

Here are the libraries we use in the different days per supported language:

Topic java C# kotlin typescript
Test framework junit xUnit Kotest jest
Fluent assertions assertJ FluentAssertions Native kotest assertions Native jest assertions
Mocking mockito NSubstitute mockk Native jest mocking features
Approval testing approvalTests Verify.xUnit approvalTests approvals
Property-Based testing vavr-test FSCheck kotest-property fast-check
Fake data generator instancio Bogus Not used fakerjs
Architecture tests archunit TngTech.ArchUnitNET.xUnit archunit N/A
Functional library vavr LanguageExt.Core arrow-kt fp-ts
Functional assertions assertj-vavr FluentAssertions.LanguageExt kotest-extensions-arrow Native jest assertions

Contributors

Yoan
Yoan Thirion
Yann
Yann Courtel