Giter Club home page Giter Club logo

mnachury / trivia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devcrafting/trivia

0.0 1.0 0.0 963 KB

Refactoring experiments with F# and courses at IUT Lyon 1

License: GNU General Public License v3.0

C# 6.96% C++ 2.22% C 2.87% COBOL 4.07% PowerShell 2.07% CoffeeScript 1.82% HTML 47.68% D 2.07% F# 2.81% Go 2.25% Groovy 2.10% Java 2.34% JavaScript 2.16% Lua 2.35% Objective-C 2.72% Perl 2.96% PHP 2.39% Python 2.51% Shell 2.97% Ruby 2.67%

trivia's Introduction

This repository is a fork of a Legacy Code Retreat code base, I used for several purposes (see below for original LCR purposes).

IUT Lyon 1 C#/.NET courses (2016)

You can find 2 branches "csharp_iutlyon1_grpA" & "csharp_iutlyon1_grpB", I used as live-coding and/or as base from one session to another (not led as a Code Retreat). The goal was to show students legacy code, on which they mainly agree there are some issues, and experiment some refactoring and core design principles, then try to make it "live" with a web API.

The path of the courses was the following (7 sessions of 4h + 1 session for evaluation) :

  • 2 sessions on C# introduction
  • Event Storming on a Meetup-like + first coding dojo on this kata: find code-smells, discover Golden Master technique & start refactoring. Our first goal was to remove all the arrays of primitive types (introduction of a Player class)
  • Continue refactoring of arrays of primitive types (with Golden Master) : Player, QuestionsStack, then avoid List<> (Players class for ex, not in the live-coded solution)
  • Based on previous refactoring (tag IUTLyon1_StartHereToAddFeatures or students' code), we should be more confident to make some changes, then it was time to add some features (keep in mind we needed a web-ready solution in the end, so need to avoid solutions with concurrency problems...):
    • Feature 1: allow to change the nb of purses to win the game: quite easy, but introduce TDD practice by themselves & start to understand concurrency problems & dependency inversion principle
    • Feature 2: allow to choose the questions' categories (impact on size of the board = 3 x nb categories): harder, need to do a little more of refactoring before starting (since currentCategory was still using hard coded categories), then need to find a way to test this feature (lots of Console.WriteLine...)
  • Continue Feature 2 implementation + retrieve questions from an external source (need abstraction, i.e Repository pattern + concrete implementation with a plain file for ex) + start removing Console.WriteLine dependency
  • (coming) Implement a Web API with Nancy/ASP.NET WebApi: need to remove Console.WriteLine completely, introduce Events and EventPublisher (+ relation with Event Sourcing & CQRS). In the end, multiple games should be able to run in parallel.

F# refactoring focusing on baby steps to immutability

The F# version is really not functional, so I tried to use it as a kata to train me to get code more functional, with a particular goal : immutability. I tried a first time, with not enough small steps, so I started over with baby steps. I often needed to introduce some more mutability and move it to allow baby steps, it was a really instructive exercice.

The result is in "immutabilityBabySteps" branch.

Legacy Code Retreat code base

Use this code base to run your own Legacy Code Retreat.

As of this writing, there isn't really a single place to get all the information you might want about Legacy Code Retreat. Search the web and ask your colleagues. Most importantly, don't panic! If you've been to Code Retreat even once, then you know most of what you need to run a Legacy Code Retreat. Give it a try!

trivia's People

Contributors

jbrains avatar jthurne avatar devcrafting avatar mlainez avatar jrglee avatar marcpmichel avatar cngzhnp avatar meatballhat avatar alexboly avatar carols10cents avatar slfitch avatar stej avatar rarous avatar schmonz avatar paytonrules avatar johnnonolan avatar codetojoy avatar eikemeier avatar ridingwolf avatar sdenier avatar c0r0n3r avatar talien avatar bambuchaadm avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.