Code Monkey home page Code Monkey logo

dlresende / extreme-carpaccio Goto Github PK

View Code? Open in Web Editor NEW
121.0 8.0 115.0 5.12 MB

Slicing and coding game

Home Page: http://diegolemos.net/2016/01/07/extreme-carpaccio/

License: BSD 3-Clause "New" or "Revised" License

C# 7.02% Clojure 0.95% Erlang 2.35% Groovy 0.76% Java 14.78% JavaScript 38.07% Python 5.65% Racket 1.18% Scala 0.90% HTML 1.08% CSS 0.05% Haskell 0.97% Shell 0.65% Go 0.63% Rust 0.47% Ruby 8.56% F# 1.20% Batchfile 0.10% Kotlin 2.54% PHP 12.09%
extreme-carpaccio kata coding-dojo coding-game coding-challenge code-kata contest workshop slicingdice extreme-startup

extreme-carpaccio's Introduction

Extreme Carpaccio

French version here.

Extreme Carpaccio is a coding game designed to encourage and favour incremental development and Continuous Delivery best practices.

During a Extreme Carpaccio session, the facilitator uses his/her computer as a server and sends HTTP requests to participant machines (generally organised in teams). Each request is a purchasing order, like those you have when you buy something somewhere. Participants then calculate the order's total amount and send the correct response back to the server. For every correct response, the participant earns points and increases his/her score. For bad responses, penalties are charged and the participant loses points. Participants should slice (or decouple) the problem in order to deploy small chunks of the solution into production as soon as possible and then score before others. This is the purpose of this exercise: define a slicing strategy, implement, deploy, check feedback, adapt the strategy, implement, deploy... and iterate as fast as possible. Those who don't slice and try go to production only once the whole solution is implemented risk to spend too much time before scoring, leaving the way free to other teams win.

This workshop, kata, or coding game is intented to help teams to practice concepts like Continuous Delivery, Lean Startup, eXtreme Programming, Agile Development, and more.

Ready for the challenge?

If you are a participant, go to clients/ to get more instructions and start playing.

If you are a facilitator, go to server/ and find out how to facilitate a session.

Have fun :D

People running Extreme Carpaccio

  • Find out what people are saying about Extreme Carpaccio on Twitter

extreme-carpaccio's People

Contributors

aldocd4 avatar arnauld avatar bchiquet avatar bernardnotarianni avatar cedricrup avatar chaabani-anis avatar dependabot-preview[bot] avatar dependabot[bot] avatar dijonkitchen avatar dlresende avatar edouard-gv avatar essic avatar floby avatar frawa avatar github-actions[bot] avatar gphilipp avatar jja-octo avatar jutkko avatar mdulac avatar miiitch avatar mmetesreau avatar okamidev avatar poenneby avatar radwane-h avatar rhwy avatar sagarafr avatar seblm avatar syl20b avatar vador avatar xereda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

extreme-carpaccio's Issues

Reduction table

Hi,

Where can I configure the reduction table? What are the standard options? Can I set it up?

A hug,

Jackson

Persist game state

I would like the game state to be persisted when the game server stops.

Use-cases:

  • manage a server crash
  • split the game on 2 different days
  • manage a laptop shutdown because of low battery 😆

Every game iteration, the game state is saved into a LevelDB local database. On server startup, the game state is rebuilt from the state stored in LevelDB.

I have a pull request almost ready to submit.

WDYT?

Remove unwanted registrations

It's common that people make mistake when they register, so I get 'zombie' teams and the scores are less readable.

When I facilitated the game for a large number of teams, it was annoying. For ~20 teams I got 3 or 4 'zombie' teams created by mistake with huge negative scores in the end of the game.

It would be handy to remove these teams or hide them.

Only the facilitator should be able to do that. So I would suggest a hidden HTTP REST endpoint, or a hidden button on the web interface displayed only for localhost.

Unstable server tests

Problem

