<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Patrick Fisher on Medium]]></title>
        <description><![CDATA[Stories by Patrick Fisher on Medium]]></description>
        <link>https://medium.com/@pwfisher?source=rss-686291236cd7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ONeDNBHunL3RTwQF.jpg</url>
            <title>Stories by Patrick Fisher on Medium</title>
            <link>https://medium.com/@pwfisher?source=rss-686291236cd7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:01:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pwfisher/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[No, I will not buy you that plastic toy with flashing colored lights]]></title>
            <link>https://medium.com/@pwfisher/no-i-will-not-buy-you-that-plastic-toy-with-flashing-colored-lights-c4e27788e3f0?source=rss-686291236cd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4e27788e3f0</guid>
            <category><![CDATA[parenting]]></category>
            <category><![CDATA[environment]]></category>
            <dc:creator><![CDATA[Patrick Fisher]]></dc:creator>
            <pubDate>Sat, 20 May 2017 21:11:27 GMT</pubDate>
            <atom:updated>2017-05-21T00:09:46.540Z</atom:updated>
            <content:encoded><![CDATA[<p>I went to a Medieval Times show with my six-year-old the other day. She wanted one of those plastic things with flashing colored lights. I told her no, but did not really explain why. I’m not happy about that, I always explain to my kids why I give a certain answer.</p><p>I then relented and got her a flag on a stick to wave for her knight. After some introspection, here’s my reason:</p><p>The plastic toy will be quite amusing for a little while. Then it will remain bulky, fragile, non-biodegradable, and full of toxic chemicals. And not reusable in any way. It is destined for landfill where it will poison our environment. Even worse, it may not make it to the landfill and it will pollute her bedroom.</p><p>On the other hand, the flag on a wood stick is a perfect toy. It will be fun using it for a little while. Then we will be stuck with something which is not bulky, non-toxic, biodegradable and totally reusable in a million ways.</p><p>So, am I an enlightened guy thinking globally and acting locally or a stingy stick-in-the-mud?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4e27788e3f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Docker image sizes for Ember FastBoot]]></title>
            <link>https://medium.com/@pwfisher/optimizing-docker-image-sizes-for-ember-fastboot-9085ed01baaf?source=rss-686291236cd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9085ed01baaf</guid>
            <category><![CDATA[node]]></category>
            <category><![CDATA[ember]]></category>
            <category><![CDATA[alpine]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[fastboot]]></category>
            <dc:creator><![CDATA[Patrick Fisher]]></dc:creator>
            <pubDate>Thu, 16 Jun 2016 07:47:59 GMT</pubDate>
            <atom:updated>2016-06-16T07:50:29.782Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This outlines how to minimize your runtime Docker image size using a single Dockerfile. If you use separate build and runtime containers, each Dockerfile will be simpler and the build will be faster, but deployment will be more complex.</em></p><p>Start with the minimal image you need for your runtime. Use Alpine.</p><p>In one big `RUN` command, install all your build dependencies, do your build, then remove everything you possibly can without breaking your runtime.</p><p>Your final result may look like this:</p><pre>FROM mhart/alpine-node:5.11</pre><pre>ENV \<br> APK_PKGS=’git openssh python build-base’ \<br> NPM_GLOBAL_PKGS=’bower ember-cli node-gyp’</pre><pre>COPY . /app</pre><pre>RUN \<br> #<br> # Install Github SSH config<br> #<br> mkdir -p ~/.ssh &amp;&amp; \<br> chmod 700 ~/.ssh &amp;&amp; \<br> cp /app/github-ssh/deploy_key ~/.ssh/id_rsa &amp;&amp; \<br> chmod 0600 ~/.ssh/id_rsa &amp;&amp; \<br> cat /app/github-ssh/known_hosts &gt;&gt; ~/.ssh/known_hosts &amp;&amp; \<br> cat /app/github-ssh/ssh_config &gt;&gt; ~/.ssh/ssh_config &amp;&amp; \<br> chmod 0644 ~/.ssh/known_hosts &amp;&amp; \<br> #<br> # Install global dependencies<br> #<br> apk --no-cache add $APK_PKGS &amp;&amp; \<br> npm install -g $NPM_GLOBAL_PKGS &amp;&amp; \<br> #<br> # Build app<br> #<br> cd /app &amp;&amp; \<br> bower install --allow-root &amp;&amp; \<br> npm install &amp;&amp; \<br> ember build --environment=production &amp;&amp; \<br> ./git-version.sh &amp;&amp; \<br> #<br> # Build server<br> #<br> cd /app/dist &amp;&amp; npm install &amp;&amp; \<br> cd /app/server &amp;&amp; npm install &amp;&amp; \<br> #<br> # Trim server node_modules<br> #<br> find \<br>   /app/dist/node_modules \<br>   /app/server/node_modules \<br>   \( \<br>     \( -type d -name test -o -name .bin \)\<br>     -o \( -type f -name *.md -o -iname LICENSE -o -name *.map \) \<br>   \) -exec rm -rf ‘{}’ + \<br> &amp;&amp; \<br> #<br> # Uninstall global dependencies<br> #<br> apk del $APK_PKGS &amp;&amp; \<br> npm uninstall -g $NPM_GLOBAL_PKGS &amp;&amp; \<br> #<br> # Cleanup app<br> #<br> rm -rf \<br>   /app/bower_components \<br>   /app/node_modules \<br>   /app/tmp \<br> &amp;&amp; \<br> #<br> # Cleanup bower<br> #<br> rm -rf \<br>   ~/.cache/bower \<br>   ~/.config/configstore \<br> &amp;&amp; \<br> #<br> # Cleanup npm<br> #<br> rm -rf \<br>   ~/.node-gyp \<br>   ~/.npm \<br>   /tmp/* \<br> &amp;&amp; \<br> #<br> # Cleanup apk<br> #<br> rm -rf \<br>   /etc/apk/* \<br>   /etc/ssl \<br>   /lib/apk/* \<br> &amp;&amp; \<br> #<br> # Cleanup Github SSH config<br> #<br> rm -rf \<br>   ~/.ssh \<br> &amp;&amp; \<br> echo ‘Done’</pre><pre>EXPOSE 3000</pre><pre>CMD [“node”, “/app/server/server.js”]</pre><p>For ultimate lightness (to save another 11.7M out of 39.4M non-app overhead), we would</p><ul><li>use alpine directly,</li><li>compile node with npm for build, then</li><li>recompile node without npm for runtime</li></ul><p>Having `COPY . /app` before the build means it will rebuild everything on every commit. We need this for FastBoot apps because we get dist/package.json from `ember build`.</p><p>We need a good .dockerignore to keep the image small (e.g. .git/objects) when we `COPY . /app`.</p><pre># This is .dockerignore<br>.git/logs<br>.git/objects<br>bower_components<br>dist<br>node_modules<br>tmp</pre><p>Notes</p><ul><li>git, openssh needed for `npm install`</li><li>python, build-base (make, g++, cc), node-gyp needed for libsass compile</li></ul><h3>Process</h3><p>How did we get here? <strong>`docker diff`</strong>. For each step, build and run images with part of the process complete, manually run the next step, then `docker diff`. This will show you what files are created during a build step and may need to be removed.</p><p>Here are commands you will find useful:</p><pre># Remove all untagged (“&lt;none&gt;”) images<br>docker rmi $(docker images -q -f dangling=true)</pre><pre># Remove all containers<br>docker ps -aq | xargs docker rm -f</pre><pre># With two terminals, run the build commands manually in one and `docker diff` in the other.<br>docker run --rm -it --name tmp build-01 sh<br>docker diff tmp</pre><pre># For docker diff in one terminal, run an image doing nothing but staying alive<br>docker run --name tmp -d build-01 tail -f /dev/null<br>docker exec -it tmp sh<br>docker diff tmp</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9085ed01baaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exciting times in AI are here again.]]></title>
            <link>https://medium.com/@pwfisher/exciting-times-in-ai-are-here-again-67d15eb68c0f?source=rss-686291236cd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/67d15eb68c0f</guid>
            <category><![CDATA[artiificial-intelligence]]></category>
            <category><![CDATA[deep-neural-networks]]></category>
            <category><![CDATA[neuroscience]]></category>
            <dc:creator><![CDATA[Patrick Fisher]]></dc:creator>
            <pubDate>Tue, 01 Sep 2015 20:22:56 GMT</pubDate>
            <atom:updated>2015-09-01T20:22:56.684Z</atom:updated>
            <content:encoded><![CDATA[<p>Exciting times in AI are here again.</p><p>For the last 40 years, strong AI stayed “10 years away.” While <a href="https://en.wikipedia.org/wiki/Artificial_general_intelligence">artificial general intelligence</a> is certainly not here yet and we cannot yet say we know it can be done, there have been tremendously exciting advances lately.</p><p><a href="http://googleresearch.blogspot.com/2014/11/a-picture-is-worth-thousand-coherent.html">Google’s image captioning research</a> (November 2014) was a wakeup call for me that neural networks — that tired old idea from the olden days of AI research — were finally starting to fulfill <a href="http://neuralnetworksanddeeplearning.com/chap4.html">their theoretical promise as universal function approximators</a>.</p><p>Once you have a universal function approximator, you can do fun things like approximate the function which decides which potential action maximizes my contentment, the function which tells me what I think I’ll see next given my current worldview, and the function which updates my conception of the world based on my perceptions of it. Oh, and by the way, these three functions are all you need for <a href="http://axon.cs.byu.edu/mrsmith/2015IJCNN_MANIC.pdf">A Minimal Architecture for General Cognition</a> (July 2015).</p><p>See <a href="https://karpathy.github.io/2015/05/21/rnn-effectiveness/">The Unreasonable Effectiveness of Recurrent Neural Networks</a> (May 2015) for examples of the power of modern neural networks, then keep these new capabilities in mind as you read <a href="http://www.quora.com/What-are-some-of-the-current-neuroscientific-theories-of-consciousness/answer/Paul-King-2">Paul King’s overview of the current state of computational neuroscience</a> (August 2015).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67d15eb68c0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>