RCRD NSO Manual – Penalty Box Timer

This document was written based on the rule set established by the WFTDA Rules Committee for the 2019 season. It contains the policies and procedures used by the Rainy City Roller Derby Officiating Crew, and is not endorsed by the Women’s Flat Track Derby Association.

General Description

During the game, the main duties will be to record when a skater enters the Box, who the skater is, when the skater can leave, and verbally notify the skater when their time has been served.

Equipment Needed

  • Clipboard
  • Tracking Sheet
  • Pen/Pencil
  • Stopwatch

Paperwork

Prior to the start of the game, the Penalty Box Manager will assign a team for the Penalty Box Timer to follow. They may switch teams during halftime, at the discretion of the Manager. When the paperwork is provided, fill in the name, date, and colour boxes (if it has not already been done in advance).

Also, in the BOX TRIPS column, skater numbers should be printed in advance. If not, fill in the numbers manually before the game starts. Copy from the IGRF or the Inside Whiteboard.

The columns of information to be tracked during the game are listed in the black bar along the top of the page:

PERIOD – Two sheets are provided for all games, one sheet can be used for each period, or continue all box trips on the same sheet. This box should be used to mark which period the box trip occurred in.

JAM # – Starting with 1 each period, write the jam number of when a skater enters the Penalty Box. DO NOT fill in the jam numbers ahead of time. Multiple skaters may be entering the Penalty Box during the same jam and each skater must be accounted for individually.

BTWN JAMS — If the skater enters the Box between jams, mark the ‘Btwn Jams’ column, and enter the upcoming jam # in the Jam # column.

TEAM – Provide the team colour (often unnecessary as there is one sheet per team).

SKATER # — Write the skater’s number in this box.

POS – Indicate what position the skater is playing. Enter J for Jammer (wearing helmet cover with a star), P for Pivot (helmet cover with a stripe), B for Blocker (no helmet cover).

IN, STAND, DONE – When the first skater enters the Penalty Box, the stopwatch will read ‘0:00’, this is the IN time. As soon as the skater sits, start the stopwatch and the skater will be in the Penalty Box for 30 seconds (unless a Referee indicates multiple penalties). ‘0:30’ will be entered for DONE. Since the skater is required to stand for the last 10 seconds, subtract those seconds from the DONE time and that is written in the STAND box, in this case ‘0:20’.

If another skater from the team enters the Box while the first skater is still being timed, write the time that the stopwatch indicates for IN, then add 30 seconds and write this under DONE, now subtract 10 seconds to show what time to STAND.

STOPWATCH AT END OF JAM – Time stops between jams, and restarts at the beginning of the next jam. If a skater has not finished serving their time before the end of the jam, indicate the time shown on the stopwatch in these boxes. If short enough, a skater can sit in the Box for multiple jams.

a) After skater #22 served 30 seconds, the stopwatch was reset.
b) #46 entered the Penalty Box in between jams 3 and 4. Twenty-five seconds into jam 4, #808 was sent to the Box. At thirty seconds after starting the watch for #46, skater #321 entered the Box.
c) With #808 and #321 in the Box, the jam ended and the clock was stopped at 0:35.
d) #808 was released at 0:55. But, the jam ended again 3 seconds later with the penalty clock at 0:58, forcing #321 to remain in the Box.

BOX TRIPS – The pink boxes of this column should be pre-printed with skater numbers in alphanumeric order (if not, do this before the game begins). For every penalty a Skater sits in the Box for, draw a hash mark in the white area below their number. If that skater is sent to the Box for a 7th penalty, they have fouled-out.

If a Skater leaves the box early, indicate the time when the Skater left along with the note ‘Left Early’. When the Skater returns to the Penalty Box, add a new line for the remaining time and additional penalty, if applicable.

If a Skater is found to have sat in error or their penalty is overturned, draw a single line through the row for that trip and note either ‘No penalty’ or ‘Penalty overturned’. Erase the tally mark from the Total Penalties section since there is no penalty that corresponds to this trip.

If a Skater is substituted for Foul Out, Expulsion or Injury and the timing has started, add a slash and then Substitute’s number. Write a note in the margin to explain the change.

