<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Josh Pinkney</title>
    <description>The latest articles on Forem by Josh Pinkney (@jpinkney).</description>
    <link>https://forem.com/jpinkney</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F104974%2Fe57c8333-6c29-41e1-b51b-fbfb475f1cdf.jpeg</url>
      <title>Forem: Josh Pinkney</title>
      <link>https://forem.com/jpinkney</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jpinkney"/>
    <language>en</language>
    <item>
      <title>Tracking down the painful bugs</title>
      <dc:creator>Josh Pinkney</dc:creator>
      <pubDate>Sat, 20 Oct 2018 22:06:41 +0000</pubDate>
      <link>https://forem.com/jpinkney/tracking-down-the-painful-bugs-2kj5</link>
      <guid>https://forem.com/jpinkney/tracking-down-the-painful-bugs-2kj5</guid>
      <description>&lt;p&gt;A few months ago I was helping a co-worker fix a bug in the &lt;a href="https://github.com/angelozerr/lsp4xml"&gt;XML language server&lt;/a&gt; that had to do with the hover feature. The bug wasn't throwing exceptions, attempts to debug it yielded no results that were easily found and for some reason, the language server just kept crashing. It wasn't really clear at all what was happening and the code just sort of died. Since this bug was seemingly undetectable we spent a really long time (probably more then we should have) doing a brute force comment out of sections that we thought might have been causing the issue.&lt;/p&gt;

&lt;p&gt;What's sad/funny is what was actually going on. For those of you who don't know, language servers connect to a client (such as VSCode) and VSCode sends requests to the server based on a user event. For example, if you hover over an element it sends a request to the server and the server sends a response back. The language server protocol dictates what should be sent/returned for a request/response. The bug was extremely simple and rather funny, but painful to debug. Basically what was happening was there was&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"test"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;inside of the part of the server that controls what happens when you hover over an element. Since VSCode was seeing that we were trying to hover, it would send a hover request to the server. The server would then react but when it hit&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"test"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;it was sending back "test" to the client, resulting in the language server crashing.&lt;/p&gt;

