microsoft / GazeInteractionApps
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 463 units with 5,511 lines of code in units (44.8% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (416 lines of code)
    • 75 medium size units (2,194 lines of code)
    • 90 small units (1,326 lines of code)
    • 291 very small units (1,575 lines of code)
0% | 7% | 39% | 24% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 7% | 39% | 24% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Games/Maze0% | 19% | 43% | 17% | 19%
Games/TwoZeroFourEight0% | 9% | 48% | 17% | 23%
Games/Fifteen0% | 11% | 41% | 22% | 24%
Apps/Phrasor0% | 8% | 27% | 34% | 29%
Tools/Positioning0% | 27% | 36% | 18% | 17%
Games/Memory0% | 0% | 56% | 21% | 21%
EyeGazeUserControls0% | 0% | 45% | 28% | 26%
Apps/SoundMachineJr0% | 0% | 25% | 37% | 36%
Apps/EyeVolume0% | 0% | 29% | 25% | 45%
Tools/EyeControlToolkitSettings0% | 0% | 26% | 18% | 54%
Apps/SeeSaw0% | 0% | 22% | 38% | 39%
Apps/DrawnOut0% | 0% | 26% | 34% | 38%
Tools/ControlTest0% | 0% | 14% | 16% | 69%
Apps/MinAAC0% | 0% | 31% | 20% | 47%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private int AddAdjacent()
in Games/TwoZeroFourEight/MainPage.xaml.cs
84 9 3
bool SwapBlank()
in Games/Fifteen/GamePage.xaml.cs
59 11 2
private async void OnGridButtonClick()
in Apps/Phrasor/MainPage.xaml.cs
57 9 2
private int TryMoveRunner()
in Games/Maze/GamePage.xaml.cs
55 15 2
private void UpdateEyeData()
in Tools/Positioning/MainPage.xaml.cs
55 10 4
private void BuildMaze()
in Games/Maze/GamePage.xaml.cs
54 7 0
public GamePage()
in Games/Maze/GamePage.xaml.cs
52 1 0
private void CreateDialogButtons()
in EyeGazeUserControls/GazeFilePicker.xaml.cs
50 2 0
private async void FlipCardFaceUp()
in Games/Memory/GamePage.xaml.cs
50 3 1
private void GazeInputSourcePreview_GazeMoved()
in Tools/Positioning/MainPage.xaml.cs
50 9 2
async void ResetBoard()
in Games/Memory/GamePage.xaml.cs
48 6 0
private void OnSolutionTimerTick()
in Games/Maze/GamePage.xaml.cs
47 9 2
private void OnFlashTimerTick()
in Games/Memory/GamePage.xaml.cs
45 2 2
private void OnHelpNavRight()
in Games/TwoZeroFourEight/MainPage.xaml.cs
44 7 2
private void OnHelpNavLeft()
in Games/TwoZeroFourEight/MainPage.xaml.cs
44 7 2
void ResetBoard()
in Games/Fifteen/GamePage.xaml.cs
43 10 0
void SetMasterVolumeLevel()
in Apps/EyeVolume/WinVolume.cs
42 1 1
private async void OnKeyboardButtonClick()
in EyeGazeUserControls/GazeKeyboard.xaml.cs
40 7 2
void InitializeButtonArray()
in Games/Fifteen/GamePage.xaml.cs
39 6 0
private void OnHelpNavRight()
in Games/Fifteen/MainPage.xaml.cs
36 6 2