If a Skater is substituted for Foul Out, Expulsion or Injury and the timing has not started, write the Substitute’s number on the paperwork. Write a note in the margin to include the penalised Skater’s number and to explain the change. Ensure that the Box Trip tally is marked against the penalised Skater and not the Substitute.

Substitute After Timing Started

a) During the tenth jam, Pivot #101 is sent to the box. At the end of the Jam they are substituted by #22 after serving 14 seconds.
Substitute Before Timing Started

b) During the tenth jam, Pivot #101 is sent to the box, but do not sit until after the end of the Jam. They are substituted by #22. (Not seen in the example above, notes are added to the margin with details of the substitution).

Procedures

Box Timers stand in/behind the Penalty Box, without obstructing the seats, so that they may see the numbers on the backs of the skaters as well as communicate verbal commands.

To help facilitate in knowing the jam to be indicated, there are two columns of numbers on the right side of the page (one for each period) that can be circled and crossed-off as needed. If at any point the jam number has not been followed, communicate with other NSOs or check the Scoreboard.

Skaters will serve 30 seconds in the Penalty Box. An Official will notify the Box Timers if more than one penalty was issued and the skater should serve more time. The hand signal for this will be to tap the wrist with two or three fingers, indicating the number of multiple penalties. Mark that multiple penalties are being served in the margin.

Skaters in the Box must sit and their time does not start until they are seated. Skaters are required to stand for the final 10 seconds of their penalty, notify them with the verbal cue ‘Colour, #, STAND’ (i.e. for #242 of the red team, say ‘Red, Two-Four-Two, Stand!’). If they do not stand fully upright, stop their time and notify them with the verbal cue ‘TIME STOPPED, Colour, #’. Restart the watch as soon as they comply.

When a skater’s penalty time has ended, use the verbal cue ‘Colour, #, DONE’. Try to synchronise saying the word ‘DONE’ as the last second ticks off.

Hard of hearing skaters sometimes request that Box Timers tap them on the shoulder for Stand and Done, especially in noisy venues. Do not do this to any skater unless they explicitly request it as many people are not comfortable with this.

If the jam ends while a skater is still in the Box, stop the stopwatch and document the time indicated in the appropriate area of the paperwork.

A maximum of three skaters from each team can be seated in the Box: 2 Blockers and 1 Jammer. If two Blockers are seated in the Box and a third is called for a penalty, wave that Blocker to return to the track until there is an opening. Once there is an opening, notify the Box Manager who will call for the skater to enter the Box. (Note: when a skater stands for the final 10 seconds, their seat is now open and can be occupied by an incoming skater). If one (or both) of the Blockers is standing for the last 10 seconds of their time, and a third Blocker is sent to the Box, the third Blocker may sit and have their time begin without being waved-off.

Skaters should enter the Box in a controlled manner. Any skater coming in ‘hot’ and knocking chairs out of place, potentially injuring Officials, or colliding with other skaters will be penalised.

Check the number of box trips against the Inside Whiteboard regularly to check that the information has been recorded accurately. Report any discrepancies so that the information between the Penalty Tracker and the box staff matches. This is important to ensure that skaters are not fouled out incorrectly. Information for 5, 6 and 7 penalties will be confirmed by the Box Manager.

If a skater has entered the Penalty Box to serve their seventh penalty, and has therefore fouled-out, they should continue to serve their time as normal. Once they are instructed to Stand, move the skater to an area in or next to the Box where they will not block any chairs or skaters. At the end of the jam, check to see if an Official Timeout or Official Review is requested. If not, instruct the skater to collect any personal belongings from their team bench and then leave the bench area. If the jam ends before the penalty time has expired, the team will need to substitute the fouled-out skater. Work with the Referees and Teams to do this as quickly as possible before the next jam starts. Retrieving the jammer or pivot helmet cover of the fouled-out skater helps to identify the position the substituted skater needs to serve as, and ensures that it is returned to the Team.

If a skater has entered the Penalty Box to serve their penalty but the Head Referee has expelled them from the game, they may be removed from the Box before their time has expired. The chair should be marked to show that it is still ‘occupied’, and timing should continue as normal. Another skater should not sit in this chair until there are fewer than 10 seconds remaining. If the jam ends before the penalty time has expired, the team will need to substitute the expelled skater.

