<?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 Austin Kincaid on Medium]]></title>
        <description><![CDATA[Stories by Austin Kincaid on Medium]]></description>
        <link>https://medium.com/@austinkincaid?source=rss-a00c2e248e6d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NyyEwtQzzbxVWyEb.</url>
            <title>Stories by Austin Kincaid on Medium</title>
            <link>https://medium.com/@austinkincaid?source=rss-a00c2e248e6d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 14:10:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@austinkincaid/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[Rails and Vue Tutorial]]></title>
            <link>https://medium.com/@austinkincaid/rails-and-vue-tutorial-81f571244c1b?source=rss-a00c2e248e6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/81f571244c1b</guid>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[npm-pipeline-rails]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[brunch]]></category>
            <dc:creator><![CDATA[Austin Kincaid]]></dc:creator>
            <pubDate>Thu, 24 Aug 2017 05:08:49 GMT</pubDate>
            <atom:updated>2017-08-27T04:51:39.701Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, let’s build a website using Rails and Vue.js.</p><p><a href="https://github.com/aceokay/TechTime"><em>Source code</em></a></p><p><strong>Background:</strong> I started this project with the goal of building a simple site for my significant other. The request was for a tool to randomly assign students to limited numbers of computers and ipads. If we have 2 computers and 3 iPads, we want five randomly selected students to get the privilege of using them that day. The aim was to offload a process that can feel unfair to a system that would have fairness built into it. This simple goal led to a simple project for me which held a series of interesting learning opportunities that I want to share with you now.</p><p>This is best for those trying to get a basic grasp of Vue or those interested in using a JavaScript front-end framework with a Rails backend.</p><p><strong>Disclaimer: </strong>This project and most choices made throughout are not declarations of best practices. There are many points in this project where I wound up making quick tech/tool/design choices that might not have been ultimately the best. I’ll try to note these where I can in the tutorial.</p><p>Also, this project was a free-time sort of thing, it’s been stretched out over time. There might be details I’ve forgotten or gloss over. Don’t let me get away with these, ask any questions on any points where you’re confused. I’ll clap back.</p><p><strong>Contents:</strong></p><ol><li>Getting Rails ready</li><li>Rails and Brunch</li><li>Writing with Vue in mind</li><li>The dirty implementation details</li><li>Launching to Heroku</li><li>References and tooling sites</li></ol><h3>1. Getting Rails ready</h3><p>There are some things to note at this stage that will dictate our actions. Since we’re building a Rails application with a Vue front-end, Rails will consequently be all backend. This Rails application will be very basic as it will only be JSON API endpoints for the Vue front-end to shoot at. You will see us taking default gems out and truly transforming how we interact with Rails.</p><p>Create a new rails project, I called mine techTime.</p><pre>// Defaults to a SQLite database, not recommended over all.<br>rails new techTime -T</pre><pre>// OR Default to a Postgres database, recommended.<br>rails new techTime -T -d postgresql</pre><p>Next we want to prep for some RSpec testing, my preferred test tool:</p><pre>rails generate:rspec</pre><p>Now we’re cooking.</p><h3>1.1 Gemfile Configuration</h3><p>View <a href="https://github.com/aceokay/TechTime/blob/master/Gemfile">my Gemfile on GitHub</a>.</p><p>Notable additions:</p><pre># Use postgres as the database for Active Recordgem<br>&#39;pg&#39;</pre><pre># Use npm as part of your Rails asset pipeline<br>gem &#39;npm-pipeline-rails&#39;</pre><p><a href="https://github.com/rstacruz/npm-pipeline-rails">npm-pipeline-rails</a> requires our uglifier to be removed. This is due to a constraint in how it interprets backticks (`) in Vue components.</p><p>Notable removal:</p><pre># Use Uglifier as compressor for JavaScript assets<br># gem &#39;uglifier&#39;, &#39;&gt;= 1.3.0&#39;</pre><p>You may be wondering where Vue comes into play. NPM has that and others on lock, through Brunch.</p><p>Install all the gems and we can continue.</p><h3>1.2 Brunch Configuration</h3><p>In choosing to use the npm-pipeline-rails gem I was given several choices for build tool including Brunch, Gulp, Webpack, and others. I chose Brunch because it was the first in the list of build tools I didn’t know how to use. It turned out to be relatively simple once I started using it. Check out the <a href="http://brunch.io/">Brunch docs here</a>.</p><p>With the installation of npm-pipeline-rails, we get some automated setup commands. We want to run the following command in the terminal for setting up for Brunch:</p><pre>./bin/rails generate npm_pipeline:brunch</pre><p>This generates several important changes and new files:</p><pre># Add compiled Brunch files to the pipeline.<br>app/assets/javascripts/application.js<br>app/assets/stylesheets/application.css</pre><pre># Generate skeleton brunch-config.js file at root.<br>brunch-config.js</pre><pre># Generate skeleton package.json<br>package.json</pre><p>These last two items are worth breaking down.</p><p><strong>brunch-config.js:</strong> This is where you’re going to configure what Brunch does. A semi-detailed breakdown can be found in the <a href="http://brunch.io/docs/config">Brunch docs here</a>. In a nutshell this is where you’re going to tell Brunch to look for files, where to build assets to, and any other general house cleaning.</p><p>I’ve modified mine for a couple purposes. First it to explicitly order my JS files in interpretation because Brunch defaults to alphabetical and would eventually pick up something out of order. I’ll go over this again later. Second is the tool <a href="https://www.npmjs.com/package/copycat-brunch">copycat-brunch</a>, which I used for copying FontAwesome fonts to the Rails vendor folder.</p><p><strong>package.json:</strong> For someone like myself who was new to npm, this is best described as the npm equivalent of your GemFile. All your npm-originating dependencies are here. In this case, all the front-end technologies and some instructions for Heroku, but we’ll get into that later. Read all about the <a href="https://docs.npmjs.com/files/package.json">package.json here.</a></p><h3>2. Rails and Brunch</h3><p>Great news, you’re working with Brunch now. Brunch will be activated automatically whenever you start your rails server but only in a limited capacity. You will want to run some build commands when working with Vue components.</p><pre>brunch build</pre><p>Run this anytime you make a change and make sure to kill your server to be sure you get the rebuilt files served to your application.</p><h3>3. Writing with Vue in Mind</h3><p>Now we can start writing up this simple application. We’re going to write a simple, yet more complex program than normal for a tutorial like this, sorry but this project was for a real person and purpose. How useful it is in real life is another story.</p><p>We’ll have several models:</p><ol><li>student</li><li>group (essentially lists of Students, Assignments, and Assignment Records)</li><li>assignment</li><li>assignment_record</li><li>groups_students (A join table)</li></ol><p>Here’s the migration:</p><pre>class AddEverything &lt; ActiveRecord::Migration[5.0]<br>  def change<br>    create_table :students do |t|<br>      t.string :name<br>      t.boolean :skip<br>      t.timestamps<br>    end</pre><pre>  create_table :groups do |t|<br>      t.string :name<br>      t.timestamps<br>    end</pre><pre>  create_table :groups_students do |t|<br>      t.belongs_to :student, index: true<br>      t.belongs_to :group, index: true<br>      t.timestamps<br>    end</pre><pre>  create_table :assignments do |t|<br>      t.string :title<br>      t.integer :group_id<br>      t.timestamps null: true<br>    end</pre><pre>  create_table :assignment_records do |t|<br>      t.integer :group_id<br>      t.belongs_to :student, index: true<br>      t.belongs_to :assignment, index: true<br>      t.timestamps<br>    end<br>  end<br>end</pre><p>Let’s look at the Group model in this Vue context first since it’s very important.</p><h3><strong>3.1 Writing for the Group</strong></h3><p>Groups contain collections of Students, Assignments, and assignment records. Groups are kind of the center of the universe at the moment. Here’s what its Model file would look like:</p><pre># group.rb<br>class Group &lt; ActiveRecord::Base<br>  has_many :groups_students, class_name: GroupsStudents<br>  has_many :students, through: :groups_students<br>  has_many :assignments<br>  has_many :assignment_records</pre><pre>  validates :name, presence: true<br>end</pre><p>To be continued…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81f571244c1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Specialized, Make It Right.]]></title>
            <link>https://medium.com/@austinkincaid/specialized-make-it-right-9f907f0f6795?source=rss-a00c2e248e6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f907f0f6795</guid>
            <category><![CDATA[empathy]]></category>
            <category><![CDATA[make-it-right]]></category>
            <category><![CDATA[customer-service]]></category>
            <category><![CDATA[bikes]]></category>
            <category><![CDATA[specialized]]></category>
            <dc:creator><![CDATA[Austin Kincaid]]></dc:creator>
            <pubDate>Tue, 20 Dec 2016 06:58:19 GMT</pubDate>
            <atom:updated>2017-01-08T03:37:25.776Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TLDR:</strong><br>Specialized sells three versions of the electric bike Turbo. Each tier of bike is expensive; $3,000, $4,5000, and $7,000 respectively. I bought the middle version, the Turbo X. Specialized also sells a $300 rack system with light integration for the Turbo series, except they don’t advertise that it doesn’t work for one of their bikes, the Turbo X, the bike I bought. After a four month back-order wait and installation abortion, I was only able to figure out the issue alone, without anyone associated with Specialized telling me. After reaching out to Specialized for a resolution, they haven’t responded.</p><p>Hello, Specialized.</p><p>Thanks for taking the time to read this, I know your time is valuable. I’ve been wanting to write to you for a couple days now as I’ve run into a situation that I know you can fix. Let me break it down.</p><p>I bought one of your <a href="https://www.specialized.com/us/en/bikes/fitness/turbo-x-usa/106891">Specialized Turbo X</a>’s this year, a 2016 model. This electric bike is wonderful. Considering my interest in wanting to not lose my mind sitting in traffic, desire to offset my commute’s considerable carbon footprint, and love for biking, I thought I found the perfect bike for my 16 mile ride to work.</p><p>I initially test rode the Specialized Turbo S but settled on the Turbo X because of the suspension and significant price difference. The bike arrived in one piece at a local bike shop, and beyond a superficial scratch, was perfect. When I bought the bike I decided I would love to have the optional $300 fender/rack/integrated-light kit as well and paid for that outright. This is a crucial point to remember.</p><p><a href="https://www.specialized.com/us/en/accessories/commute-accessories/turbo-rackfenderlight-set/105027">The Super-Fenders</a> as I’ll refer to them from here on, were on backorder. I couldn’t wait so I bought some placeholder fenders and rack in the mean time to make due. Four months later I finally received a call saying the fenders were in, I was overjoyed.</p><p>Now’s a good point to mention I don’t live particularly close to the bike shop that I purchased all these items from. This is a 24 mile drive for me, one way. I took the bike in under the assumption the installation required more than a little knowhow and I would prefer it done perfectly by a professional. All of your vendors are professionals after all, I had nothing to worry about.</p><p>Until I picked the bike up, when things started going downhill.</p><p>I went in to pick up the bike and immediately turned the bike on to see that glorious bike light! Imagine my confusion when nothing came on. I had read the lights were prone to being almost annoying for always being on, so I was surprised nothing happened. At this point I should also mention my reticence in mentioning this issue with the bike shop staff, I had been burned before.</p><p>Considering all the loose bolts, half-cocked repairs, and general unprofessionalism, I wasn’t stunned to see a new mistake from this shop. Looking at the light, I figured there was a minor mistake under the hood and I would just do it myself instead of leaving my bike again (having already waited two days for some Super-Fender installation). I didn’t say anything about the lack of light and took the bike home.</p><p>At home I finally cracked the bike open. I was really impressed with the design of the Super-Fenders and how discreet the wire was running from the rack to the fender to the bottom-bracket compartment, great work there. I followed that wire and opened the compartment it ran into.</p><p>Instead of a properly wired light I found the rest of the wires bundled up and taped together neatly just within the compartment. Connected to nothing.</p><p>I’ll spare you the details but after a few hours I finally figured out the most grim news, my bike does not support this $300 Super-Fender set. There’s also no way to get this functionality without first voiding the warranty.</p><p>You might be wondering how big of a deal this is. It’s a big deal. Big enough for me to shell out the $300 up front. To wait four months. To throw away perfectly functional fenders and rack already on the bike. To drive back and forth to the shop to make this magic happen.</p><p>I’m upset.</p><p>What should have happened to stop this? Here’s an incomplete list:</p><ol><li>The bike shop should know what does and does not work on the bike</li><li>You should make it easier to compare different models</li><li>You shouldn’t have the top and bottom tier have this functionality, but leave the middle out.</li><li>You should stop marketing this Super-Fender set as compatible with the Turbo line, 2/3 boxes ticked in functionality does not a compatible Super-Fender make.</li><li>You shouldn’t let shops order these two products, the bike and Super-Fender set, together. Unless some clear explanation box is presented and checked on checkout</li><li>The bike shop should have informed me of 2/3 functionality on installation. On confirmation of installation over the phone. In person as I picked the bike up. As I stared at the bike trying to figure out why the light wasn’t turning on with the bike.</li></ol><p>Those are just the ones off the top of my head, you guys are smart, I know you can expand on them as well.</p><p>After what I will forever refer to as “The Most Uncomfortable Customer Service Call” to the bike shop, I still don’t have a clear resolution.</p><p>Specialized, I’d like you to make this right.</p><p>I want full functionality. I want the fenders you lead me to believe were compatible with my bike. I want four months back. I want those miles driven back. I want my emails answered. I want my calls addressed. I want you to read this, whip up some empathy, and make this right.</p><p>I hope to talk with you soon.</p><p><strong>Update 12/21/2016:</strong><br>After tweeting @iamspecialized, I have the beginning of a conversation</p><h3>Austin Kincaid on Twitter</h3><p>Hey, @iamspecialized! I wrote you a letter! I hope you make time to read it. Talk to you soon. https://t.co/whE6T51T9s</p><h3>Specialized on Twitter</h3><p>@AOKincaid Hi Austin. Thank you for the letter. Please could you email us at ridercare@specialized.com in order to resolve the problem</p><h3>Austin Kincaid on Twitter</h3><p>@iamspecialized Hello, Specialized. I&#39;ve updated the blog post and sent that email. #specialized #turbo #makeitright #customerservice</p><p>Here’s the email response content:<br>Hello, Specialized,</p><p>I tweeted a blog post I wrote at your twitter handle @iamspecialized a day ago and just heard this morning to email you. Here’s the link to the post. <a href="https://medium.com/@austinkincaid/specialized-make-it-right-9f907f0f6795#.d27kj4ue8">https://medium.com/@austinkincaid/specialized-make-it-right-9f907f0f6795#.d27kj4ue8</a></p><p>I look forward to chatting you soon.</p><p>Austin</p><h3>Last Response From Specialized: December 21, 2016</h3><p><strong>Update 1/7/2017:</strong></p><p>Specialized, here’s how the problem was resolved. I received a call from the bike shop I bought the bike from that a new part had come in special from you, Specialized. I was told this part would make the Super-Fenders work and would NOT void my warranty. Great!</p><p>I drove in, checked one last time that this was for real, I was told it was, and left looking forward to the call that the installation was done. I received a call the next day informing me that the installation was impossible. WHAT.</p><p>What is going on here? Why would Specialized send the bike shop this part (which was for the base model of Turbo, where it does work)? why would the bike shop not double-check with Specialized that this part actually works? Why wouldn’t they call after my incredulous response over the phone that I couldn’t believe this part was made just for me?</p><p>Whatever. Specialized, you’re garbage. See you never again.</p><p>Here’s a quick, basic rundown of what you’ve lost.</p><p>My business: This bike is $4,500 when I bought it. I imagine the next model will be in this range and slowly fall from there, but still hover over $2,000. So let’s say you lost $15,000 just from me (just for bikes) over this snafu.</p><p>My close friends: Of my close friends, here in Portland, many of them ride bikes regularly. Many of them also have the means and interest in buying new bikes from time to time. Many of them have ridden my bike when I first bought it in excitement to showoff how cool it was. Now all they know is how awful I’ve been treated by Specialized (and the bike shop, your representatives). Let’s say there are seven people who have been turned off to your company. Let’s call this a loss of a conservative $10,000</p><p>My general friends: I haven’t shared this article on my personal accounts yet, beyond Twitter, most of my friends and family don’t know about this issue. I’ll post it now and let’s call this loss of $20,000</p><p>The Internet: 41 people read this article at this point. I’ve only shared it a few times on Twitter, that’s not much. Let’s call this one ominou$.</p><p>Austin</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f907f0f6795" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>