Coder Social home page Coder Social logo

extreme_startup's Introduction

Welcome

This is Extreme Startup. This software supports a workshop where teams can compete to build a software product that satisfies market demand.

NB don't show the players the code for this project until after the workshop as otherwise they can cheat.

Getting started

The simplest way to get Extreme Startup running is to run in Docker.

# The first time
docker build -t extreme_startup .         # ./build.sh
docker run -d -p 80:3000 extreme_startup  # ./run.sh

and for warmup round

docker run -d -p 80:3000 -e WARMUP=1 extreme_startup   # ./warmup.sh

You can even run the tests in Docker if you are making changes to the code

docker run --rm -it --entrypoint=rake extreme_startup   # ./test.sh

For more information on How to manage docker read Docker docs

See bottom for how to run this native (the hard way/the Rubyist way).

Notes for facilitators

  • Run the server on your machine. It's a Sinatra app that by default runs on port 3000 (the docker scripts typically map to port 80).

  • Everyone needs a computer connected to the same network, so that they can communicate. Check that everyone can see the leaderboard page served by the webapp running on your machine. Depending on the situation, we have used a local/ad-hoc network and that is ok for the game.

  • We have had trouble with things like firewalls, especially on some Windows laptops, so if there are problems, make sure you can ping clients from the server and vice versa.

  • Warmup round: run the web server with the WARMUP environment variable set (note that the result of running with WARMUP=0 is undefined):

WARMUP=1 ruby web_server.rb  # or ./warmup.sh
  • In the warmup round, just make sure that everyone has something technologically working, you just get the same request repeatedly. @bodil has provided some nice sample players in different languages.

  • Real game: revert to using the full QuizMaster, and restart the server. This will clear any registered players, but that's ok.

  • As the game progresses, you can introduce new question types by moving to the next round. Visit /controlpanel and press the "Advance round" button. Do this when you feel like some of the teams are making good progress in the current round. Typically we've found this to be about every 10 mins. But you can go faster/slower as you like. There are 6 rounds available.

  • In case you want to 'stop the world' and reflect with the players during the game, you can use the "Pause Game" button in /controlpanel.

  • Set a time limit so you know when to stop the game, declare the winner, and retrospect.

-- Robert Chatley and Matt Wynne 2011.

People Who've Run Extreme Startup Sessions

If you run this workshop, please write it up on the internet and send us a link to add to this list.

Running "natively" (without Docker)

If you want to run the workshop without Docker you need to get this running (not tested in a few years):

  • Install Ruby 1.9.3 and rubygems

  • (For Windows)

    • Install Ruby DevKit
    • Extract to (e.g.) c:\devkit
    • cd c:\devkit
    • ruby dk.rb init
    • Edit the file config.yml (Add the locations where ruby is installed e.g. c:\Ruby193)
    • ruby dk.rb install
  • (For Ubuntu 12.04 onwards)

  • (For Mac (Xcode 5.1 onwards))

  • Install dependencies:

cd ../<extreme startup dir>
gem install bundler
bundle install
  • Start the game server
bundle exec ruby web_server.rb

extreme_startup's People

Contributors

anders88 avatar andyw8 avatar britter avatar bryant1410 avatar duksis avatar fiqwrk avatar jhannes avatar kimjoar avatar kjetiljd avatar kytrinyx avatar lenary avatar magnars avatar mahnve avatar mattwynne avatar mlainez avatar mostalive avatar neiltarrant avatar neomatrix369 avatar oc avatar peterbeewestmacott avatar rchatley avatar seblm avatar tclavier avatar twillouer avatar tyrcho 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  avatar  avatar  avatar

extreme_startup's Issues

error on /controlpanel URL

When I access /controlpanel, I get this ruby exception :

