<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Common Dream</title>
	<atom:link href="https://commondream.net/feed/" rel="self" type="application/rss+xml" />
	<link>https://commondream.net</link>
	<description></description>
	<lastBuildDate>
	Thu, 06 Dec 2018 02:37:40 +0000	</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>

<image>
	<url>https://najj874959496.files.wordpress.com/2018/11/aa.png?w=32</url>
	<title>Common Dream</title>
	<link>https://commondream.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<cloud domain='commondream.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<atom:link rel="search" type="application/opensearchdescription+xml" href="https://commondream.net/osd.xml" title="Common Dream" />
	<atom:link rel='hub' href='https://commondream.net/?pushpress=hub'/>
	<item>
		<title>Moving Faster by Working on Master</title>
		<link>https://commondream.net/2018/12/03/moving-faster-by-working-on-master/</link>
				<comments>https://commondream.net/2018/12/03/moving-faster-by-working-on-master/#respond</comments>
				<pubDate>Tue, 04 Dec 2018 02:35:22 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://commondream.net/?p=67</guid>
				<description><![CDATA[As the number of programmers at Abstract has grown, code review has increased as a daily blocker. The team&#8217;s areas of expertise become more spread out and the code gets more complicated, slowing the process down. It&#8217;s not the first time I&#8217;ve experienced this with the startups I have worked with. Please don&#8217;t misunderstand me, &#8230; <a href="https://commondream.net/2018/12/03/moving-faster-by-working-on-master/" class="more-link">Continue reading <span class="screen-reader-text">Moving Faster by Working on&#160;Master</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[
<p>As the number of programmers at Abstract has grown, code review has increased as a daily blocker. The team&#8217;s areas of expertise become more spread out and the code gets more complicated, slowing the process down. It&#8217;s not the first time I&#8217;ve experienced this with the startups I have worked with.<br></p>



<p>Please don&#8217;t misunderstand me, though. Code review is without a doubt beneficial, especially to someone prone to silly mistakes like me, and especially with a larger team. It just tends to slow as the team grows.</p>



<p>With <a href="https://guides.github.com/introduction/flow/">the GitHub flow</a> you branch for each thing you share for review. That&#8217;s great if there&#8217;s no delay between submitting a pull request and merging it, but if the review step includes any delay things get tricky. To make additional changes to the same code you have to branch from your branch and keep the new branch up to date with review feedback. As you build a complex tree of branches that gets pretty difficult to manage.</p>



<p>The inevitable result on most teams is to either avoid working on the same code or to submit large pull requests. But then, as the pull requests get larger, the review time slows even more and compounds the issue.<br></p>



<hr class="wp-block-separator" />



<p>Jackson Gabbard&#8217;s <a href="https://jg.gg/2018/09/29/stacked-diffs-versus-pull-requests/">post on Stacked Diffs</a> blew my mind. It described a problem I was feeling every day but couldn&#8217;t put into words in terms of this review delay cycle. My main takeaway was that by controlling what I reveal to my peers about my work I can help them review my code more easily. To do so, I had to come up with a git workflow that enabled me to fully control my change history.<br></p>



<p>Unfortunately the GitHub flow is pretty ingrained at Abstract, and Gabbard&#8217;s post described a process that there was little likelihood of implementing on our team because it would require drastic changes. I needed a workflow that had the advantages of stacked diffs but without requiring a retool of our entire team. I needed a flow that only required me to retool myself.<br></p>



<p>After some thinking, here&#8217;s where I landed in terms of personal guidelines:</p>



<ol><li>Work on master each day. My master branch is my master branch, not the team&#8217;s, and would typically operate a little ahead of our master branch on GitHub.</li><li>Never push my master branch, since that would break the rules our team operates under.</li><li>Cherry pick commits I make to a new pull request branch and push it up.</li><li>Use interactive rebase and amend commits as needed as I worked to keep my pull requests to a single initial commit when submitting for review.</li><li>Cherry pick additional commits onto pull request branches when changes are requested so that the history on the pull request makes sense for my peers.</li></ol>



<p>I decided to make this change and started in earnest that day.</p>



<p>I fairly quickly realized I needed a command to see how far ahead of GitHub I was, which lead me to add an alias for a <code>git unmerged</code> command. That alias looked like this:</p>



<pre class="wp-block-code"><code>[alias]
unmerged = log master ^origin/master --no-merges --pretty=oneline --abbrev-commit</code></pre>



<p>Pushing pull requests up was even trickier. That process looked like this:</p>



<pre class="wp-block-code"><code>git branch [name] origin/master --no-track
git checkout [name]
git cherry-pick [rev-to-add]
git push origin [name]
git checkout --force master
git branch -D [name]</code></pre>



<p>After a few times doing that I wrote up a quick Go project to handle it. It&#8217;s available at <a href="https://github.com/commondream/tbg">commondream/tbg</a>and makes it easier to install and work with. The project adds two commands:</p>



<ul><li><code>git unmerged</code> shows commits on master that aren&#8217;t on the remote</li><li><code>git share</code> adds a commit to a remote branch</li></ul>



<hr class="wp-block-separator" />



<h2>A Day in the Life</h2>



<p>I&#8217;ll try to make this all clearer with an example. </p>



<p>My day starts with me wanting to work on some performance improvements, so I hop onto a the repo for that project and <code>git pull --rebase</code> to make sure I&#8217;m up to date.</p>



<p> To start on the performance improvements,&nbsp;<strong> I work directly on </strong><code><strong>master</strong></code><strong>.&nbsp;</strong>I commit and immediately realize that I want to tweak the commit a bit, so I go ahead and rewrite the commit with <code>git commit --amend</code>.<br></p>



<p>Eventually the change is starting to pull on some&nbsp; refactoring ideas, but the performance itself is improved, so I go ahead and decide to share where I&#8217;m at for review. To do that I run <code>git share perf-improvements HEAD</code> because I worked on a single branch the entire time. <code>git share</code> pushes the commit at <code>HEAD</code> up to a new remote branch named <code>perf-improvements</code>. I hop over to GitHub and create a pull request.<br></p>



<p>To start the refactor, I again just add the work to master. There&#8217;s no need to wait on review or start a new branch, even though I&#8217;m continuing to work on the same code.&nbsp;&nbsp; Once it&#8217;s working I commit it to master and move on. At this point running <code>git unmerged</code> shows a commit for the performance work and another commit for the refactor. I don&#8217;t share this commit with the team yet, because reviews on the <code>perf-improvements</code> branch may yield some conflicts and I don&#8217;t want to be too greedy with my teammates review time.<br></p>



<p>I take a quick peek at GitHuband notice I got some feedback on the <code>perf-improvements</code> branch. I&#8217;m lucky to work with so many amazing programmers and the feedback is spot on, so I make the change. The change conflicts with my refactor commit, so I&#8217;m going to have to get a little tricky. <code>git checkout HEAD~ algo.go</code> puts the file I need to change into the state of the pull request. I make the change, commit it, and <code>git share perf-improvements HEAD</code> to add it to the pull request.</p>



<p>At this point my refactor will seem to have disappeared because I overwrite it with that checkout, but thankfully I can <code>git rebase --interactive</code> to rewrite the history on <code>master</code> to squash the new <code>perf-improvement</code> commit into the first one and move the refactor after them. Then I clean up the refactor commit a bit based on the pull request feedback from <code>perf-improvements</code>.</p>



<p>That last change to <code>perf-improvements</code> got it approval so I hit <em>Squash and Merge</em> on GitHub and <code>git pull --rebase</code> on my computer. If I hit any conflicts in the rebase I can either edit them and <code>git rebase --continue</code> or <code>git rebase --skip</code> if I want to just throw away the commit. I do that pretty frequently after I squash on GitHub.<br></p>



<p>Now I can share the refactor commit and put it up for review. The cycle continues with me putting a PR up and continuing on, and always pushing to get my PRs approved so I can send the next one up.</p>



<hr class="wp-block-separator" />



<h2>Is It Really Better?<br></h2>



<p>The process above is certainly different from the GitHub flow, and it definitely forces you to rewrite git history regularly, but I think it&#8217;s a lot better than the GitHub flow for a few reasons:</p>



<h3>Commits Communicate Clearly<br></h3>



<p>In the GitHub flow commits tend to be a catchall for whatever you need to do to build the feature you&#8217;re building. With this process I strive to make commits clear, even to the point of amending them to ensure they&#8217;re focused on a single change.<br></p>



<h3>I Keep Moving<br></h3>



<p>This workflow ensures that I keep moving forward without having to look for a total change in topic to avoid conflicts. Back in my branching days I was constantly worried that moving to a new task would mean more branches that I would have to merge against my current one. Working only on master ends up being a simpler, more focused mental model that keeps me from maintaining local branches and trying to keep them all up to date when they&#8217;re interdependent. That ends up meaning more progress.</p>



<h3>Review Stays Focused<br></h3>



<p>When I share a commit for review it tends to stay very focused. I usually share reviews that are smaller than 5 files and that are trivial to read and review. They&#8217;re focused on just one type of change, and tell a story. That helps my reviewers by reducing their mental burden for that particular review and by reducing how much time they have to spend reading the changes.</p>



<h2>And Finally<br></h2>



<p>Moving to working only working on master and stacking my commits has been a major change in how much code I&#8217;ve been able to ship the past couple of months. It has made it easier to review my code and I&#8217;ve also noticed that my peers have given me approval more quickly. If it&#8217;s something you&#8217;re interested in, go ahead and install <a href="https://github.com/commondream/tbg">commondream/tbg</a> and give it a try.<br></p>
]]></content:encoded>
							<wfw:commentRss>https://commondream.net/2018/12/03/moving-faster-by-working-on-master/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>The Computer from Pascal to von Neumann</title>
		<link>https://commondream.net/2018/11/26/the-computer-from-pascal-to-von-neumann/</link>
				<comments>https://commondream.net/2018/11/26/the-computer-from-pascal-to-von-neumann/#respond</comments>
				<pubDate>Mon, 26 Nov 2018 14:00:19 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Book Reviews]]></category>

		<guid isPermaLink="false">http://commondream.net/?p=61</guid>
				<description><![CDATA[The history of the computer is something I don&#8217;t hear a lot about in my day to day work, and recently I had an urge to learn more about these amazing gadgets that I use for hours on end every day. The Computer from Pascal to von Neumann came up almost immediately as a book &#8230; <a href="https://commondream.net/2018/11/26/the-computer-from-pascal-to-von-neumann/" class="more-link">Continue reading <span class="screen-reader-text">The Computer from Pascal to von&#160;Neumann</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><a href="https://www.worldcat.org/title/computer-from-pascal-to-von-neumann/oclc/939797049&amp;referer=brief_results"><img data-attachment-id="63" data-permalink="https://commondream.net/2018/11/26/the-computer-from-pascal-to-von-neumann/img_0636/" data-orig-file="https://najj874959496.files.wordpress.com/2018/11/img_0636.png?w=1100" data-orig-size="320,480" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="img_0636" data-image-description="" data-medium-file="https://najj874959496.files.wordpress.com/2018/11/img_0636.png?w=1100?w=200" data-large-file="https://najj874959496.files.wordpress.com/2018/11/img_0636.png?w=1100?w=320" src="https://najj874959496.files.wordpress.com/2018/11/img_0636.png?w=1100" class="aligncenter size-full wp-image-63" srcset="https://najj874959496.files.wordpress.com/2018/11/img_0636.png 320w, https://najj874959496.files.wordpress.com/2018/11/img_0636.png?w=100 100w, https://najj874959496.files.wordpress.com/2018/11/img_0636.png?w=200 200w" sizes="(max-width: 320px) 100vw, 320px"  ></a></p>
<p>The history of the computer is something I don&#8217;t hear a lot about in my day to day work, and recently I had an urge to learn more about these amazing gadgets that I use for hours on end every day.</p>
<p><em><a href="https://www.worldcat.org/title/computer-from-pascal-to-von-neumann/oclc/939797049&amp;referer=brief_results">The Computer from Pascal to von Neumann</a></em> came up almost immediately as a book I had to read. It describes the history of the early mechanical computers of the 1600s and works its way forward to the early 1960s. The author, Dr. Herman Goldstine, is especially capable of telling this tale since he was personally involved in designing ENIAC, the first stored program computer.</p>
<p><em>The Computer</em> is fairly technical in places, so I&#8217;m not sure if I would recommend it to anyone not at all technically inclined, but for those of us who work with computers every day Goldstine does a commendable job of digging into the details of early computing history.</p>
]]></content:encoded>
							<wfw:commentRss>https://commondream.net/2018/11/26/the-computer-from-pascal-to-von-neumann/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						
		<media:thumbnail url="https://najj874959496.files.wordpress.com/2018/11/img_0636.png" />
		<media:content url="https://najj874959496.files.wordpress.com/2018/11/img_0636.png" medium="image">
			<media:title type="html">img_0636</media:title>
		</media:content>

		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>Full Featured Development Logging With Docker Compose, Fluentd, Elasticsearch, and Grafana</title>
		<link>https://commondream.net/2018/08/25/full-featured-development-logging-with-docker-compose-fluentd-elasticsearch-and-grafana/</link>
				<pubDate>Sat, 25 Aug 2018 21:10:38 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Fluentd]]></category>
		<category><![CDATA[Grafana]]></category>
		<category><![CDATA[Microservices]]></category>

		<guid isPermaLink="false"></guid>
				<description><![CDATA[The finished product: a filterable, searchable interface for your logs in development. I usually find that the more I can keep my development environment aligned with production, the easier it is to work. I’m usually spending the majority of my time in my dev environment, so it’s always better to line the tooling up so &#8230; <a href="https://commondream.net/2018/08/25/full-featured-development-logging-with-docker-compose-fluentd-elasticsearch-and-grafana/" class="more-link">Continue reading <span class="screen-reader-text">Full Featured Development Logging With Docker Compose, Fluentd, Elasticsearch, and&#160;Grafana</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<figure class="wp-caption"><img src="https://najj874959496.files.wordpress.com/2018/08/f350b-1slxtimnoeb-as-r7x1oigg.png?w=1100" /><figcaption class="wp-caption-text">The finished product: a filterable, searchable interface for your logs in development.</figcaption></figure>
<p>I usually find that the more I can keep my development environment aligned with production, the easier it is to work. I’m usually spending the majority of my time in my dev environment, so it’s always better to line the tooling up so that the techniques I can use for troubleshooting in development are the same ones I can use in production.</p>
<p>This post will walk through configuring a development logging infrastructure for a project on Docker Compose using Fluentd, Elasticsearch, and Grafana. The finished product will be a web interface for searching your development environment using technologies that you can easy run in production as well.</p>
<h3>The Setup</h3>
<p>This project will be using Docker Compose. The easiest way to install it is with <a href="https://www.docker.com/products/docker-desktop" target="_blank" rel="noopener">Docker Desktop</a>. Go ahead and create a directory for your source code as well.</p>
<h3>The App</h3>
<p>First up, the test app. Make a subdirectory in your project directory named <code>randolog</code> and toss this <code>main.go</code> file into it:</p>
<pre>package main

import(
	"log"
	"math/rand"
	"time"
)

func main() {
	for {
		log.Printf("Some random log output %d\n", rand.Intn(1000))
		
		time.Sleep(500 * time.Millisecond)
	}
}</pre>
<p>The program is pretty simple. It loops infinitely, writing out some random log data. It’s not ultimately that important what the program here does, so long as it has some log output for us to work with.</p>
<p>Docker Compose is configured with a <code>docker-compose.yml</code>file. It’s best to build that up piece by piece. To start, here’s the configuration for running the <code>randolog</code> program:</p>
<pre>version: "3"

services:
  randolog:
    image: golang
    command: go run /usr/src/randolog/main.go
    volumes:
      - ./randolog/:/usr/src/randolog/</pre>
<p>This configuration sets up a new service named <code>randolog</code>using <code>go run</code> to execute <code>main.go</code>. It is also mounting the <code>randolog</code>source code to <code>/usr/src/randolog</code> so that the source code is available in the container.</p>
<p>With that configuration it should be possible to run <code>randolog</code>with <code>docker-compose run --rm randolog.</code> Once it outputs some log messages, press <code>Ctrl-c</code> to interrupt it. The output should look something like this:</p>
<figure class="wp-caption"><img src="https://najj874959496.files.wordpress.com/2018/08/b3b81-1taydbogai3pxqu_u2ah-6q.png?w=1100" /><figcaption class="wp-caption-text">Some random log output</figcaption></figure>
<h3>Configure Fluentd</h3>
<p>Now it’s time to add Fluentd to the mix. Fluentd is a tool for routing log messages. It’s very flexible, but initially the configuration will only output log messages to <code>stdout</code>.</p>
<p>A custom will have to be built Fluentd image because the default Fluentd image doesn’t include the Elasticsearch plugin, which will be needed later in this project.</p>
<p>Add a new folder to the project named <code>fluentd </code>and add a folder named <code>plugins </code>under that folder. The <code>plugins </code>folder will stay empty, but due to a quirk with the Fluentd <code>onbuild </code>Docker image it has to be there.</p>
<p>Add a <code>Dockerfile </code>to the <code>fluentd </code>folder with this content:</p>
<pre>FROM fluent/fluentd:onbuild

# below RUN includes plugin as examples elasticsearch is not required
# you may customize including plugins as you wish

RUN apk add --update --virtual .build-deps \
        sudo build-base ruby-dev \
 &amp;&amp; sudo gem install \
        fluent-plugin-elasticsearch \
 &amp;&amp; sudo gem sources --clear-all \
 &amp;&amp; apk del .build-deps \
 &amp;&amp; rm -rf /var/cache/apk/* \
           /home/fluent/.gem/ruby/2.4.0/cache/*.gem</pre>
<p>This is pretty much a copy and paste from the <code>fluentd </code>image <code>onbuild</code> <a href="https://hub.docker.com/r/fluent/fluentd/" target="_blank" rel="noopener">instructions on Docker Hub</a>. This <code>Dockerfile </code>sets up an image containing Fluentd, the Elasticsearch plugin for Fluentd, and a custom <code>fluent.conf</code> file.</p>
<p>Before building the image create a <code>fluent.conf</code>in the <code>fluentd </code>folder as well:</p>
<pre>&lt;source&gt;
  @type  forward
  port  24224
  bind 0.0.0.0
&lt;/source&gt;

&lt;match **&gt;
  @type stdout
&lt;/match&gt;</pre>
<p>&nbsp;</p>
<p>This <code>fluent.conf</code> has two sections. The first, the <code>&lt;source&gt;</code> block, tells Fluentd to listen for the Fluentd forward protocol on port 24224. The second, the <code>&lt;match&gt;</code>section, tells it to output anything it recieves to <code>stdout</code>.</p>
<h3>Configure Fluentd in Docker Compose</h3>
<p>To run Fluentd the Docker Compose configuration has to be updated. Update <code>docker-compose.yml</code> to look like this:</p>
<pre>version: "3"

services:
  randolog:
    image: golang
    command: go run /usr/src/randolog/main.go
    volumes:
      - ./randolog/:/usr/src/randolog/
    logging:
      driver: fluentd
      options:
        fluentd-address: "localhost:24224"
        tag: "docker.{{.ID}}"
      
  fluentd:
    build:
      context: ./fluentd/
    ports:
      - "24224:24224"
      - "24224:24224/udp"</pre>
<p>This update includes two main changes. A new <code>fluentd</code> service definition allows Fluentd to be run with Docker Compose. Second, a new <code>logging </code>configuration for the randolog service tells Docker to forward logs to the new Fluentd service.</p>
<p>The <code>fluentd </code>service definition defines how to build the Fluentd image with Docker and also specifies that port 24224 should be available for tcp and udp. Using the<code>ports</code>directive rather than<code>expose</code>is important because Docker log drivers don’t have access to the network running within Docker Compose, so it will connect to localhost rather than a Docker internal address.</p>
<p>The <code>logging </code>directive for <code>randolog</code>tells it to use the <code>fluentd </code>log driver for Docker, which is built into Docker, and tells it to forward logs to <code>localhost:24224</code>. It also specifies a tag naming scheme.</p>
<p>It’s time to test that everything is working. Run <code>docker-compose build fluentd</code> to build the new Fluentd image. There should be a decent amount of output but no errors. Once the image build completes, run <code>docker-compose up fluentd</code>to start Fluentd. The output should look something like this:</p>
<figure><img src="https://najj874959496.files.wordpress.com/2018/08/c50c7-1jpndd3mznre7guwila3fqq.png?w=1100" /></p>
</figure>
<p>Keep Fluentd running, and in another terminal run <code>docker run --rm randolog</code> to ensure that its log output is now directed to Fluentd. It should look just like it did before, but you should also see some log messages in the Fluentd terminal:</p>
<figure><img src="https://najj874959496.files.wordpress.com/2018/08/6a997-1xxss4vosu3cpvltogqdcqw.png?w=1100" /></p>
</figure>
<h3>Connecting Elasticsearch To Fluentd</h3>
<p>Now it’s time to set up Elasticsearch and tell Fluentd to forward logs to it. The Elasticsearch image is ready out of the box, so no custom image is required. Update<code>docker-compose.yml</code>again:</p>
<pre>version: "3"

services:
  randolog:
    image: golang
    command: go run /usr/src/randolog/main.go
    volumes:
      - ./randolog/:/usr/src/randolog/
    logging:
      driver: fluentd
      options:
        fluentd-address: "localhost:24224"
        tag: "docker.{{.ID}}"
      
  fluentd:
    build:
      context: ./fluentd/
    ports:
      - "24224:24224"
      - "24224:24224/udp"

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
    expose:
      - 9200
      - 9300
    environment:
      - discovery.type=single-node</pre>
<p>The only change here is the new <code>elasticsearch</code> service. It exposes ports 9200 and ports 9300 and configures Elasticsearch to run without a cluster.</p>
<p>The <code>fluent.conf</code> file needs to be updated as well:</p>
<pre>&lt;source&gt;
  @type  forward
  port  24224
  bind 0.0.0.0
&lt;/source&gt;

&lt;match **&gt;
  @type elasticsearch
  host elasticsearch
  port 9200
  logstash_format true

  &lt;buffer&gt;
    flush_interval 5s
  &lt;/buffer&gt;
&lt;/match&gt;</pre>
<p>This update tells Fluentd to send all log messages to Elasticsearch. Any time <code>fluent.conf</code> is updated the image will have to be rebuilt, so run <code>docker-compose build fluentd</code> to rebuild it.</p>
<p>Start Fluentd and Elasticsearch now with <code>docker-compose up fluentd elasticsearch,</code>and then run <code>docker-compose run --rm randolog</code>again in another terminal. There should be log messages showing Fluentd connecting to Elasticsearch and Elasticsearch creating an index based on the log messages received:</p>
<figure><img src="https://najj874959496.files.wordpress.com/2018/08/e749c-1fvn8c_an6f3eh6p38gzo8q.png?w=1100" /></p>
</figure>
<h3>Set up Grafana</h3>
<p>Now that data is flowing into Elasticsearch it’s time to explore that data with Grafana. Just like Elasticsearch Grafana comes ready to go out of the box, so just update<code>docker-compose.yml:</code></p>
<pre>version: "3"

services:
  randolog:
    image: golang
    command: go run /usr/src/randolog/main.go
    volumes:
      - ./randolog/:/usr/src/randolog/
    logging:
      driver: fluentd
      options:
        fluentd-address: "localhost:24224"
        tag: "docker.{{.ID}}"
      
  fluentd:
    build:
      context: ./fluentd/
    ports:
      - "24224:24224"
      - "24224:24224/udp"

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
    expose:
      - 9200
      - 9300
    environment:
      - discovery.type=single-node
  grafana:
    image: grafana/grafana
    ports:
      - 3000:3000
    volumes:
      - ./grafana:/var/lib/grafana
    depends_on:
      - elasticsearch</pre>
<p>The new <code>grafana</code> service runs Grafana and opens up port 3000 for browser access. It mounts a folder named <code>grafana</code>to save the state of Grafana, so go create that folder now. It also notes that Grafana depends on Elasticsearch.</p>
<p>Start it all with <code>docker-compose up fluentd elasticsearch grafana</code>. Now navigate with a web browser to <a href="http://localhost:3000" target="_blank" rel="noopener">http://localhost:3000</a>. A login form will be displayed:</p>
<figure><img src="https://najj874959496.files.wordpress.com/2018/08/c81ae-1zw8xfm1xuz1mwtrsimwgxq.png?w=1100" /></p>
</figure>
<p>The initial username is <code>admin</code> and the initial password is also <code>admin</code>. Grafana will require the password to be updated on initial login.</p>
<h3>Connect Grafana To Elasticsearch</h3>
<p>After authenticating, hover over the gear in the left sidebar and choose <code>Data Sources</code>.</p>
<ol>
<li>Click on the <code>Add Data Source</code> button to be taken to the new data source form.</li>
<li>In the name, enter <code>Logs</code>.</li>
<li>Choose <code>Elasticsearch </code>in the Type drop down.</li>
<li>Enter <code><a href="http://elasticsearch:9200" rel="nofollow">http://elasticsearch:9200</a></code> for the URL.</li>
<li>In Index Name enter <code>[logstash-]YYYY.MM.DD</code> and choose <code>Daily </code>in the Pattern field.</li>
</ol>
<p>A success message like the one in the image below should display once you click Save and Test.</p>
<figure><img src="https://najj874959496.files.wordpress.com/2018/08/12c07-1t0zgygvhwaprpok5lsbehq.png?w=1100" /></p>
</figure>
<h3>View The Log Data in Grafana</h3>
<p>Now that a data source is configured, it’s time to build a log search dashboard.</p>
<ol>
<li>In the left sidebar hover over the plus icon and choose Dashboard.</li>
<li>Choose Table as the panel type and a table will appear.</li>
<li>Drag the bottom right corner of the table to fill the window.</li>
</ol>
<p>To edit the contents of the table, hover over the title bar for the table and choose Edit.</p>
<ol>
<li>Click on the General tab and give your table the Title <code>Logs</code>.</li>
<li>Click on the Metrics tab and choose <code>Logs</code> in the Data Source drop down.</li>
<li>For the Metric field below click on <code>Count</code>and change it to <code>Raw Document</code>.</li>
<li>Click on the Options tab and change the Table Transform to <code>JSON Data</code>.</li>
<li>Click the <code>+</code> icon next to Columns and choose <code>@timestamp</code>.</li>
<li>Click the <code>+</code> icon again and choose <code>log</code>.</li>
<li>Close the edit panel.</li>
</ol>
<p>The log data from <code>randolog</code> should appear in the table.</p>
<figure><img src="https://najj874959496.files.wordpress.com/2018/08/6c12e-19aazhckngcypx8z1ouqz1g.png?w=1100" /></p>
</figure>
<h3>Filter the Log Data in Grafana</h3>
<p>The log data is visible, but it’s not filterable. Filtering the data requires a variable to be configured.</p>
<ol>
<li>From the dashboard, click on the gear icon in the top right corner to open the Dashboard settings.</li>
<li>On the left side, click on Variables and click the Add Variable button.</li>
<li>Under Name, enter <code>filter</code>.</li>
<li>For Label, enter <code>Filter</code>.</li>
<li>Under Type, choose <code>Ad hoc filters</code>.</li>
<li>Under Data Source choose <code>Logs</code>.</li>
<li>Click the Add button.</li>
<li>Click the back arrow in the top right corner to return to the Dashboard.</li>
</ol>
<p>Ad-hoc filters apply to the entire data set being loaded in the dashboard, so no further configuration is required. To filter the data you can either enter a filter manually at the top of the dashboard, or you can hover over a value in the table and click on the icon for <code>Filter for value</code> or <code>Filter out value</code>.</p>
<p>When filtering data it’s important to remember that Elasticsearch is a full-text search index so searches will be by keyword, not with exact matches on phrases.</p>
<h3>In Conclusion</h3>
<p>Using Fluentd, Elasticsearch, and Grafana in development makes it easier to filter and review logs using a stack that can easily be implemented in production as well.</p>
<p>Each of these components is a very flexible and powerful tool. For example, adding the <code>container_name</code> field to the log table metrics list in Grafana would make it much simpler to review logs for multiple containers in a single Docker Compose configuration. Especially in architectures built on microservices this can be very helpful for filtering logs to the specific service being worked on.</p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/f350b-1slxtimnoeb-as-r7x1oigg.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/b3b81-1taydbogai3pxqu_u2ah-6q.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/c50c7-1jpndd3mznre7guwila3fqq.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/6a997-1xxss4vosu3cpvltogqdcqw.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/e749c-1fvn8c_an6f3eh6p38gzo8q.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/c81ae-1zw8xfm1xuz1mwtrsimwgxq.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/12c07-1t0zgygvhwaprpok5lsbehq.png" medium="image" />

		<media:content url="https://najj874959496.files.wordpress.com/2018/08/6c12e-19aazhckngcypx8z1ouqz1g.png" medium="image" />
	</item>
		<item>
		<title>Treehouse, One Year Out</title>
		<link>https://commondream.net/2016/04/29/treehouse-one-year-out/</link>
				<pubDate>Sat, 30 Apr 2016 00:00:00 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://najj874959496.wordpress.com/2016/04/29/treehouse-one-year-out/</guid>
				<description><![CDATA[A year ago today, April 30, 2015, was my last day at Treehouse. I’ve tried not to talk too much about leaving there, except with close friends — it’s taken time to gain perspective on such a wild ride. A year out now I have a different job, live in a different town in a different house, &#8230; <a href="https://commondream.net/2016/04/29/treehouse-one-year-out/" class="more-link">Continue reading <span class="screen-reader-text">Treehouse, One Year&#160;Out</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>A year ago today, April 30, 2015, was my last day at Treehouse. I’ve tried not to talk too much about leaving there, except with close friends — it’s taken time to gain perspective on such a wild ride. A year out now I have a different job, live in a different town in a different house, and feel pretty at peace with the fact that the Treehouse adventure part of my life is done.</p>
<p>The thing I miss most about Treehouse is the people. I worked with a phenomenal team and made friends that I still talk to with regularity. I worked for amazing students who still contact me from time to time — and who were the true reason that Treehouse excelled like it did.</p>
<hr>
<p><em>Originally published at </em><a href="https://commondream.net/life/2016/04/30/treehouse-one-year-out.html" target="_blank"><em>commondream.net</em></a><em> on April 30, 2016.</em></p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing Reloader</title>
		<link>https://commondream.net/2016/04/26/introducing-reloader/</link>
				<pubDate>Wed, 27 Apr 2016 00:00:00 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Golang]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://najj874959496.wordpress.com/2016/04/26/introducing-reloader/</guid>
				<description><![CDATA[I’ve been doing a lot of golang development lately, and it has been a lot of fun. I’ve really enjoyed the simplicity of the language, and having a compiler and the error checking it provides. One thing I’ve missed from Rails development, though, is automatic reloading, especially when doing web development. I found a few &#8230; <a href="https://commondream.net/2016/04/26/introducing-reloader/" class="more-link">Continue reading <span class="screen-reader-text">Introducing Reloader</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I’ve been doing a lot of <a href="http://golang.org" target="_blank">golang</a> development lately, and it has been a lot of fun. I’ve really enjoyed the simplicity of the language, and having a compiler and the error checking it provides.</p>
<p>One thing I’ve missed from Rails development, though, is automatic reloading, especially when doing web development. I found a few different solutions for Go, like <a href="https://github.com/codegangsta/gin" target="_blank">gin</a>, but many of them took over the compilation process any time a file is saved, and that didn’t feel quite right for me. After a little bit of thinking I decided I could solve the problem pretty simply, and created <a href="https://github.com/commondream/reloader" target="_blank">Reloader</a>.</p>
<p>Reloader is the simplest possible solution to the problem that I could find. Pretend you’ve written an app that generates a binary named <em>my_web_server</em>. To run it in reloader, you simply append reloader to the beginning of your command line:</p>
<pre>reloader ./my_web_server</pre>
<p>Reloader will monitor the executable file for program you’re running and any time it changes due to recompile, Reloader will restart it with the command line you gave it.</p>
<p>I’ve been using Reloader for several months now, and haven’t needed to change it in a while, so I think it’s ready for others to try. You can learn more, including how to install Reloader, in the <a href="https://github.com/commondream/reloader/blob/master/README.md" target="_blank">README</a>.</p>
<hr>
<p><em>Originally published at </em><a href="https://commondream.net/programming/2016/04/27/introducing-reloader.html" target="_blank"><em>commondream.net</em></a><em> on April 27, 2016.</em></p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>Executive Accountability</title>
		<link>https://commondream.net/2015/10/21/executive-accountability/</link>
				<pubDate>Wed, 21 Oct 2015 23:10:57 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Employment]]></category>
		<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://najj874959496.wordpress.com/2015/10/21/executive-accountability/</guid>
				<description><![CDATA[This summer I hit my 15 year mark when it comes to working with young technology companies, and joined my fifth early stage company. Depending on your perspective that may sound great or horrible, and honestly depending on the day of the week I feel both ways about it too. Over time I’ve picked up &#8230; <a href="https://commondream.net/2015/10/21/executive-accountability/" class="more-link">Continue reading <span class="screen-reader-text">Executive Accountability</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>This summer I hit my 15 year mark when it comes to working with young technology companies, and joined my fifth early stage company. Depending on your perspective that may sound great or horrible, and honestly depending on the day of the week I feel both ways about it too.</p>
<p>Over time I’ve picked up some informal questions I ask while interviewing. Initially these were questions that helped me understand the founder’s vision for the company — questions like:</p>
<ul>
<li>What does success look like for your company?</li>
</ul>
<p>Believe it or not, most early stage companies hire without knowing what new employees will be doing. It’s always good to figure out those expectations (or lack of them), so I started asking:</p>
<ul>
<li>What will I do each day in this position?</li>
<li>How will you know that I’m doing a great job?</li>
</ul>
<p>After I wasn’t paid my last couple of paychecks because one company ran out of money, I added questions about company finances and financial transparency to the list:</p>
<ul>
<li>How much money is in the bank?</li>
<li>How much cash are you burning each month?</li>
<li>How do you communicate the financial situation of the company to the team?</li>
</ul>
<p>All of these questions have helped me understand how young companies I’m thinking of joining operate and how they see me fitting into what they do. After thinking back on what has happened in each of the positions I’ve worked in, though, I’m adding another to my list:</p>
<ul>
<li>How do you hold yourself and the executive team accountable to make good decisions?</li>
</ul>
<p>Many young companies lack structures to keep founders and the executive team accountable for making good decisions. Here’s a list that of problems with executive accountability that I’ve seen fairly frequently, but it’s by no means exhaustive.</p>
<h4>Total Control</h4>
<p>Companies that haven’t raised capital (or that don’t intend to raise capital) typically end up in a structure where the founder or founders have enough ownership of the company to have total control. That’s very often exactly why founders start a company — the freedom to make whatever decisions they want and to learn as they iterate. But at the end of the day, the whole team is building the company and the whole team deserves the ability to give feedback and raise red flags when they see a problem. Everyone’s jobs are ultimately on the line.</p>
<p>Founders operating with a strategy of total control often talk about responsibility being on their shoulders or about how the company is theirs and you just have to trust them. Don’t be surprised if their voice softens a bit when they tell you this.</p>
<p>It’s not wrong for a founder to have total or majority ownership of a company, but founders must accept that as soon as they hire employees they’re giving up total control of the business.</p>
<h4>The Ineffective Board</h4>
<p>Many companies have almost useless boards. The board meets irregularly and when they do meet there’s a lack of transparency. The founder sees the board as an adversary to be defeated, rather than a group of trusted influencers for the company. You’ll often hear executives with ineffective boards mention that board meetings are a waste of time.</p>
<p>If you have shares as an employee of a young company, the board should be supremely interesting to you as an independent group protecting your interests in the company against bad decisions by the executive team. You want to hear about a board that really takes its time and works hard to ensure the executive team is doing its best work.</p>
<h4>The Silencing Effect of Equity</h4>
<p>Equity in a company can have a silencing effect on the team. Here’s how that usually works:</p>
<ol>
<li>The company issues options or restricted stock with a vesting period and other purchase terms, typically with a contingency that if an employee leaves the company or is fired they have to exercise or void their equity.</li>
<li>Some time after equity is issued the executive team makes a decision the team disagrees with.</li>
<li>The team pushes back a bit.</li>
<li>The executive team says the decision is final. They often include a warning about how they’re totally in charge, how this is the right decision, or any of the other lines of thinking mentioned in the section about total control above.</li>
<li>The team decides that they’d better not rock the boat because it could mean losing their job and all that equity that they’ve worked hard for but that still isn’t fully vested (or that they can’t afford to exercise in the case of options).</li>
</ol>
<p>I’m not totally sure how to solve this problem, but I think rewarding stock as a reward for great performance after the fact could be one way to help handle the issue.</p>
<h4>Not Really Listening</h4>
<p>Some executives have no issues with transparency, but still don’t actually listen when feedback is given. It’s pretty easy to imagine what happens next — the team stops giving feedback and ultimately knows that the transparency is worthless, except maybe as a warning sign of when to bail out. That lack of response to feedback ultimately ends up with the same outcome as if the feedback had never been given.</p>
<h4>Back to the Question</h4>
<p>It’s important that founders and executives know that what they’re doing is visible and that they’ll receive clear feedback on what they’re up to from other rationally thinking humans, whether it’s the team or an outside advisor or board. So back to the question:</p>
<ul>
<li>How do you hold yourself and the executive team accountable to make good decisions?</li>
</ul>
<p>There’s no right answer, but there are many clearly wrong answers. Answers like:</p>
<ul>
<li>“We just make great decisions.”</li>
<li>“We understand that ultimately success is on their shoulders.”</li>
<li>“Failure’s the ultimate accountability.”</li>
</ul>
<p>are pretty clear signals that you should be on guard. You’re dealing with someone who hasn’t set up much accountability for themself.</p>
<p>If you hear answers like:</p>
<ul>
<li>“We meet with the board of directors monthly for a few hours and discuss all major upcoming decisions and the results of past decisions.”</li>
<li>“We communicate openly with the team and actively seek their feedback about decisions.”</li>
</ul>
<p>you’ve probably found a company that’s on the right track.</p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>“I Have No Use for Apps”</title>
		<link>https://commondream.net/2015/10/20/i-have-no-use-for-apps/</link>
				<pubDate>Tue, 20 Oct 2015 20:48:32 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://najj874959496.wordpress.com/2015/10/20/i-have-no-use-for-apps/</guid>
				<description><![CDATA[So I buy a new computer, and it has Windows 10 on it. It’s way better than Windows 8, but I had to take all sorts of junk off of it, and it still had the Windows App Store. What am I going to do with an app store? I use the web and I &#8230; <a href="https://commondream.net/2015/10/20/i-have-no-use-for-apps/" class="more-link">Continue reading <span class="screen-reader-text">“I Have No Use for&#160;Apps”</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<blockquote><p>So I buy a new computer, and it has Windows 10 on it. It’s way better than Windows 8, but I had to take all sorts of junk off of it, and it still had the Windows App Store. What am I going to do with an app store? I use the web and I use Excel. Excel’s a program &#8211; I have no use for apps.</p></blockquote>
<p>A good friend of mine made the statement above while we were catching up over the phone the other night.</p>
<p>This perceived difference between apps and programs was really interesting to me, and I dug in a bit more to try to get a feel for why he thought they were different. For him it seemed to be about value — apps are cheap or free and functionally trivial, while programs are more expensive and are for serious use.</p>
<p>This conversation was a nice reminder for me that my perspective as a person who builds software almost every day is often fairly different from the people I’m building software for.</p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>The pstree Command</title>
		<link>https://commondream.net/2015/10/19/the-pstree-command/</link>
				<pubDate>Mon, 19 Oct 2015 20:09:36 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false"></guid>
				<description><![CDATA[I use the ps command pretty frequently for checking for running processes, and pretty regularly use ps axjf to view currently running processes as a tree. The tree view within ps, though, has always been especially difficult for me to read. Today, though, I stumbled across pstree, which displays the process tree much more cleanly. &#8230; <a href="https://commondream.net/2015/10/19/the-pstree-command/" class="more-link">Continue reading <span class="screen-reader-text">The pstree Command</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I use the <em>ps</em> command pretty frequently for checking for running processes, and pretty regularly use <em>ps axjf </em>to view currently running processes as a tree. The tree view within <em>ps</em>, though, has always been especially difficult for me to read.</p>
<p>Today, though, I stumbled across <em>pstree</em>, which displays the process tree much more cleanly. It’s installed by default on Ubuntu, so you can run <em>pstree -p</em> to show a tree of all processes, with pids, like this:</p>
<figure>
<p><img src="https://najj874959496.files.wordpress.com/2015/10/b81ee-1-qpl92v3vjo6bugrj6qj-w.png?w=1100"><br />
</figure>
<p>You can learn more on the <a href="http://linuxcommand.org/man_pages/pstree1.html" target="_blank">pstree man page</a>.</p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>

		<media:content url="https://najj874959496.files.wordpress.com/2015/10/b81ee-1-qpl92v3vjo6bugrj6qj-w.png" medium="image" />
	</item>
		<item>
		<title>Four Months In at The Iron Yard</title>
		<link>https://commondream.net/2015/10/16/four-months-in-at-the-iron-yard/</link>
				<pubDate>Sat, 17 Oct 2015 03:48:22 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://najj874959496.wordpress.com/2015/10/16/four-months-in-at-the-iron-yard/</guid>
				<description><![CDATA[I hit the four month mark at The Iron Yard at the beginning of the month. We’re building a lot of really cool software and it’s been a fun chance to start a project from scratch and make new decisions. Yet again, it’s a Rails app. We tested out a lot of language and framework &#8230; <a href="https://commondream.net/2015/10/16/four-months-in-at-the-iron-yard/" class="more-link">Continue reading <span class="screen-reader-text">Four Months In at The Iron&#160;Yard</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I hit the four month mark at The Iron Yard at the beginning of the month. We’re building a lot of really cool software and it’s been a fun chance to start a project from scratch and make new decisions.</p>
<ul>
<li>Yet again, it’s a Rails app. We tested out a lot of language and framework setups before we landed on Rails. I’ll hit my 10 year anniversary of working with Ruby and Rails next year, but it’s still my favorite framework/language combo.</li>
<li>We’re doing dev in <a href="https://www.vagrantup.com" target="_blank">Vagrant</a> boxes rather than directly on our systems. It’s been cool, but hasn’t always been the easiest setup.</li>
<li>Both our production servers and our Vagrant boxes are built out with <a href="http://www.ansible.com" target="_blank">Ansible</a>. It’s been a pretty cool tool, and has had a lot less mental overhead than Chef.</li>
<li>
<a href="http://gulpjs.com" target="_blank">Gulp</a> is replacing the Asset Pipeline for us. I think it’s a good decision, but it hasn’t always been completely easy. We’re processing JS with <a href="https://babeljs.io" target="_blank">Babel</a>, though, and ES6 has been great.</li>
<li>We’re focusing more on feature specs than on unit testing controllers. I’ve been a huge fan of that.</li>
<li>Although our app is primarily a rails app, it already has a couple of additional projects attached to it, and we’ve built everything out in a single monorepo. I’ve really liked that format.</li>
<li>We’ve got a pretty small team of 5, but we made a concious effort to start hiring a mix of more experienced and less experienced developers from the beginning. I think it’s really payed off in diversity of ideas and in forcing the team to understand the tradeoffs of different decisions.</li>
</ul>
<p>As far as the company goes, I’ve been really impressed with the team at The Iron Yard and their student focused approach. Each day carries tons of discussions of how we do what’s best for students, and that’s been a lot of fun.</p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>
	</item>
		<item>
		<title>If I don’t do this, no one will.</title>
		<link>https://commondream.net/2014/09/19/if-i-dont-do-this-no-one-will/</link>
				<pubDate>Fri, 19 Sep 2014 17:56:04 +0000</pubDate>
		<dc:creator><![CDATA[commondream]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://najj874959496.wordpress.com/2014/09/19/if-i-dont-do-this-no-one-will/</guid>
				<description><![CDATA[no one will. Indeed, the most productive employees don’t necessarily work the longest hours. Instead, they take the smartest approach to managing their energy to solve tasks in efficient and creative ways. — Derek Thompson, A Formula for Perfect Productivity: Work for 52 Minutes, Break for 17, The Atlantic At Treehouse, we’ve got this weird thing called the &#8230; <a href="https://commondream.net/2014/09/19/if-i-dont-do-this-no-one-will/" class="more-link">Continue reading <span class="screen-reader-text">If I don’t do this, no one&#160;will.</span> <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<figure><img src="https://cdn-images-1.medium.com/max/NaN/1*1C1vii1W0vXCqhRobHTlXQ.jpeg"></figure>
<p></p>
<h2>no one will.</h2>
<blockquote><p>Indeed, the most productive employees don’t necessarily work the longest hours. Instead, they take the smartest approach to managing their energy to solve tasks in efficient and creative ways. — Derek Thompson, <a href="http://www.theatlantic.com/business/archive/2014/09/science-tells-you-how-many-minutes-should-you-take-a-break-for-work-17/380369/?_ga=1.170744099.2878245.1388561908" target="_blank">A Formula for Perfect Productivity: Work for 52 Minutes, Break for 17</a>, The Atlantic</p></blockquote>
<p>At Treehouse, we’ve got this weird thing called the <a href="http://america.aljazeera.com/watch/shows/real-money-with-alivelshi/articles/2014/6/30/inside-the-life-ofacompanythatworksa4workweek.html" target="_blank">4-day work week</a>. It’s not a gimmick, it’s not the 4-hour work week, and there’s not some 4 days of working 10 hours scheme going on. We really work 4 8-hour days each week.</p>
<p>The 4-day work week ultimately boils down to the beauty of constraints. Ryan, our founder, and his wife, Gill, had the hypothesis that smart, motivated people given only 4 days per week would recognize how precious those 4 days are and take full advantage of them. Work smarter, rather than harder. You know the drill.</p>
<p>Overall, I’d say their hypothesis has been proven in resounding fashion. Treehouse has grown very quickly. We’ve built a product, team, and company that we’re all proud of. We’ve had <em>so</em> much fun doing it. Also, we’ve had an extra day with our families and friends while we’ve accomplished all this.</p>
<hr>
<p>I haven’t been very good at working 4 days per week, though. Especially not when it comes to mental work, but I’ve also worked most Fridays in the almost 4 years that I’ve worked on Treehouse now. That’s probably not a good thing.</p>
<p>All those days, and honestly I can’t tell a single story about the great work I did on a Friday that really made a difference. That’s probably not a good thing.</p>
<p>I have a really hard time turning things off and spending time on my family and myself. That’s probably not a good thing.</p>
<hr>
<p>There’s an insidious phrase rattling around in my head that drives me to work on Fridays, and it may well drive you to work harder, rather than smarter, too:</p>
<blockquote><p>If I don’t do this, no one will.</p></blockquote>
<p>This phrase can drive you insane. It can cause you to question everything. This phrase breeds distrust in your team. “Why aren’t they doing this?” My emotional response is that I’m all alone. The real answer? There are more important things to be done than my idea from 30 seconds ago.</p>
<p>The phrase breeds a feeling of self-importance. “I’m the only one willing do this.”</p>
<p>The phrase takes away your ability to focus and prioritize. More and more work doesn’t mean better and better work. <a href="https://www.youtube.com/watch?v=H8eP99neOVs" target="_blank">“Focusing is about saying no.”</a></p>
<hr>
<p>I’m going to try and be a little better about these things. I don’t want to be the kind of person who ultimately mistrusts my team, feels self-important, and misplaces priorities. I want to build really great stuff and I want to be deliberate about how I build it. Most of all, I want to be the kind of person that people remember working with for the right reasons.</p>
<p>So today (a Friday, no less) I’m paying my bills, writing a silly essay, and then reading while I wait on my kids to come home from school. I’m hoping I’ll try talking things out with the team the next time my brain says “If I don’t do this, no one will.”</p>
]]></content:encoded>
									
		<media:content url="https://1.gravatar.com/avatar/d89303eeb125010f12ba7af2132ed60c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">commondream</media:title>
		</media:content>

		<media:content url="https://cdn-images-1.medium.com/max/NaN/1*1C1vii1W0vXCqhRobHTlXQ.jpeg" medium="image" />
	</item>
	</channel>
</rss>