Sometimes when I run npm test on the server, I get the following failure:

 1) BadRequest should randomly corrupt order
   Message:
     Expected { prices : [ 64.73, 29.48, 73.49, 58.88, 46.61, 65.4, 16.23 ], quantities : [ 3, 10, 6, 5, 9, 5 ], country : 'FR', reduction : 'STANDARD' } not to equal { prices : [ 64.73, 29.48, 73.49, 58.88, 46.61, 65.4, 16.23 ], quantities : [ 3, 10, 6, 5, 9, 5 ], country : 'FR', reduction : 'STANDARD' }.
   Stacktrace:
     Error: Expected { prices : [ 64.73, 29.48, 73.49, 58.88, 46.61, 65.4, 16.23 ], quantities : [ 3, 10, 6, 5, 9, 5 ], country : 'FR', reduction : 'STANDARD' } not to equal { prices : [ 64.73, 29.48, 73.49, 58.88, 46.61, 65.4, 16.23 ], quantities : [ 3, 10, 6, 5, 9, 5 ], country : 'FR', reduction : 'STANDARD' }.

Most often the test passes. But sometimes it fails randomly.

How to reproduce the problem

Run the following script to be pretty sure to see the problem:

#!/usr/bin/env bash
set -e
for i in $(seq 1 100); do
	npm test
done

Tested on:

  • macOS 10.12.4
  • node v7.9.0

Analysis

The test expects the random-generated order corruption to be different than the previous corrupted order. There is a non-null probability that the random order generator builds an identical corrupted order.

Suggestion

Maybe we could set the random generator seed, or mock the random. Which one do you prefer?
I'll try to make a PR.

Make new seller registration on/off

Today, new sellers (participants) are able to register themselves at any point of the game. Sometimes this is not desirable, because a seller with an important negative balance can simply create a new account and start from 0.

This story is about making the registration configurable, so that the facilitator can turn it off once all teams are registered and ready to play.

Respond 404 instead of empty and not respond

Today, if a participant do not respond the server nothing happen. It'd be great if a responde became mandatory in order to not be charged with penalties. To do so, if the participant is not able to handle the request, he has to respond 404.

Add wrong request to break participants clients

In order to encourage participants to test, it'd be great that the server starts sending bad requests. In order to not be charged with penalties, the participant should respond with the http code 400 to server. It'd be great if this feature could be activated on the fly with some frequency, like, for each 10 requests one request is wrong.

Put all the clients at the same level

All the clients should:

  • have a /ping resource that responds "pong"
  • hava a /feedback resource which accepts a message {"type": "ERROR","content": "The field \"total\" in the response is missing."} and parse the same message leaving an JSON parsing example for participants
  • remove all the existing parsing regarding the main problem (no more parsing for order objects and responses like Bill or other) (running the exercice with participants with a little bit of experience makes the exercice "too simple" and very short in time)
  • have a test to give participants an example

Python client too

Hi diego, I would like to add python client server, can you add me as a contributor ?

Add "dynamic" rules on the fly for taxes calculation

Today the problem is very static and sometimes people tend to implement it "from one shot". Furthermore, this approach and the /feedback resources don't push participants to test.

After many feedbacks and discussions with others running Extreme Carpaccio, we're willing to add new taxes rules on the fly to push the problem nature from static (at the beginning) to dynamic (during the game).

To do so, at some point we'd like to change the taxes strategy leaving the fixed numbers back and start using rules for each country, like : if(total < 100) return sum * 1.2; else return sum * 1.2 + 10;

Server not catching exception and crashing :/

In some extremely rare cases when the machine running the server automatically changes the Wi-Fi connection, the server crashes with the following error:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.10.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/diego/Projects/github.com/dlresende/extreme-carpaccio/server/node_modules/.bin:/Users/diego/go/bin:/Users/diego/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/diego/go/bin:/Users/diego/bin:/Users/diego/.fzf/bin
10 verbose lifecycle [email protected]~start: CWD: /Users/diego/Projects/github.com/dlresende/extreme-carpaccio/server
11 silly lifecycle [email protected]~start: Args: [ '-c', 'node bin/www' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `node bin/www`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/diego/Projects/github.com/dlresende/extreme-carpaccio/server
17 error Darwin 16.4.0
18 error argv "/usr/local/Cellar/node/7.10.0/bin/node" "/usr/local/bin/npm" "start"
19 error node v7.10.0
20 error npm  v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] start: `node bin/www`
23 error Exit status 1
24 error Failed at the [email protected] start script 'node bin/www'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the extreme-carpaccio-server package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     node bin/www
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs extreme-carpaccio-server
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls extreme-carpaccio-server
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