Jammers have a special set of rules and the Box Manager will provide assistance in these circumstances.

Skaters should not be released from the Box at the end of the game until the score is Final.

Communication with the Penalty Box Manager and other Penalty Box Timer is very important. It is a good idea to discuss how the communication will work before the start of the game. It is also good to check the number of the jam with each other.

Penalties

Illegal Procedure

Rule 4.4

Nobody may enter the Penalty Box except for Officials and Skaters who are serving penalties.

  • All medical support staff will be allowed into the box as necessary, but may only communicate with penalized Skaters regarding medical matters.
  • If a team’s non-skating bench staff enters the Penalty Box, this penalty will be issued to their team’s Captain.
  • If a skater or bench staff accidentally enters the Penalty Box but does not communicate with penalised skaters, nor interferes with the running of the Box, no penalty is to be issued.

Rule 1.2 and Scenario C4.2.4.C

If a penalised Skater removes safety equipment while in the Penalty Box. A penalised Skater may remove their mouth guard while in Penalty Box whether sat or stood. Merely adjusting safety equipment while in the Penalty Box is not to be penalised.

Scenario C4.2.4.D and C4.4.1.B

A Skater completely exiting the Penalty Box before they are released by an Official. (Note: If a Skater unintentionally leaves the box due to venue constraints while moving around (e.g. instructed to change seat or allowing another Skater to sit behind them) then the Skater should not be penalised).

  • If the Penalty Box Official instructs the Skater to leave early, this penalty does not apply.
  • Scenario C4.2.4.D: Skaters who leave without being dismissed but have completed their time are not to be penalised.

Interference

Scenario C4.2.3.A

Failure to be on the track for the next jam at jam start, in the appropriate position (Pivot or Blocker), when currently in the Penalty Box queue. One penalty will be assessed to each offending Skater.

Misconduct

Scenario C4.2.4.E

Throwing objects which could cause harm (e.g. water bottles, tools) into the box is to be penalised.

Scenario C4.3.A

Imitating an Official to confuse other skaters.

Scenario C4.3.F

Profane, abusive, and obscene language is unsporting and degrading to the sport, but should not always be penalized. If said language was audible to the audience or via broadcast, [the skater] is penalized. If [the skater]’s profanity was directed at an Official, [the skater] is penalized. Otherwise, a few choice words directed at a teammate or opponent should result in a warning and be penalized if the behavior continues.

Scenario C4.5.B

Entering the box in an uncontrolled manner which causes impact to an Official or Skater in the Box, or forces them to vacate their position.

Penalty Box Timers will be able to issue these penalties themselves unless the Head Referee says otherwise, this will be clarified before the start of the game. If the penalty should be issued to the Captain, this should be reported to the Head Referee who will issue this.

Issuing penalties must be done in accordance with Officiating Discretion. The correct verbal cue and hand signal must be used, these can be found in WFTDA Officiating Cues, Codes And Signals.

End of First Period

Consult with the Penalty Tracker, Inside Whiteboard and Lineup Tracker to ensure all the penalties are accurate. If any skaters were in the Box at the end of the first period, carry this information over to the next sheet. Notify the Outside Pack Referee prior to the start of the second period. These skaters must return and finish their time during the second period.

RCRD NSO Manual – Scorekeeper

This document was written based on the rule set established by the WFTDA Rules Committee for the 2019 season. It contains the policies and procedures used by the Rainy City Roller Derby Officiating Crew, and is not endorsed by the Women’s Flat Track Derby Association.

General Description

There are two Scorekeepers who will document the points earned during each jam and keep a running tally of the score. Each will be assigned to watch a Jammer Referee during the game; they will stand outside of the track, on either side of the Scoreboard Operator. Scorekeepers need to focus on their assigned Referees and maintain good communication with the Operator.

Equipment Needed

  • Clipboard
  • Score sheets
  • Pen/Pencil
  • Coloured Wristband

Paperwork

Prior to the start of the game, the Head NSO will assign a team/colour, introduce each Scorekeeper to the Jam Referee they will watch, and provide a coloured wristband. When the paperwork is provided, fill in the name, date, and colour boxes (if it has not already been done in advance).

The columns of information to be watched for during the game are listed in the black bar along the top of the page:

