Code statistics

on 6 June 2015, latest master branches for all (RUST) repositories

bbollen@machine:~/SAFE/rust$ cloc .
     468 text files.
     276 unique files.                                          
    5361 files ignored.

http://cloc.sourceforge.net v 1.60  T=1.23 s (119.5 files/s, 22527.1 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Rust                            127           3097           3923          19657
Bourne Shell                      4             96             53            451
YAML                             11             33              4            356
Bourne Again Shell                2              6              1             24
DOS Batch                         1              0              0              8
D                                 2              4              0              4
--------------------------------------------------------------------------------
SUM:                            147           3236           3981          20500
--------------------------------------------------------------------------------

On GitHub I counted 3452 commits (since RUST refactor starting februari 2015); breakdown, no sorting on the rows:

library     commits     rust loc
-----------------------------------------
routing       1424          6908**
client         240          2499
crust          393          2702
vault          399          2117
types          310          1298
drive           12             -
sentinel       154          1943***
lru_cache       98           267
se             352          1381
msg_filter      70           235
accumulator     29           223

note: I did the counting because of an update to redecentralised’s listing of projects
**there is about 800 loc of redundant code in routing because of an ongoing refactor
***contains an archive of old sentinel code, for 1176 loc; so sentinel is currently 767 loc - remember, less is more here !

12 Likes

Nice one @BenMS I think as we step through the Technical Debt sprints these numbers will decrease quite a lot.

For the community, the intent is every 3rd sprint will be featureless and purely focussed on reducing technical debt. So this means improve code quality, the original author will review each change. This will ensure we get as close to perfect code as we can and that means reducing code as much as possible.

Rust allows a monadic approach to code (which is mathematically correct and describable) and also makes great use of generics and iterable code. So you can actual create code that is much shorter and more technically accurate. This in a great many cases means no while/do/for loops and almost zero if statements (use match and iterators instead).

This will not happen though until after the next two sprints as these are vital to get feature complete. This weeks update and roadmap will show what this and the next 2 sprints will deliver. So in 3 sprints time we move to tech debt sprints every 3rd sprint.

12 Likes

[quote=“dirvine, post:2, topic:4054”]
modaic
[/quote] monadic?

Yes :slight_smile: I will update the post, thx for the catch, it’s my special crypto signature, my typo’s are my stamp.

2 Likes