Skip to content

Instantly share code, notes, and snippets.

DiUS is hosting a tennis tournament. To aid with this, we're developing a scoring system.

The scoring system for tennis works like this.

  • A match has one set and a set has many games

  • A game is won by the first player to have won at least 4 points in total and at least 2 points more than the opponent.

    • The running score of each game is described in a manner peculiar to tennis: scores from zero to three points are described as 0, 15, 30, 40, respectively
@codingricky
codingricky / Agile board.md
Last active March 15, 2018 02:26
Agile board

DiUS are keen on this "Agile" thing. We want to develop a tracking system for Agile cards.

Your application should cater for the following:

  • Be able to create cards. Cards have a title, description and estimate in points
  • Cards belong to an iteration
  • Assume a board has only one iteration at the moment
  • An iteration can have multiple columns. (It should have at least two, one starting and one done)
  • There is a column designated as the starting column. And one designated as the done column.
  • Columns have a name
@codingricky
codingricky / DiUS-Storyboard.md
Last active August 29, 2015 14:03
DiUS Storyboard

DiUS is betting big on this "Agile" wave. We believe it is the way of the future. So much so, we are beginning to think people need to stop using Physical Storywalls and to start using Electronic versions.

So your task is to implement a Digital Storywall.

  • Projects can be created
  • A project has a number of iterations
  • Iterations have a number of stories
  • Stories have points and a description
  • Stories belong to a Swimlane, so 'Ready for Dev', 'In Dev', 'Code Review', 'QA', 'Done'
  • Stories can move forwards and backwards between Swimlanes. But only one at a time, so from 'Ready for Dev' to 'In Dev' to 'Code Review'
@codingricky
codingricky / robovm-callback.java
Last active June 17, 2019 14:05
robovm callback/bind selector
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.foundation.NSDictionary;
import org.robovm.apple.uikit.UIApplication;
import org.robovm.apple.uikit.UIApplicationDelegateAdapter;
import org.robovm.apple.uikit.UIBarButtonItem;
import org.robovm.apple.uikit.UIBarButtonSystemItem;
import org.robovm.apple.uikit.UIColor;
import org.robovm.apple.uikit.UINavigationController;
import org.robovm.apple.uikit.UIScreen;
import org.robovm.apple.uikit.UITableViewController;
@codingricky
codingricky / DiUS Todo List.md
Last active July 12, 2017 22:19
DiUS Todo List

At DiUS we need all the help we can get remembering things. To help, you need to code up a simple To Do list.

The features on this system are:

  • The "To Do" list contains items
  • Items have a string (the thing "To Do") and a completion date. The date is the date the item needs to be completed by
  • Items that contain an empty or null string should be rejected
  • Items can be retrieved by index, that is the order in which they were inserted. So 0 returns the first inserted item, etc.
  • Items can be retrieved by day, so give me all the items that need to be done on the 24th of April, 2014
  • Items can be marked as done. Any items that are complete should not be returned
package com.github.codingricky.leapmotion;
import com.leapmotion.leap.Controller;
import com.leapmotion.leap.Hand;
import com.leapmotion.leap.Listener;
public class LeapMotionListener extends Listener {
private float x;
@Override
package com.github.codingricky.leapmotion;
import com.leapmotion.leap.Controller;
import org.skree.brickattack.Game;
import org.skree.brickattack.PaddleEntity;
public class LeapMotionGame extends Game {
private static final int MOVEMENT_MULTIPLIER = 4;
private final Controller controller;
$ play run
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import play.Application;
import play.GlobalSettings;
import services.GreetingService;
import services.RealGreetingService;
public class Global extends GlobalSettings {
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / @controllers.Application.index()
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)