JAM — Starting with 1 each period, write the jam number as it happens. DO NOT fill in the jam numbers ahead of time. If a Star Pass should occur, write ‘SP’ in the box below the current jam.

JAMMER’S NUMBER – Write the alphanumeric number of the Jammer in this box. If a Star Pass should occur, write the number of the Pivot who received the star (they are now the Jammer).

LOST – If the Jammer loses the ability to become the Lead Jammer, or if they lose the status itself after acquiring it, mark an ‘X’ in this box. (Note: do not mark if the Jammer simply does not become Lead Jammer.) Reasons for loss of Lead status are:

  • Jammer is sent to the Box as Lead Jammer
  • Jammer is sent to the Box before completing their initial trip and Lead has not yet been awarded
  • Jammer completes a star pass after earning Lead Jammer status or before it has been awarded
  • Jammer or Jammer’s teammate intentionally removes their helmet cover for any other reason after earning Lead Jammer status or before it has been awarded
  • Jammer is the first to complete their initial trip but is not awarded Lead due to no pass/no penalty

LEAD – When the Referee signals that the Jammer has earned Lead Jammer status, mark this box with an ‘X’.

CALL – If the Jammer of the team calls off the jam prior to its natural conclusion, mark this box.

INJ – Mark this box if the jam is called-off due to an injury.

NI – (No Initial) If the Jammer does not complete their initial trip through the pack before the jam ends, mark an ‘X’ in this box. Leave the box for Trip 2 empty as the Jammer has not started scoring trips.

TRIP 2, TRIP 3, ETC. – Each time the Jammer goes through the pack, the Referee will signal how many points they earned on that trip. (Note: there are no points earned on their first/initial trip through the pack.) Scoring for jams with ten or more scoring trips should be marked in the Trip 10 column as: [ninth scoring trip points] + [tenth scoring trip points]+ …

JAM TOTAL – At the end of the jam, tally the points for each trip.

GAME TOTAL – Keep a running tally for the entire period. The period 1 total (at the bottom of the page) will carry over into the next period.

a) During the second jam, there was a Star Pass; Pivot #2121 becomes the new Jammer and continues where the previous Jammer left off.
b) In jam three, the Jammer did not get through the pack at all before the jam ended.
c) Jammer #55 earned the status of Lead Jammer and called off the jam before its 2 minute natural conclusion.

Star Passes

Both Scorekeepers will write in two rows in a jam which has a Star Pass.

The Scorekeeper for the Star Passing team should move to the next row and write ‘SP’ in the Jam # column. Write the new Jammer’s number in the Jammer’s Number column, and pick up the scoring on the trip where the previous Jammer left off.

If the original Jammer is still on the initial trip when a Star Pass occurs, the NI column should be marked. If the new Jammer also does not complete the initial trip, then the NI column should be marked in the SP row as well.

The Scorekeeper for the NON-Star Passing team should wait to see if their team performs a Star Pass as well. If that team did not Star Pass during the same jam, at end of the jam move to the next row and write ‘SP*’ in the Jam # column, leaving the rest of that row intentionally blank.

NOTE: The current Standard Practice is to record points only when the Jammer Referee has signalled points at the end of a Jammer’s trip. This means all points scored on a scoring trip of a Star Pass should be recorded for the new Jammer.

One team star passes

During the second jam, there was a Star Pass; Pivot #2121 becomes the new Jammer and continues where the previous Jammer left off.
The opposing team did not Star Pass, so ‘SP*’ has been entered.

Both teams star pass

During the second jam, there was a Star Pass; Pivot #2121 becomes the new Jammer and continues where the previous Jammer left off.
The opposing team also had a Star Pass; Pivot #80 becomes the new Jammer and continues where the previous Jammer left off. There only needs to be one line for the star passes; as both teams had a star pass there is no need for a SP* line.

Overtime Jam

A game may never end in a tie score. If the score is tied at the end of a game, an overtime jam will determine the winner.

Overtime jams last the full two minutes, and there is no Lead Jammer. Jammers will begin scoring points on their initial trip. The score for the first trip will be recorded in the Trip 2 column as such: [Initial Trip points] + [Second Trip points].

If the score remains tied, additional overtime jams will be played until the tie is broken.

Procedures