Server does not start (npm 6.4.10)

Server does not start when running npm run start (npm version: 6.4.1). Error:

internal/validators.js:113
    throw err;
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "interval" argument must be of type number. Received type object
    at StatWatcher.start (internal/fs/watchers.js:76:3)
    at Object.watchFile (fs.js:1322:10)
    at Configuration.watch (/home/CODE/extreme-carpaccio/server/javascripts/config.js:65:16)
    at Object.<anonymous> (/home/CODE/extreme-carpaccio/server/app.js:26:15)
    at Module._compile (internal/modules/cjs/loader.js:723:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:659:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node bin/www`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

It is caused by configuration.watch(); line in app.js not passing any parameters. Due to that callback, watchOnce, interval are undefined and the error this thrown.

I've checked if this worked on earlier versions of npm and found out that it works in version 2.15.11 despite those parameters being undefined.

I'll create a merge request resolving this issue, but the way I do it might not be the best.

Edit:
I verified it on another machine as well - the same thing happens

Chalk bump break imports

Chalk bump break imports

Hello guys, I tried to run the server but got this error :

> [email protected] start
> node bin/www

/private/tmp/extreme-carpaccio/server/javascripts/repositories.js:4
var chalk = require('chalk')
            ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /private/tmp/extreme-carpaccio/server/node_modules/chalk/source/index.js from /private/tmp/extreme-carpaccio/server/javascripts/repositories.js not supported.
Instead change the require of index.js in /private/tmp/extreme-carpaccio/server/javascripts/repositories.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/private/tmp/extreme-carpaccio/server/javascripts/repositories.js:4:13) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v21.7.1

I tried with the following conditions :

  • OS: MacOS Sonoma 14.1
  • Node: v21.7.1

It seems that the culprit is the bump of Chalk 4.1.2 -> Chalk 5.3.0, when I checkout on commit 5859d8f80586cdde32f294e9cdf14ae9266a8470, it works.

Have a nice day. :)

Stress estimation and tracking experiment: any recommendations?

Hi,

In some context, 'value generation' is not a big enough incentive for teams to change their behaviors! For example:

  • teams are stuck in a long batch delivery mode, they don't see the value of delivering early because nothing will hit a customer before one year anyway
  • dev teams are mostly 'executors' and they don't really care if their employer gets more value or not, for them, life is still going to look like "Stories in, stories out..."

These work environments are far from ideal, but unfortunately, they are still very common. In order to try something new, I thought we could tweak the extreme carpaccio to estimate the stress level of the different seller teams. This way we would see that the way they work has a direct impact on their working conditions. I thought about estimating stress by summing 3 factors:

  • Something proportional to the income difference with leaders (when you are not performing well on the market, you get pressure)
  • Something proportional to the time since last 'earning' (when you don't deliver anything new for a long time, you get pressure)
  • Something proportional to any money lost, that would then decreases with time (bugs in production generate a lot of pressure)

I would need to add a new graph for stress levels on the main screen. At the end of the sessions, seller teams could compare and discuss their stress graph and the way they worked.

Here are my questions:

  1. Would you be willing to accept such an enhancement in the main codebase?
  2. Are there any points you would want me to keep in mind?
  3. Would you prefer a large PR or many small ones? I will use small commits anyway.
  4. Have you got any coding or design recommendations?

Thanks a lot for this project.

npm install fails in Windows 11

I'm trying to start extreme-carpaccio server in Windows 11.

C:\Users\nicolas-delsaux\Documents\open-source\extreme-carpaccio\server>npm install

> [email protected] postinstall
> node_modules/.bin/bower install

'node_modules' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
npm ERR! code 1
npm ERR! path C:\Users\nicolas-delsaux\Documents\open-source\extreme-carpaccio\server
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node_modules/.bin/bower install

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nicolas-delsaux\AppData\Local\npm-cache\_logs\2022-01-06T13_12_18_644Z-debug.log

NOTICE in the command trying to be run, the path has forward slashes, which are not compatible with Windows path ... I guess it's a bower bug

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.