<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Nilpath</title><link>https://nilpath.se/post/</link><description>Recent content in Posts on Nilpath</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 26 Mar 2016 09:40:20 +0200</lastBuildDate><atom:link href="https://nilpath.se/post/index.xml" rel="self" type="application/rss+xml"/><item><title>Autocompleting Golang in Atom Text Editor</title><link>https://nilpath.se/autocompleting-golang-in-atom-text-editor/</link><pubDate>Sat, 26 Mar 2016 09:40:20 +0200</pubDate><guid>https://nilpath.se/autocompleting-golang-in-atom-text-editor/</guid><description>&lt;p&gt;For a while now I&amp;rsquo;ve been using Atom as my go to text editor when building stuff for the web. While Apple have the expression &amp;ldquo;There&amp;rsquo;s an App for that&amp;rdquo;, the same could almost be said for Atom in regards to plugins.&lt;/p&gt;
&lt;p&gt;At my new workplace we are using Golang for some of the back end services and of course there is a plugin for that! The &lt;a href="https://atom.io/packages/go-plus"&gt;Go Plus&lt;/a&gt; plugin provides everything you need to be effective when writing Go in the Atom Editor.&lt;/p&gt;</description></item><item><title>TIL: Better bug reporting with GIFs</title><link>https://nilpath.se/better-bug-reporting-with-gifs/</link><pubDate>Thu, 04 Feb 2016 11:34:09 +0200</pubDate><guid>https://nilpath.se/better-bug-reporting-with-gifs/</guid><description>&lt;p&gt;Today I learned the effect of using gifs when creating bug reports or really, to explain anything.&lt;/p&gt;
&lt;p&gt;I recently needed a tool for doing quick screen captures and ended up using a tool called &lt;a href="http://droplr.com/"&gt;Droplr&lt;/a&gt;. At the same time I noticed that you could generate gifs from your screen captures with as much ease.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve found that it&amp;rsquo;s almost always easier to show how to create a bug than to write about it. And it usually takes a lot of time to write a good bug report.&lt;/p&gt;</description></item><item><title>Compiling riot.js tags using Webpack and Babel 6</title><link>https://nilpath.se/compiling-riot-js-tags-using-webpack-and-babel-6/</link><pubDate>Tue, 22 Dec 2015 10:38:59 +0200</pubDate><guid>https://nilpath.se/compiling-riot-js-tags-using-webpack-and-babel-6/</guid><description>&lt;p&gt;We&amp;rsquo;ve started working with &lt;a href="http://riotjs.com/"&gt;riot.js&lt;/a&gt; at work and so far it have been great. Last weekend I decided that it would be nice to update our dependencies in the project. As usual I thought to myself, how hard can it be? And as always, it&amp;rsquo;s usually not as easy as it seems from the start.&lt;/p&gt;
&lt;p&gt;We use &lt;a href="https://webpack.github.io/"&gt;webpack&lt;/a&gt; as a build tool and the &lt;a href="https://github.com/esnunes/riotjs-loader"&gt;riotjs-loader&lt;/a&gt; for compiling the riot tags into JavaScript.&lt;/p&gt;
&lt;p&gt;We had some issues around using riotjs with Babel 6 but with riotjs &amp;gt;= 2.3.11 you have the option of &lt;a href="http://riotjs.com/guide/compiler/#babel-6"&gt;using Babel 6 with the riot.js compiler&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Learning ES6 - Default Values &amp; Destructuring</title><link>https://nilpath.se/learning-es6-default-values-and-destructuring/</link><pubDate>Thu, 24 Sep 2015 22:00:02 +0200</pubDate><guid>https://nilpath.se/learning-es6-default-values-and-destructuring/</guid><description>&lt;p&gt;Today, I thought that we could speak about two new features in ECMAScript 6 that are pretty useful when writing functions: default values and destructuring.&lt;/p&gt;</description></item><item><title>Learning ES6 - Strings</title><link>https://nilpath.se/learning-es6-strings/</link><pubDate>Thu, 17 Sep 2015 07:36:02 +0200</pubDate><guid>https://nilpath.se/learning-es6-strings/</guid><description>&lt;p&gt;There have been some improvements to the ways you can create and work with Strings in ECMAScript 6. For example, &lt;a href="https://developer.mozilla.org/en/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object"&gt;new methods&lt;/a&gt; were added to the String object. However, the most interesting addition is the new string literal syntax called template strings, and that’s what I&amp;rsquo;m going to talk about today.&lt;/p&gt;</description></item><item><title>Learning ES6 - Arrow Functions</title><link>https://nilpath.se/learning-es6-arrow-functions/</link><pubDate>Sun, 13 Sep 2015 08:29:15 +0200</pubDate><guid>https://nilpath.se/learning-es6-arrow-functions/</guid><description>&lt;p&gt;One of the key features in JavaScript is the ability to pass around functions as variables. The use of this feature is quite common in most JavaScript Libraries and Frameworks, as well as in the language itself. If you have written something in for example jQuery or plain JavaScript, then you have most likely written a callback before. A callback is actually just a function you pass around and call when some task has completed.&lt;/p&gt;</description></item><item><title>Nordic.js 2015: Day 2</title><link>https://nilpath.se/nordic-js-2015-day-2/</link><pubDate>Sat, 12 Sep 2015 12:36:02 +0200</pubDate><guid>https://nilpath.se/nordic-js-2015-day-2/</guid><description>&lt;p&gt;Today is Saturday and I thought that I would write a summary about the second day of Nordic.js, while I&amp;rsquo;m recovering from yesterday’s epic after party at Trädgården.&lt;/p&gt;
&lt;p&gt;Personally, I think that the second day was even better than the first day. The theme of the second day was focused on performance in JavaScript and on the web. Not all talks were performance related - the day also had talks about Web Audio and how to build desktop applications using web technologies.&lt;/p&gt;</description></item><item><title>Nordic.js 2015: Day 1</title><link>https://nilpath.se/nordic-js-2015-day-1/</link><pubDate>Thu, 10 Sep 2015 18:22:09 +0200</pubDate><guid>https://nilpath.se/nordic-js-2015-day-1/</guid><description>&lt;p&gt;The first day of Nordic.js is coming to an end and it has been a great first day. The line up of speakers have been great and while some, in my opinion, performed better than others the overall experience has been great.&lt;/p&gt;
&lt;p&gt;I also like the diversity in the type of talks that was given. They have been both practical and inspirational and not all have been necessarily technological in its nature.&lt;/p&gt;</description></item><item><title>Learning ES6 - let and const</title><link>https://nilpath.se/learning-es6-let-and-const/</link><pubDate>Mon, 07 Sep 2015 07:54:02 +0200</pubDate><guid>https://nilpath.se/learning-es6-let-and-const/</guid><description>&lt;p&gt;Over the &lt;a href="http://nilpath.se/learning-ecmascript-6-with-es6-katas/"&gt;past few weeks&lt;/a&gt; I&amp;rsquo;ve started to dive more into EcmaScript 6. I&amp;rsquo;ve decided that I&amp;rsquo;m going to take the time and document what I learn here, starting with the new ways of declaring variables &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve also started a new repository over at Github that will act as a &lt;!-- raw HTML omitted --&gt;cheat sheet&lt;!-- raw HTML omitted --&gt;. Of course, as of writing this, it is still a work in progress but I&amp;rsquo;m hoping to expand it further over the next coming weeks.&lt;/p&gt;</description></item><item><title>Learning EcmaScript 6 with ES6 Katas</title><link>https://nilpath.se/learning-ecmascript-6-with-es6-katas/</link><pubDate>Sat, 22 Aug 2015 21:32:18 +0200</pubDate><guid>https://nilpath.se/learning-ecmascript-6-with-es6-katas/</guid><description>&lt;p&gt;Although I&amp;rsquo;ve been reading (and coding) a bit of ES6, &lt;!-- raw HTML omitted --&gt;ES6 Katas&lt;!-- raw HTML omitted --&gt; feels like a solid piece of source material for getting a good overview on what is new. The site provides &lt;!-- raw HTML omitted --&gt;programming katas&lt;!-- raw HTML omitted --&gt; for learning the new things in EcmaScript6. No setup of environment needed, pretty neat!&lt;/p&gt;
&lt;p&gt;So far I&amp;rsquo;ve done the Array, Class and Destructuring Katas and I know for sure I&amp;rsquo;ve learned some new things that will be use full. I would have liked to have some less completed tests though, sometimes it mostly felt like correcting some mistakes than testing the new things.&lt;/p&gt;</description></item><item><title>Service Workers, the future for caching</title><link>https://nilpath.se/service-workers-the-future-of-caching/</link><pubDate>Thu, 28 May 2015 21:00:00 +0200</pubDate><guid>https://nilpath.se/service-workers-the-future-of-caching/</guid><description>&lt;p&gt;This week I got the opportunity to experiment with the Service Worker API at work, in a lab session held by &lt;!-- raw HTML omitted --&gt;@OskarKarlsson&lt;!-- raw HTML omitted --&gt;. Although it is not supported in all browsers just yet, my initial impressions are pretty much that I love it.&lt;/p&gt;
&lt;p&gt;It feels a lot like what I would expect Application Cache to be but without the &lt;a href="http://nilpath.se/the-true-douchiness-of-application-cache/"&gt;quirks&lt;/a&gt;. Not only can we use it as a &amp;ldquo;Cache Everything&amp;rdquo; solution, with service workers we&amp;rsquo;re also able to priorities how we want to read from the cache as well.&lt;/p&gt;</description></item><item><title>Making (JavaScript) Promises</title><link>https://nilpath.se/making-javascript-promises/</link><pubDate>Sun, 12 Apr 2015 12:00:44 +0200</pubDate><guid>https://nilpath.se/making-javascript-promises/</guid><description>&lt;p&gt;When writing JavaScript code you often, if not always, end up writing something that is asynchronous. Whether it&amp;rsquo;s responding to File I/O, a AJAX request using or user interaction the standard method have been to use &lt;code&gt;callback functions&lt;/code&gt;. Writing a function that use callbacks can look something like the following&lt;/p&gt;</description></item><item><title>An Introduction to Goroutines</title><link>https://nilpath.se/working-with-goroutines/</link><pubDate>Sun, 05 Apr 2015 09:58:03 +0200</pubDate><guid>https://nilpath.se/working-with-goroutines/</guid><description>&lt;p&gt;Goroutines, what are they exactly? According to the &lt;!-- raw HTML omitted --&gt;documentation&lt;!-- raw HTML omitted --&gt; they are a way to work with concurrency which basically means to execute functions at the same time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;They&amp;rsquo;re called goroutines because the existing terms—threads, coroutines, processes, and so on—convey inaccurate connotations. A goroutine has a simple model: it is a function executing concurrently with other goroutines in the same address space.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Unlike threads they are simpler to use and more memory efficent. For an in-depth comparison on goroutines and threads checkout &lt;!-- raw HTML omitted --&gt;this post&lt;!-- raw HTML omitted --&gt;.&lt;/p&gt;</description></item><item><title>It's not Application Cache's Fault.. Sometimes.</title><link>https://nilpath.se/the-true-douchiness-of-application-cache/</link><pubDate>Tue, 31 Mar 2015 20:47:01 +0200</pubDate><guid>https://nilpath.se/the-true-douchiness-of-application-cache/</guid><description>&lt;p&gt;At work we are currently building a mobile web application together with a client. We decided that we would a good idea to use Application Cache for offline mode as well as handling updates when we release new versions of the site.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s been a long road and &lt;!-- raw HTML omitted --&gt;I kind of knew that we would hit roadblocks&lt;!-- raw HTML omitted --&gt;. But I never thought that they would just keep on coming.&lt;/p&gt;</description></item><item><title>Optimizing images using MozJPEG</title><link>https://nilpath.se/optimizing-images-using-mozjpeg/</link><pubDate>Sat, 28 Mar 2015 16:20:10 +0200</pubDate><guid>https://nilpath.se/optimizing-images-using-mozjpeg/</guid><description>&lt;p&gt;Earlier this week I was at a meetup and got to hear &lt;a href="https://twitter.com/tbaldauf"&gt;Tobias Baldauf&lt;/a&gt; speak about Image Compression. He talked about tools like jpegoptim and jpegrescan and also the new compression formats webp and mozjpeg. If you haven&amp;rsquo;t seen the talk I suggest that you do &lt;a href="https://www.youtube.com/watch?v=vCHkpxPP6Es"&gt;take a look at it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t have time to watch it right now, then here are some cliff notes.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nilpath.se/img/posts/optimizing-images-using-mozjpeg/cliff-notes.jpg" alt="Cliff Notes"&gt;&lt;/p&gt;
&lt;p&gt;Right now WebP is beating MozJPEG in compression (32.9% vs 12.1%) however, compression with MozJPEG yeild less dissimilarity between the original image and the compressed image than compression with webp (0.3% vs 0.09%).&lt;/p&gt;</description></item><item><title>Building a REST API in golang</title><link>https://nilpath.se/building-a-rest-api-in-golang/</link><pubDate>Tue, 17 Mar 2015 21:55:52 +0200</pubDate><guid>https://nilpath.se/building-a-rest-api-in-golang/</guid><description>&lt;p&gt;I&amp;rsquo;ve been building a side project with a friend and I thought that I would take the time to write down how we built the back-end for it.&lt;/p&gt;
&lt;p&gt;Currently, we&amp;rsquo;re using golang (or Go for short) consuming APIs as well as providing an API. This post will mainly consist of how we did the later part.&lt;/p&gt;
&lt;p&gt;To build this API we used web framework called Revel that, not so different from Ruby on Rails and ExpressJS, provides a MVC pattern for building web based applications on.&lt;/p&gt;</description></item><item><title>Making docker shiver</title><link>https://nilpath.se/making-docker-shiver/</link><pubDate>Sun, 27 Oct 2013 16:49:45 +0200</pubDate><guid>https://nilpath.se/making-docker-shiver/</guid><description>&lt;p&gt;So I thought I would start my new blogging career by writing up how I&amp;rsquo;ve got this blog up and rolling. The technologies, or frameworks, that I decided to use are &lt;a href="https://ghost.org/"&gt;Ghost&lt;/a&gt; and &lt;a href="http://www.docker.io/"&gt;Docker&lt;/a&gt;. I got all this up and running using &lt;a href="https://www.digitalocean.com"&gt;DigitalOcean&lt;/a&gt;, a lightweight cloud-hosting platform similar to Amazon AWS.&lt;/p&gt;
&lt;h2 id="why-ghost"&gt;Why Ghost?&lt;/h2&gt;
&lt;p&gt;Ghost is new blogging platform. In fact, it is still in its beta phase with version 0.3.3 being the current version as of writing this post. It got funded through &lt;a href="http://www.kickstarter.com/projects/johnonolan/ghost-just-a-blogging-platform"&gt;Kickstarter&lt;/a&gt; earlier this year. It is built upon nodejs and currently you&amp;rsquo;ll have to download the source itself and host it on your own. In the future they hope to be able to also provide ghost as a platform as well.&lt;/p&gt;</description></item></channel></rss>