Prior to the first jam, tie the coloured wristband around the wrist of the hand to be used to be signal to the Referees. When the game begins, watch the assigned Referee and do not get distracted.

As the Jammers make their way through the pack on their initial trip, know which Jammer (if either) earned Lead Jammer status. On subsequent trips, Referees will signal how many points were earned. Use the hand with the wristband to mimic the points back to the Referee. Watch the Jammer Referee for a score, especially at the end of a jam as they may have scored points. Wait for this before reporting the score to the Scoreboard Operator.

Communication between both Scorekeepers and the Scoreboard Operator is very important. After each scoring trip announce Colour and Points scored to the Scoreboard Operator, e.g. ‘Red 4’. Other things to announce are lead, lost lead, and star pass so all three NSOs can hear. Check regularly that all three have the same current jam number.

The Official Score is the one that is shown on the Scoreboard. Corrections to this can only be made during the lineup and the jam following the one where the error occurred. After this, the score displayed will be taken to be the correct one. It is extremely important to ensure that the Scoreboard Operator has been given the correct number of points for each trip and jam. If an error has occured but it is too late to correct the Official Score, make a note of the reason for the error as this will need to be recorded by the HNSO.

If less than two minutes remain of the second period, the score must be corrected before the start of the following jam. The Head Referee may choose to take an Official Timeout at this point to give the opportunity to check this.

A tip for making sure a score has been recorded when needed is to place a dot in the bottom left of each trip box as the Jammer starts that trip. This dot means that a score needs to be recorded in that box, even if it is zero. Further information can be found in Nine Inch Wheel’s Dot System.

Before the Jammer passes through the pack again, double-check the maths. Between jams and during timeouts, double-check the maths. Any time there is a break in the game play, double-check the maths.

Penalties

Illegal Procedure

Rule 2.2.2

A Jammer without Lead Jammer status successfully calling off a jam

Misconduct

Scenario C4.3.F

Profane, abusive, and obscene language is unsporting and degrading to the sport, but should not always be penalized. If said language was audible to the audience or via broadcast, [the skater] is penalized. If [the skater]’s profanity was directed at an Official, [the skater] is penalized. Otherwise, a few choice words directed at a teammate or opponent should result in a warning and be penalized if the behavior continues.

Scorekeepers will be able to issue these penalties themselves unless the Head Referee says otherwise, this will be clarified before the start of the game. If the penalty should be issued to the Captain, this should be reported to the Head Referee who will issue this.

Issuing penalties must be done in accordance with Officiating Discretion. The correct verbal cue and hand signal must be used, these can be found in WFTDA Officiating Cues, Codes And Signals.

End of First Period

Complete the boxes at the bottom of the page to count up the total number of jams, the total number of Lost, Lead, Call, Injury and No Initials, and the total score for each trip. The combined total of the trips should equal the total score.

Find the colour’s assigned Jammer Referee and ask them to double check the scores and the maths. They can then sign this sheet.

Transcribe the Game Total at the bottom of period one to the top of the next sheet. The Jammer Referees will switch their roles and the Scorekeeper will switch with them, staying with the same Referee for the second period. Trade paperwork and coloured wristbands with the other Scorekeeper.

NOTE: At the end of the game, the Head NSO will get the final scores and record them on the IGRF before getting signatures from the Team Captains.

Functional Programming in C# – Part 1: Method Chaining

This is the first part in what is currently planned to be a 4-part series on functional programming, though I may end up adding more parts in future as there are other functional topics I could cover.

This first post is greatly influenced by Dave Fancher’s Functional C#: Fluent Interfaces and Functional Method Chaining but with a few additions of my own that I’ve found useful.

I’m not going to go into the history of functional programming or try to extol it’s virtues – there are many sources out there that do that and I assume that if you’re here reading this then you’ve probably already read plenty about that. However, I will say that I’ve been using functional style C# in a commercial setting for 4 years now and have found it to be a powerful tool for writing clean, reliable code.

Map and Tee

Functional languages can chain methods together in such a way that each method acts on the output of the previous method. For example, this F# function would output 13:

10
|> Add 1
|> Add 5
|> Subtract 3

This behaviour is similar to the fluent syntax found in some libraries but can be applied without having to design the class specially for it.

This is achieved using a couple of generic extension methods called Map and Tee.