NoMethodError at /controlpanel
undefined method `round' for #ExtremeStartup::WarmupQuestionFactory:0x0000000154dd40

Other URLs seem to work fine.

I'm running in docker, here is my env

HOSTNAME=3a3e170a5bc1
GEM_HOME=/usr/local/bundle
TERM=xterm
BUNDLE_APP_CONFIG=/usr/local/bundle
PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WARMUP=0
PWD=/usr/src/app
RUBY_MAJOR=1.9
SHLVL=1
HOME=/root
RUBY_VERSION=1.9.3-p551
_=/usr/bin/env

Vary frequency of questions

This is an idea for making the game more interesting - have some questions that are high value, but only appear infrequently. At the moment, all questions appear with roughly the same frequency.

ngrok

You could add a tip in the README about https://ngrok.com/

It's really an easy way to solve all the firewall / nat / network issues : all servers (both facilitator and trainees) can be exposed on internet in 1 min with that :)

Change leaderboard layout

Putting the leaderboard alongside the graph would work better on projector screens, giving more vertical space for the leader board.

Refactor: Split question.rb from question_factory.rb

It seems like the most interesting contributions to extreme startup comes in terms of new question types. By splitting out question.rb from question_factory.rb, it may be easier to merge these contributions.

why server on the client?

Hello,

It's not an issue but a question and since I don't know how to contact you, i send an issue. Feel free to close/delete it.

I read the feedback and it seems that the choice of asking people to create a server on client and the main server have to connect to player servers generate some problems like firewalls, nat, different network and so on.

I would like to understand what are the reasons behind this choice?

BTW: I love the idea and plan to test on my geek network :)

ruby not found in docker

When I run the container like that docker@boot2docker:/mnt/sda2/tmp/extreme_startup$ docker run -ti -p 80:3000 es I get this error : /bin/sh: 1: [ruby: not found

When I run it with

 docker run -ti -p 80:3000 es bash
 ruby web_server.rb

It works

Make reputation a factor in penalty for failure

When we ran the game at ScoRUG, we had an early leader (@lenary) who was never caught. He suggested afterwards:

One thing I was thinking of after the session yesterday was making it easier for the leader to be toppled via their own mistakes. Perhaps the more points you have, the more detrimental any failures/errors are to your points, because you have more reputation to lose.

Seems like a good idea, provided we can do it simply enough that people can understand what's going on and still follow the relationship between the penalty and the points available for getting a question right.

Wrong fibonacci algorithm ;)

Code from server:

def correct_answer
  n = which_number
  root5 = Math.sqrt(5)
  phi = 0.5 + root5/2
  Integer(0.5 + phi**n/root5)
end

While this is a mathematically clever way, this fails miserably on larger fibonaccis due to precision issues. sqrt(5) is an irrational number, its precision is calculated to over 1 mill decimals. Ruby float: Math.sqrt(5) == 2.23606797749979 is just too imprecise.

It actually fails already with fib(71):

def gr_fib(n)
  root5 = Math.sqrt(5)
  phi = 0.5 + root5/2
  Integer(0.5 + phi**n/root5)
end
>> (69...72).map { |n| gr_fib n }
=> [117669030460994, 190392490709135, 308061521170130]
>> 117669030460994+190392490709135
=> 308061521170129

I suggest to use an iterative version instead. For instance:

def fib(n)
  a, b = 0, 1
  (0...n).each { |_| a, b = b, a + b }
  a
end

Update to current Ruby tools

Very late to the game here, but I was originally drawn to this workshop via @jhannes, whom I met in Kiev where he hosted a dojo.

Now I'd like to host a similar event myself, but I'm having trouble getting the application to run. The fact that I'm on Windows probably doesn't help, but I've previously managed to get other Ruby-based programs running, including my own blog, which is created with Jekyll.

My other big disadvantage is that I'm not a Ruby programmer at all.

I've been asking about some of my issues on Stack Overflow, and I'm currently stuck with this one: http://stackoverflow.com/q/32228794/126014 From the answer provided so far, I understand that the main issue is that the code in the repo isn't compatible with current Ruby tools/dependencies.

If so, would it be possible to update the code base to current Ruby tools, or are there other attempts I can make of getting the current code base up and running?

I realise that this is software provided for free, so I completely understand if this is too big of an effort. On the other hand, if I don't ask, the answer is automatically no... ๐Ÿ˜„

Duplicate Players!

At the moment a user can register multiple times with same username and same URL.
It looks it cause them to loose scores.

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.