ClearCommitPortland, Oregon, Brooklyn, NY

  • 159 Commits
  • 143 Pushes
  • 3 Deploys
Launch Site

ClearCommit

By ClearCommit

Screencast
Quick Intro

ClearCommit is a semantic diff tool for GitHub codebases. See changes in functions, not changes in lines.

Description

Developers use Git to store code–text designed to be understood by computers. However, Git understands nothing about code; ask it for changes and it'll only tell you about lines and files. But we don't think about lines and files–we think about classes, functions, and modules. Enter ClearCommit, semantic diff tool for codebases.

Judging Instructions

ClearCommit provides both human- and machine-readable reports. We had grand user-experience plans, but time ran short so the primary interface is artisan, handcrafted URLs =). Keep in mind also that we're at the whim of GitHub's API rate-limiter; if things don't seem to work, that's our excuse!

Summary of a code base at a commit:

For Humans (example): keming-labs.2013.nodeknockout.com/analyzed_commit/:user/:repo/:commit-sha

For Robots (example): keming-labs.2013.nodeknockout.com/api/github/analyzed_commit/:user/:repo/:commit-sha

Semantic diff between two commits:

For Humans (example): keming-labs.2013.nodeknockout.com/semantic_diff/:user1/:repo1/:commit-sha1/:user2/:repo2/:commit-sha2

For Robots (example): keming-labs.2013.nodeknockout.com/api/github/semantic_diff/:user1/:repo1/:commit-sha1/:user2/:repo2/:commit-sha2

GitHub Integration:

ClearCommit monitors @mention notifications in pull requests and commit comments. Ping @ClearCommit in one of those threads for an in-line summary of changes.

Note that if the site or mentions aren't working, it's likely because we've hit Github API rate limits. However, once a report has been successfully generated, it will always be available.

What they Used

Backend

Frontend

Update: we've published an article about the technology behind ClearCommit here. Thanks for checking us out!

Who

Votes

Your Vote

Voting is now closed.

