<?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 Kyle Fox on Medium]]></title>
        <description><![CDATA[Stories by Kyle Fox on Medium]]></description>
        <link>https://medium.com/@kylefox?source=rss-6aa024d2cea0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fI-rgFf5j1Py2yfI.jpeg</url>
            <title>Stories by Kyle Fox on Medium</title>
            <link>https://medium.com/@kylefox?source=rss-6aa024d2cea0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:05:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kylefox/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[How to setup JavaScript testing in Rails 5.1 with Webpacker and Jest]]></title>
            <link>https://medium.com/@kylefox/how-to-setup-javascript-testing-in-rails-5-1-with-webpacker-and-jest-ef7130a4c08e?source=rss-6aa024d2cea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef7130a4c08e</guid>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[webpacker]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[rails]]></category>
            <dc:creator><![CDATA[Kyle Fox]]></dc:creator>
            <pubDate>Sun, 03 Sep 2017 05:27:28 GMT</pubDate>
            <atom:updated>2017-09-05T16:53:34.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Kh8TzABRb5lAqAz69Ftnw.jpeg" /></figure><p>Rails 5.1 ships with <a href="https://github.com/rails/webpacker">Webpacker</a>, which enables dinosaurs like myself to wade tepidly into the buzzing JavaScript — err, <em>ECMAScript</em>— tar pit that cool millennials are swimming in these days.</p><p>There doesn’t seem to be much documentation on how to setup testing with Webpacker, so I figured I’d chronicle how I managed to eventually get it working. I decided to try <a href="https://facebook.github.io/jest/">Jest</a> for no reason in particular, even though I’m <em>(gasp!)</em> not using React.</p><p><strong>Disclaimer:</strong> I’m definitely a newb when it comes to this stuff. It all feels a bit like a Rube Goldberg machine constructed from JSON and dotfiles. So I won’t be surprised (or offended) when people tell me there’s a better way of achieving something I’ve described here. In fact, I’d love to know how this setup could be improved. 🙌</p><h3>1. Install Jest</h3><p>First, install Jest by running this from the root of your Rails project.</p><pre>yarn add --dev jest</pre><p>A common practice it to setup a script that executes your test commands. Add this to your package.json file:</p><pre>&quot;scripts&quot;: {<br>  &quot;test&quot;: &quot;jest&quot;<br>},</pre><p>and you’ll be able to run your tests with yarn test. Of course, at this point you could simply run yarn jest, but that’s just silly. Why would you do that. 🤣</p><h3>2. Tell Jest where to find your tests</h3><p>One thing that’s nice about Jest is how <a href="https://facebook.github.io/jest/docs/en/configuration.html#testmatch-array-string">aggressively</a> it looks for test files in your project. For example, Jest will execute all files matching *.spec.js or *.test.js in your project … which means config/webpack/test.js will be run as a test, causing Jest to report a failure.</p><p>My OCD brain can’t handle this kind of loosey-goosey matching, so I used the <a href="https://facebook.github.io/jest/docs/en/configuration.html#roots-array-string">roots</a> config option to tell Jest to run only test files found in the spec/javascript directory. If you’re like me, add this to package.json:</p><pre>&quot;jest&quot;: {<br>  &quot;roots&quot;: [<br>    &quot;spec/javascript&quot;<br>  ]<br>},</pre><p>You can verify the setup so far by stubbing in a test file and running it. Create spec/javascript/sum.spec.js with a simple test:</p><pre>test(&#39;1 + 1 equals 2&#39;, () =&gt; {<br>  expect(1 + 1).toBe(2);<br>});</pre><p>Now, run yarn test and you should see some green output and feel that familiar, satisfying Pavlovian response that only TDD can provide. 👏</p><p><strong><em>Update:</em></strong><em> I discovered that adding </em><em>app/javascript to </em><em>roots enabled me to use the </em><a href="https://facebook.github.io/jest/docs/en/cli.html#watchall"><em>--watchAll</em></a><em> flag, which runs tests whenever files change (like </em><a href="https://github.com/guard/guard-rspec"><em>Guard</em></a><em>). Combine with the </em><a href="https://facebook.github.io/jest/docs/en/cli.html#notify"><em>--notify</em></a><em> flag for added zen</em> 👍 <em>Still trying to figure out how to get </em><em>--watch to work … </em>🤔</p><h3>3. Setup Babel</h3><p>I’m also using cool stuff like import, which didn’t seem to work out of the box. Running my specs raised this error:</p><pre>SyntaxError: Unexpected token import</pre><p>This surprised me — it’s likely I’ve configured something wrong. But I eventually got <a href="http://babeljs.io/">Babel</a> working by installing a few additional packages:</p><pre>yarn add --dev babel-jest babel-preset-es2015</pre><p>and adding the&quot;es2015&quot; preset (bolded) to my .babelrc file:</p><pre>{<br>  &quot;presets&quot;: [<strong>&quot;es2015&quot;</strong>,<br>    [&quot;env&quot;, {<br>      &quot;modules&quot;: false,<br>      &quot;targets&quot;: {<br>        &quot;browsers&quot;: &quot;&gt; 1%&quot;,<br>        &quot;uglify&quot;: true<br>      },<br>      &quot;useBuiltIns&quot;: true<br>    }]<br>  ],</pre><pre>&quot;plugins&quot;: [<br>    &quot;syntax-dynamic-import&quot;,<br>    [&quot;transform-class-properties&quot;, { &quot;spec&quot;: true }]<br>  ]<br>}</pre><h3>4. Tell Jest where your modules live</h3><p>I didn’t like the idea of typing out the full path to my modules from within my specs. The <a href="https://facebook.github.io/jest/docs/en/configuration.html#moduledirectories-array-string">moduleDirectories</a> setting can be used to tell Jest where to look for modules, so I pointed it to my source files in app/javascript. My Jest configuration in package.json ended up looking like this:</p><pre>&quot;jest&quot;: {<br>  &quot;roots&quot;: [<br>    &quot;spec/javascript&quot;<br>  ],<br><strong>  &quot;moduleDirectories&quot;: [<br>    &quot;node_modules&quot;,<br>    &quot;app/javascript&quot;<br>  ]</strong><br>},</pre><p><strong><em>Note:</em></strong><em> the value passed to </em>moduleDirectories<em> overrides the default, so you must also include the </em>node_modules<em> directory.</em></p><p>The final result is pretty sweet, and very closely matches my RSpec setup. For example, you can have a source file app/javascript/Dinosaur.js:</p><pre>export default class Dinosaur {<br>  get isExtinct() {<br>    return true;<br>  }<br>}</pre><p>and a matching test file spec/javascript/Dinosaur.spec.js:</p><pre>import Dinosaur from &#39;Dinosaur&#39;;</pre><pre>test(&#39;Dinosaurs are extinct&#39;, () =&gt; {<br>  expect((new Dinosaur).isExtinct).toBeTruthy();<br>});</pre><p>and yarn test Just Works™ 🎉</p><h3>BONUS ROUND: Setup Codeship to run Jest tests</h3><p>I use <a href="https://codeship.com/">Codeship</a> for continuous integration and thought it would be nifty to have it run my Jest suite in addition to my RSpec suite. Turns out it was super easy.</p><p>I added this to my <a href="https://documentation.codeship.com/basic/quickstart/getting-started/#configuring-your-setup-commands">Setup Commands</a>:</p><pre>nvm install 8.4.0<br>yarn install</pre><p>And this to my <a href="https://documentation.codeship.com/basic/quickstart/getting-started/#configuring-your-test-commands">Test Commands</a>:</p><pre>yarn test</pre><p>Neato 👍</p><h3>Summary</h3><p>As mentioned, I’ve probably done all this in a roundabout way. I would love feedback or suggestions from folks who actually know what they’re doing! Leave a comment or tweet <a href="https://twitter.com/kylefox">@kylefox</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef7130a4c08e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product Management Philosophies]]></title>
            <link>https://medium.com/@kylefox/product-management-philosophies-fae0eca11bec?source=rss-6aa024d2cea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/fae0eca11bec</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Kyle Fox]]></dc:creator>
            <pubDate>Tue, 14 Jul 2015 18:02:26 GMT</pubDate>
            <atom:updated>2017-09-03T05:34:16.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WoYFVIe-qS56SxzSozFTAQ.jpeg" /></figure><p>An aspiring product manager asked me to describe my “style” and philosophies around product management. I spend a lot of time thinking about this in bits and pieces but have never collected my thoughts in an organized manner.</p><p>Putting together a response was useful and fun, so I thought I’d share it here as well. Below are some of the ways I approach product management at <a href="http://www.carenetwork.com/">CareNetwork.</a></p><p><strong>Move very quickly.</strong> The enemy of a startup is <em>slowness.</em></p><p><strong>Always focus on MVP.</strong> What’s the fastest/cheapest way to test a hypothesis about what a customer will find valuable?</p><p><strong>Prototype and iterate to learn.</strong> Building stuff is easy. Figuring out <em>what</em> to build is difficult.</p><p><strong>Avoid perfectionism.</strong> It’s better to be imperfect but early than perfect but too late. Besides, you can continually deliver improvements.</p><p><strong>Do less.</strong> Be disciplined about delivering an extremely thoughtful, cohesive, curated set of well-executed features. (Note: well-executed != perfect).</p><p><strong>Don’t fear competitors.</strong> They are usually more of a distraction than anything and often pose less of a threat than you think. <a href="https://twitter.com/ajs/status/310790088810450944">Startups don’t die by homicide.</a></p><p><strong>Be flexible &amp; open-minded.</strong> Good ideas can come from anyone, anywhere, anytime.</p><p><strong>Treat everyone fairly.</strong> All stakeholders (sales, customers, engineers, executives) have a right to give input and feel heard. However, you aren’t obligated to <em>implement</em> everyone’s ideas… (See next two points)</p><p><strong>Balance all input.</strong> <a href="http://kylefox.ca/multi-tasking-is-the-heart-of-product-management/">Product managers are the hub</a> and must synthesize input from a huge number of sources. It’s your job to separate the signal from the noise.</p><p><strong>You can’t please everyone.</strong> Someone will always dislike a given product decision. Consider their feedback, but don’t let criticism erode your confidence in your decisions.</p><p><strong>Constantly talk with users.</strong> Customer development is a skill that comes with practice, but is a form of mining gold. Learn what questions to ask and how to listen. <a href="http://www.spencerfry.com/why-entrepreneurs-are-scared-of-talking-to-users">Don’t be scared</a> to talk with users early and often.</p><p><strong>Read between the lines.</strong> When a salesperson or customer tells you what they want, think deeply and ask yourself “What problem are they <em>really</em> trying to solve?”</p><p><strong>Keep it fun.</strong> At the end of the day, we’re all extremely fortunate to have the opportunity to build cool stuff and work with talented people. A good product team doesn’t feel like a mechanical assembly line — it feels like a group of friends excited about making stuff together.</p><p>I rattled these off rather quickly, hopefully they make sense. There are probably more I am forgetting, too. Also, these ideas are more related to product <em>management</em> — i.e. a process for building products — rather than the attributes of a good product.</p><p>What are your product management philosophies? <a href="https://twitter.com/kylefox">Let me know on Twitter!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fae0eca11bec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multitasking is the Heart of Product Management]]></title>
            <link>https://medium.com/@kylefox/multitasking-is-the-heart-of-product-management-80150f71650c?source=rss-6aa024d2cea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/80150f71650c</guid>
            <dc:creator><![CDATA[Kyle Fox]]></dc:creator>
            <pubDate>Sun, 29 Sep 2013 19:57:15 GMT</pubDate>
            <atom:updated>2013-09-29T20:09:13.421Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*1AduGfQAzfHGmYHv.jpeg" /><figcaption>http://www.flickr.com/photos/ryantron/4453018910/</figcaption></figure><h4>Inefficient, but unavoidable.</h4><p>Part of my job at Granify involves product management and ensuring we ship an awesome product that customers love. I’ve been building products for a while, but the whole <em>management </em>aspect is still quite new to me. I’ve learned a ton by working alongside our CEO Jeff Lawrence, a seasoned product manager, but there are still many aspects of the job I find challenging — in particular, <strong>multitasking.</strong></p><h3>Serial vs. Parallel Work</h3><p>My background is in production work: writing code and designing interfaces. In these roles you generally have a steady stream of <em>serial tasks </em>for which you’re responsible. You’re subject to interruptions (like any job) but it’s often possible to put your headphones on for a couple hours to focus on a single problem until it’s solved. And following that you move onto the next task on your list.</p><p>As a product manager, however, it’s virtually impossible to single-task. I’m bombarded with incoming information, <em>and every bit is important &amp; time-sensitive. </em>Some examples:</p><ul><li>Listening to feedback from the sales team</li><li>Hearing feature requests from the team or customers</li><li>Reports from Q/A and customers about bugs</li><li>Dealing with technical fires</li><li>Reviewing &amp; accepting new work submitted by developers/designers</li><li>Assigning new work to team members who finish tasks sooner than expected <em>(always a nice problem to have!)</em></li><li>Answering questions new employees might have about process, PM software, etc.</li></ul><p>At any given moment I’m likely dealing with at least two of the above scenarios simultaneously. The nature of this role requires multiple tasks to be tackled in <em>parallel </em>— to do otherwise would slow down the rest of the team.</p><h3>Product managers are the hub of the company</h3><p>In essence, the Product Manager’s function is to <em>synthesize </em>the endless stream of information coming from different sources (customers, engineers, analytics, marketing, sales, executives) and turn it into something tangible that can be shipped to customers. Accepting &amp; organizing these disparate data points <em>as they arrive </em>is critical. If you ignore (or defer for too long) any one aspect it begins to lag behind and slows down the whole company.</p><p>You can try to structure how you triage incoming information — for example, we’ve started having short Friday meetings to review customer feedback from that week — but often you need to listen when a co-worker is in the zone, excitedly telling you about their new idea. Those important nuances get lost when you ask them to distill their idea into a Google Doc to be read later when more convenient.</p><p>There may be downsides to <a href="http://www.forbes.com/sites/douglasmerrill/2012/08/17/why-multitasking-doesnt-work/">multitasking</a>, but with Product Management it’s an unavoidable part of the job. And it’s a skill I’m constantly working to improve.</p><p>What advice do you have for someone trying to get better at multitasking?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80150f71650c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>