2,233 karma · joined December 23, 2013
I build developer tools at Sourcegraph: https://sourcegraph.com
Would love to hear people's thoughts and feedback!
Long term vision is to get rid of the "my editor X doesn't support language Y" problem as well as build a lot of other multi-language analysis tools on top of it. Shameless plug: if you care about developer productivity, join us!
The currently supported languages are Go, Java, Python, JavaScript, and Ruby, so this wouldn't work yet for iOS, but Objective-C and Swift are high on our priority list. Editor plugins exist for Emacs, Sublime, and Atom. Would love to hear anyone's feedback from trying it out.
Because Sourcegraph understands the code at a semantic level, we can tie comments to a specific function/class/module and show the discussion history even as the specific lines of code change over time. Right now, we do comments for code reviews, but want to add this for any existing version of the code. I'm one of the creators of Sourcegraph and would love to hear any feedback/suggestions the HN community has to offer!
See this, for example: https://sourcegraph.com/github.com/gorilla/mux/.godoc
See also https://srclib.org/, a library with similar goals to Kythe supporting a different set of initial languages (including JavaScript, Python, Ruby, Java, Haskell, and Go) with editor plugin support for Emacs, Sublime, and Atom. (Disclaimer: I'm one of the authors.) The dynamic languages, and JavaScript in particular, are hard to support well. Libraries like tern.js make it doable, but life would be much easier with stronger static guarantees from the language itself. For now, it's a very hard problem, but there is so much to gain from Intellisense-level tooling around JS.
If there's a lot of custom logic, then it might be better to write an ad hoc tool that checks the AST of the Java against the AST of the C#. srclib and I think also Kythe are designed for building tools that want to be language-agnostic, rather than digging into specific language behavior.
For those interested in code analysis and dev tools, another library you might want to check out is srclib (I'm one of the authors). srclib is an open-source polyglot code analysis library designed for editors and code explorers. Its mission, supporting a common language-independent schema to support building better language-aware tools, is closely aligned with Kythe's. There's documentation and a succinct description of the problem we're trying to solve at https://srclib.org.
srclib currently supports Go, Java, Python, JavaScript, Ruby, Haskell, and soon PHP. There's a simple command line API that editor plugins can call, and currently there are srclib plugins for Emacs, Sublime, and Atom. srclib also powers https://sourcegraph.com.
I'm looking forward to seeing where Kythe goes and hopefully integrating Kythe and srclib. I think this is a huge step forward toward better tools for programmers. Just ask anyone who works/used to work at Google about the quality of their internal dev tools vs. the outside world. Thanks to the Kythe team for sharing this with the world!
If you want to get an idea of our site architecture, you can check out https://sourcegraph.com/github.com/sourcegraph/thesrc. (It's a link aggregation site (thesrc.org) that pulls from HN, Reddit, and a few other places and only displays links with programming-related content.) We made it to share some patterns we found useful for building a web app in Go, and the interfaces and structure mirror how Sourcegraph.com is designed. There's also a talk here if you're interested: http://www.youtube.com/watch?v=7zYXhhrRn2E.
In our experience, unit tests are useful because they run quickly (so you can run them literally every time a file changes), and let you much more quickly figure out the root cause of a failure. To us, the ability to run tests in a few seconds vs over a minute is important, because we want the dev feedback loop to be as immediate as possible. Just as we would hate waiting on slow compile times, we also hate waiting on slow tests.
That having been said, we also run comprehensive end-to-end tests before pushing changes to the site to ensure everything works properly. We think both are important to ensuring site quality and keeping the dev cycle efficient.
(note: I'm one of the creators of Sourcegraph, would love to hear any feedback!)
We are a team of 4 in San Francisco building a better way to search and explore code. Sourcegraph indexes 100,000s of open source libraries. It lets you browse fully linked code, see live usage examples of how other projects and people are using a given function, and quickly find documentation. Check it out for yourself at https://sourcegraph.com.
We're looking for programmers who are passionate about open source and who can jump into any part of our codebase and make a strong contribution to our product.
As a member of our team, you will engage with users, design and implement new functionality (front-end, back-end, language analysis), help drive product direction, contribute to open-source libraries, and evangelize our product and mission.
Come help us improve the state of our own craft and make code more accessible and open. Shoot us an email at hiring@sourcegraph.com with your resume and background.
We've been working on another code search engine for open-source: https://sourcegraph.com/. Our approach is a little different -- we parse and index things at a programming language level. This has the benefit of being able to list usage examples of a function or jump to a definition (i.e., smart IDE-like behavior). Obviously, one drawback is having to implement language-specific support; right now Sourcegraph just supports Python, Javascript (node.js) and Go.
Would love to hear people's feedback on either approach!
For other examples of code search, check out: Ohloh: http://www.ohloh.net/, Krugle: http://opensearch.krugle.org/, and Google code search (or what remains of it) https://code.google.com/p/chromium/codesearch
Sometimes the documentation tells you exactly what you need. Sometimes you want an at-a-glance example. And sometimes you might want to dive into the source to figure out what's going on. Whatever it is you're doing to understand a piece of code, we want to make it as easy as possible.
assert is commonly used as a function, but in this case, it turns out to be a module as well. You can see this by clicking on that module link; you'll go to a page that shows assert.js and see that module.exports is assigned to the ok function (which you can click on to jump to its definition). Other attributes are also defined on module.exports, however, so you can see that you can not only do "assert(condition, message)" but also "assert.equal(condition, message)", "assert.notEqual(condition, message)", "assert.deepEqual(condition, message)", etc.
You're right, auto-generating docs is not easy! Javascript turns out to be one of the toughest languages to do this for, and we have a long way to go. The properties tab doesn't seem very useful on that page. We're pushing a new change to the UI that will hopefully make this page clearer and more useful in the near future. Please send any more feedback our way!
I think a key to documentation that is both easy to understand and easy to maintain is to have good usage examples of the code. They are a very straightforward and concise way of conveying both 1) what something does and 2) how to use it. I like to say, "the right usage example can be worth 1000 words of documentation."
Check out https://sourcegraph.com (disclaimer: I am one of the creators). It parses/analyzes the code to identify function calls, type references, etc., and uses that to show you how a piece of code is used. Currently supports Python, node.js, Go, and Ruby. Would love to hear anyone's feedback!
https://github.com/paypal/gatt
A writeup of their talk at GopherCon: http://gophercon.sourcegraph.com/post/83731231041/bluetooth-...
http://gophercon.sourcegraph.com/post/83843443678/gobot-go-p...