Other Votes

  • (9)
  • judge

    Groupon

    I'd like to see a tool like this. It's a pretty useful kind of analysis to have available. Unfortunately, the only way I could find of actually using it other than studying and then manually editing the URL in the example diff. If just a bit of the time spend on the promotional website had been spent on making the tool a bit more usable (i.e. complete) it would have a big improvement.

  • judge

    I work on a commit health system for my day job. This is the missing piece!

    And vice versa: ClearCommit would be very useful if it was paired with Travis CI or another testing system. Instead of being notified of a failing build, notify about a bad commit and show this page coupled with failing test results.

    A diff between the last known good and currently failing commits is super useful for an engineer to know when her job is to fix the test.

  • judge

    sooo close, keep working on this guys!! I'll be checking back into this project.

  • judge

    While I do understand its usage, there would need to be more semantic value for there to be any real reason to use it over a standard github diff. Maybe something like this in combination with a code climate report would be sweet to see if you are losing score with the new additions. Overall it has a clean UI that is understandable, I just don't see myself using it in its current rendition.

  • judge

    Mozilla

  • judge

    clearcommit bot – great idea, would love to see this evolve more, very cool.

  • judge

    Pluralsight

    I really like this idea and would use it. A bookmarklet or Chrome extension would have been a really useful way to use this (rather than a GitHub comment bot).

  • judge
  • contestant

    Very interesting idea! Congrats for the execution!

  • contestant

    MiCloud

    very cool idea, and useful for developers. hope it can be a product.

  • contestant

    This is a great idea! It looks very usable as well.

    I just wish it was easier to pick versions. It would be great if I could associate it with a repo, then any new PR made on that repo would have a link to a report for that PR's changes posted to it as a comment.

  • judge

    Bugsnag

    This is an awesome tool, I've been wanting similar things (and more) forever! Wouldn't it be nice if two people adding a method to the same point in a file was not a merge conflict :).

    I hope you guys have time to improve this even further, but what's there already is a great start.

  • contestant

    AWSOME !

  • judge

    CratePlayer

  • contestant

    Foliotek

    Very nice.

  • contestant

    Awesome, I hate line by line diff comparison its a pain and this solves it :) sample looks to work great, love the design!

  • judge

    Brandcast

    wow. super useful. very thorough and complete.

  • contestant

    This is such a great idea! The @clearcommit bot idea is very cool. I branched my teams entry and made some tweaks and I can't wait to review my changes with them, with clear commit :)

    Hope you guys keep this project going.

    Great job!

  • contestant

    This is awesome! Great job I gave a 3 in utility because I am kind of confused on how to actually use it? (Is the only thing I would have to do is add it in a comment in github? or do I have to have it included in my project?)

    • zachallaun
      contestant

      Hi there! Unfortunately we were quite pressed for time and ended up investing in stability instead of usability at the last minute.

      Right now the way to use ClearCommit is to:

      1. Hand-craft URLs (see judging instructions for format)
      2. Ping @ClearCommit on a commit or pull request comment thread on GitHub. No "including" required :).
    • kriceTK
      contestant

      Ahh gotcha, will you continue to work on this? If so I would love to see it when completed. (I hope you guys win because this is awesome)

    • zachallaun
      contestant

      We'll definitely continue to work on it. I think all of us want to see it completed…

  • judge

    GitHub

    Wow, that's all I can say. Nice work. I'm impressed.

  • contestant

    i.tv

    This looks amazing. How did you get the semantic parsing? Is that what Acorn is for? Incredible work.

    • zachallaun
      contestant

      Thanks! Regarding parsing, I've copied my answer from an earlier question:

      The analysis pipeline basically works like this:

      1. Parse code into an AST. We used existing parsers for JavaScript and CSS, but hacked together our own for Clojure/Script.

      2. Analyze the AST and transform it into something more standardized. This is where we identify the "elements" of code – functions in the case of JavaScript and Clojure/Script, and selectors in the case of CSS. The output of this phase is the same format regardless of language.

      3. Merge the analyzed AST's into a single "analyzed commit" result. This is the end of the line if someone's just looking for analyzed commits.

      4. If someone's requested a diff, we have the much easier job of diffing two data structures: the analyzed commits. And because they have a standard structure, we get to use the same diffing code for all languages.

      The diff algorithm itself is quite simple, but thus far seems relatively effective. We identify which elements have been added and removed, and then which elements have been changed. For the elements that have been changed, we figure out which sub-components have been changed. This will ultimately be a part of a JSON object:

      {name: ["foo" "function"], params: {before: ["x", "y"], after: ["x"]}}

  • contestant

    Very good idea. Developers are lazy people and I'm pretty sure automatic commit messages could be generated easily from this report. I would really use this tool for other languages too. Good job, keep it up!

    • zachallaun
      contestant

      Thanks! That's an angle we hadn't thought of.

  • contestant

    BandPage

    As you note, not really that easy to use. BUT, pretty f'n awesome when it works. Had to reload a few test pages a few times to I guess wait for the semantic analysis to finish and get parsed into some sort of format.

    Great work! Curious how you were doing the actual semantic analysis. Is it an algorithm of your own creation, or something pre-existing but ported into this context?

    • zachallaun
      contestant

      Thanks for your interest!

      The analysis pipeline basically works like this:

      1. Parse code into an AST. We used existing parsers for JavaScript and CSS, but hacked together our own for Clojure/Script.

      2. Analyze the AST and transform it into something more standardized. This is where we identify the "elements" of code – functions in the case of JavaScript and Clojure/Script, and selectors in the case of CSS. The output of this phase is the same format regardless of language.

      3. Merge the analyzed AST's into a single "analyzed commit" result. This is the end of the line if someone's just looking for analyzed commits.

      4. If someone's requested a diff, we have the much easier job of diffing two data structures: the analyzed commits. And because they have a standard structure, we get to use the same diffing code for all languages.

      The diff algorithm itself is quite simple, but thus far seems relatively effective. We identify which elements have been added and removed, and then which elements have been changed. For the elements that have been changed, we figure out which sub-components have been changed. This will ultimately be a part of a JSON object:

      {name: ["foo" "function"], params: {before: ["x", "y"], after: ["x"]}}

    • diurnalist
      contestant

      Makes sense :)

      I agree with another commenter that this would have really good synergy with some sort of post-commit hook or notification on Github. Main reason would be if module public APIs are modified. If you're watching the project you can immediately be notified that something you've been calling has had its signature changed.

      The very non-trivial part of that is determining which parts ARE exposed on a public API, as people have so many different ways of doing that. Maybe you all can figure that out too ;)

    • zachallaun
      contestant

      Definitely! This was a planned feature, but we scrapped it in favor of making the site more stable =). (Two hours before the comp ended, it was crashing on malformed URLs.)

  • contestant

    BandPage

    Wow, the design and execution is fantastic. I'm not entirely sure what I would use this for in a practical sense, but nonetheless this provides the most clear way to know what changed at a birds eye view between commit hashes.

    • zachallaun
      contestant

      Thanks so much! There's definitely room for improvement, but we're pretty pleased with the results so far =).

  • contestant

    copyPastel

    Great tool for developers; it would be wonderful to know which functions are hotspots via this.

  • contestant

    I quite like this, it looks like you're on your way to a really nice code review tool.

    However, the UI was a bit rough and I couldn't get it to work on any of my own repos (hand changing the URL is rough.)

  • judge

    A bit more thought needs to be put into the design of this thing, but overall I could see a tool like this coming in handy.

    • zachallaun
      contestant

      Thanks for the feedback! Would you be willing to elaborate on what you'd like to see changed with the design? Are you referring to the (admittedly horrible) current UI of hand-crafting URLs, or the visual presentation? If the latter, is there a different format of presentation that you'd prefer?

    • Yeah, mainly the hand crafting URLs. Visual presentation met the bar for a hack project :)

  • judge

    Nodejitsu

    This is SO useful to module developers. I really hope you continue on with it.

    • zachallaun
      contestant

      Thanks so much! We had a lot of fun building it (though I admit that I was getting pretty stressed towards the end). I don't think any of us want to see it languish, so you should expect additional polish and improvement. =)

  • contestant

    Nice :)

IMPORTANT DATES

REGISTRATION
SEP 17
COMPETITION
NOV 9-11 UTC
JUDGING
NOV 11-17
WINNERS
NOV 18

Thank you to our Platinum Sponsors