It's definitely fun to mess around with. Nicely, done!
Quick question: why do repo and gist counts cap at 100? I haven't looked at Github's API myself yet, so there might be a technical limitation here that I'm unaware of.
Yeah, there are a lot of technical limitations that we had to work around. Mainly, everything is paginated with a max per_page of 100. We decided to only analyze the 100 most recent gists and repos to not have to worry about that.
For commits, however, we couldn't not analyze them, so we do a ton of processing. Basically, we loop over every one of your repos and loop over all of the pages of commits for that repo. For big repos (i.e. Facebook), that means we end up doing 100s of async API requests...it gets pretty intense.
It makes sense that you're analyzing only the first 100, but it would probably be cool to add the raw quantities of these things as a metric. Perhaps they shouldn't count towards the score, but it would be cool to display them, and the info's readily available from https://api.github.com/users/:uname
I said it below, but the big chunk of "processing" is looking at all of the commits for all of your repos. There's no good way to access this data, so we essentially loop over all of your repos and than for each repo loop over all the pages of commits--a lot of API requests.
Unlocking the secret of life, apparently. At least, that's what it says it's doing now, after complaining that nobody else had got this far. It's been about 5 minutes...
...maybe it would have been wise to start with a table of existing entries that could be resolved quickly. I don't use Git and couldn't think of any accounts off the top of my head, so I just set 'abc' against 'xyz' on the theory that those usernames were likely to exist. UPDATE: I'm getting the behavior with Obama v Romney and indeed Jesse P v Remy G. Maybe the server's just overloaded...
Failed to load resource https://platform.twitter.com/widgets.js
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:236
chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:236
Uncaught ReferenceError: twttr is not defined app.js:190
Not sure if it can handle big repos very well, I just threw in Twitter vs Facebook for fun and I got stuck with the "secret of life" message. But it's pretty neat! :)
Yeah, we loop over every page of commits for every repo for each user, so it takes a little while...that being said, if you wait it's pretty cool to see. Twitter is ~90 and Facebook is ~80.
I reached out to Github to see if there was a better way to do this, but they said there wasn't, unfortunately.
In the code, if you look, I actually extend that rate limit to 5000 by using authenticated requests (on the client side, I know, this is "dangerous"). The problem is that it just takes a long long time, lots of request (~400 for Facebook alone), which gradually slow down as the browser gets overloaded.
Awesome to see the quick turn around on your repo, though I haven't seen it deployed yet. It looks like you are using Heroku to deploy, have you not deployed yet or do I need to refresh my client-side resources?
I think you should weight the number of stars per repo higher. I think I am winning on number of repos and number of gists, but I think the user I'm battling beat me. Quality > Quantity.
Thanks for this. I ran into a lucky coincidence: my GitHub account is exactly 1000 days old. It's surprising that I've been using GitHub for almost 10% of my life. (I'm 10,095 days old, so it'll be exactly 10% the week after next.)
(incidentally, there appears to be a UI bug where it lists some repos multiple times - at the end the list looked like puppet/chef/puppet/chef/puppet/chef )
I've been thinking about a similar hack for awhile, but my idea was to measure/compare code cleanliness (in the agile sense of the word) and expressiveness between two chunks of code written by two different developers, in the same programming language and with the same number of SLOC.
I believe something like this to be a much more reliable metric of code quality than commits per day and what have you.
If someone else has already done this, I'd be fascinated to take a look at how you measure those things. The problem would require a non-trivial amount of AI.
Neat! It'd be really cool to see the top-scorer in an organization.
Trying to compute the score of tobytripp (a coworker) leaves me at the secret of life with both "Error in event handler for 'undefined': Cannot read property 'qrstr' of undefined TypeError: Cannot read property 'qrstr' of undefined
" and "Uncaught SyntaxError: Unexpected token ILLEGAL" in my console.
44 comments
[ 3.1 ms ] story [ 100 ms ] threadFor commits, however, we couldn't not analyze them, so we do a ton of processing. Basically, we loop over every one of your repos and loop over all of the pages of commits for that repo. For big repos (i.e. Facebook), that means we end up doing 100s of async API requests...it gets pretty intense.
...maybe it would have been wise to start with a table of existing entries that could be resolved quickly. I don't use Git and couldn't think of any accounts off the top of my head, so I just set 'abc' against 'xyz' on the theory that those usernames were likely to exist. UPDATE: I'm getting the behavior with Obama v Romney and indeed Jesse P v Remy G. Maybe the server's just overloaded...
EDIT: My cookie-blocking plugin apparently was blocking something critical.
I reached out to Github to see if there was a better way to do this, but they said there wasn't, unfortunately.
http://gitbattle.com?u1=twitter&u2=mozilla
the error message is:
{ "message": "API Rate Limit Exceeded for 112.199.99.5" }
I should have opened a pull request for you!
Awesome to see the quick turn around on your repo, though I haven't seen it deployed yet. It looks like you are using Heroku to deploy, have you not deployed yet or do I need to refresh my client-side resources?
http://www.gitbattle.com/?u1=puppetlabs&u2=opscode
(incidentally, there appears to be a UI bug where it lists some repos multiple times - at the end the list looked like puppet/chef/puppet/chef/puppet/chef )
I believe something like this to be a much more reliable metric of code quality than commits per day and what have you.
If someone else has already done this, I'd be fascinated to take a look at how you measure those things. The problem would require a non-trivial amount of AI.