0

I'm looking to see if there is a simple heuristic for getting an approximate lines of code from a repository based upon the byte size. For example, the following url gives us 219K bytes:

{
    "Ruby": 219981
}

What do you think would be an average of bytes to LOC? I know files can be minified and it'll not be exact, but what might be a good/average ratio?

samuelbrody1249
  • 4,379
  • 1
  • 15
  • 58

1 Answers1

0

Do a statistical analysis of sample code (Python, C++, Java, shell scripts, and others) from GitHub. You're going to find an average with a huge standard deviation which will show that such an approach is probably not too meaningful.

Richard Jessop
  • 897
  • 1
  • 12
  • 19
  • ok and what were you able to find? It seems like if there's no content maybe you could just post this as a comment instead of an answer. – samuelbrody1249 Feb 23 '21 at 20:24