├── LICENSE ├── README.md ├── README_EN.md ├── constraint_01.md ├── contrainte_01.md ├── contrainte_02.md └── contrainte_03.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Jonathan Laurent 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Minesweeper challenge 2 | 3 | ## Objectif - Apprendre le Test Driven Development 4 | 5 | J'ai perfectionné ma pratique du TDD en faisant une chose, répéter le même exercice une bonne cinquantaine de fois. C'est ce que je te propose de faire en suivant le challenge minesweeper. 6 | 7 | L'objectif est de se perfectionner sur un kata portant le même nom et d'affiner la pratique semaine après semaine. La répétition est la base du système. 8 | ## Informations pratiques 9 | 10 | Le challenge débutera le Mardi 1er Avril et se terminera le Vendredi 30 Mai (les dates peuvent évoluer). 11 | ## Le kata minesweeper 12 | 13 | L'objectif est de créer une fonction `minesweeper` permettant de résoudre le jeu du démineur. Un exemple sera plus simple. 14 | 15 | J'ai un tableau de mine représenté par la chaîne de caractère suivante : 16 | 17 | ``` 18 | .*.**. 19 | ....*. 20 | ..*... 21 | ``` 22 | 23 | La fonction minesweeper doit renvoyer la chaîne de caractère suivante : 24 | 25 | ``` 26 | 1*2**2 27 | 1234*2 28 | 01*211 29 | ``` 30 | 31 | L'objectif est de retourner une chaîne de caractère en indiquant pour chaque case combien il y a de mines autour. 32 | 33 | ### Les contraintes 34 | 35 | Chaque semaine, je vais proposer des contraintes dans la réalisation de ce challenge. 36 | 37 | ## Comment participer 38 | 39 | ### Bronze - Dans ton coin 40 | 41 | Tu peux simplement faire le challenge dans ton coin, en suivant les consignes écrites ici. C'est un excellent moyen d'apprendre TDD. 42 | Tel un fantôme, tu auras accès au discord et aux dicussions mais tu ne pourras pas communiquer. 43 | 44 | Tarif : 0 € HT 45 | 46 | ### Argent - Interaction avec les pairs 47 | 48 | Tu auras la possibilité d'échanger avec tes pairs et de communiquer sur tes travaux. 49 | Je répondrai aux questions techniques qui bloquent le lancement. 50 | 51 | Tarif au choix : 52 | - 1 € à 59€ (TTC) 53 | - 1 post linkedin dans lequel tu me taggues pour dire que tu participes au challenge avec un lien vers ce fichier 54 | 55 | ### Or - Interaction asynchrone avec moi 56 | 57 | Tu auras la possibilité de m'interpeller (@Jonathan) sur discord pour me poser des questions. 58 | 59 | Tarif : de 60 € à 119€ (TTC) 60 | 61 | ### Diamant - Feedback asynchrone sur ton travail 62 | 63 | Je surveillerai spécifiquement la réalisation de ton travail afin de te donner des feedbacks qui t'aideront à avancer encore plus vite 64 | 65 | Tarif : 120 € à 599 € (TTC) 66 | 67 | ### Platinium - Interaction synchrone 68 | 69 | On planifiera une fois par semaine une session de 45 minutes ensemble pour t'aider à réaliser le challenge. Tu pourras me poser tes questions, coder avec moi ou me raconter ta vie. Ces 45 minutes te sont consacrées 70 | 71 | Tarif : à partir de 600 € (TTC) 72 | 73 | 74 | ## Les outils 75 | 76 | - discord, pour participer au challenge 77 | - un compte github ou gitlab, pour partager ton travail 78 | - https://githistory.xyz/ pour visualiser l'historique de ton travail 79 | - https://git-gamble.is-cool.dev/theory.html pour te forcer à faire des petits pas 80 | 81 | 82 | ## Le déroulement 83 | 84 | 1. Inscris toi sur [le serveur discord](https://discord.gg/bSgTv36CAs). 85 | 2. Si tu souhaites participer au challenge, achète le pass à prix libre ici et choisis le montant que tu souhaites mettre : 86 | - [Pass à prix libre](https://buy.stripe.com/8wM29z8sy7VRc2A5ko) 87 | 3. Installe l'outil git gamble 88 | 4. Choisis ton langage 89 | 5. Tu peux commencer le challenge 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | # Minesweeper Challenge 2 | 3 | ## Goal - Learn Test Driven Development 4 | 5 | I improved my TDD practice by doing one thing: repeating the same exercise about fifty times. This is what I invite you to do by following the Minesweeper challenge. 6 | 7 | The goal is to master a kata with the same name and refine the practice week after week. Repetition is the foundation of the system. 8 | 9 | ## Practical Information 10 | 11 | The challenge will start on Tuesday, April 1st, and end on Friday, May 30th (dates may change). 12 | 13 | ## The Minesweeper Kata 14 | 15 | The goal is to create a `minesweeper` function that solves the Minesweeper game. An example will make it clearer. 16 | 17 | Here is a mine grid represented by the following string: 18 | ``` 19 | .*.**. 20 | ....*. 21 | ..*... 22 | ``` 23 | 24 | The `minesweeper` function should return the following string: 25 | 26 | ``` 27 | 1*2**2 28 | 1234*2 29 | 01*211 30 | ``` 31 | 32 | The goal is to return a string indicating how many mines surround each cell. 33 | 34 | ### Constraints 35 | 36 | Each week, I will introduce constraints to guide the challenge execution. 37 | 38 | ## How to Participate 39 | 40 | ### Bronze - On Your Own 41 | 42 | You can simply do the challenge on your own by following the instructions here. It’s a great way to learn TDD. 43 | Like a ghost, you’ll have access to Discord and discussions, but you won’t be able to communicate. 44 | 45 | Price: €0 (excl. VAT) 46 | 47 | ### Silver - Peer Interaction 48 | 49 | You will have the opportunity to interact with peers and discuss your work. 50 | I will answer technical questions that block your progress. 51 | 52 | Price: €50 (excl. VAT) / €60 (incl. VAT) 53 | 54 | ### Gold - Asynchronous Interaction with Me 55 | 56 | You will be able to mention me (@Jonathan) on Discord to ask me questions. 57 | 58 | Price: €100 (excl. VAT) / €120 (incl. VAT) 59 | 60 | ### Diamond - Asynchronous Feedback on Your Work 61 | 62 | I will specifically monitor your work and provide feedback to help you progress faster. 63 | 64 | Price: €200 (excl. VAT) / €240 (incl. VAT) 65 | 66 | ### Platinum - Synchronous Interaction 67 | 68 | We will schedule a 45-minute session per week to help you complete the challenge. You can ask me questions, code with me, or just chat. These 45 minutes are entirely for you. 69 | 70 | Price: €500 (excl. VAT) / €600 (incl. VAT) 71 | 72 | ## Tools 73 | 74 | - Discord, to participate in the challenge 75 | - A GitHub or GitLab account, to share your work 76 | - [githistory.xyz](https://githistory.xyz/) to visualize your work history 77 | - [Git Gamble](https://git-gamble.is-cool.dev/theory.html) to enforce small incremental steps 78 | 79 | ## Process 80 | 81 | 1. Sign up on [the Discord server](https://discord.gg/bSgTv36CAs). 82 | 2. If you want additional options, purchase one of the following passes: 83 | 1. [Platinum Pass](https://buy.stripe.com/9AQeWlcIOgsn6IgcMP) 84 | 2. [Diamond Pass](https://buy.stripe.com/7sI9C11060tpaYw002) 85 | 3. [Gold Pass](https://buy.stripe.com/14k15veQW5NJc2AbIJ) 86 | 4. [Silver Pass](https://buy.stripe.com/4gw6pP4cib836IgaEE) 87 | 3. Install the Git Gamble tool. 88 | 4. Choose your programming language. 89 | 5. You can start the challenge. 90 | -------------------------------------------------------------------------------- /constraint_01.md: -------------------------------------------------------------------------------- 1 | # Constraint 01: Knowing What to Develop 2 | 3 | In your code, you must demonstrate that you understand what is expected of you. Even before writing the first line of code, you need to prove that you know what you are doing. 4 | 5 | To achieve this, you will use examples. 6 | 7 | ## Conditions 8 | - You work in a single file, the one used for your test. It must be named with the current date. 9 | - The examples must appear at the top of your file 10 | - Once you think you have enough examples, you can start coding 11 | - Make as many commits as possible 12 | 13 | ## Reference 14 | You can look into the following concepts for the examples: 15 | - example mapping 16 | - specification by example 17 | -------------------------------------------------------------------------------- /contrainte_01.md: -------------------------------------------------------------------------------- 1 | # Contrainte 01 : Savoir ce que l'on va développer 2 | 3 | Dans ton code, tu dois mettre en évidence que tu sais ce que l'on attend de toi. Avant même que tu aies écrit la première ligne de code, tu dois prouver que tu sais ce que tu fais. 4 | 5 | Pour cela, tu vas utiliser des exemples. 6 | 7 | ## Conditions 8 | - Tu ne travailles que dans un seul fichier, celui de ton test. Il doit être nommé avec la date du jour. 9 | - Les exemples doivent apparaître en haut de ton fichier 10 | - Une fois que tu penses avoir assez d'exemple, tu peux commencer à coder 11 | - Fais un maximum de commit 12 | 13 | 14 | ## Référence 15 | Tu peux te renseigner sur les concepts suivants pour les exemples : 16 | - example mapping 17 | - specification by example 18 | 19 | -------------------------------------------------------------------------------- /contrainte_02.md: -------------------------------------------------------------------------------- 1 | # Contrainte 02 : Se laisser guider par les erreurs 2 | 3 | Il faut bien comprendre les erreurs et en déduire les actions à faire. 4 | 5 | ## Conditions 6 | - Tu ne travailles que dans un seul fichier, celui de ton test. Il doit être nommé avec la date du jour. 7 | - Tu dois copier / coller l'erreur en commentaire 8 | - Tu dois ajouter en commentaire une interprétation de l'erreur et une correction à apporter 9 | - Les boucles sont interdites 10 | - Les fonctions comme Replace, Repeat et autres sont interdites 11 | - Fais un maximum de commit 12 | 13 | 14 | ## Référence 15 | - https://blog.cleancoder.com/uncle-bob/2013/05/27/TheTransformationPriorityPremise.html 16 | - https://en.wikipedia.org/wiki/Transformation_Priority_Premise 17 | - https://medium.com/@zolipeto/extract-of-uncle-bobs-transformation-priority-premise-post-85ab20216fb1 18 | -------------------------------------------------------------------------------- /contrainte_03.md: -------------------------------------------------------------------------------- 1 | # Contrainte 03 : Choisir les bonnes étapes de développement 2 | 3 | Selon les choix que l'on prend, les transformations que l'on applique au code peuvent être triviales ou compliquées. 4 | 5 | Pour cela, nous allons découvrir les transformations priorities premises 6 | 7 | ## Conditions 8 | - Tu ne travailles que dans un seul fichier, celui de ton test. Il doit être nommé avec la date du jour. 9 | - Tu dois essayer de choisir une transformation ayant la plus basse priorité à chaque fois. 10 | - Les boucles sont interdites 11 | - Les fonctions comme Replace, Repeat et autres sont interdites 12 | - Pour chaque commit, tu vas indiquer via un commentaire dans le code la transformation que tu as choisis. 13 | - Fais un maximum de commit 14 | 15 | 16 | ## Référence 17 | - https://blog.cleancoder.com/uncle-bob/2013/05/27/TheTransformationPriorityPremise.html 18 | - https://en.wikipedia.org/wiki/Transformation_Priority_Premise 19 | - https://medium.com/@zolipeto/extract-of-uncle-bobs-transformation-priority-premise-post-85ab20216fb1 20 | --------------------------------------------------------------------------------