Map

public static TOut Map<Tin, TOut>(
    this Tin @this, 
    Func<Tin, TOut> func) 
    =>
    func(@this);

Map takes a function and applies it to the value that Map is called on, returning the result of the function call.

This gives us enough to replicate what we saw in the F# example above:

10
.Map(Add(1))
.Map(Add(5))
.Map(Subtract(3));

I’ll deal with exactly how the Add and Subtract methods are defined shortly. But for now we can see how Map has allowed us to replicate the F# example.

However, we run into an issue if we want to output this result to the console as Console.WriteLine has no return value and so cannot be used as an argument to Map. The |> operator in F# however will happily accept Console.WriteLine.

We could get around this by writing a wrapper function for Console.WriteLine which returns the same value passed in. However, this would lead to writing the same thing over and over just to work with Map. To solve this, we have Tee.

Tee

public static TInOut Tee(
    this TInOut @this,
    Action func)
{
    func(@this);
    return @this;
}

Tee accepts an action, calls it with the value that Tee is called on, and then returns the original value. This allows us to chain logging functions like Console.WriteLine into our code.

For example:

10
.Map(Add(1))
.Map(Add(5))
.Map(Subtract(3))
.Tee(Console.WriteLine);

So that’s it right? Well, not quite.

There’s also a use of Tee where you want to call some function with side effects that does return a value but you just want to continue using the current value. This is arguably less pure functionally, but in reality it’s really useful because of the nature of working in a functional style in a traditionally OO language.

So, we add an overload of Tee that looks like this:

public static TIn Tee<TIn, TOut>(
    this TIn @this, 
    Func<TIn, TOut> func)
{
    func(@this);
    return @this;
}

Dealing with IDisposable

So the above is all fine when dealing with normal objects. However, we find a slight issue when dealing with disposable objects. If we were to just chain them in with Map then they would soon get lost and we wouldn’t end up disposing them correctly.

We could just break out the bits of code which use disposable objects and wrap them in using statements, but then we’re just back to standard procedural programming. So, we add a method called Use.

Use

public static TOut Use<TDisposable, TOut>(
    this TDisposable @this,
    Func<TDisposable, TOut> func)
where TDisposable : IDisposable
{
    using (@this)
        return func(@this);
}

Use takes a disposable object and passes it to a function. It then disposes the object and returns the result of the function.

This allows us to chain using statements right into the middle of other functions without risking their Dispose methods not getting called. For example, imagine we wanted a function that read a name from a file and then output a string saying hello to that name:

path
.Map(File.OpenRead)
.Use(stream => new StreamReader(stream)
	.Use(reader => reader.ReadToEnd()))
.Map(x => $"Hello, {x}");

Ideally we wouldn’t have this as a single function as it does too much, but I think it serves as an example of Use.

Aligning to LINQ

Those of you familiar with LINQ should have seen the similarity between the above functions and functions like Select. This isn’t by accident and Map, Tee and Use are designed to work well in conjunction with LINQ.

There are a couple more functions needed to fully round out the functional toolkit and integrate it with LINQ, though. These are ForEach and Evaluate.

ForEach

public static IEnumerable<TInOut> ForEach(
    this IEnumerable<TInOut> @this,
    Action<TInOut> func)
    =>
    @this.Select(x => x.Tee(func));

public static IEnumerable<TInOut, TIgnored> ForEach(
    this IEnumerable<TInOut> @this,
    Func<TInOut, TIgnored> func)
    =>
    @this.Select(x => x.Tee(func));

A ForEach is often a standard extension method in projects. This one is designed to fit in with the LINQ functions and so uses Select to produce an IEnumerable without enumerating the collection.

In my experience, this does mean that this behaviour needs communicating clearly to other people on the project as some people expect it to enumerate immediately.

I find it’s also useful to have another method which performs the enumeration without returning a value, just so the intention is clear. This is the Evaluate method.

Evaluate

public static void Evaluate<T>(
    this IEnumerable<T> @this)
    =>
    @this.ToList();

As you can see, this is just a wrapper for ToList. However, it makes it clearer that the output isn’t required.

Comparison of Functions

Now we have all the functions we need (for now), we can see how they relate to each other and to existing LINQ methods.