&lt;p&gt;Let me know your worst bug experience in the comments! &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>tools</category>
      <category>vscode</category>
    </item>
    <item>
      <title>My 16 Months at Red Hat</title>
      <dc:creator>Josh Pinkney</dc:creator>
      <pubDate>Sat, 13 Oct 2018 01:54:04 +0000</pubDate>
      <link>https://forem.com/jpinkney/my-16-months-at-red-hat-3kmf</link>
      <guid>https://forem.com/jpinkney/my-16-months-at-red-hat-3kmf</guid>
      <description>&lt;p&gt;The University of Toronto offers an internship program called Professional Engineering Internship (PEY). Each year students join a company for 16 months to gain experience (either in Software Development or a few other fields). Last year/this year (May 2017-August 2018) I did my internship with a software company called Red Hat. Red Hat is a company that contributes a ton to different open source projects (you might know them for &lt;a href="https://getfedora.org"&gt;Fedora&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux"&gt;RHEL&lt;/a&gt;). All of the interns were assigned a different open source project to work on. In my case, I worked on quite a few different things mainly the YAML Language server, Eclipse Che, and Eclipse Theia.&lt;/p&gt;

&lt;p&gt;Initially, I began working on the YAML Language Server for YAML files. For those who are not familiar with language servers, it is basically a language smartness provider to integrate features like autocomplete, go to definition, find all references and alike for programming languages or file formats[1]. Language servers work through the language server protocol which specifies which data will be sent to the server during different events. Additionally, it defines which results will be sent back from the server to the client as a response. For example, if you are editing a YAML file and you want to autocomplete at a specific location, the client is going to send a completion request to the server and the server will respond with valid completions. I worked on the YAML language server project mostly alone so I was responsible for creating all of the features (hover, validation, auto-completion, etc). It took about 4 months until release and has been steadily growing in downloads ever since. I'm currently working part-time at Red Hat so I still maintain it.&lt;/p&gt;

&lt;p&gt;After the YAML Language Server was released I started working on Eclipse Che. For those who have not experienced Eclipse Che, it differs a lot from traditional desktop Eclipse (they're two completely different products, they're both just under the &lt;a href="https://www.eclipse.org/org/foundation/"&gt;Eclipse foundation&lt;/a&gt;). For one, Eclipse Che is a cloud-based workspace management tool and IDE. This means that you are able to access your workspace/code from anywhere at any time in your browser and offers docker images with everything installed so that you will not have to do any configuration for your IDE. On the other hand, traditional Eclipse is an extremely heavyweight IDE. It has been one of the leading Java IDE’s for more than 10+ years, has a diverse set of features and focuses only on the desktop environment. Most of my work for Eclipse Che focused around language server integrations and making sure the predefined stacks were working correctly. In order to make sure the predefined stacks were working I had to learn a lot of docker and understand the requirements that were needed in each docker image. For example, for the Java stack, we'd want to make sure that the image its using has the latest java tooling installed. In terms of language server integrations for Eclipse Che, I specifically worked on and currently maintain the YAML Language Server integration and helped out with the Java Language Server integration.&lt;/p&gt;

&lt;p&gt;Right now I currently work on Eclipse Theia. Eclipse Theia is also a cloud ide but differs from Eclipse Che in a few different ways. Eclipse Che is a very heavyweight IDE and built using Java while Eclipse Theia is lighter and built using typescript. Additionally, Eclipse Che is a workspace management + IDE combo whereas Eclipse Theia is only an IDE. Eclipse Theia is based off of Monaco (the editor that powers VSCode) and is currently on track to emulate the VSCode API inside of Eclipse Theia. This means that one day you should be able to run your VSCode extensions in the cloud. In terms of my work, I mostly work on additional Java support by adding features such as the ability to see external Java libraries, configuring your classpath, find implementation of interfaces. More recently, I've been asked to help emulate one of VSCode's endpoints inside of Theia.&lt;/p&gt;

&lt;p&gt;Links for the curious:&lt;br&gt;
[1] - &lt;a href="https://langserver.org"&gt;https://langserver.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://microsoft.github.io/language-server-protocol/"&gt;https://microsoft.github.io/language-server-protocol/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/redhat-developer/yaml-language-server"&gt;https://github.com/redhat-developer/yaml-language-server&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/eclipse/che"&gt;https://github.com/eclipse/che&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/theia-ide/theia"&gt;https://github.com/theia-ide/theia&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>github</category>
      <category>java</category>
      <category>linux</category>
    </item>
    <item>
      <title>Introducing the XML Language Server!!!</title>
      <dc:creator>Josh Pinkney</dc:creator>
      <pubDate>Thu, 04 Oct 2018 05:47:01 +0000</pubDate>
      <link>https://forem.com/jpinkney/introducing-the-xml-languageserver-1oea</link>
      <guid>https://forem.com/jpinkney/introducing-the-xml-languageserver-1oea</guid>
      <description>&lt;p&gt;For the past 6 months or so some of my co-workers at Red Hat have been working on a language server for XML. This has been a &lt;a href="https://github.com/Microsoft/vscode/issues/1440" rel="noopener noreferrer"&gt;heavily requested language server&lt;/a&gt; with a few attempts, but all of them only had basics features. As someone who is really fascinated with language servers its awesome to see another new one come out, especially one that I got to watch grow from inception. It just released on the &lt;a href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml" rel="noopener noreferrer"&gt;VSCode marketplace&lt;/a&gt; a week or two ago and its really exciting to see the impact it has on writing XML.&lt;/p&gt;

&lt;p&gt;The current features are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Syntax error reporting&lt;/li&gt;
&lt;li&gt;General code completion&lt;/li&gt;
&lt;li&gt;Auto-close tags&lt;/li&gt;
&lt;li&gt;Symbol highlighting&lt;/li&gt;
&lt;li&gt;Document folding&lt;/li&gt;
&lt;li&gt;Document symbols and outline&lt;/li&gt;
&lt;li&gt;Renaming support&lt;/li&gt;
&lt;li&gt;Document Formatting&lt;/li&gt;
&lt;li&gt;XSD validation&lt;/li&gt;
&lt;li&gt;XSD based hover&lt;/li&gt;
&lt;li&gt;XSD based code completion&lt;/li&gt;
&lt;li&gt;Code actions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F148698%2F45977901-df208a80-c018-11e8-85ec-71c70ba8a5ca.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F148698%2F45977901-df208a80-c018-11e8-85ec-71c70ba8a5ca.gif" alt="Features gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is still being actively developed and if you would like to check it out here's a link: &lt;a href="https://github.com/angelozerr/lsp4xml" rel="noopener noreferrer"&gt;https://github.com/angelozerr/lsp4xml&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>tools</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Building a Top 50 VSCode Extension that hit over 2 Million Downloads as an Intern</title>
      <dc:creator>Josh Pinkney</dc:creator>
      <pubDate>Sat, 29 Sep 2018 05:45:49 +0000</pubDate>
      <link>https://forem.com/jpinkney/building-a-top-50-vscode-extension-that-hit-over-2-million-downloads-as-anintern-4bc6</link>
      <guid>https://forem.com/jpinkney/building-a-top-50-vscode-extension-that-hit-over-2-million-downloads-as-anintern-4bc6</guid>
      <description>

&lt;p&gt;It's been over a year since I started working on the &lt;a href="https://github.com/redhat-developer/yaml-language-server"&gt;YAML language server&lt;/a&gt; and &lt;a href="https://github.com/redhat-developer/vscode-yaml"&gt;VSCode-YAML&lt;/a&gt; and I thought it would be interesting to write about how it grew from hundreds of downloads per version to hundreds of thousands of downloads per version by sheer luck and a bit of perseverance.&lt;/p&gt;

&lt;h3&gt;Backstory&lt;/h3&gt;

&lt;p&gt;At the start of my internship at Red Hat, I was asked to work on YAML tooling specifically for Kubernetes. I was told that the tooling would leverage the language server protocol and we would write integrations for a couple of code editors, starting with VSCode.&lt;/p&gt;

&lt;p&gt;The initial idea was to create a Kubernetes language server that would take out some of the pain associated with writing Kubernetes YAML files. We would do this by providing features such as validation, auto-completion, document symbols, etc. As development furthered the decision was made to pivot to a general language server to support all of YAML and not just YAML for Kubernetes' specifically. As a result, we were able to introduce another new feature: validation via JSON schemas. This meant that users are able to insert their own custom JSON schemas and have their YAML be validated against it. In other words, you can use the language server to help write Ansible, Kubernetes, and Travis CI YAML files just to name a few.&lt;/p&gt;

&lt;p&gt;Now that we've built the language server, we needed to integrate it into a code editor. We started with VSCode-YAML which is the VSCode extension that starts the YAML language server and exposes preferences to the users in VSCode.&lt;/p&gt;

&lt;p&gt;After a few months of development, it came time for the release.&lt;/p&gt;

&lt;h3&gt;Release&lt;/h3&gt;

&lt;p&gt;Within a few weeks of the release, there were hundreds of new developers downloading the extension and a few bugs and feature requests being submitted to the GitHub repo. As the downloads grew, so did my responsibility. I not only had to maintain the existing functionality, but I also had to create any enhancements that users have requested and create new releases.&lt;/p&gt;

&lt;p&gt;Initially, VSCode-YAML wasn't popular because of a competing extension on the VSCode marketplace at the time. The competing extension had around ~20k installs and it seemed like we weren't going to be able to compete. Luckily through the power of open source, I ended up getting in contact with that extension creator. In short, he told me that he wanted to pursue other projects and didn't feel like maintaining his work and that if our YAML language server supported document formatting then he would shut down his extension. After we started to support document formatting he unpublished. Out of sheer luck, it gave us enough momentum to become the recommended YAML extension to install on VSCode. &lt;/p&gt;

&lt;p&gt;Within about a week we went from getting hundreds of downloads a day to thousands. First, our extension got on the marketplaces trending today, then the marketplaces trending this week, and eventually the marketplaces trending monthly. After that the extension took off, rounding out that version at roughly 155,000 total downloads. With sheer luck, we were able to take the extension from something that a few people used, to something that thousands use. &lt;/p&gt;

&lt;p&gt;Currently the YAML language server is integrated into a few different clients that support the language server protocol. It was first integrated into VSCode via an extension, then Eclipse Che, then Atom, then Neo-Vim, and more recently Theia.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml"&gt;Check out VSCode-YAML on the Marketplace&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&lt;/p&gt;

&lt;p&gt;VSCode-YAML and the YAML language server are still being actively developed. If you are interested in the project and would like to contribute let me know!&lt;/p&gt;

&lt;p&gt;Also, if you're interested in this type of content please give this post a heart :)&lt;/p&gt;


</description>
      <category>github</category>
      <category>opensource</category>
      <category>tools</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
