<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Beyang Liu on Medium]]></title>
        <description><![CDATA[Stories by Beyang Liu on Medium]]></description>
        <link>https://medium.com/@beyang?source=rss-83b2d1ae7363------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qOLNzPA-PI9Dj-Yc.jpeg</url>
            <title>Stories by Beyang Liu on Medium</title>
            <link>https://medium.com/@beyang?source=rss-83b2d1ae7363------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 20:14:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@beyang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Sourcegraph, Code Intelligence, and the Language Server Protocol]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/sourcegraph-code-intelligence-and-the-language-server-protocol-f2479fdd92ef?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2479fdd92ef</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[eclipse]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 10 May 2017 00:12:25 GMT</pubDate>
            <atom:updated>2017-05-15T18:25:00.834Z</atom:updated>
            <content:encoded><![CDATA[<p>Pick your favorite Java repository and a revision and file at random (or <a href="https://sourcegraph.com/github.com/apache/commons-io@70b9170cac5a47f6d55cdced51e94ac9a8fec28a/-/blob/src/main/java/org/apache/commons/io/IOUtils.java#L99:18">try this one</a>). Visit that file in <a href="https://sourcegraph.com/">Sourcegraph</a> and within seconds, you can jump to definition (Ctrl/⌘-click), find all references (right click), search for symbols (Ctrl/⌘-p), and view usage examples drawn from other projects.</p><p>How does the magic work? A big part of it is a new open standard called the <strong>Language Server Protocol</strong> (LSP). We think LSP will benefit almost every code editor and plugin, and we’d like to explain why with examples of how Sourcegraph has used it to scale to millions of repositories across many different languages.</p><figure><a href="https://sourcegraph.com/github.com/junit-team/junit4@d07ed0bf79efd81c260f327854a02097f59fffb2/-/blob/src/main/java/org/junit/Test.java#L66:20"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LOyxNByJZg-9xdHVQWotbw.png" /></a><figcaption>Instant Code Intelligence on Sourcegraph</figcaption></figure><h3>Code Intelligence</h3><p>Jump-to-definition, find references, and symbol search are crucial tools for the everyday tasks of understanding and working with code. Their importance is obvious to users of IDEs like the Eclipse IDE, and there’s a constant effort to build plugins that provide these features for more and more languages.</p><p>The <a href="https://github.com/Microsoft/language-server-protocol">Language Server Protocol</a>, originally released by Microsoft, is an open standard that makes it much easier to write editor plugins that work across many languages. And beyond the code in your editor, it has enabled Sourcegraph to bring such features to all the other places programmers view code, including your <a href="https://sourcegraph.com/github.com/junit-team/junit4@d07ed0bf79efd81c260f327854a02097f59fffb2/-/blob/src/main/java/org/junit/Test.java#L66:20">web browser</a>, <a href="https://chrome.google.com/webstore/detail/sourcegraph-for-github/dgjhfomjieaadpoljlnidmbgkdffpack?hl=en">code review tool</a>, and <a href="https://text.sourcegraph.com/introducing-code-search-in-sourcegraph-5944a3b75df7">code search</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*dfLDwCJbsrLWI63Q." /><figcaption>An example of the protocol in use, from the <a href="https://github.com/Microsoft/language-server-protocol/blob/master/README.md">README</a>.</figcaption></figure><p>Sourcegraph is designed to be a quick, frictionless way to make sense of code. It’s faster than OpenGrok and as smart as your IDE when it comes to things like finding all references to a symbol. Underneath the hood is a complex system that parses and analyzes source code on the fly to provide underlying capabilities that we call <strong>Code Intelligence</strong>. “Code Intelligence” is just shorthand for language-aware productivity boosters like:</p><ul><li>Jump to definition</li><li>Find references</li><li>Symbol search</li><li>Hover tooltips</li><li>Autocomplete</li></ul><p>But such features have existed in tools like the Eclipse platform for decades. Why the need now for a new open standard? The reason has to do with tractability.</p><h3>O(M·N) problem</h3><p>IDEs like the Eclipse IDE are complex systems that often support Code Intelligence on a certain set of languages. Sourcegraph aims to support every language. LSP makes both these undertakings far more tractable.</p><p>Historically, the problem of supporting multiple languages in multiple editors has been O(M·N). You have M editors (Eclipse IDE, VS Code, Sublime, Atom, Emacs, Vim, etc.) and N languages (Java, JavaScript, Go, TypeScript, Python, etc.). Historically, you need a separate Code Intelligence plugin for each combination of editor and language. Such plugins are expensive to write — you have to understand compiler internals <em>and</em> integrate with different build systems <em>and</em> figure out UI subtleties. As a result, you end up in a world in which there are far fewer than M·N plugins — a world in which your choice of language severely constrains your choice of editor and vice versa. In the perfect world, you should be able to stick with your editor of choice no matter what language you work in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*deSfeuQZchkOAbI5v7KKCg.png" /><figcaption>O(M·N) problem</figcaption></figure><p>Defining a clear protocol between the language analyzer and the code viewer/editor is crucial. Separating these concerns means no language-specific code at the application layer. The folks working on the frontend can focus on user experience without worrying about language semantics. The folks working on language analysis have a clear interface and don’t have to worry about the mechanics of the frontend.</p><p>LSP defines such a protocol that sits between editor plugins and the underlying analysis libraries. You build one language server for each language and one plugin for each editor. Each editor plugin that speaks LSP will now have support for every single language server. You’ve reduced a O(M·N) problem to a O(M+N) problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*ws2LYhzfuHpEimlb9-knWQ.png" /><figcaption>O(M + N)</figcaption></figure><p>The theory translates well into practice. Currently, <a href="http://langserver.org/">there is a LSP implementation for almost every major programming language</a>. And that means if your editor plugin speaks LSP, you have access to Code Intelligence across many languages all without having to write a single line of parsing or type-checking code.</p><h3>Just-in-time and good enough</h3><p>Another key feature of LSP is the lack of a strict model for code structure. The protocol has no notion of namespaces, class hierarchies, definitions, or references. How does one represent “jump to definition” with no notion of a definition? In the case of LSP, the input is merely the location of the reference (a filename, line number, and column) and the output is the location of the definition (also a filename, line number, and column).</p><p>LSP does not attempt to model the semantic relationships in code at all. But if we are trying to build Code Intelligence, shouldn’t our protocol be aware of at least the basic semantic relationships in code? Surprisingly, the answer is “no” for two reasons:</p><ol><li>Coming up with a language-agnostic data model is hard. Some languages are imperative. Others are functional. Some languages permit complex class hierarchies. Other languages don’t even have inheritance. Coming up with a data model that is both general enough to cover every language feature in the wild and specific enough to be useful for answering user queries is very tricky.</li><li>As the old saying goes, there are only two hard things in Computer Science, and one of them is naming things. (The other one is cache invalidation, which is another fun topic for us at Sourcegraph, but that’s for another article.) Naming is hard and naming in code is no exception. As an exercise, try coming up with a truly unique universal identifier for a symbol in code. “Universal” in this case means across all the code in the world, not just your local disk, because we no longer live in a world where the code on your disk is the only code that matters. LSP solves the problem by bypassing it completely.</li></ol><p>None of this precludes building a semantic data model on top of LSP. In fact, at Sourcegraph, we’ve done exactly that for more advanced features. But all of that is possible because we build on top of a layer that does not make premature oversimplifications about the code.</p><h3>Extensibility</h3><p>The last feature of LSP that I’ll mention in this post is extensibility. The creators of LSP foresaw that in the future, people would desire new functionality from language servers beyond what was defined in the original spec. Sourcegraph needs to support features like cross-repository jump-to-definition and global usage examples that no editor or IDE currently offers.</p><p>The primitive capabilities we require to support these features also happen to be useful to editor plugins in many cases. To that end, we’ve <a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-chache.md">extended</a> <a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-files.md">the</a> <a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-workspace-references.md">protocol</a>. It’s easy to add new functionality to LSP. Indeed, there is a vibrant, open-source community that continues to contribute changes to the protocol while maintaining backwards compatibility with existing LSP plugins.</p><h3>Code Intelligence for every language, every editor, and everywhere you view code</h3><p>I’d love to live in a world where it’s as easy to use the Eclipse IDE to write Python or JavaScript as it is to write Java. I’d also love a world where exploring code in any language with IDE-like superpowers was as easy as sharing <a href="https://sourcegraph.com/github.com/junit-team/junit4@d07ed0bf79efd81c260f327854a02097f59fffb2/-/blob/src/main/java/org/junit/Test.java#L66:22">this hyperlink</a>.</p><p>We think the Language Server Protocol will enable both these dreams to become reality. Code Intelligence is what makes the experience of using your IDE magical, and LSP makes that magic far more tractable to implement. We’ve used it to great success so far at <a href="https://sourcegraph.com/">Sourcegraph</a> and we’d highly encourage you to check it out for your IDE and editor plugins.</p><p>Questions, comments, or feedback about Sourcegraph or LSP? <a href="https://twitter.com/srcgraph">Let us know</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2479fdd92ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/sourcegraph-code-intelligence-and-the-language-server-protocol-f2479fdd92ef">Sourcegraph, Code Intelligence, and the Language Server Protocol</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code Intelligence for Java now available on Sourcegraph]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/code-intelligence-for-java-now-available-on-sourcegraph-5bcb149f177?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bcb149f177</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Tue, 11 Apr 2017 20:36:58 GMT</pubDate>
            <atom:updated>2017-04-11T23:09:06.939Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we announce general availability for Java on Sourcegraph. If you write Java, this means that you can now use Sourcegraph to:</p><ul><li>Explore code without losing your place in your editor</li><li>Get IDE-like functionality to your code review tool</li><li>Learn from usage examples drawn from across the open-source world</li><li>Have more efficient code discussions by linking directly to the code in question</li><li>Make every piece of code easily searchable and accessible for every member of your team</li></ul><p>Every feature mentioned in this post is available now for Java on Sourcegraph.com and Sourcegraph Enterprise. Scroll down for the detailed feature list.</p><figure><a href="https://sourcegraph.com/github.com/Sberned/kafka-logback@582266a6ad00fd878315f4f3ff983900f04e7c1f/-/blob/src/test/java/ru/sberned/kafkalogback/KafkaAppenderTest.java#L115:28-115:38"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rSP9kiAtj1vksGMCKFb8BQ.png" /></a><figcaption>Seamless, zero-config code exploration in your web browser. An easy-to-use HUD for code understanding.</figcaption></figure><h3>Detailed feature list</h3><p>(Refer to the screenshot above)</p><ol><li>Documentation tooltips</li><li>Jump to definition</li><li>Find references</li><li>External usage examples</li><li>Symbol search</li><li>Text search</li><li>Authorship (Git blame)</li></ol><h4>Performance</h4><p>Sourcegraph works within seconds on any revision of code and scales to large repositories. It even works for newly pushed revisions such as those submitted for code review.</p><figure><a href="https://chrome.google.com/webstore/detail/sourcegraph-for-github/dgjhfomjieaadpoljlnidmbgkdffpack?hl=en"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qgqyqzpJlLKgacUx-5QGwA.png" /></a><figcaption>Sourcegraph integrates with code review tools like GitHub pull requests.</figcaption></figure><h4>Code review integration</h4><p>Sourcegraph integrates with code review tools including:</p><ul><li>GitHub pull requests (GitHub.com, GitHub Enterprise)</li><li>Phabricator (Enterprise-only)</li></ul><p>If your favorite code review tool is not yet supported, please let us know!</p><h4>Have more fruitful conversations around code</h4><p>Because Sourcegraph is just a web app, you can link to any location in your codebase. Our users have found this useful as a starting point for <strong>code discussions</strong>. Sharing a link is easy and doesn’t require the person on the other end to go through the annoying exercise of opening up a new editor or stashing their work-in-progress changes to check out your branch.</p><p>This addresses a critical communication bottleneck in software development and makes it easier to disseminate knowledge across your team. (Hint hint: if you want to give the management a good reason to try Sourcegraph, we’ve found “addresses a critical communication bottleneck” and “disseminate knowledge across our team” to be persuasive lines). Here’s how it looks in action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Pz64YShQ4WJlEevH6H_Pw.png" /><figcaption>Using Sourcegraph, I was easily able to identify the author of a piece of code and start a conversation in chat by linking him directly to the code in question.</figcaption></figure><h4>Link together your team’s code</h4><p>Do you rely heavily on open-source libraries? Or does your team have multiple microservices versioned in separate repositories? Sourcegraph lets you trace state changes and control flow logic across repository boundaries:</p><figure><a href="https://sourcegraph.com/github.com/Sberned/kafka-logback@582266a6ad00fd878315f4f3ff983900f04e7c1f/-/blob/src/test/java/ru/sberned/kafkalogback/KafkaAppenderTest.java#L118:21-118:29"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*utBisaCtaS1qtRPtHwtXpw.png" /></a><figcaption>Sourcegraph’s jump-to-definition works even if the definition is in a separate repository or an open-source library. Because it’s all on the web, there’s no need to check out code to your local machine.</figcaption></figure><h4>Supported Java project types</h4><p>Sourcegraph now supports the following types of Java repositories:</p><ul><li>Projects built with <strong>Maven</strong></li><li>Projects built with <strong>Gradle</strong></li><li><strong>Android</strong> applications and libraries</li><li>Any combination of the above</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wWLDvGcSf4L6huAxbPYQcw.png" /></figure><p>We offer support for additional build systems to enterprise customers. Please email hi@sourcegraph.com for more info.</p><p><strong>Programmer’s note:</strong> we support the common case for the build systems above, but now and then we encounter a corner case that isn’t yet supported. If you try out Sourcegraph on your repository and find jump-to-definition or hover tooltips do not work, please let us know via the “Feedback” button at the bottom of the screen. We are incredibly responsive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/129/1*eDAtE4xe-dQ24UqMqoiVeg.png" /></figure><h3>Try it out now</h3><p>See Sourcegraph in action now on some popular open-source Java projects:</p><ul><li><a href="https://sourcegraph.com/github.com/mockito/mockito@ccd5e85a0c60e7f3ae10ac86db1e5110966e9d41/-/blob/src/main/java/org/mockito/stubbing/OngoingStubbing.java#L48:24-48:34">Mockito</a></li><li><a href="https://sourcegraph.com/github.com/JakeWharton/butterknife@acf8957801c66d4aaa75084fc0c5c28ba84d3918/-/blob/butterknife-compiler/src/main/java/butterknife/compiler/ButterKnifeProcessor.java#L143:17-143:25">Butter Knife</a></li><li><a href="https://sourcegraph.com/github.com/square/okhttp@2fa94d3f356a7a9e33456bac4ab345ebef9ae346/-/blob/okhttp/src/main/java/okhttp3/Request.java#L27:20-27:27">OkHttp</a></li><li><a href="https://sourcegraph.com/github.com/nostra13/Android-Universal-Image-Loader@4c728792d73e964f6d8501f742cda57dd56731c6/-/blob/library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java#L49:14-49:25">Android Universal Image Loader</a></li><li><a href="https://sourcegraph.com/github.com/dropwizard/dropwizard@04490cb148003b011efe5fa045e9af2811b8a764/-/blob/dropwizard-core/src/main/java/io/dropwizard/Application.java#L24:23-24:34">Dropwizard</a></li></ul><p>Or you can test it out on your <a href="https://sourcegraph.com/pricing">private repositories on GitHub.com</a>. We also do <a href="https://sourcegraph.com/pricing">on-premises deployments for enterprise software teams</a>. Contact us for more info!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bcb149f177" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/code-intelligence-for-java-now-available-on-sourcegraph-5bcb149f177">Code Intelligence for Java now available on Sourcegraph</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[See how many people use a Java library, with Sourcegraph badges]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/see-how-many-people-use-a-java-library-with-sourcegraph-badges-e8f639c2c1ed?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f639c2c1ed</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 08 Mar 2017 16:40:07 GMT</pubDate>
            <atom:updated>2017-04-11T21:59:48.275Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re excited to announce that <strong>Sourcegraph “used by” badges </strong>now support Java libraries. If you’re an open-source author, these badges tell you how many other projects depend on your work. If you’re an open-source user, the badges help you make an informed decision based on how many others are actually using and relying on a library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*d3pUuXjGPHqmW_Sz69Y19A.png" /></figure><figure><a href="https://sourcegraph.com/github.com/junit-team/junit@cebbf5e15725b4dc247ac0557f6fa63f475b15af/-/blob/src/main/java/org/junit/Test.java#L66:19-66:23"><img alt="" src="https://cdn-images-1.medium.com/max/784/1*1dziZxK--_T9DmzYdGIIIA.png" /></a><figcaption>JUnit is used by over 6 thousand open-source projects.</figcaption></figure><p>Our badges pull dependency information from the same global code graph that helps you make sense of code on <a href="https://sourcegraph.com/">Sourcegraph.com</a>. Code is data, and we’re on a mission to make that data useful to programmers everywhere.</p><h3>How to add the badge</h3><p>Copy the following snippet to your README.md and replace “github.com/junit-team/junit4” with the name of your repository:</p><pre>[![Sourcegraph]<br>(https://sourcegraph.com/github.com/junit-team/junit4/-/badge.svg)](https://sourcegraph.com/github.com/junit-team/junit4?badge)</pre><p>Customize the look and feel of your badge with 3 different styles by tacking any of these onto the badge.svg URL:</p><ul><li>?style=plastic</li><li>?style=flat</li><li>?style=flat-square</li></ul><p>Here are just a few of the popular open-source repositories that already use the badge:</p><ul><li><a href="https://github.com/gorilla/mux#readme">gorilla/mux</a>, URL router and dispatcher for Go: used by 3,000+ projects</li><li><a href="https://github.com/gogits/gogs#readme">Gogs</a>, a self-hosted Git service: used by 1,000+ projects</li><li><a href="https://github.com/blevesearch/bleve#readme">bleve</a>, a modern text indexer: used by 657 projects</li><li><a href="https://github.com/go-kit/kit#readme">Go kit</a>, a toolkit for microservices: used by 509 projects</li><li><a href="https://github.com/mholt/caddy#readme">Caddy webserver</a>: used by 237 projects</li></ul><p>How many people rely on your open-source code? Find out now by pasting the Markdown snippet into your README. Here it is again:</p><pre>[![Sourcegraph]<br>(https://sourcegraph.com/github.com/junit-team/junit4/-/badge.svg)](https://sourcegraph.com/github.com/junit-team/junit4?badge)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f639c2c1ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/see-how-many-people-use-a-java-library-with-sourcegraph-badges-e8f639c2c1ed">See how many people use a Java library, with Sourcegraph badges</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2: How Sourcegraph scales with the Language Server Protocol]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/part-2-how-sourcegraph-scales-with-the-language-server-protocol-73b86175f38b?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/73b86175f38b</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 22 Feb 2017 18:29:58 GMT</pubDate>
            <atom:updated>2017-02-22T18:33:44.687Z</atom:updated>
            <content:encoded><![CDATA[<h4>Making Code Intelligence “just work”</h4><p>In <a href="https://text.sourcegraph.com/how-sourcegraph-scales-with-the-language-server-protocol-a4e8fd3fbae5">my last post</a>, I introduced the Language Server Protocol as the open-source protocol that we at Sourcegraph believe will enable a new set of developer tools powered by <strong>Code Intelligence</strong>. Code Intelligence, if you recall, is just shorthand for</p><ul><li>jump-to-def</li><li>find-references</li><li>symbol-search</li><li>docstring tooltips</li><li>autocomplete</li><li>and more</li></ul><p>Or, more pedantically,</p><blockquote><strong>Code Intelligence</strong> is the set of auto-navigation and auto-generation primitives that use a semantic understanding of code to enable a human programmer to efficiently read and write source code.<br><em>(See the </em><a href="https://text.sourcegraph.com/how-sourcegraph-scales-with-the-language-server-protocol-a4e8fd3fbae5"><em>previous post</em></a><em> for a breakdown of this definition.)</em></blockquote><p>The Language Server Protocol was created by Microsoft to make Code Intelligence available for <em>every</em> language in <em>every</em> editor. Because Sourcegraph puts many of the abilities of editor plugins and IDEs into a browser-based app, LSP fits nicely into our technology stack. But Sourcegraph also differs from editors in some critical ways. Our goal is to make Code Intelligence available across <a href="https://sourcegraph.com/github.com/gorilla/mux@94e7d24fd285520f3d12ae998f7fdd6b5393d453/-/blob/mux.go#L17:19-17:25">many</a> <a href="https://sourcegraph.com/github.com/gorilla/mux@392c28fe23e1c45ddba891b0320b3b5df220beea/-/blob/mux.go#L17:19-17:25">different</a> <a href="https://sourcegraph.com/github.com/gorilla/mux@cafdb65e9ebf0275ed34de6b54f316e440a756bb/-/blob/mux.go#L17:19-17:25">versions</a> <a href="https://sourcegraph.com/github.com/gorilla/mux@b12896167c61cb7a17ee5f15c2ba0729d78793db/-/blob/mux.go#L17:19-17:25">of</a> <a href="https://sourcegraph.com/github.com/gorilla/mux@293ebe14936bf5aa585139c72ea2f28d4164f984/-/blob/mux.go#L17:19-17:25">code</a> (note the different commit hashes in those links), in many different settings both inside and <a href="https://chrome.google.com/webstore/detail/sourcegraph-for-github/dgjhfomjieaadpoljlnidmbgkdffpack">outside your editor</a>, and across a global view of code rather than just the code on your dev machine.</p><figure><a href="https://sourcegraph.com/github.com/gorilla/mux@392c28fe23e1c45ddba891b0320b3b5df220beea/-/blob/mux.go#L17:19-17:25"><img alt="" src="https://cdn-images-1.medium.com/max/709/1*t1ZtJ6Y5pxV-SbZ3_X0Imw.png" /></a><figcaption>Global usage examples, one of the advanced Code Intelligence features that only Sourcegraph provides.</figcaption></figure><p>To that end, we need capabilities that the original LSP spec does not describe. Luckily, the original authors of LSP foresaw the need for the unforeseen and made the protocol easy to extend while preserving backwards compatibility.</p><p>Though we were driven by our own use case, we also realized that some of the extensions we made to the protocol would be broadly useful to other dev tool creators. Here are two ways in which we extended LSP that we think will be useful to others.</p><h3>On-demand file fetching decoupled from the filesystem</h3><p>Traditionally, Code Intelligence has been found only in IDEs and editor plugins. Because editors only deal with code on a developer’s local machine, editor plugins typically interact directly with the filesystem to fetch the file contents necessary to provide abilities like “jump to definition” and “find references.” You’ll notice that many IDEs and plugins take a couple of seconds (sometimes more) to warm up, during which they display a message like “Updating indices.” What’s happening underneath the hood is that they’re re-reading file contents from disk, running them through a compiler-like analysis process, and extracting the information necessary to support Code Intelligence operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*0N0Yb0m3aZ5lxrzPCK7plg.png" /><figcaption>An excuse to go make yourself some coffee.</figcaption></figure><p>It’s bad enough having to wait for your IDE to boot up on the single revision of code checked out on your local machine. But users of Sourcegraph explore code in many different repositories and commits. Because Sourcegraph lets you jump to definitions and references in other repositories, each click could take you to a new codebase and, if we took the naive approach of “Updating indices,” you’d have to wait awhile before you could continue exploring. Friction points like these spell the death of productivity, so we figured out how to do away with “Updating indices” altogether to create a developer user experience that feels instant.</p><p>To make this possible, we added an on-demand file fetching extension to LSP. Recall that in LSP, there is a strict separation of editor frontend and language analysis. The language analysis backend is composed of programs called language servers, which expose endpoints like textDocument/definition that map to Code Intelligence abilities like “jump to definition.”</p><p>In the original specification, language servers were assumed to have access to the local filesystem, because that’s where the code is for your editor. This doesn’t work for Sourcegraph, because we index vast quantities of code across multiple languages — too much to fit on one local disk. Our initial implementation simply used git clone --depth 1 to fetch repositories to language server, but we soon realized this was too slow. Some of the repositories we index (especially the private ones) are massive. It can take twenty seconds or more for the git clone to complete and that doesn’t even involve running any code analysis yet.</p><p>To make our language servers lightning fast, we had to make files accessible to them file-by-file, as needed.</p><p>We extended the <a href="https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md">original Language Server Protocol</a> to create a way for LSP clients (e.g., editors) to provide file contents and file path structure to language servers such that the language servers never need to access the filesystem directly. The extension consists of 2 simple endpoints:</p><ul><li>workspace/files provides a list of all file paths relative to the workspace root</li><li>textDocument/content provides the contents of a file at a specific file path</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*ReHVStgRySa7zVNKENc_uQ.png" /><figcaption>File fetching in a traditional editor plugin or language server.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*jLpcrvijz1kjF6m9-9FqOQ.png" /><figcaption>File fetching with the LSP files extension. Note the shortened response time.</figcaption></figure><p>The file-fetching extension has enabled Sourcegraph to provide capabilities like “jump to definition” and “hover-over docs” within seconds of a user visiting an arbitrary source file at an arbitrary commit in a large repository. The performance is so good that we’ve had many users ask what database we use to store all the data, because they assume we’ve somehow pre-computed the indices. The amazing fact is, we don’t. Everything is done on the fly.</p><p>We think incorporating this file-fetching ability into the LSP standard will be useful for editor plugins, too. Many code analysis and compiler APIs already support fetching file contents through an abstract interface rather than directly from the filesystem. They do so both as a performance optimization (hot file contents can be kept in memory) and to support real-time Code Intelligence features like autocomplete, where buffer contents have not yet been written out to disk. The LSP files extension would make it possible to build LSP editor plugins that take advantage of these properties. Perhaps we can look forward to a day in the future where “Updating indices” in editors is a relic of the past.</p><h3>Cross-repository Code Intelligence</h3><p>An increasing amount of software relies on code defined outside the main repository, and indeed, the notion of a “main repository” is fading altogether. Whether you’re depending on internal libraries, pulling in open source, or breaking your monolithic application out into separate microservices, code is becoming increasingly distributed across multiple codebases. This presents a challenge for Code-Intelligence-based tools, because now these tools need to be aware of code that might exist outside of your local workspace.</p><p>Two of the “superpowers” that Sourcegraph provides are cross-repository jump to definition and global usage examples:</p><figure><a href="https://sourcegraph.com/github.com/gorilla/pat@cf955c3d1f2c27ee96f93e9738085c762ff5f49d/-/blob/pat.go#L26:6-26:12"><img alt="" src="https://cdn-images-1.medium.com/max/708/1*GOYH45uEfoFn1DhhmpjcIg.png" /></a><figcaption>Cross-repository jump-to-def: “mux.Router” is defined in an external repository.</figcaption></figure><figure><a href="https://sourcegraph.com/github.com/gorilla/mux@94e7d24fd285520f3d12ae998f7fdd6b5393d453/-/blob/mux.go#L39:6-39:12"><img alt="" src="https://cdn-images-1.medium.com/max/706/1*T-wNIsUTPgbFAqlARe8slw.png" /></a><figcaption>After clicking “Jump to definition,” we’re instantly looking at the definition — defined in a separate repository.</figcaption></figure><p><strong>Cross-repository jump to definition</strong> lets you jump from the source code of one repository to a definition located in a dependency. On Sourcegraph, this works even if you haven’t vendored your dependencies and, of course, without having to check out any code to your local machine.</p><p><strong>Global usage examples</strong> is like “find references” across all the code in the world. It lets you see how a function or type is used by others, whether they be fellow teammates or open-source developers halfway across the world.</p><p>We’ve thought long and hard about how to implement these abilities, and a good part of that thought process was figuring out how to boil them down to a set of primitives that could be provided by language servers. Here’s the set of endpoints we came up with:</p><ul><li>Structured reference lookup (<a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-workspace-references.md#workspacexreferences-extension-to-lsp">workspace/xreferences</a>) lets you look up the locations of reference in code that match a set of structured criteria (e.g., that reference a certain name defined in a certain package with a certain type).</li><li>Structured definition lookup (<a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-workspace-references.md#extended-workspace-symbol-request">workspace/symbol</a>) lets you look up the location of definitions that match a set of structured criteria (e.g., a definition that has name X and type Y in package Z).</li><li>Structured definition descriptors (<a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-workspace-references.md#goto-definition-extension-request">textDocument/xdefinition</a>) give you a structured property list that describes the definition at a given location.</li><li>Package and dependency metadata (workspace/xpackages) gives you the names and versions of packages defined in a source tree, along with the names and versions of their dependencies.</li></ul><p>Cross-repository jump to definition and global usage examples are specific to Sourcegraph’s use case, and they require substantially more infrastructure than these four Code Intelligence primitives. But we believe these primitives are also generally useful to authors of editor plugins and other developer tools. Here are a couple of use cases we find particularly compelling.</p><h4>Integration with package managers and package repositories</h4><p>More and more language communities are relying on vibrant open-source package ecosystems to share and distribute libraries. A problem that comes with this brave new world, however, is the issue of keeping your dependencies up to date. Wouldn’t it be nice if your editor or IDE was aware of the dependencies in your project and could tell you which packages have new versions available for download, or could provide you the set of licenses you’re pulling in through your dependencies? The workspace/xpackages endpoint would make this functionality widely available.</p><h4>Advanced definition search</h4><p>Most editors support some sort of text-based symbol searching, but in many cases, you’re looking for something more specific. You might want only to search for functions in some cases, and only types in another. You might want to limit the scope of your search to specific sub-trees on particularly large repositories. Structured symbol search (via the workspace/symbol extension) would allow you to define a specific set of property:value filters to find the definitions that match your criteria.</p><h4>Tracking a definition over multiple commits</h4><p>Sometimes code gets moved around. A function might be moved to a different file in a refactoring, but still have the same meaning. If this happens, you have to manually track down the new location of the function, which is pretty annoying. You could build a tool using the textDocument/xdefinition endpoint that matches the definition description across revisions, even if files have changed. You could also use the information to provide better heuristics to git diff.</p><h4>Advanced reference lookup</h4><p>Currently, most editors offer a way to find references to a single definition, but sometimes you want to search for references that refer to different definitions that share some properties. For example, you might have functions or methods with duplicate names across different packages. This is fairly common with microservices, where code at API boundaries is increasingly auto-generated from something like Thrift or Protocol Buffers. In such cases, vanilla “find all references” fails. Currently, the best fallback is grep, but grep results often contain too much noise.</p><h3>Code Intelligence for the future</h3><p>Both the file-fetching and cross-repository extensions are works in progress. We’re still ironing out the details of the API, and in the meantime have submitted both as proposals to the LSP community for feedback and discussion. The community has been great about providing constructive feedback thus far, and we’re excited to see where the discussion goes.</p><p>The extensibility of the Language Server Protocol has made it relatively easy to experiment with new features like those mentioned above without worrying about breaking the backwards compatibility of the <a href="http://langserver.org/">dozens of open-source language servers and LSP editor plugins currently being developed</a>. LSP is both standardizing a lot of what we’ve come to expect from IDEs and editor plugins <em>and</em> enabling new innovation in Code Intelligence like what you see on Sourcegraph. For these reasons, we think it is an invaluable contribution to the larger software ecosystem. We hope you’ll join us in making it the open standard for Code Intelligence.</p><p>In the next post in this series, I’ll dive into implementation details of how we make language servers fast. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73b86175f38b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/part-2-how-sourcegraph-scales-with-the-language-server-protocol-73b86175f38b">Part 2: How Sourcegraph scales with the Language Server Protocol</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 1: How Sourcegraph scales with the Language Server Protocol]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/how-sourcegraph-scales-with-the-language-server-protocol-a4e8fd3fbae5?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4e8fd3fbae5</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Thu, 16 Feb 2017 18:31:46 GMT</pubDate>
            <atom:updated>2017-02-27T19:44:23.593Z</atom:updated>
            <content:encoded><![CDATA[<h4>The problem of Code Intelligence and the need for an open standard</h4><p><em>Update: </em><a href="https://text.sourcegraph.com/part-2-how-sourcegraph-scales-with-the-language-server-protocol-73b86175f38b#.v0dq2ua8z"><em>Part 2 of this series is now published</em></a><em>.</em></p><p>Sourcegraph lets you view any line of code in your web browser with all the navigation features of an IDE and more. That includes both classic abilities — like jump-to-definition, find-references, tooltips, and symbol search — and novel superpowers like cross-repository jump-to-definition and global usage examples. The sum of these parts is a quick, frictionless way to discuss or make sense of code.</p><p>Underneath the hood is a complex system that parses and analyzes source code on the fly and provides the underlying code navigation capabilities to the UI. These capabilities we collectively call “Code Intelligence.” Code Intelligence is not a marketing term. We use it to mean something very specific:</p><blockquote><strong>Code Intelligence</strong> is the set of auto-navigation and auto-generation primitives that use a semantic understanding of code to enable a human programmer to efficiently read and write source code.</blockquote><p>Let’s break that down:</p><ul><li><em>“auto-navigation and auto-generation primitives”</em> — in other words, basic capabilities that make it possible to easily jump around and type less.</li><li><em>“semantic understanding”</em> — because humans should be free to focus on the substance of the code, rather than the rote mechanics of navigation and typing. Text-based tools like grep leave too much of the burden on you.</li><li><em>“a human programmer”</em> — this is not about building a fully autonomous code-writing A.I., because we aren’t snake oil salesmen.</li><li><em>“efficiently read and write source code”</em> — because that’s what your job is as a programmer. And reading code is as important (if not more important) as writing it.</li></ul><p>In other words, Code Intelligence is shorthand for “jump-to-def + find-references + symbol-search + tooltips + autocomplete + more.” Code Intelligence is what makes the experience of using Sourcegraph magical. In a series of posts starting with this one, I’m going to explain how the magic works, starting with how the technical challenges of Code Intelligence have led us to adopt the Language Server Protocol as a key layer in our architecture. We think the Language Server Protocol is the future of Code Intelligence — both on Sourcegraph and inside every editor, and we believe that every plugin and IDE author should check it out.</p><h3>Separation of concerns</h3><p>Pick at random a repository, a commit, and a file in one of the languages we support. (If you can’t think of one, <a href="https://sourcegraph.com/github.com/opentracing/opentracing-go@6edb48674bd9467b8e91fda004f2bd7202d60ce4/-/blob/gocontext.go#L21:6-21:21">this one will do</a>.) Visit that file in Sourcegraph and in a matter of seconds, you will be able to jump to where things are defined, find everywhere they are used, jump across dependency boundaries, and view usage examples drawn from other projects.</p><figure><a href="https://sourcegraph.com/github.com/opentracing/opentracing-go@6edb48674bd9467b8e91fda004f2bd7202d60ce4/-/blob/gocontext.go#L21:6-21:21"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgQPOsRZn-hPDGGcdtixiw.png" /></a><figcaption>Instant Code Intelligence on Sourcegraph</figcaption></figure><p>IDEs like Eclipse, IntelliJ, and Visual Studio are massively complex tools that often only support Code Intelligence well on a few languages. Sourcegraph aims to support every programming language. In order to make this gigantic undertaking tractable, we made a key architectural decision early on to define a clear protocol between the language analyzer and the code viewing frontend. Separating these concerns means no language-specific code at the application layer. The folks working on the frontend can focus on user experience without worrying about language semantics. The folks working on language analysis have a clear interface and don’t have to worry about the mechanics of the frontend.</p><p>We’ve experimented with different protocols to satisfy our needs along the way. We created a protocol and library called srclib, designed for batch offline language analysis, which powered most of our Code Intelligence in the early days. But over time, as our users and customers began to rely on Sourcegraph more and more, they demanded real-time Code Intelligence in more places (code review, in their editor, etc.) across a larger number of repositories and revisions. To address their needs, we needed a protocol that allowed for real-time analysis. We found what we were looking for in the Language Server Protocol.</p><h3>The Language Server Protocol</h3><p>The <a href="https://github.com/Microsoft/language-server-protocol">Language Server Protocol</a> (LSP) is an open protocol originally created and open-sourced by Microsoft that defines a set of standard Code Intelligence capabilities for editor plugins. Here is a subset that will be familiar to any professional programmer:</p><ul><li>Jump to definition</li><li>Find all references</li><li>Hover-over-symbol tooltips</li><li>Autocompletion</li><li>Symbol search</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*dfLDwCJbsrLWI63Q." /><figcaption>An example of the protocol in use, from the <a href="https://github.com/Microsoft/language-server-protocol/blob/master/README.md">official README</a>.</figcaption></figure><p>Sourcegraph is not an editor, but we view IDE-level Code Intelligence as table stakes for any tool for viewing and making sense of code. Moreover, we want to bring that level of Code Intelligence to every language in every editor. But a multitude of IDEs and editor plugins already exist—why the need for new plugins, much less a new standard?</p><h4>The M x N problem</h4><p>We originally wrote about the M x N problem back in 2013, when we created srclib, our open-source offline language analysis library. It is the problem of having M editors (Emacs, Vim, Sublime, VS Code, Atom, etc.) and N programming languages (JavaScript, Java, Go, Python, Rust, TypeScript, etc.) Each of the editors has editing capabilities (buffer management, file navigation, keyboard shortcuts, look-and-feel, etc.) that should be orthogonal to choice of language. In the perfect world, you should be able to stick with your editor of choice no matter what language you work in.</p><p>But that’s not the world we live in. Why not? Because to make every editor support Code Intelligence for every language, you’d need to build M x N editor plugins, each of which needs to integrate with the plugin API of a specific editor <em>and</em> understand the compiler-level semantics of the language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*deSfeuQZchkOAbI5v7KKCg.png" /><figcaption>M x N</figcaption></figure><p>LSP defines a communication protocol that sits between editor plugins and the underlying analysis libraries. You build one language server for each language and one plugin for each editor. Each editor plugin that speaks LSP will now have support for every single language server. You’ve reduced the M x N problem to an M + N problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*ws2LYhzfuHpEimlb9-knWQ.png" /><figcaption>M + N</figcaption></figure><p>This is, of course, all good in theory, but how many languages are actually supported by an LSP-based language server today? <a href="http://langserver.org/">A lot.</a></p><h4>Just-in-time and good enough</h4><p>Another key feature of LSP is the lack of any real data model for code. The protocol has no notion of namespaces, class hierarchies, definitions, or references. How does one represent “jump to definition” with no notion of a definition? In the case of LSP, the input is merely a filename, line number, and column—the location of the reference—and the output is… a filename, line number, and column—the location of the definition.</p><p>LSP does not attempt to model the semantic relationships in code at all. But if we are trying to build Code Intelligence, shouldn’t our protocol be aware of at least the basic semantic relationships in code? The answer is no for two reasons:</p><ol><li>Coming up with a language-agnostic data model is hard. Some languages are imperative. Others are functional. Some languages permit complex class hierarchies. Other languages don’t even have inheritance. Coming up with a data model that is both general enough to encompass every language feature in the wild and specific enough to be useful for answering user queries is incredibly tricky.</li><li>As the old saying goes, there are only two hard things in Computer Science, and one of them is naming things. (The other one is cache invalidation, which is another fun topic for us at Sourcegraph, but I digress.) Naming is hard and naming things in code is no exception. As an exercise, try coming up with a truly unique universal identifier for a symbol in code. “Universal” in this case means across all the code in the world, not just your local disk, because we no longer live in a world where the code on your disk is the only code that matters. LSP solves the problem by bypassing it completely.</li></ol><p>None of this precludes building a semantic data model on top of LSP. In fact, at Sourcegraph, we’ve done exactly that for some of our more advanced features. But all of that is possible because we build on top of a layer that does not impose oversimplifying assumptions about the code.</p><h4>Extensibility</h4><p>The last important feature of LSP that I’ll touch upon in this post is extensibility. The creators of LSP foresaw that in the future, people would desire new functionality out of language servers beyond what was defined in the original spec. Sourcegraph needs to support features like cross-repository jump-to-definition and global usage examples that no editor or IDE currently offers. The primitive capabilities we require to support these features also happen to be useful to editor plugins in many cases. To that end, we’ve <a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-chache.md">extended</a> <a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-files.md">the</a> <a href="https://github.com/sourcegraph/language-server-protocol/blob/master/extension-workspace-references.md">protocol</a>. I’ll dive into specifics in a later post, but for now, I’ll just note that it is easy to add new functionality to LSP without breaking backwards compatibility. Indeed, there is a vibrant, open-source community that continues to contribute changes to the protocol while maintaining backwards compatibility with existing LSP plugins.</p><h3>The future of Code Intelligence</h3><p>History has taught us that when it comes to creating technology, it’s overwhelmingly the technologies that save developers time that win. Sourcegraph’s <a href="https://sourcegraph.com/plan">mission</a> revolves around saving developers time. To that end, we’ve invested deeply in Code Intelligence, because we believe it is a huge multiplier of developer productivity and, as a corollary, a multiplier of the overall rate of technological progress.</p><p>We believe that LSP will bring a new wave of Code-Intelligence-powered editor plugins, IDEs, and developer tools. We hope other companies, organizations, and individuals building tools for programmers will join us in adopting and promoting this standard for the benefit of programmers everywhere.</p><p>Hopefully, I’ve given you a better idea of the technical problems we’re solving at Sourcegraph and why they matter to the greater software community. In subsequent posts, I’ll dive into extensions we’ve made to LSP to enable novel Code Intelligence abilities (cross-dependency jump-to-def and global usage examples), and I’ll describe implementation details of language servers that we think will be broadly useful and interesting. If you are like us and find this interesting, <a href="https://github.com/Microsoft/language-server-protocol">start contributing</a> and <a href="https://sourcegraph.com/">sign up for Sourcegraph</a>.</p><h4><a href="https://text.sourcegraph.com/part-2-how-sourcegraph-scales-with-the-language-server-protocol-73b86175f38b#.lvv6feuvy">Part 2: How Sourcegraph scales with the Language Server Protocol<br>Making Code Intelligence “just work”</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4e8fd3fbae5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/how-sourcegraph-scales-with-the-language-server-protocol-a4e8fd3fbae5">Part 1: How Sourcegraph scales with the Language Server Protocol</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sourcegraph: the best way to read code just got better]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/sourcegraph-the-best-way-to-read-code-just-got-better-2094def0e553?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/2094def0e553</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[devtools]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Tue, 04 Oct 2016 00:30:48 GMT</pubDate>
            <atom:updated>2016-10-04T00:46:04.644Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we’re announcing a new edition of <a href="https://sourcegraph.com/">Sourcegraph</a> that makes it even faster and easier to answer your everyday programming questions. If you code in Go, <a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/net/http/request.go#L690">check it out now</a>. If you use another language, <a href="https://sourcegraph.com/beta">sign up for the beta</a> — we’ll have news for you in the next couple of weeks!</p><p>If you’re new to Sourcegraph, you can think of it as an online code browser that feels like your favorite IDE. But instead of your local workspace, we’ve already indexed all the Go code in the world. It makes figuring out how to use libraries and understanding existing code a breeze. Here’s what some well-known members of the Go open-source community are saying:</p><blockquote>“Sourcegraph is so intuitive that you soon forget you have it, but so useful that if you use GitHub without it, it just feels like all your favorite features are missing.” — <a href="https://twitter.com/francesc"><strong>Francesc Campoy</strong></a>, <a href="https://talks.golang.org/2016/state-of-go.slide#1">developer advocate</a> on the Go core team</blockquote><blockquote>“I use Sourcegraph to become more familiar and productive with new libraries really fast. It makes reading code a breeze.” — <a href="https://twitter.com/mholt6"><strong>Matt Holt</strong></a>, author of the popular <a href="https://caddyserver.com/">Caddy web server</a></blockquote><blockquote>“Sourcegraph’s Chrome extension has become indispensable for browsing open-source code.” — <a href="https://twitter.com/inconshreveable"><strong>Alan Shreve</strong></a>, creator of <a href="https://ngrok.com/">ngrok</a> and <a href="https://equinox.io/">equinox.io</a></blockquote><p>And today, it gets even better.</p><figure><a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/net/http/request.go#L690"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2z6i2J80rgW2he1LkNECBg.png" /></a><figcaption>The new Sourcegraph looks fast and is fast.</figcaption></figure><p>We’ve listened to the feedback of thousands of developers using Sourcegraph for both open-source and private code. Sourcegraph is now smarter, faster, and re-designed from the ground up to address the most common pains of reading and understanding code. How exactly?</p><ul><li><strong>Fast code browsing</strong>: Jump-to-def, find-refs, and symbol search are now super fast and reliable—still without any configuration required.</li><li><strong>A redesigned UI </strong>targets the most common tasks and puts every function, class, and important variable just a few keystrokes away.</li><li><strong>It <em>just works</em></strong> on a lot more repositories, public and private, which means you won’t have to fall back to context-switching to other tools.</li></ul><p>All these features are live now, so <a href="https://sourcegraph.com/">go check it out</a>. If you use a language other than Go, <a href="https://sourcegraph.com/beta">stay tuned</a> — we’ll have some news for you in the next couple of weeks.</p><h3>Faster and easier to use than ever before</h3><p>Here’s the whirlwind tour of usability and performance improvements that we’re shipping today.</p><p>Jumping to definition used to take a second or longer. Now it feels almost instant, even if the definition lives in another repository. And if you want to view the def without losing your place in the current file, you can sneak a peek:</p><figure><a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/net/http/request.go#L690"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YKL6ATBcOKIDiXYUsUdGEQ.png" /></a><figcaption>Jump to (or peek at) a definition.</figcaption></figure><p>Mouse-over tooltips are a lot speedier, too. Hover over any token for additional context like type signatures and docs.</p><figure><a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/net/http/request.go#L690"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vk6X1iUny_jkuspHJNkiAw.png" /></a><figcaption>Hover over for context.</figcaption></figure><p>If you want to see how something is used, you can quickly find and flip through all references. The interface is quick and clean:</p><figure><a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/net/http/request.go#L690"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e31UMNeXH2iZjneS2bbUkg.png" /></a><figcaption>Find refs.</figcaption></figure><p>There’s a new quick-launch bar that lets you jump to any symbol or file faster than you can say “global graph of code.” Activate it by clicking “Search” in the upper-right corner or just by typing “/” on any page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kqiD7GzlN5OIrZpjYvNiEQ.png" /><figcaption>Jump to any symbol or file. Activate it with the “/” hotkey.</figcaption></figure><p>The same quick-launch bar lets you jump to any repository, so you can quickly hop across different codebases. This is perfect for teams that version microservices in separate repositories or depend on a lot of open-source libraries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*wpxr_W1t4Sc9bypF0nr6yg.png" /><figcaption>Jump to any repository. Activate it with the “/” hotkey.</figcaption></figure><p>You can <a href="https://sourcegraph.com/join">sign up and auth your private code</a> or try it out on any of these open-source repositories:</p><ul><li><a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/fmt/print.go#L189">Go standard library</a></li><li><a href="https://sourcegraph.com/github.com/docker/docker/-/blob/cmd/docker/docker.go#L68">Docker</a>: the open-source container engine</li><li><a href="https://sourcegraph.com/github.com/mholt/caddy/-/blob/caddy.go#L773:6">Caddy web server</a>: HTTP/2 web server with automatic HTTPS</li><li><a href="https://sourcegraph.com/github.com/gogits/gogs/-/blob/models/repo.go#L153:6">Gogs</a>: open-source Git repository host</li><li><a href="https://sourcegraph.com/github.com/syncthing/syncthing/-/blob/cmd/syncthing/main.go#L283">Syncthing</a>: continuous file synchronization</li><li><a href="https://sourcegraph.com/github.com/grafana/grafana/-/blob/pkg/cmd/grafana-cli/main.go">Grafana</a>: gorgeous metric vizualizations and dashboards</li><li><a href="https://sourcegraph.com/github.com/spf13/hugo/-/blob/main.go#L24">Hugo</a>: fast and flexible static site generator</li><li><a href="https://sourcegraph.com/github.com/coreos/etcd/-/blob/etcdserver/v3_server.go#L145">etcd</a>: distributed, reliable key-value store</li><li><a href="https://sourcegraph.com/github.com/influxdata/influxdb/-/blob/cmd/influx/main.go#L36">InfluxDB</a>: timeseries database</li><li><a href="https://sourcegraph.com/github.com/cayleygraph/cayley/-/blob/cmd/cayley/cayley.go#L155">Cayley</a>: graph database based on Google’s Knowledge Graph</li><li><a href="https://sourcegraph.com/github.com/drone/drone/-/blob/client/client.go#L11">Drone CI</a>: open-source CI platform</li></ul><h3>Save time, code more</h3><p>Thank you to all the members of the Go community who’ve supported us along the way with feedback, bug reports, and word-of-mouth evangelism.</p><p>Whether you’re new to Sourcegraph or are among the tens of thousands of programmers who already use it, this new edition will let you spend less time making sense of code and more time writing it. <a href="https://sourcegraph.com/github.com/golang/go/-/blob/src/bytes/buffer.go#L17">So check it out now</a> and <a href="https://twitter.com/srcgraph">let us know what you think</a>!</p><figure><a href="https://sourcegraph.com/"><img alt="" src="https://cdn-images-1.medium.com/max/128/1*Hw9u6TmGEpKxyBW_WApmrw.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2094def0e553" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/sourcegraph-the-best-way-to-read-code-just-got-better-2094def0e553">Sourcegraph: the best way to read code just got better</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[InnerSource and reaping the benefits of open source behind your firewall, a discussion at GitHub…]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/github-universe-liveblog-innersource-and-reaping-the-benefits-of-open-source-behind-your-firewall-2af906c3e0ae?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/2af906c3e0ae</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[innersource]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 14 Sep 2016 22:22:36 GMT</pubDate>
            <atom:updated>2016-09-14T23:23:43.953Z</atom:updated>
            <content:encoded><![CDATA[<h3>InnerSource and reaping the benefits of open source behind your firewall, a discussion at GitHub Universe</h3><p>Engineering leaders from Bloomberg, Walmart Labs, Line, HP, IBM, and GitHub talk about open source inside enterprise (or “inner source”). We paraphrase the key points here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OIAqPdJH9_SsxxfzTDu0SA.jpeg" /></figure><p>“InnerSource” is a new term for something that programmers have been doing for a long time. It’s about openness, transparency, and increased efficiency. It’s easy to describe, hard to do, but if done right it can be transformative for your company’s processes and culture.</p><p>Today, we hear from practioners on the forefront of adopting InnerSource for many different industries.</p><ul><li>Panna Pavangadkar of <strong>Bloomberg</strong>, Global Head of Engineering Development Experience</li><li>Yasuhiro Inami, iOS engineer of <strong>Line</strong>, one of the fastest growing social networks and messaging apps in Japan</li><li>Jeremy King, Senior VP, CTO of Global eCommerce <strong>Walmart</strong></li><li>Joan Watson, Director of Engineering IT of <strong>HP</strong></li><li>Jeff Jagoda, Senior Software Engineer of <strong>IBM</strong></li><li>Moderated by Kakul Srivastava, VP Product Management of <strong>GitHub</strong></li></ul><p>Q: What’s your role at your company? What are the business reasons why inner sourcing is important? What’s the one thing you’ve learned about inner source that most people don’t know.</p><p>Panna: The focus of my her department is improving the developer experience and productivity. Their core product is the Bloomberg Terminal. Inner Source is not new to Bloomberg (they used to call it “collaboratively sourced”). Their competitive advantage is the ability to come up with new ideas and ship them quickly to consumers of the terminal. Three pillars to making inner source successful:</p><ul><li>getting community excited, creating buzz within your organization</li><li>making it possible to contribute to features you’re not directly responsible for but see an opportunity to add value.</li><li>getting management buy-in on why this is important and getting the encouragement to push the boundaries</li></ul><p>Yasuhiro: Line was started in 2011, 220 milllion MAU, recently listed on Tokyo and NYSE. Their mission is to connect communication and entertainment for their users. His background is web development and has been at Line for 5 years. He works on inner source during the week and hacks on open source during the weekend.</p><p>Jeremy: Walmart Labs is a global division with offices around the world. They’re responsible for all of Walmart eCommerce sites. They were given the mandate of rebooting Walmart’s entire technology division and basically started from the ground up. To do this, you want to create an “irresistible development environment” — best practices, modern tools, strong code review processes. They also focus on experiences that combine digital and physical experiences (e.g., scanning an item in store and paying for it). Inner source helps spread knowledge around, unlocking collaborative bottlenecks and eliminating territoriality around private code. Walmart Labs has been inner sourcing since the beginning.</p><p>Joan: HP is an active member of the Linux community. Open source has always been a “part of their DNA.” What’s changing now is the specific tools they’re using. She works across organizations and roles (engineers, data scientists, managers) to improve developer productivity. Inner source is an amazing competitive advantage for HP. They’ve built a “Google-like developer experience” inside their company. And it helps them accelerate time to market. One of the big challenges is a big culture shift that they’re working through, but the benefits justify the effort.</p><p>Jeff: IBM sees inner source as a way to improve efficiency and encourage the spread of shared knowledge across the company. The coding part is just the tip of the iceberg of the “social coding” shift. It also involves changes to project management, staffing, dependency management, relationship between security team and dev organization (training squad or quasi-regulatory agency?)</p><p>Q: Have you seen business results? Have you seen measurable ROI tied to the adoption of inner source?</p><p>Jeff: Tying to dollars is hard, but we’re measuring other metrics. Our most productive teams (on social metrics) are also the most productive teams and the best adopters of modern best practices like continuous delivery. Our policy and governance teams are also much quicker. Changes to official policy used to take 6 months; now you can have a pull request merged in a day.</p><p>Panna: Internally, Bloomberg created a scoresheet where we scan all our repositories with a Contributing.md and look at other stats (forks, help wanted issues). We’ve kind of gamified the experience to get people excited about sharing things. Another interesting case study was a recent Businessweek issue that was about code. The journalists on that issue used GitHub to collaborate on the articles, even though none of them were programmers.</p><p>Jeremy: It’s amazing how much higher quality the code that people open-source is. That’s a thing that’s hard to measure exactly, but the improvement is obvious.</p><p>Q: What’s the single biggest challenge so far?</p><p>Jeremy: They had a guy quit because he became the only expert on an area of the code. He spent all his time reviewing and responding to issues and couldn’t code anymore</p><p>Yasuhiro: The firewall makes it more difficult to collaborate. If more things were open source, this wouldn’t be an issue.</p><p>Joan: There’s a big culture shift required, especially for people accustomed to doing things a certain way.</p><p>Jeff: Tension between security risk and the productivity associated with greater sharing.</p><p>Q: Are there any dealbreakers for inner sourcing?</p><p>Joan: It would probably be security — if there was a security breach of some sort. We work closely with our security team and get feedback frequently on the architecture and general direction.</p><p>Q: Can you elaborate on how you’re dealing with security concerns?</p><p>Jeff: We’re investing in automation to flag patterns that might indicate security breaches or code leakage. There’s still a long way to go in quantifying cost and risk (in some cases, it might be cheaper to just let someone steal code).</p><p>Jeremy: There’s no going back. We just have to deal with it and learn more about encryption to make sure things are secure while they become more open.</p><p>Panna: Yeah, the ship has sailed. Her focus is on ensuring their developers understands how to collaborate effectively, across different geographic locations and cultures.</p><p>Jeff: IBM has learned from a couple of painful experiences to shift away from super strict compliance enforcement. If someone is doing something a certain way, there’s probably a good reason for it, so now we try to understand and learn why someone is doing something that might go against our inner source policy and figure out if it’s helping or hurting our business.</p><p>Q: Final question: are there specific ways that make your inner sourcing approach unique due to the constraints of your specific industry?</p><p>Panna: Inner source helps people help themselves — you can submit a pull request without having to wait on someone’s answer to your question. This is especially important for us because of all the different components and pieces of information we have tie together.</p><p>Jeremy: I don’t think there’s a lot of things specific to retail. A lot of the stuff we do translates to other industries. For example, we’re releasing an open source React framework soon called Electrode that should be useful for a wide range of web apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2af906c3e0ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/github-universe-liveblog-innersource-and-reaping-the-benefits-of-open-source-behind-your-firewall-2af906c3e0ae">InnerSource and reaping the benefits of open source behind your firewall, a discussion at GitHub…</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 short stories from open source: pains in gains]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/5-short-stories-from-open-source-pains-in-gains-8a711b5c40b1?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a711b5c40b1</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[collaboration]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 14 Sep 2016 21:17:11 GMT</pubDate>
            <atom:updated>2016-09-16T17:48:34.109Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lynn Langit, Cloud &amp; Data Architect Director of Teaching Kids Programming (<a href="http://slides.com/lynnlangit/meet-matt">slides</a>)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3eFc2KNwHBjrHFpD_vjbhA.jpeg" /></figure><p>She tells the story of Matt, a fifth grade history teacher who wrote some bacon-related code in Swift</p><p>Lynn’s daughter has been coding since age 8 and taught Matt how to code.</p><p>Matt now teaches Java to 8th graders.</p><p>Matt wanted to understand how he could contribute to open source. TKP introduced him to the world of open source on GitHub. They made a portal website explaining their libraries and what GitHub is.</p><p>Your job today is to find a Matt.</p><h3>Jason Chen, Quill: open source DDOS (<a href="https://github.com/sourcegraph/github-universe-2016-slides/blob/master/OvercomingMaintainerDDoS_Jason_Chen.pdf">slides</a>)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h02G2MQGGsaljn2XTlFEMg.jpeg" /></figure><p>GitHub Issues have 2 properties:</p><ul><li>anyone anywhere can create an issue,</li><li>but it often takes time and effort for maintainers to create complete and thoughtful response</li></ul><p>These are classic characteristics of an ideal Denial of Service attack scenarios.</p><p>At one point, Jason was spending all his time answering GitHub Issues instead of building new features.</p><p>An obvious solution was just to spend less time on Issues, but that’s bad, because users feel ignored and post mean memes to your project.</p><p>An better strategy is to ask for clarification instead of trying to guess what an issue reporter is trying to say. “Can you elaborate? What did you mean by X?” This doesn’t take a lot of your time, but shows that you are super responsive.</p><p>Asking for clarification tells a user you are responsive to their needs, so they will in turn reciprocate by investing time into composing a more detailed description of their issue. If you’re lucky, they may even end up answering their own questions.</p><p>So if you’re unclear about something, “just ask for clarifications.”</p><h3>Gregor Martynus of hood.ie: Growing a healthy community by dedicating space (<a href="https://github.com/sourcegraph/github-universe-2016-slides/blob/master/Dedicating%20Space%20-%20Gregor%20Martynus.pdf">slides</a>)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vf4MwOFzzPi6E7toYsNPgA.jpeg" /></figure><p>How can you get more people to become active contributors to your project?</p><p>Thanks to GitHub, collaborating on code is easier than ever. But open source is intimidating. Lack of tooling is no longer the bottleneck. People issues are. If you aren’t good at fostering an inclusive, welcoming culture, you’re missing out on great potential contributors.</p><p>Hoodie is trying to be one of open source’s most diverse and inclusive communities. To foster this, they created a dedicated space for contributors and community members: <a href="http://hoodie.camp/">hoodie.camp</a>. It’s built on top of the GitHub API.</p><h3>Bringing back open source projects to life, Enrique Mogollan, Software Engineer at Salesforce Desk</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ikoFbqyILY5H9oczYHqoaQ.jpeg" /></figure><p>A while back, Enrique found a bug in an open-source dependency. He explored the code and submitted a pull request. It took 7 weeks for the change to be merged. He felt that the project was important, though, so he continued to contribute and invest in it. After awhile, one of the contributors invited Enrique to become a contributor himself.</p><p>Open source projects die or fade for a variety of reasons: maintainers move on, lose interest. Why should we rescue projects?</p><ul><li>It might be depended on by something somewhere</li><li>Security and trust are important values of open source and to ensure these, the code needs to be kept up to date.</li><li>There’s potential to build new features and fix new bugs that can benefit others.</li></ul><p>How can you start?</p><ul><li>Writing documentation</li><li>Contact the maintainers and express your gratitude</li></ul><p>Even if a community is dormant, they can still be woken up and act as a team. Biggest bottleneck in open source is time. And the solution to that problem is greater collaboration. The future of open source is the community.</p><h3>Quinn Murphy, NetSuite (<a href="https://www.haikudeck.com/fighting-for-the-future-lessons-from-the-training-room-uncategorized-presentation-9acbc86690">slides</a>)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O9cLEjpyzkAXgqCBsLTkEA.jpeg" /></figure><p>Open source is everywhere, but change is still frightening. Imagine you’ve discovered a great open-source project, but it’s still unknown to the stakeholders in your org.</p><blockquote>Fighting for open source is a lot like Street Fighter.</blockquote><p>How do you convince people? It’s like the Street Fighter Training Room. Show, don’t tell .The future is hard for people to see, so give them as many chances to interact and play around with the new thing.</p><p><strong>“Learn to block.”</strong> Guard your lifebar. An open source library is going to some things well, other things poorly. Explain the tradeoffs before people point out the flaws. No solution is perfect.</p><p><strong>“Know your matchups.”</strong> Tell different stories that appeal to different stakeholders.</p><p><strong>“Understand the benefits of standing still vs moving forward.”</strong></p><p><strong>“Learn to lose”</strong> — failure is feedback. Learn from losses so you can win the next battles.</p><p><strong>“It’s never Game Over.”</strong> It’s only over when you quit trying.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a711b5c40b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/5-short-stories-from-open-source-pains-in-gains-8a711b5c40b1">5 short stories from open source: pains in gains</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub Universe liveblog: “Open source for National Security”]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/github-universe-liveblog-ian-lee-lawrence-livermore-national-laboratory-91af97f29659?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/91af97f29659</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[open-government]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 14 Sep 2016 19:21:24 GMT</pubDate>
            <atom:updated>2016-09-15T01:56:58.122Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://twitter.com/ianlee1521">Ian Lee</a> of Lawrence Livermore National Laboratory talks about how LLNL is using, producing, and encouraging open source in government (<a href="https://speakerdeck.com/ianlee1521/developing-open-source-in-service-to-national-security">slides here</a>).</p><p>Open source software and national security — two topics you don’t hear together too often. But there’s a lot of work in government agencies being done right now — open source, inner source, and closed source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8LeAkNACLvgEnCXP-1qUBw.jpeg" /></figure><p>Lawrence Livermore grew out of the aftermath of the Los Alamos Project, one of 17 Department of Energy national labs, one of 3 national labs that are responsible for reporting on the readiness state of the U.S. nuclear stockpile.</p><p>You also may have seen us on Star Trek Into Darkness. The warp core came from them.</p><p>We do a lot of closed source, but also a good amount of open source. They don’t want to reinvent all the great things that the open-source community has already created.</p><p>Over the past 20 years, they’ve had 3 out of the 16 #1 supercomputing systems. That’s a lot of computation power.</p><p>Because of their unique computing resources and needs, they’ve developed their own operating system: TOSS, the Tri-Lab Operating System. It’s based on Red Hat Linux with additions to support HPC (large, interconnected clusters):</p><ul><li>Low Latency Interconnect: Infiniband</li><li>Parallel File System: Lustre</li><li>Resource Manager: SLURM</li></ul><p>They work closely with the open communities whose tools they’re leveraging.</p><p>SLURM is a resource manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jfhJ1CvpscXbwWI9bKrjhA.jpeg" /></figure><p>Flux is a family of projects for site-customized resource management systems, an evolution of SLURM for more computing systems in 2016.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_MVa05r60r6Wj20l-l_Sw.jpeg" /></figure><p>They ported ZFS to Linux. Traditional filesystems, like ext4, don’t scale for their workflows. ext4 only scales up to 16TB volumes. LLNL led the work to port ZFS to Linux. It’s now standard in Ubuntu, as easy as `apt-get install zfs`.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YKfyv-MPvpdJ9omwdipNFQ.jpeg" /></figure><p>SPACK: the supercomputing package manager (written in Python)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WHnqVyIKytDcPuhFST2cFg.jpeg" /></figure><p>ESGF: the first decentralized database (petabytes!) for handling climate science data.</p><p>What languages does LLNL use?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yU1pnjwEHnIjeaZPZp32Ww.jpeg" /></figure><p>They have a GitHub pages portal to help you explore their code. GitHub code search is okay, but it’s difficult to filter repositories in specific languages and specific purposes. So they’re building a portal to help people explore the code: <a href="http://software.llnl.gov/">http://software.llnl.gov/</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bgvy4nN7VawWrWgelAXxpg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91af97f29659" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/github-universe-liveblog-ian-lee-lawrence-livermore-national-laboratory-91af97f29659">GitHub Universe liveblog: “Open source for National Security”</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub Universe liveblog: Clarence Wardell, U.S. Digital Service]]></title>
            <link>https://medium.com/the-official-sourcegraph-blog/clarence-wardell-4dbfb2ade1f5?source=rss-83b2d1ae7363------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dbfb2ade1f5</guid>
            <category><![CDATA[open-data]]></category>
            <category><![CDATA[government]]></category>
            <dc:creator><![CDATA[Beyang Liu]]></dc:creator>
            <pubDate>Wed, 14 Sep 2016 18:51:10 GMT</pubDate>
            <atom:updated>2016-09-14T19:04:58.559Z</atom:updated>
            <content:encoded><![CDATA[<p>Innovation fellow of the U.S. Digital Service, a.k.a. the “president’s startup.”</p><p>His time as innovation fellow started in 2014, right around the time the conversation around law enforcement and Ferguson was coming to a tipping point. Big demand for better data around policing, especially with officer shootings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*75TAuLENSspfiw96cW5Q2A.jpeg" /></figure><p>They compiled 49 recommendations based on data for the White House. We looked around the country and saw police departments actively responding to citizen concerns, not waiting around for mandates or legislation — Dallas, Seattle, Louisville. They invited folks to the White House to have a discussion and workshops. They started a conversation to share more data and ended the meeting with a commitment board: 14 PDs committed to releasing policing data in formats that were machine-readable. They didn’t ask for a specific product right away, but wanted folks to get the process started and off the ground. This became the Police Data Initiative in May 2015.</p><p>As of this past summer, they’ve reached 56 police departments around the country, both big and small. 80 jurisdictions, 150+ data sets covering 40 million individuals.</p><p>Police Data Initiatives commitments:</p><ul><li>leadership buy-in</li><li>release at lease 3 datasets in open format (disaggregated, machine readable)</li><li>designed “quarterback” who partakes in bi-weekly community of practice phone calls — stand-ups to share data with other PDs</li><li>engage citizens through data</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xs-1BcGE3N3fW81IGTHbYQ.jpeg" /></figure><p>Police Data Initiatives key activities:</p><ul><li>recruit new jurisdictions</li><li>manage growing community of practice</li><li>successful execution for datasets and community events</li></ul><p>Early successes:</p><ul><li>Public Safety Open Data Portal</li><li>New Orleans Police Department Operation Spark: engaging student hackers to hack on community policing data</li><li>Code for America: Indianapolis Metropolitan Police Department’s Project Comport: show data on police use of force</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xYsLyqbSYDht-HNW3_2NAg.jpeg" /></figure><p>We’re starting to see a new paradigm. Police departments across the country are coming around to the idea of sharing data as the default. It’s the People’s Data, not just the police’s data.</p><p>How to get involved?</p><ul><li><a href="http://www.wh.gov/policedata">www.wh.gov/policedata</a></li><li><a href="http://www.wh.gov/buildingtrust">www.wh.gov/buildingtrust</a></li><li>codeforamerica.github.com.io/pdi-census</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dbfb2ade1f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-official-sourcegraph-blog/clarence-wardell-4dbfb2ade1f5">GitHub Universe liveblog: Clarence Wardell, U.S. Digital Service</a> was originally published in <a href="https://medium.com/the-official-sourcegraph-blog">Plain Text — The Official Sourcegraph Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>