Map operates on an element and transforms it into another by executing the given function on it. This is much like Select which applies a function to each element in a similar fashion. In fact, some people like Map to be able to operate on one or more items and basically remove Select. However, I prefer having the ability to Map a collection and operate on the entire collection and retain Select for operating on each item.

Similarly, Tee and ForEach execute a method with the current value as the parameter and then return the value.

Currying

The final topic I’ll discuss in this post is the idea of currying.

Currying is where a function which takes multiple parameters is converted into a sequence of functions which each take a single parameter and build up the result. This allows us to use structures like Map and Tee to call these multi-parameter functions.

Functional languages do this without any special syntax, but we need to add stuff to C# to get the same behaviour.

There are two approaches to this that I’m going to cover. The first one I’ll talk about now, the second one I’ll leave for a later post.

So, we’ll look at how to deal with this when we have control over the functions and so can structure them how we like. This method is OK to use when there are two or three parameters for a function but I wouldn’t recommend it beyond that as it starts to make the code difficult to comprehend.

We’ll take the Add function we used in the earlier examples. Obviously a traditional C# implementation of this would look like:

int Add(int x, int y) => x + y;

However, if we used this function as is with Map we would have to add lambdas like so:

10
.Map(x => Add(x, 1))
.Map(x => Add(x, 5));

This isn’t necessarily bad but isn’t as clean as the examples I showed above.

To get to that cleaner syntax we have to jump further into the functional world of functions being passed around like any other variable. Rather than returning an int, we’re going to return a function that accepts an int and returns an int. This turns the function into:

Func<int, int> Add(int y) => x => x + y;

Now, if you remember back to the declaration of Map, you’ll remember that it takes as an argument a function with a single parameter which is exactly what this function returns! So we can just put the call to the method directly in the Map function as shown in the examples and the second argument will be passed through.

There are also other benefits of writing functions like this. In the following example we provide a function which calculates force given mass and acceleration and then produce other functions from this which have already had acceleration provided and are waiting for mass:

void Main()
{
	var getForceOfGravityOnEarth = GetForce(GravityOnEarth);
	var getForceOfGravityOnMars = GetForce(GravityOnMars);
	var getForceOfGravityOnMoon = GetForce(GravityOnMoon);
	
	12.3
	.Map(getForceOfGravityOnEarth)
	.Tee(Console.WriteLine);
}

Func<double, double> GetForce(double mass) => acceleration =>
	mass * acceleration;

const double GravityOnEarth = 9.8;
const double GravityOnMars = 3.1;
const double GravityOnMoon = 1.6;

As mentioned, there is another was of doing this which means that functions can be written normally, but there’s probably enough involved in this that it deserves its own post.

Wrapping Up

That’s it for this part. You should be able to use the tools described to chain simple methods together to produce functional methods.

There are still things we’re missing, though. We still have no way for handling error conditions; there’s still no good way of handling async methods; and we still have no way of using currying with methods we didn’t write.

These topics will be covered in future posts and I’ll link them here once they’re written.

Making roller derby accessible for people with colour vision deficiencies

What is colour vision deficiency

