
Court-Martial Panel Member
Randomization Generator
How the Court-Martial Panel Member Randomization Generator Works
Application Design
The Court-Martial Panel Member Randomization Generator application is coded in such a way that panel members are assigned randomly and that only one set of assigned numbers can be generated per use without opportunity for manipulation or control.
The application was developed using the .NET 6 framework. Put simply, as names are entered into the generator, they are stored in what is called an “array item” which is essentially a list of data that keeps the branch, rank, and name of the panel member together and tracks the order that they are entered in. Once the “RANDOMIZE Panel Members” button is clicked, the application's front-end code serializes the array of panel members into a JavaScript Object Notation (JSON) string and sends that to the C# programming back-end code. From there, the back-end code takes over for the randomization process.
Number Generation Process
The random numbers are generated through the C# "Random" class, which is a two-step process. First, C# produces what is known as the “seed.” The seed is the number that is input into the algorithm to produce the random numbers. In this case, the seed is pulled from the timestamp, which in C# is produced by calculating the number of milliseconds since the Coordinated Universal Time of January 1, 1970. Therefore, no two “seeds” can ever be identical because each unique seed only exists for a single millisecond.
The seed is then fed into the algorithm which sorts the array of panel members sent from the front-end into a random order. The array of panel members is then given an assigned number in this newly randomized order. Finally, the randomized list with assigned numbers is serialized into a new JSON string, sent back to the front-end code, and displayed on the 'Results' page. The JSON string is also sent to the functions for both the unofficial Microsoft Excel Open XML Spreadsheet (.XLSX) file export and the official Portable Document Format (.PDF) file export.
Additional Safeguards
In addition to using non-duplicable seeds, there is an additional safeguards in place to ensure the integrity of the randomly assigned numbers. Numbers can only be generated once for any given set of data. Any user wishing to generate a second set of numbers for a list must first re-enter all the data, at which point the seed used in the algorithm will be different from the previous entry. Therefore, it would produce different results. Moreover, using the web browser’s “Back” button once numbers have been assigned clears all data from the table. This prevents a user from being able to quickly produce another set of assigned numbers.