Colour vision deficiency (often referred to as ‘colour-blindness’) affects a significant proportion of the population. In Europe the most common form of it affects 1 in 12 people with a single X chromosome and 1 in 200 people with two X chromosomes (https://ghr.nlm.nih.gov/condition/color-vision-deficiency#statistics).

Despite this prevalence, many aspects of society are not made accessible to colour-blind individuals.

Exactly how colour-blindness affects someone varies from individual to individual. By far the most common form is red-green colour blindness which means that the person has abnormal red or green cones in their retina. The impact this can have ranges from a person struggling to tell the difference between a reddish-brown and a greenish-brown through to a person being completely unable to see one of the colours.

Examples

Describing colour-blindness is very hard to do to someone without it. It’s incredibly hard for a person with normal colour vision to imagine not being able to do something which comes so naturally.

NOTE: Please remember that with all these examples the fact that you’re viewing it on a screen and not in real life will alter the colour display.

The example I often use when trying to describe my personal experience of colour-blindness is that I can’t play snooker. The moment the brown ball ends up amongst the reds I can’t tell where it is anymore because the colours are just too similar for me. The image below is a simulation of how I view snooker balls – it’s not perfect but I hope it will give you an idea.

Picture of a standard set of snooker balls. The image on the left shows the original colours and the picture on the right shows a simulation of viewing the balls with colour vision deficiency.

Original image by barfisch – Own work, CC BY-SA 3.0, Link

Another example is the standard tests used to diagnose colour-blindness: the Ishihara plates. In the image below, people with normal colour vision are expected to see the number 74 whereas those with red-green colour vision deficiencies are expected to see 21.

Further examples can be found at colourvisiontesting.com

Impact in roller derby

So, let’s get to the meat of this – exactly what impact does colour-blindness have in roller derby? I’m going to approach this as an official as that’s my only real experience of the sport but remember that most of these issues are likely to impact other roles connected to the sport as well.

Numbers

The biggest issue I’ve come across is the colour of people’s numbers. It is very common for skaters to choose to put red numbers on a black (or other dark colour) background. This isn’t particularly easy to see for anyone but can be problematic for those with red-cone deficiency.

Take this image below – with full colour vision it appears to contrast quite well. (Apologies to any skaters with the number 123, this isn’t picking on you I just had to choose a number).

123 in red text on a black background

Now I’ll apply a filter to simulate colour-blindness.

The above image with the red component reduced

This number is obviously a lot harder to see. Now remember that people will be trying to read this number as it moves around on a skater’s back or arm and hopefully you’ll be able to imagine how hard that can be.

Shirt colours

The other problem which I’ve come across on a few occasions is the colour of the kit worn by each team being too similar. The rules state that the teams must wear contrasting kits but the interpretation of contrasting can differ and those with full colour vision sometimes don’t consider how the kits may look to those with colour-blindness.

I’ve only ever had one kit combination where I’ve been completely unable to tell two teams apart. This was green versus grey and the players’ sweat had turned both colours into a dark greenish-grey to my eyes. Fortunately I was an OPR and this was Sur5al so I stepped out for a few jams and all was fine. However, if this had been a full length game then I would have likely had to withdraw from the crew.

The more common issue I have is where the team colours are slightly similar but different enough to be identifiable (for instance green and black). This is all fine before the game but once skaters start moving things like pack definition become very hard.

For pack definition I generally rely a lot on my peripheral vision where colour vision is worse. However, when the colours are closer I have to use my central vision more which increases the mental load of pack definition and notably reduces my ability to focus on other areas of the game.

What can be done to improve accessibility

There are a hundred tools out there for simulating colour-blindness that you might be able to use to determine if kits are sufficiently readable. However, none of them can simulate it perfectly and there’s a much easier way to be sure: luminance.

Colour-blindness impacts how hues are observed but how dark or light something is isn’t impacted. So, if two things are of a completely different brightness then they’ll always be visible regardless of colour vision.

The image below depicts a particularly hard number for me to see – red on a dark coloured background. (Again, these colours chosen for difficulty not to single out any team or skater).

Red 123 on a dark turquoise background

If we convert this to greyscale then we get the following:

The above image converted to greyscale

Now the number in this image is definitely visible, but I wouldn’t describe it as highly contrasting which is what we want. So, let’s look at a colour which could make this a lot better.

Light yellow 123 on a dark turquoise background

Whether or not yellow is a particularly aesthetically pleasing colour to go for in this case, it does make it a lot clearer and I wanted to choose a colour rather than just plain white to show that it can be something more interesting. When converting this to greyscale we get the following:

The above image converted to greyscale

This is obviously much more contrasting and could easily be seen by someone even if they had complete colour-blindness.

The other option is to use a highly contrasting border around the number. This way the desired colours can be kept but it still makes it possible for colour-deficient people to see.

Conclusion

Roller derby is a wonderfully inclusive sport but more could be done to improve accessibility for people with colour vision deficiencies whatever their role in the sport.

The simplest steps to take to ensure that the sport is accessible are for teams to ensure that their numbers have a highly contrasting luminance with the rest of their kit; and for head officials and game coordinators to ensure that the teams playing have a high luminance contrast between their kits.

Testing for luminance difference can be done by taking a photo of the kit and converting it to greyscale. Remember that some colours (green is especially bad for this) may appear bright to your eyes but are actually quite dark when converted.

Further reading