<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="http://corinnpope.com/feed.xml" rel="self" type="application/atom+xml" /><link href="http://corinnpope.com/" rel="alternate" type="text/html" /><updated>2022-12-02T00:25:12+00:00</updated><id>http://corinnpope.com/feed.xml</id><title type="html">Corinn Pope</title><subtitle>I'm a full-stack product person building useful things on the interwebz.</subtitle><entry><title type="html">Should your email copywriter also do email design?</title><link href="http://corinnpope.com/copywriting/2022/12/01/email-copywriting-design.html" rel="alternate" type="text/html" title="Should your email copywriter also do email design?" /><published>2022-12-01T15:08:49+00:00</published><updated>2022-12-01T15:08:49+00:00</updated><id>http://corinnpope.com/copywriting/2022/12/01/email-copywriting-design</id><content type="html" xml:base="http://corinnpope.com/copywriting/2022/12/01/email-copywriting-design.html">&lt;p&gt;In short, no.&lt;/p&gt;

&lt;p&gt;There are some exceptions, but generally speaking, writers did not go to design school. It’s unlikely you want them designing your emails.&lt;/p&gt;

&lt;p&gt;Plain text? Sure, most of us can:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;add bullets&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;create bolded headlines&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;italicize for emphasis&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;and create an email that POPS…&lt;em&gt;without&lt;/em&gt; the need for beautiful backgrounds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But full HTML emails with code and graphics are tough. You have tables. You have CSS. You have images that need serving and hosting.&lt;/p&gt;

&lt;p&gt;Not to mention making sure it’s just right on mobile, tablets, and desktops. That’s a lot of skillsets we didn’t learn in “copywriting school”.&lt;/p&gt;

&lt;p&gt;Now for the exceptions. Here’s when you should expect your email creator to design as well:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;You’re hiring an agency&lt;/strong&gt; that specializes in complete email creation&lt;/li&gt;
  &lt;li&gt;You’re hiring a very expensive &lt;strong&gt;contractor that has confirmed they can do all of this&lt;/strong&gt; for you (and hopefully has a portfolio to back it up)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;You’re OK with a “good enough” email from your copywriter&lt;/strong&gt; and realize it will take many extra hours for them to do the additional work of designing, coding, and testing the emails.&lt;/li&gt;
  &lt;li&gt;You have &lt;strong&gt;pre-existing templates that are easy&lt;/strong&gt; to do and just need the text copy+pasta’d in&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s it in a nutshell.&lt;/p&gt;

&lt;p&gt;Please do not expect your writer to design a full HTML email from scratch. If you do need all of this, remember it’s likely to cost more.&lt;/p&gt;</content><author><name></name></author><category term="copywriting" /><summary type="html">In short, no.</summary></entry><entry><title type="html">Saving Puppeteer Screenshots To Active Record In Rails</title><link href="http://corinnpope.com/development/2021/08/24/saving-puppeteer-screenshots-with-active-storage.html" rel="alternate" type="text/html" title="Saving Puppeteer Screenshots To Active Record In Rails" /><published>2021-08-24T15:08:49+00:00</published><updated>2021-08-24T15:08:49+00:00</updated><id>http://corinnpope.com/development/2021/08/24/saving-puppeteer-screenshots-with-active-storage</id><content type="html" xml:base="http://corinnpope.com/development/2021/08/24/saving-puppeteer-screenshots-with-active-storage.html">&lt;p&gt;I’m working on a side project right now. It lets website owners, copywriters, and designers run &lt;a href=&quot;https://isthisclear.com&quot;&gt;free 5-second tests&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After posing a question about who is responsible for conversion rates on twitter, &lt;a href=&quot;https://twitter.com/andrewculver/status/1427309562059628549?s=20&quot;&gt;@andrewculver&lt;/a&gt; responded about how his whole team is and how a developer created essentially an open form that helped make it really easy for people to get started on a task on their site.&lt;/p&gt;

&lt;p&gt;I wondered if there was anything I could apply that same thing to on my own site. I have been having some trouble with getting traffic so I want to make sure that any traffic I do get will be able to get started with as little effort as possible. And when I say “get started”, I really mean “create a test”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entering a URL and taking a screenshot of it using puppeteer&lt;/strong&gt; was an idea &lt;a href=&quot;https://twitter.com/excid3&quot;&gt;@excid3&lt;/a&gt; had suggested a while back I’ve been meaning to implement. I had some time this weekend and thought I may as well give it a go.&lt;/p&gt;

&lt;p&gt;But I ran into a lot of issues when getting it to work. First, since puppeteer is mostly javascript, I knew I’d probably want to use either a lot of stimulusJS or a gem. I don’t want to write everything from the ground up. &lt;a href=&quot;https://github.com/Studiosity/grover&quot;&gt;Grover&lt;/a&gt; landed up fitting the bill. The only thing was that most of the tutorials on it were around PDFs and there wasn’t any rails specific documentation in the docs on getting it set up with Active Storage.&lt;/p&gt;

&lt;p&gt;Grover gave a nice &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.to_png&lt;/code&gt; method that was super handy, but it didn’t really give a great explanation of what you were getting with that. So first issue was trying to decode what that meant. Literally.&lt;/p&gt;

&lt;p&gt;Next issue I ran into was getting it to save. I tried what felt like everything. Most of my time was spent trying to get it into a TempFile, but trying to save that tempfile resulted in a weird authentication error.&lt;/p&gt;

&lt;p&gt;Eventually I realized I’d need ImageMagick to save it as an image successfully. And because it wasn’t a direct upload, I’d need to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;io:&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filename:&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;content_type:&lt;/code&gt; to send my image to Active Storage.&lt;/p&gt;

&lt;p&gt;Things I found helpful and pulled from along the way:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/paulmwatson/elasticbeanstalk-rails-grover-puppeteer&quot;&gt;An Elastic Beanstalk, Rails, Grover, Puppeteer app&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/55787737/is-there-a-way-to-convert-binary-data-into-a-data-type-that-will-allow-activesto&quot;&gt;SO question on binary data into Active Storage compatible data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s how I landed up getting it working:&lt;/p&gt;

&lt;h3 id=&quot;the-setup&quot;&gt;The Setup&lt;/h3&gt;

&lt;p&gt;I have cloudinary setup as my Active Storage provider. You’ll need to have your own setup as well.&lt;/p&gt;

&lt;p&gt;You’ll also need the following in your gemfile:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gem 'puppeteer-ruby'
gem 'grover'
gem &quot;mini_magick&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle install&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You may always want to set up an initializer for grover in config/intializers. Mine looks like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Grover.configure do |config|
  config.use_png_middleware = true
  config.options = {
    viewport: {
      width: 1024,
      height: 768
    },
    prefer_css_page_size: true,
    emulate_media: 'screen',
    cache: true,
    timeout: 0,
    wait_until: 'domcontentloaded',
    full_page: false
  }
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You’ll also want to make sure you have active storage setup for the field you’re using as your file field like so: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;has_one_attached :screenshot&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;the-first-form&quot;&gt;The First Form&lt;/h3&gt;

&lt;p&gt;Alright. Setup is done. Next we gotta get our screenshot in somehow. I created this in a partial and rendered it in my homepage. It takes a url from the user.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;div class=&quot;&quot; data-turbolinks-animate-persist=&quot;true&quot;&amp;gt;
  &amp;lt;form&amp;gt;
    &amp;lt;input class=&quot;input&quot; type=&quot;url&quot; placeholder=&quot;Enter a URL&quot; value=&quot;&amp;lt;%= @test_url %&amp;gt;&quot; name=&quot;test_url&quot; required autofocus&amp;gt;
      &amp;lt;input type=&quot;submit&quot; value=&quot;get feedback&quot; class=&quot;btn btn-large btn-primary&quot;&amp;gt;
  &amp;lt;/form&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I then store the input of the form in a cookie, take them through the signup process, and spit them out on a create test page with their test url they entered already pre-filled.&lt;/p&gt;

&lt;h3 id=&quot;the-create-form&quot;&gt;The Create Form&lt;/h3&gt;
&lt;p&gt;We’ll also need a “regular” create form. You could probably figure out how to combine these two, but this way worked best for the flow I wanted to take the users through.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;%= form_with(model: @test) do |form| %&amp;gt;
  &amp;lt;p class=&quot;text-xs text-gray-700&quot;&amp;gt;Enter a URL (including the https:// part and we'll optimize it for a 5-second test&amp;lt;/p&amp;gt;
  &amp;lt;div class=&quot;form-group&quot;&amp;gt;
    &amp;lt;%= form.text_field :test_url, placeholder: &quot;https://yoursite.com&quot;, class: &quot;form-control&quot; %&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;!-- more form fields would go here, but skipping them for brevety's sake --&amp;gt;

  &amp;lt;%= form.button &quot;Post Test&quot;, class: &quot;btn btn-primary&quot; %&amp;gt;
&amp;lt;% end %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The form setup is pretty simple. Next up is saving what comes through that form.&lt;/p&gt;

&lt;h3 id=&quot;the-create-method&quot;&gt;The Create Method&lt;/h3&gt;
&lt;p&gt;So it turns out that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.to_png&lt;/code&gt; outputs binary data. We then give that data to MiniMagick to read and give it a format.&lt;/p&gt;

&lt;p&gt;We’ll need to store attach it as an io object next. The &lt;a href=&quot;https://edgeguides.rubyonrails.org/active_storage_overview.html#attaching-file-io-objects&quot;&gt;Rails docs&lt;/a&gt; tell us just how to do that.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  def create
    @test = Test.new(test_params)
    if @test.save
      test_url = ActionController::Base.helpers.sanitize(test_params[:test_url] || '', tags: [])
      decoded_data = Grover.new(test_url).to_png
      image = MiniMagick::Image.read(decoded_data)
      image.format(&quot;png&quot;)
      @test.screenshot.attach(
        io: StringIO.new(image.to_blob),
        filename: &quot;#{@test.name}_screenshot.png&quot;,
        content_type: &quot;image/png&quot;
      )
      redirect_to test_path, notice: &quot;Test was successfully created.&quot;
    else
      render :new, status: :unprocessable_entity
    end
  end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;viewing-the-newly-created-screenshot&quot;&gt;Viewing the Newly Created Screenshot&lt;/h3&gt;

&lt;p&gt;If you want to view the screenshot from active storage, use the following:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;% if @test.screenshot_attached? &amp;amp;&amp;amp; @test.screenshot.representable? %&amp;gt;
  &amp;lt;%= image_tag(@test.screenshot) %&amp;gt;
&amp;lt;% end %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can also forgo uploading it at all if all you want to do is view it.&lt;/p&gt;

&lt;h4 id=&quot;just-viewing-it-controller&quot;&gt;Just viewing it (controller)&lt;/h4&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@test_url = ActionController::Base.helpers.sanitize(cookies[:test_url] || '', tags: [])
@image = Rails.cache.fetch(Digest::MD5.hexdigest(&quot;grover_url_png_#{@test_url}&quot;)) do
  Base64.encode64(Grover.new(@test_url).to_png)
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;just-viewing-it-in-the-view&quot;&gt;Just viewing it (in the view)&lt;/h4&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;% if @image %&amp;gt;
  &amp;lt;h4&amp;gt;Test screenshot preview&amp;lt;/h4&amp;gt;
  &amp;lt;%= image_tag &quot;data:image/png;base64,#{@image.html_safe}&quot; %&amp;gt;
&amp;lt;% end %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That’s essentially it! I hope this saves you some time and trouble if you’re trying to screenshots in your app.&lt;/p&gt;

&lt;p&gt;P.S  After writing this article, it was pointed out to me that cloudinary offers a URL to PNG converter. (Check out the docs for that here.)[https://cloudinary.com/documentation/url2png_website_screenshots_addon].&lt;/p&gt;</content><author><name></name></author><category term="development" /><summary type="html">I’m working on a side project right now. It lets website owners, copywriters, and designers run free 5-second tests.</summary></entry><entry><title type="html">It’s Been a While</title><link href="http://corinnpope.com/development,/entrepreneurship/2021/06/24/its-been-a-while.html" rel="alternate" type="text/html" title="It’s Been a While" /><published>2021-06-24T15:08:49+00:00</published><updated>2021-06-24T15:08:49+00:00</updated><id>http://corinnpope.com/development,/entrepreneurship/2021/06/24/its-been-a-while</id><content type="html" xml:base="http://corinnpope.com/development,/entrepreneurship/2021/06/24/its-been-a-while.html">&lt;p&gt;I always say I’m going to be better about blogging consistently. Yet here I am, over a year later from my last post…finally getting around to writing another one.&lt;/p&gt;

&lt;p&gt;Let me catch you up.&lt;/p&gt;

&lt;p&gt;A lot has happened in the last year.&lt;/p&gt;

&lt;p&gt;Some things haven’t changed. Like working on things I love, taking time to stay fit, going camping, traveling to new places, and enjoying life.&lt;/p&gt;

&lt;p&gt;Other things &lt;em&gt;have&lt;/em&gt; changed. Since the last time I checked:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I realized the startup I was working on was not going to work (for a variety of reasons)&lt;/li&gt;
  &lt;li&gt;I moved from downtown Austin to Hill Country (and picked up some cats and chickens along the way)&lt;/li&gt;
  &lt;li&gt;I took a contracting gig at a startup and am moving to a full-time role (which I’m surprisingly cool with)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A year ago I was paying someone to pair with me (not that that’s a bad thing) and struggling to find customers. Now I pinch myself when I wake up and realize that someone is paying me to write code for most of the day while taking a ride on a rocketship.&lt;/p&gt;

&lt;p&gt;Oh, and I also
get to learn about wine in the process. I loved wine before. I love it even more now.&lt;/p&gt;

&lt;p&gt;Although it has ruined cardbordeaux for me forever. My wallet does not like that part.&lt;/p&gt;

&lt;p&gt;The other week when travelling, I even got the feeling of wanting to be home. That was a new one for me.&lt;/p&gt;

&lt;p&gt;My FOMO is now gone, along with the pandemic. Good riddance. I won’t miss either of those.&lt;/p&gt;

&lt;p&gt;Obviously there’s been more to my year than just those highlights, but those are the most significant points I can recall. Other small things include
buying my first vehicle ever totally on my own (and only the second one I’ve ever owned), running an ultramarathon, and buying a casita travel trailer to hit the road with.&lt;/p&gt;

&lt;p&gt;Writing this now makes me remember how much fun it can be to sit and write into the void that it is the internet.&lt;/p&gt;

&lt;p&gt;I’m not sure why I don’t blog consistently even though I know that I enjoy it when I do it. I suppose my daily journaling session is enough to fulfill my urge to write.&lt;/p&gt;

&lt;p&gt;I also learned this year I am a big “avoider”. So I’ve come up with a few mantras to overcome that - like asking “what needs to be done?” and “what’s the smallest action to take to do that”. It is still a struggle on some days.&lt;/p&gt;

&lt;p&gt;Still — I know practicing writing in public is beneficial and I know I should do it more. But I’ll be honest - sometimes after a long day of work, all I want to do is curl up on the couch with a good book, a glass of wine, and my cats. Not write.&lt;/p&gt;

&lt;p&gt;Anyways - until next year (or maybe sooner, depending on how I feel). Hugs and kisses.&lt;/p&gt;</content><author><name></name></author><category term="development," /><category term="entrepreneurship" /><summary type="html">I always say I’m going to be better about blogging consistently. Yet here I am, over a year later from my last post…finally getting around to writing another one.</summary></entry><entry><title type="html">Do It Scared</title><link href="http://corinnpope.com/development,/entrepreneurship/2020/06/24/on-launching-june-2020.html" rel="alternate" type="text/html" title="Do It Scared" /><published>2020-06-24T15:08:49+00:00</published><updated>2020-06-24T15:08:49+00:00</updated><id>http://corinnpope.com/development,/entrepreneurship/2020/06/24/on-launching-june-2020</id><content type="html" xml:base="http://corinnpope.com/development,/entrepreneurship/2020/06/24/on-launching-june-2020.html">&lt;p&gt;Speckled is almost ready to launch as an MVP. It still needs some little things but I’d say 95% of the MVP work is complete.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And I’m terrified of launching.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It’s very much an MVP. It doesn’t have a ton of features. In fact, I’m afraid it has too few for it to really grab people and make them excited. What if it’s underwhelming to most people? What if it doesn’t actually help anyone other than me? What if people check it out and never come back?&lt;/p&gt;

&lt;p&gt;I know that it’s not going to be a perfect solution for everyone.&lt;/p&gt;

&lt;h4 id=&quot;not-to-self-do-not-take-it-personally&quot;&gt;Not to self: do not take it personally&lt;/h4&gt;

&lt;p&gt;Even if people like it, I’m still going to receive less than positive feedback at one point or another. I suppose I’m OK with it but still something about it puts a pit in my stomach. Not taking things personally is something I’ve really had to work on over the last few years and this is going to be a huge test of that.&lt;/p&gt;

&lt;p&gt;I know I’ll survive. I’m going to feel the fear anyways. I may as well feel fear and do something about it rather than not do anything about it and still feel fear anyways.&lt;/p&gt;

&lt;p&gt;Maybe they should rephrase “just do it” to “just do it, but scared”.&lt;/p&gt;

&lt;h4 id=&quot;so-what-am-i-gonna-do-about-it&quot;&gt;So what am I gonna do about it?&lt;/h4&gt;

&lt;p&gt;Anyways, that’s enough talking about fear. The next obvious question is…what am I going to do about it?&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;I’m going to wrap up the last few engineering tasks.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I’m going to go to that launch list I’ve been building.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And I’m going to ask every person on it one by one to go ahead and try it out.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If they don’t like it, I’ll ask them why not and keep iterating. If they do like it, then I’ll be more confident about reaching out to strangers or even testing advertising.&lt;/p&gt;

&lt;p&gt;Then I’m going to launch.&lt;/p&gt;

&lt;p&gt;Let’s do this.&lt;/p&gt;</content><author><name></name></author><category term="development," /><category term="entrepreneurship" /><summary type="html">Speckled is almost ready to launch as an MVP. It still needs some little things but I’d say 95% of the MVP work is complete.</summary></entry><entry><title type="html">Product Thoughts - June 2020</title><link href="http://corinnpope.com/personal/2020/06/12/product-thoughts-june-2020.html" rel="alternate" type="text/html" title="Product Thoughts - June 2020" /><published>2020-06-12T15:08:49+00:00</published><updated>2020-06-12T15:08:49+00:00</updated><id>http://corinnpope.com/personal/2020/06/12/product-thoughts-june-2020</id><content type="html" xml:base="http://corinnpope.com/personal/2020/06/12/product-thoughts-june-2020.html">&lt;h1 id=&quot;random-product-thoughts---june-2020&quot;&gt;Random Product Thoughts - June 2020&lt;/h1&gt;
&lt;p&gt;June 12, 2020&lt;/p&gt;

&lt;p&gt;I woke up this morning and just had an insatiable urge to write. About what I’m not sure, so let’s see how the words flow out of my brain this morning. Stream of consciousness…let’s go!&lt;/p&gt;

&lt;h2 id=&quot;texas-covid-19-cases-are-risingfast&quot;&gt;Texas Covid-19 cases are rising…fast&lt;/h2&gt;

&lt;p&gt;Texas is currently seeing a massive spike in covid-19 cases. We’re on a three day streak of record highs. If we have to go back into lockdown I’m going to be super bummed and a little bit pissed.&lt;/p&gt;

&lt;p&gt;Personally, I don’t really go anywhere “normal” anymore. No library. No coffee shops. No restaurants. No Target runs. Nada. The only thing I still do on occasion is go to Trader Joe’s. And even then, a TJ’s run mean a mask and post-shopping shower. I do run outside, although on the commute through my building to the path I still wear a mask.&lt;/p&gt;

&lt;p&gt;Still, there’s something heavier about being under official lockdown, even if without it you still follow all the “rules”.&lt;/p&gt;

&lt;h2 id=&quot;datagrid-successes-kinda&quot;&gt;Datagrid successes (kinda)&lt;/h2&gt;
&lt;p&gt;Anyways, enough with the rant and negativity. Let’s talk about something positive….&lt;/p&gt;

&lt;p&gt;I had been struggling with this darn Vue datagrid I have in my app for months now. I knew at the beginning it was going to be the hardest part of building, but I didn’t realize just how hard it would be.&lt;/p&gt;

&lt;p&gt;For experienced programmers, it’d probably be a breeze. Maybe it’d take them a week. But since I’m pretty new to Javascript &lt;em&gt;and&lt;/em&gt; vue, it was an exercise in patience and persistence that’s lasted for many months.&lt;/p&gt;

&lt;p&gt;The table pulls from multiple database tables, has lots of nested JSON, requires sort, search, editing, and deleting.&lt;/p&gt;

&lt;p&gt;It look me embarassingly long to go from concept and trying to figure out if this needs javascript (I was holding out hope in the beginning) to actually getting it to a place where I can use it myself.&lt;/p&gt;

&lt;p&gt;But…now I can use it myself! And I’m using it to figure out my TODO list and rank it in order of priority.&lt;/p&gt;

&lt;p&gt;Up next are fixing an annoying roadmap bug that used to not be there. Then I need to start think about how onboarding is going to work.&lt;/p&gt;

&lt;p&gt;It’s actually INCREDIBLY helpful. Now I just add things to my TODO list, rank them, and pick things from the top and work my way down.&lt;/p&gt;

&lt;p&gt;I get what they say about eating your own dogfood. Doing so has helped me tweak a number of things already and I’m sure will help me in the future.&lt;/p&gt;

&lt;h2 id=&quot;planning-out-user-onboarding&quot;&gt;Planning out user onboarding&lt;/h2&gt;

&lt;p&gt;About onboarding though…&lt;/p&gt;

&lt;p&gt;I think the “aha” moment for people will be when they add their first 3-5 items and realize that what they thought may be “top” priority may not be. The question then is how do I get them to that point as fast as humanly possible? And then keep them coming back when they have more items to add?&lt;/p&gt;

&lt;p&gt;Part of the things that are required to get them there include:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;having a scoring model (default RICE one created at account creation)&lt;/li&gt;
  &lt;li&gt;creating a board (have a default board on upon account creation)&lt;/li&gt;
  &lt;li&gt;adding items (haven’t made any defaults, maybe I should add at least one)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m wondering if I should add some default items as kind of a meta onboarding. Let people edit them. Let them archive them. Show them on the roadmap.&lt;/p&gt;

&lt;p&gt;Would it be just one item? Or should there be a bunch of tasks?&lt;/p&gt;

&lt;p&gt;Or maybe a quick demo video would be helpful.&lt;/p&gt;

&lt;p&gt;I’ve also tossed around the idea of having a more detailed setup process that lets users select from multiple scoring models or create their own right after signup. There would be different options depending on what stage they’re in and what they’re looking for.&lt;/p&gt;

&lt;p&gt;BUT, making them create their own score and &lt;em&gt;then&lt;/em&gt; add items may be too complex. What if they get stuck on the scoring stuff and never add items…even if a custom scoring methodology would be better for them longer term?!&lt;/p&gt;

&lt;p&gt;If they add items to the default model and &lt;em&gt;then&lt;/em&gt; customize their scoring model, they’ll probably have a better intuition as to how the application works and how to handle adding scoring methods. I think that’s probably the better way to go.&lt;/p&gt;

&lt;p&gt;Plus, it’ll be fastest to the aha moment.&lt;/p&gt;

&lt;p&gt;Both are worth testing out though once there are enough users to draw some conclusions.&lt;/p&gt;

&lt;p&gt;Onboarding plan: I’m going to add a default item and/or items and give them the option of watching a quick onboarding video.&lt;/p&gt;

&lt;p&gt;Guess I need to record a demo video.&lt;/p&gt;

&lt;h2 id=&quot;getting-them-to-come-back&quot;&gt;Getting them to come back&lt;/h2&gt;

&lt;p&gt;How will I get them to come back after they’ve prioritized their list?&lt;/p&gt;

&lt;p&gt;I’m not realy a fan of roadmaps with strict dates. I won’t be able to ping them on things that are coming up or are “due” soon.&lt;/p&gt;

&lt;p&gt;Could I see if they’ve integrated with anything and ping them when they’ve added something that may also need to be added to Speckled? Perhaps. Although depending on the user, I feel like this may overwhelm then with notifications and that’s no beuno either.&lt;/p&gt;

&lt;p&gt;I could go with the variable rewards system in the “Hooked” book model. Although it feels a little dirty. But then again, we’re all PMs here so we all know the game and how to turn it off if we don’t like it. Still.&lt;/p&gt;

&lt;p&gt;Maybe broadcast roadmap changes to slack.&lt;/p&gt;

&lt;p&gt;I’d also like to add custom backgrounds. That’d be fun.&lt;/p&gt;

&lt;p&gt;Or a little celebration when they mark something as done or archive something.&lt;/p&gt;

&lt;h2 id=&quot;am-i-getting-ahead-of-myself&quot;&gt;Am I getting ahead of myself?&lt;/h2&gt;

&lt;p&gt;Little things. So many little things. They all need wrapping up.&lt;/p&gt;

&lt;p&gt;The last 10% of this project is taking 90% of the time. It’s so frustrating.&lt;/p&gt;

&lt;p&gt;There are bugs in the datagrid. If you select more than one item to edit, you can only save one item. Anything else will be overwritten.&lt;/p&gt;

&lt;p&gt;There’s a bug in the roadmap. If you drag a story away and that old column is now empty, it just disappears.&lt;/p&gt;

&lt;p&gt;There’s a bug in bulk importing. The form only appears after refresh.&lt;/p&gt;

&lt;p&gt;There’s a bug in asana imports. Sometimes they don’t work.&lt;/p&gt;

&lt;p&gt;I haven’t gotten around to changing the active class in the selection menu. It always looks like you’re on the dashboard.&lt;/p&gt;

&lt;p&gt;Still, I think it’s good to think about big things like onboarding and retention in parallel with these little things.&lt;/p&gt;

&lt;p&gt;Just so many little things! And so many big things too!&lt;/p&gt;

&lt;h2 id=&quot;end-ramble&quot;&gt;End ramble&lt;/h2&gt;

&lt;p&gt;I guess I should stop rambling and get back to work. That was oddly therapeutic though.&lt;/p&gt;</content><author><name></name></author><category term="personal" /><summary type="html">Random Product Thoughts - June 2020 June 12, 2020</summary></entry><entry><title type="html">Habits</title><link href="http://corinnpope.com/personal/2020/05/25/habits-2020.html" rel="alternate" type="text/html" title="Habits" /><published>2020-05-25T15:08:49+00:00</published><updated>2020-05-25T15:08:49+00:00</updated><id>http://corinnpope.com/personal/2020/05/25/habits-2020</id><content type="html" xml:base="http://corinnpope.com/personal/2020/05/25/habits-2020.html">&lt;h1 id=&quot;my-habits--routines-in-2020&quot;&gt;My Habits &amp;amp; Routines in 2020&lt;/h1&gt;
&lt;p&gt;May 25, 2020&lt;/p&gt;

&lt;p&gt;It’s been almost an entire year since I read James Clear’s &lt;em&gt;Atomic Habits&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;There are very few books I can say have definitively changed my life my life for the better.&lt;/p&gt;

&lt;p&gt;This is one of them.&lt;/p&gt;

&lt;p&gt;The premise of the book is to figure out what your ideal identity is and then create or remove habits that help you reach this dream identity of yours.&lt;/p&gt;

&lt;p&gt;I thought it was going to be a bit woo-woo. Like, who can really just decide to change and then do it, right away? Don’t habits take a while to stick?&lt;/p&gt;

&lt;p&gt;It was worth a shot though, so using the book, I identified the kind of person I’d like to be as:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;a mindful, flexible individual&lt;/li&gt;
  &lt;li&gt;a strong and lean trail runner&lt;/li&gt;
  &lt;li&gt;a successful business owner&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once I decided on these, figuring out new habits was actually fun and easy. They weren’t a chore. They didn’t take 21 days or whatever amount people say you need to form a habit. I just did them. And the next day did them again. Repeat ad infinitum.&lt;/p&gt;

&lt;p&gt;What changes did I make? Here are the ones I’ve implemented since June 2019:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Charging my phone overnight in the living room
    &lt;ul&gt;
      &lt;li&gt;This prevents me from getting sucked into the vortex of hacker news, reddit, email, twitter, and other mindless browsing first thing in the morning.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Grabbing my meditation cushion and sitting
    &lt;ul&gt;
      &lt;li&gt;As soon as I roll out of bed, I go sit on my meditation cushion. If it’s a really good day, I’ll sit for 10 minutes until my head feels clear enough to get going. Otherwise it’s anywhere from 20 minutes up to an hour on days I’m feeling really anxious.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Stretching routine
    &lt;ul&gt;
      &lt;li&gt;Directly after meditating, I do a yoga routine consisting of sun salutations and some other hip opening poses to try to undo the damage from sitting for 8 hours a day.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Journal
    &lt;ul&gt;
      &lt;li&gt;This has been the most rewarding behind meditation. Right after stretching, I pop open my journal and write about how I’m feeling. I’ll typically also cover things about what happened yesterday, what the weather is like, what I’m planning on doing today, what I’m grateful for, the day’s top headline, and more.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Get to Work
    &lt;ul&gt;
      &lt;li&gt;Before all these habits, I’d sit down at my computer and repeat the same website checking cycle I did on my phone. Now I just go straight from my journal entry to work. I even have an Alfred shortcut setup to make sure it’s as easy as hitting a hotkey.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Workout
    &lt;ul&gt;
      &lt;li&gt;Depending on the time of year and state of the world, I’ll either workout in the morning somewhere between stretching and journaling or in the afternoon before lunch. Usually it’s a run, but with this whole coronavirus thing going on, it’s been a stationary bike ride lately.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Eat
    &lt;ul&gt;
      &lt;li&gt;Breakfast/Lunch is at 1PM. That’s the soonest I’ll usually eat, and on some days when I’m in the work zone, it can be even later.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Drink
    &lt;ul&gt;
      &lt;li&gt;I don’t drink on any worknight.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Other weekly habits include “Writing Wednesday” and “Strategy Sunday”.&lt;/p&gt;

&lt;p&gt;These new habits have been really, really great.&lt;/p&gt;

&lt;p&gt;I feel SO much better than I did this time last year.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I can sit in a full lotus pose, put my hands flat on the floor when touching my toes, and do a decent wheel pose&lt;/li&gt;
  &lt;li&gt;I can meditate for an hour and not get too anxious&lt;/li&gt;
  &lt;li&gt;I can stick to an exercise routine even when I don’t want to&lt;/li&gt;
  &lt;li&gt;I can realize when stupid websites are sucking up my time and quit them&lt;/li&gt;
  &lt;li&gt;I can spend more time creating and less time consuming&lt;/li&gt;
  &lt;li&gt;I wake up with a clear head&lt;/li&gt;
  &lt;li&gt;I can look back a year and see exactly how I was feeling in my journal&lt;/li&gt;
  &lt;li&gt;I can identify when I’m in a funk and get out of it quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My routine isn’t perfect. I’d like to add some better nighttime routines around getting to bed at a specific time and eating fewer refined carbs.&lt;/p&gt;

&lt;p&gt;To do that, I need to think about how to make those easy and really decide that I want to be an early riser and health conscious eater. But boy do I love carbs and sleeping in.&lt;/p&gt;

&lt;p&gt;Is it time to give those up? Based on how my other habits make me feel, I suppose it is.&lt;/p&gt;</content><author><name></name></author><category term="personal" /><summary type="html">My Habits &amp;amp; Routines in 2020 May 25, 2020</summary></entry><entry><title type="html">Keep it Simple, Stupid</title><link href="http://corinnpope.com/development/2020/05/06/keep-it-simple-stupid.html" rel="alternate" type="text/html" title="Keep it Simple, Stupid" /><published>2020-05-06T15:08:49+00:00</published><updated>2020-05-06T15:08:49+00:00</updated><id>http://corinnpope.com/development/2020/05/06/keep-it-simple-stupid</id><content type="html" xml:base="http://corinnpope.com/development/2020/05/06/keep-it-simple-stupid.html">&lt;h1 id=&quot;keep-it-simple-stupid&quot;&gt;Keep it Simple, Stupid&lt;/h1&gt;
&lt;p&gt;May 6, 2020&lt;/p&gt;

&lt;p&gt;Speckled has been a work in progress for 3 months now. Crazy!&lt;/p&gt;

&lt;p&gt;It’s been a blast, but as like most programming projects it has taken about 3x longer than expected. My programming skills are getting better and I’m getting faster, but it’s still mildly infuriating to close my eyes at night and &lt;em&gt;feel&lt;/em&gt; like I’ve made negative progress on my codebase, even if I did learn a bunch.&lt;/p&gt;

&lt;h2 id=&quot;education--knowledge&quot;&gt;Education != Knowledge&lt;/h2&gt;

&lt;p&gt;Part of my slow progress has been due to my naivete. I started this project with little understanding of how models work in real projects. I only had the academic knowledge that database tables should be normalized, with foreign keys linking related tables and things repeated as little as possible.&lt;/p&gt;

&lt;p&gt;When I drew everything out, I broke everything down into wayyyyy too many tables. For the main functionality of scoring things, I had the following tables:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Items&lt;/li&gt;
  &lt;li&gt;Formulas&lt;/li&gt;
  &lt;li&gt;Factors&lt;/li&gt;
  &lt;li&gt;Scores&lt;/li&gt;
  &lt;li&gt;Composite Scores&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;stuck-in-has__many__through-hell&quot;&gt;Stuck in has__&lt;em&gt;many&lt;/em&gt;__through Hell&lt;/h2&gt;

&lt;p&gt;The number of nested relationships I had to keep track of was becoming a serious time and energy suck. I was getting stuck very frequently with just trying to figure out how to access some of the records in my database.&lt;/p&gt;

&lt;p&gt;Need an item’s score for “factor x”? Well, you’ll have to join the formulas and factors tables to find which ones belong to their team, and then find the record where the item_id is the one you’re looking up, and then get the value from that row. Or something like that. I try to forget. It was a lot of rigmarole.&lt;/p&gt;

&lt;p&gt;One day, I was trying to debug an issue with a friend (I had/have a lot of issues). His blank stare as I tried to explain some of the relationships to him was an indicator of how crappy my initial design decisions had been.&lt;/p&gt;

&lt;p&gt;You know that feeling when you’re explaining something to someone and in the middle of your explanation, you go “Shit. There’s gotta be a better way to do this”? Well, I had that feeling while talking to him…more than a couple of times.&lt;/p&gt;

&lt;h2 id=&quot;tear-it-all-down&quot;&gt;Tear It All Down&lt;/h2&gt;

&lt;p&gt;So, like any good teacher, he suggested I simplify it.&lt;/p&gt;

&lt;p&gt;Suddenly, five tables became two. TWO freaking tables! Oh, how much easier that would be to manage!&lt;/p&gt;

&lt;p&gt;It made so much more sense.&lt;/p&gt;

&lt;p&gt;However, I did feel slightly annoyed at myself for not having thought of it before, even though I am still a beginner and should be a little gentler on myself. Only with experience will some of this stuff start to click.&lt;/p&gt;

&lt;p&gt;Thankfully, other people have way more experience than me and can provide guidance when I’m stuck.&lt;/p&gt;

&lt;p&gt;Now I’m refactoring everything to use these simplified models.&lt;/p&gt;

&lt;h2 id=&quot;what-did-i-learn&quot;&gt;What did I learn?&lt;/h2&gt;

&lt;p&gt;Well, I now know &lt;em&gt;a lot&lt;/em&gt; more about relationships in Rails then most advanced beginners, so I got that going for me.&lt;/p&gt;

&lt;p&gt;I learned that having a teacher who has more experience than you is one of the fastest ways to learn and see your mistakes.&lt;/p&gt;

&lt;p&gt;And third, I learned it is almost always better to keep things simple.&lt;/p&gt;

&lt;p&gt;After all, why use 5 tables when 2 will do?&lt;/p&gt;</content><author><name></name></author><category term="development" /><summary type="html">Keep it Simple, Stupid May 6, 2020</summary></entry><entry><title type="html">Reflections on My Apprenticeship and What’s Next</title><link href="http://corinnpope.com/entrepreneurship/2020/03/25/reflection-new-project.html" rel="alternate" type="text/html" title="Reflections on My Apprenticeship and What’s Next" /><published>2020-03-25T15:08:49+00:00</published><updated>2020-03-25T15:08:49+00:00</updated><id>http://corinnpope.com/entrepreneurship/2020/03/25/reflection-new-project</id><content type="html" xml:base="http://corinnpope.com/entrepreneurship/2020/03/25/reflection-new-project.html">&lt;h1 id=&quot;leaving&quot;&gt;Leaving&lt;/h1&gt;

&lt;p&gt;How do you decide when an apprenticeship is complete? When is it time to move on? To call it done?&lt;/p&gt;

&lt;p&gt;Do you move on after a certain time period — say two years or so? After you’ve learned “enough”? Or maybe when you get that gut feeling that it’s time to go?&lt;/p&gt;

&lt;p&gt;If you’re looking at an exact answer, I’d say “it depends”. However, if you forced me to give broad reaching advice, I’d say 2 years plus however much time you need to accomplish the following:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Reach whatever personal goals you have set for yourself&lt;/li&gt;
  &lt;li&gt;Gain the particular skills you know you’ll need for your next project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a little background, I spent my apprenticeship at a graphic design company who offered their services in a “productized” model. In the time that I was there, we grew from a small team of 10 or so to 25-ish employees on the US side, and from 100 or so designers to over 250 designers on the Phillippines side.&lt;/p&gt;

&lt;p&gt;The goal for my apprenticeship was to understand how a small(ish) internet based business is run, what the big challenges are, how one may tackle them, and get some reps in on the company dime and time on how to run a product and a business. I promised myself I’d take in every bit of learning I could, give my all to the role, take ownership wherever possible, and see what I could accomplish.&lt;/p&gt;

&lt;p&gt;During my time there, I learned the guts of how something I’d like to run could be run, from marketing and sales to product, customer service, and development. And then some.&lt;/p&gt;

&lt;p&gt;I also had two particularly helpful experiences. The first experience was running a software product that was a side project for the company. I learned what running a small SaaS would really be like. Second, I led a small product team that was able to ship some really cool stuff. I’m really proud of the work we did there and was fortunate to work with a really great group of people.&lt;/p&gt;

&lt;p&gt;2.4 years in I knew it was time to go.&lt;/p&gt;

&lt;p&gt;Even with all the great experiences I was having, I was starting to bump up against some barriers. I started to realize that I may be best suited for earlier stage work and that the detailed, process-oriented work that is required to take a company beyond ten million may not be my forte and was not enjoyable work for me. That was turning into the majority of my work. Also, while I loved managing, I missed creating.&lt;/p&gt;

&lt;p&gt;If I stayed longer, I could learn how to lead larger teams. That’s cool and all — but my long-term goal is not to build some massive business with hundreds of employees. It’s to build a small team that builds a meaningful product that customers love. Keyword &lt;em&gt;small&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I also put my whole energy into the role. My team was spread out literally across the globe, from eastern Europe to Asia, there was almost always someone on my team online at every hour of the day. That meant a lot of slack messages at odd hours. I felt like I needed to be there for everyone all the time, and that started to take a toll of my mental health. A sense of burnout started to creep in. I was tired.&lt;/p&gt;

&lt;p&gt;It was indeed time.&lt;/p&gt;

&lt;p&gt;When the day came around and I put in my notice, I felt guilty. I felt guilty for leaving my team. I felt guilty for leaving such a great position (that was a great product role, and it was remote to boot). I felt guilty for wanting to be selfish and pursue my own goals.&lt;/p&gt;

&lt;p&gt;I cried when I put in my resignation, but I knew it was the right decision. After getting all the leaving bits in order, I breathed a sigh of relief knowing I now had some time to re-focus on the next step of making my long-term goals come true.&lt;/p&gt;

&lt;h1 id=&quot;recovery-phase&quot;&gt;Recovery Phase&lt;/h1&gt;

&lt;p&gt;Creative juice level - 30%&lt;/p&gt;

&lt;p&gt;Right after leaving, I had a few options of what to do next, from doing some consulting work, to taking some ownership of the company side project mentioned above, to joining a role my friend recommended me for at a growing company.&lt;/p&gt;

&lt;p&gt;But I needed a break. My creative juice levels were at all time lows. I’d sit in front of my journal and nothing would come out of my brain. That’s a real bad sign for me. Usually I could fill up pages with random ideas, plans, and thoughts. But now, nothing.&lt;/p&gt;

&lt;p&gt;So, how could I get my creative groove back?&lt;/p&gt;

&lt;p&gt;My first order of business was running the marathon I’d been training for. So I did that. It was cold, wet, and miserable, but I did it! It turns out committing to a plan no matter how much it sucks can help you get where you want to be. The marathon also happened to be near the Willamette valley, so after that we visited some friends, hung out with a whole bunch of cute golden retrievers, and drank more than a couple of bottles of pinot.&lt;/p&gt;

&lt;p&gt;I’m grateful that I had some activities planned after leaving. It made the transition to not having a “real” plan yet that much easier.&lt;/p&gt;

&lt;p&gt;After the marathon and travel were over and I was back in Austin, I still woke up every day thinking about my last role for a week or so. Old habits die hard. But let’s not lie now, I did bask in the lack of Slack notifications. Those first couple of weeks I spent just cleaning, working out, writing in my notebook, napping, meditating, and painting. Unstructured time felt great, if not a bit anxiety provoking at times for someone who is usually very goal oriented.&lt;/p&gt;

&lt;p&gt;Then it was off to Portugal for a month to hang out, relax, and re-find myself &lt;em&gt;Eat, Love, Pray&lt;/em&gt; style.&lt;/p&gt;

&lt;p&gt;Just kidding!&lt;/p&gt;

&lt;p&gt;My loose goal for the trip was to learn some new things and explore Lisbon, not try to cram years of self-discovery into one month.&lt;/p&gt;

&lt;h1 id=&quot;directionless-exploration&quot;&gt;Directionless Exploration&lt;/h1&gt;

&lt;p&gt;During the Portugal trip and the months that proceeded it, I decided it’d be fun to explore some things I was interested in since I now had some time on my hands. You know, making progress on the “I should do that one day” type things.&lt;/p&gt;

&lt;p&gt;First up was programming. I decided to learn Ruby, JavaScript, and dive back into Ruby on Rails. Tailwind CSS was also something I wanted to explore.&lt;/p&gt;

&lt;p&gt;Also on the list was finally reading some classic literature, learning a new language, cooking more, redoing my personal site, decluttering, completing some projects around the house, signing up for an ultramarathon, and more.&lt;/p&gt;

&lt;p&gt;I figured I’d start tackling some of the ideas on the list and not fully commit to any one thing in particular. I’d pursue the things that piqued my curiousity. What I actually got around to doing was less than my (lofty) aspirations. I still managed to accomplish quite a bit and dabble in a few topic areas like:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Ruby, RoR&lt;/li&gt;
  &lt;li&gt;JavaScript, Vue&lt;/li&gt;
  &lt;li&gt;TailwindCSS&lt;/li&gt;
  &lt;li&gt;Spending time outside&lt;/li&gt;
  &lt;li&gt;Signing up/training for an ultra&lt;/li&gt;
  &lt;li&gt;Turning this site into a static site (on gatsby)&lt;/li&gt;
  &lt;li&gt;Reading Candide, The Brothers Karamazov, 100 Years of Solitude&lt;/li&gt;
  &lt;li&gt;Drinking lots of espresso and Portugese wine&lt;/li&gt;
  &lt;li&gt;Picking up an enjoyment of tinned sardines on toast&lt;/li&gt;
  &lt;li&gt;Reflecting on past year and go through previous years annual reflections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this time, I’d spent November in Portugal and December/Beginning of January at home with family. I love my family, but I was starting to get that itch to get out of there and do something productive. My creative batteries were recharged and I was ready to get stuff done.&lt;/p&gt;

&lt;h1 id=&quot;latching-on&quot;&gt;Latching On&lt;/h1&gt;

&lt;p&gt;Now that I was recharged and had all this potential creative energy, the next question was…what should I direct it to?&lt;/p&gt;

&lt;p&gt;I’m a big fan of project based learning. You can only learn so much from reading about something. Plus, having a project I feel is a great way to feel accomplished as you move something from an idea into something that’s tangible.&lt;/p&gt;

&lt;p&gt;However, I’m not a fan of coming up with a solution first and then trying to find the problem it solves. That’s silly. I’d rather start with a growing market and then figure out what problems they’re having and solve those. I feel like the most “duh” way of doing this is identifying which markets you’re a part of, making a list of the problems you deal with on a daily basis, and tackling one of those.&lt;/p&gt;

&lt;p&gt;I consider myself a member of the product manager community and most strongly identify with that group professionally. Some of the problems I had were:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Not writing good enough specs&lt;/li&gt;
  &lt;li&gt;Having to constantly prioritize and say no&lt;/li&gt;
  &lt;li&gt;Lacking coordination and know-how to do good product marketing&lt;/li&gt;
  &lt;li&gt;Balancing market, customer, and stakeholder needs&lt;/li&gt;
  &lt;li&gt;Managing roadmaps and schedules&lt;/li&gt;
  &lt;li&gt;Fielding questions and requests from what felt like everyone&lt;/li&gt;
  &lt;li&gt;Managing knowledge bases&lt;/li&gt;
  &lt;li&gt;Staying ahead of communication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I pursued “building better specs” for a while and then moved on to better prioritization. Mostly because “spec management” as a category doesn’t really exist yet and I didn’t want to try to break into something new as a bootstrapper.&lt;/p&gt;

&lt;p&gt;However, there were some companies out there already doing project and product prioritization, so I realized that’d probably be better to go into since I wouldn’t have to spend all that energy explaining what it is that I’m making.&lt;/p&gt;

&lt;p&gt;Now, should build it myself or outsource it? Since I knew the basics of programming and product management, I could probably outsource it without getting swindled. However, right now I have more time than money, so I decided to go the route of building it myself.&lt;/p&gt;

&lt;p&gt;While I’m trying to metaphorically burn the bridges and go all in on this entrepreneurship thing, I know that knowing how to develop a web app is a good skill to have should ever SHTF and I need to get a job for a while.&lt;/p&gt;

&lt;p&gt;This next part of the story is the boring part. It’s the part where I wake up every morning, get in my morning coffee, meditation, journal, run, and fire up my text editor. Then proceed to “program”.&lt;/p&gt;

&lt;p&gt;What I really do is a combination of banging my head against the wall, silently mouthing “wtf why won’t this work?”, googling things, trying small tweaks and refreshing, and writing a bit of code. I’ve been getting more efficient at this as time has gone on.&lt;/p&gt;

&lt;p&gt;I now find myself writing my own code, which sounds stupid, but I feel like is an indicator of how far I’ve come in just the past couple of months. No more copying and pasting from StackOverflow.&lt;/p&gt;

&lt;p&gt;Some days I make a lot of progress, and some days I feel like I’ve made negative progress. However, I’ve never felt more fulfilled, relaxed, and happy — even though some days just absolutely suck.&lt;/p&gt;

&lt;p&gt;I also got myself a &lt;a href=&quot;https://codementor.io/&quot;&gt;codementor&lt;/a&gt;, who has been an indespensable help for when I get stuck. There are just some programming things that you seem to have to learn from other programmers. My &lt;a href=&quot;https://gorails.com&quot;&gt;GoRails&lt;/a&gt; membership has also proven to be an amazing way to learn how to build real, useful features into my application.&lt;/p&gt;

&lt;h1 id=&quot;current-project&quot;&gt;Current Project&lt;/h1&gt;

&lt;p&gt;So what’s next? Well that spec management tool I mentioned before evolved into a product prioritization tool. It’s stupid simple. Embarassingly so I’m afraid.&lt;/p&gt;

&lt;p&gt;As a product manager, you can add all of your potential product ideas, features, bugs, improvements, stakeholder requests, and whatever else is on that long list of yours and prioritize it in a way that makes sense for your goals.&lt;/p&gt;

&lt;p&gt;Want to make sure you’re building things the customer wants? You can evaluate all your ideas on customer demand. Maybe you’re more concerned about keeping your crazy boss happy. Then prioritize for that. Or perhaps in this crazy time, you want to make sure everything new can generate a buck and keep long-term customers. Then prioritize for those criteria.&lt;/p&gt;

&lt;p&gt;As a PM, it’s really easy to build the wrong things. It’s friggin hard to build the right things at the right time. That’s what Speckled is for. Making better product decisions.&lt;/p&gt;

&lt;p&gt;I have a rough landing page up right now at &lt;a href=&quot;https://getspeckled.com&quot;&gt;GetSpeckled.com&lt;/a&gt;. It’s not exactly sign-up-able yet, but it’s getting there slowly but surely. Over the next couple of weeks I’ll be getting to the point where I feel more comfortable demo-ing it.&lt;/p&gt;

&lt;p&gt;So that’s what’s next! Could it have come with better timing in the midst of all this Covid-19 stuff? Sure! But it is what it is.&lt;/p&gt;

&lt;p&gt;Alright, back to coding!&lt;/p&gt;</content><author><name></name></author><category term="entrepreneurship" /><summary type="html">Leaving</summary></entry><entry><title type="html">Custom Column Selection on a Vue Datagrid</title><link href="http://corinnpope.com/development/2020/01/23/custom-column-selection-vue-datagrid.html" rel="alternate" type="text/html" title="Custom Column Selection on a Vue Datagrid" /><published>2020-01-23T15:08:49+00:00</published><updated>2020-01-23T15:08:49+00:00</updated><id>http://corinnpope.com/development/2020/01/23/custom-column-selection-vue-datagrid</id><content type="html" xml:base="http://corinnpope.com/development/2020/01/23/custom-column-selection-vue-datagrid.html">&lt;h1 id=&quot;custom-column-selection-on-a-vue-datagrid&quot;&gt;Custom Column Selection on a Vue Datagrid&lt;/h1&gt;

&lt;p&gt;On the application I’m building, I wanted users to be able to select which columns they see. Staring at a screen full of data can be headache inducing — especially when trying to parse between what columns are what. When things get bloated, it can be confusing to see ‘customer_id’ and ‘id’ on the same table where you’re trying to find the ‘referral_source’ column. Intercom does this really well.&lt;/p&gt;

&lt;p&gt;I started off with the Vue datagrid component from the vue documentation as a template for my datagrid.&lt;/p&gt;

&lt;p&gt;Because I’m using it as a single file component, I had to seperate out the query function and the actual table part into seperate components. The parent is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;datagrid.vue&lt;/code&gt; while the child is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;datatable.vue&lt;/code&gt;. This way, datagrid can pass it’s query string to datatable&lt;/p&gt;

&lt;p&gt;Plus, it keeps the actual table part and all of it’s niceties like the columns selector and search fields apart from one another.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/custom_columns.gif&quot; alt=&quot;Column selection&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;my-models&quot;&gt;My models&lt;/h3&gt;

&lt;p&gt;In this table I have a grid of items. An item object contains a number of parameters like id, name, description, created_at, updated_at, team_id, user_id, board_id, and lots of others. This data takes the form of an array of objects.&lt;/p&gt;

&lt;h3 id=&quot;my-vue-setup&quot;&gt;My Vue setup&lt;/h3&gt;

&lt;p&gt;I have vue and vuex setup in my rails 6 application. I won’t go over how to do this, as the documentation can do a better job at explaining the setup process than I can.&lt;/p&gt;

&lt;p&gt;In addition, I also have a store setup so I can easily get and set data from the backend of things.&lt;/p&gt;

&lt;p&gt;The files this feature touches:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;app/javascript/packs/application.js
app/javascript/components/datagrid.vue
app/javascript/components/datatable.vue
app/views/dashboards/index.html.erb
app/controllers/dashboards_controller.rb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;One note: don’t forget to include your javascript pack tag wherever you may keep them. Mine is in my application layout file like so: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Anyways, on to the code…&lt;/p&gt;

&lt;h2 id=&quot;applicationjs&quot;&gt;Application.js&lt;/h2&gt;

&lt;p&gt;Register the datagrid component with Vue&lt;/p&gt;

&lt;p&gt;Alongside any imports, add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;import Datagrid from '../components/datagrid'&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Within your store, add a place to store your items (or whatever name it is you’ll be using)&lt;/p&gt;

&lt;p&gt;`
window.store = new Vuex.Store({
    state: {
      items: [],
  },
`&lt;/p&gt;

&lt;p&gt;We’ll then setup Vue to listen for our datagrid element:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;document.addEventListener(&quot;turbolinks:load&quot;, function() {
    var element = document.querySelector(&quot;#datagrid&quot;)
        if (element != undefined) {
            window.store.state.items = JSON.parse(element.dataset.items)
            const datagrid = new Vue({
            el: element,
            store: window.store,
            template: &quot;&amp;lt;Datagrid /&amp;gt;&quot;,
            components: { Datagrid }    })
        }
    })
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;our-view--view-controller&quot;&gt;Our view &amp;amp; view controller&lt;/h2&gt;

&lt;p&gt;Now we need to add a #datagrid to a view somewhere so the query selector in the code above can do it’s thang.&lt;/p&gt;

&lt;p&gt;I have mine in my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;views/dashboards.index.html.erb&lt;/code&gt; but you can put yours wherever you need to render your datagrid.&lt;/p&gt;

&lt;p&gt;`
&amp;lt;%= tag.div id: :datagrid, data: { items: @items.to_json } %&amp;gt;
`&lt;/p&gt;

&lt;p&gt;Obv, our app needs to know what @items and columnsArray means because it’s a computer and it’s pretty stupid unless you tell it explicity what to do (ok, maybe minus machine learning but I digress…).&lt;/p&gt;

&lt;p&gt;So we find the items we want in our view’s controller (mine is in the index, but yours may be somewhere else):&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;def index
    @items = Item.where('team_id = ?', current_user.team_id)
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want to check out what kind of data you’re spitting out, throw a couple of console.logs into the datagrid setup in application.js (hint: try console.log(window.sotre.state.items)).&lt;/p&gt;

&lt;h2 id=&quot;datagridvue&quot;&gt;datagrid.vue&lt;/h2&gt;

&lt;p&gt;Now for the fun Vue stuff! We have our datagrid div id setup and all prepped and ready to do something with some data.&lt;/p&gt;

&lt;p&gt;Let’s set up datagrid.vue, i.e the parent controller in this relationship.&lt;/p&gt;

&lt;h3 id=&quot;the-template-section&quot;&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;template&amp;gt;&lt;/code&gt; section&lt;/h3&gt;

&lt;p&gt;There are three major chunks to the template section of this code.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;the search query area&lt;/li&gt;
  &lt;li&gt;the column selection dropdown&lt;/li&gt;
  &lt;li&gt;the datatable child component&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The search query area has an input boxed named “query” and a v-model=”searchQuery” we’ll send to the datatable as a prop in just a bit.&lt;/p&gt;

&lt;p&gt;The next part is the dropdown menu for column selection. We show and hide it on click using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v-on:click=&quot;visible =!visible&quot;&lt;/code&gt;. When visible, we’ll see a list of checkboxes that track our selections in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v-model=&quot;checkedColumns&quot;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Finally, we have the datatable child component. We use this div to send the columns the user has selected via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:columns=&quot;checkedColumns&quot;&lt;/code&gt; and the text from the input field with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:filter=&quot;searchQuery&quot;&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div id=&quot;datagrid&quot;&amp;gt;
    &amp;lt;div class=&quot;flex flex-row flex-no-wrap justify-between&quot;&amp;gt;
      
    &amp;lt;!-- left items --&amp;gt;
      &amp;lt;div class=&quot;flex flex-row m-2 justify-start items-center&quot;&amp;gt;
        &amp;lt;div class=&quot;text-lg font-light pr-2&quot;&amp;gt;
          &amp;lt;i class=&quot;fas fa-search&quot;&amp;gt;&amp;lt;/i&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class=&quot;border-b border-solid border-neutral-6 w-56&quot;&amp;gt;
          &amp;lt;input name=&quot;query&quot; v-model=&quot;searchQuery&quot; placeholder=&quot;Search&quot;&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;

      &amp;lt;!-- Right items --&amp;gt;
      &amp;lt;div class=&quot;flex flex-row m-2 justify-start items-center&quot;&amp;gt;
        &amp;lt;div v-on:click=&quot;visible = !visible&quot; class=&quot;mb-10 hover:cursor-pointer&quot;&amp;gt;&amp;lt;i class=&quot;fas fa-columns&quot;&amp;gt;&amp;lt;/i&amp;gt;
         Columns
        &amp;lt;/div&amp;gt;     
        &amp;lt;div class=&quot;relative&quot;&amp;gt;
          &amp;lt;div v-if=&quot;visible&quot; class=&quot;w-64 bg-neutral-1 p-4 absolute right-0 top-0 rounded-lg shadow border border-neutral-2&quot;&amp;gt;
            &amp;lt;div class=&quot;text-md font-light text-neutral-7 border-b border-neutral-3 m-2 p-2&quot;&amp;gt;Display columns: 
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
              &amp;lt;input type=&quot;checkbox&quot; id=&quot;reach_score&quot; value=&quot;reach_score&quot; v-model=&quot;checkedColumns&quot;&amp;gt;
              &amp;lt;label for=&quot;reach_score&quot;&amp;gt;Reach Score&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
              &amp;lt;input type=&quot;checkbox&quot; id=&quot;impact_score&quot; value=&quot;impact_score&quot; v-model=&quot;checkedColumns&quot;&amp;gt;
              &amp;lt;label for=&quot;impact_score&quot;&amp;gt;Impact Score&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
              &amp;lt;input type=&quot;checkbox&quot; id=&quot;confidence_score&quot; value=&quot;confidence_score&quot; v-model=&quot;checkedColumns&quot;&amp;gt;
              &amp;lt;label for=&quot;confidence_score&quot;&amp;gt;Confidence Score&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
              &amp;lt;input type=&quot;checkbox&quot; id=&quot;effort_score&quot; value=&quot;effort_score&quot; v-model=&quot;checkedColumns&quot;&amp;gt;
              &amp;lt;label for=&quot;effort_score&quot;&amp;gt;Effort Score&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div&amp;gt;
              &amp;lt;input type=&quot;checkbox&quot; id=&quot;rice_score&quot; value=&quot;rice_score&quot; v-model=&quot;checkedColumns&quot;&amp;gt;
              &amp;lt;label for=&quot;rice_score&quot;&amp;gt;RICE Score&amp;lt;/label&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt; 

    &amp;lt;div class=&quot;mt-2&quot;&amp;gt;
      &amp;lt;datatable :columns=&quot;checkedColumns&quot; :filter=&quot;searchQuery&quot;&amp;gt;&amp;lt;/datatable&amp;gt;
    &amp;lt;/div&amp;gt;

  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;the-script-section&quot;&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;script&amp;gt;&lt;/code&gt; section&lt;/h3&gt;

&lt;p&gt;In the script section we need to import our child component so vue knows what to do with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;datatable&amp;gt;&lt;/code&gt; element we’ve given it. We also need to register it as a component.&lt;/p&gt;

&lt;p&gt;In checkedColumns, I’ve added the columns I want to be the default columns.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;script&amp;gt;

    import datatable from &quot;./datatable.vue&quot;;

    export default {
        components: { datatable },
        data: function() {
        return {
            searchQuery: '',
            visible: false,
            checkedColumns: [&quot;roadmap&quot;, &quot;name&quot;, &quot;description&quot;, &quot;reach_score&quot;, &quot;impact_score&quot;, &quot;confidence_score&quot;, &quot;effort_score&quot;, &quot;rice_score&quot;],
        }
    },
}
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;datatablevue&quot;&gt;Datatable.vue&lt;/h2&gt;

&lt;p&gt;Last but not least, we have datatable.vue. This accepts the filter and columns prop from the parent component, filters based on query, sorts based on column clicked on, and makes the formatting a bit prettier. My data included a lot of underscored names, so you may want to edit or remove the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;removeUnderscoreCapitalize&lt;/code&gt; filter as you see fit.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;thead&amp;gt;
        &amp;lt;tr&amp;gt;
          &amp;lt;th v-for=&quot;key in columns&quot;  @click=&quot;sortBy(key)&quot;
            :class=&quot;{ active: sortKey == key }&quot; class=&quot;bg-yellow-5&quot;&amp;gt;
            
            &amp;lt;span class=&quot;arrow&quot; :class=&quot;sortOrders[key] &amp;gt; 0 ? 'asc' : 'dsc'&quot;&amp;gt;
            &amp;lt;/span&amp;gt;
          &amp;lt;/th&amp;gt;
        &amp;lt;/tr&amp;gt;
      &amp;lt;/thead&amp;gt;
      &amp;lt;tbody&amp;gt;
        &amp;lt;tr v-for=&quot;item in filteredItems&quot;&amp;gt;      
          &amp;lt;td v-for=&quot;key in columns&quot;&amp;gt;
            
          &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      &amp;lt;/tbody&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
  export default {
    props: [
      &quot;filter&quot;,
      &quot;columns&quot;
    ],
    data: function() {
      var sortOrders = {}
      this.columns.forEach(function (key) {
        sortOrders[key] = 1
      })
      return {
        searchQuery: '',
        sortKey: '',
        sortOrders: sortOrders,
      }
    },

    computed: {    
      items: {
        get() {
          return this.$store.state.items
        },
        set(value) {
          this.$store.state.items = value
        },
      },    
      filteredItems: function () {
        var sortKey = this.sortKey
        var filter = this.filter &amp;amp;&amp;amp; this.filter.toLowerCase()
        var order = this.sortOrders[sortKey] || 1
        var items = this.items
        if (filter) {
          items = items.filter(function (row) {
            return Object.keys(row).some(function (key) {
              return String(row[key]).toLowerCase().indexOf(filter) &amp;gt; -1
            })
          })
        }
        if (sortKey) {
          items = items.slice().sort(function (a, b) {
            a = a[sortKey]
            b = b[sortKey]
            return (a === b ? 0 : a &amp;gt; b ? 1 : -1) * order
          })
        }
        return items
      }

    },

    filters: {
      removeUnderscoreCapitalize: function (str) {
        var res = str.replace(&quot;_&quot;, &quot; &quot;);
        // return res.charAt(0).toUpperCase() + res.slice(1);
        return res.replace(/\w\S*/g, function(txt){
          return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
        });
      },
  },

    methods: {
      sortBy: function (key) {
        console.log(&quot;SortBy Called&quot;)
        this.sortKey = key
        console.log(this.sortKey)
        this.sortOrders[key] = this.sortOrders[key] * -1
        console.log(this.sortOrders[key])
    }
  }


  }
&amp;lt;/script&amp;gt;

&amp;lt;style scoped&amp;gt;

th {
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

th.active {
  color: #fff;
}

th.active .arrow {
  opacity: 1;
}

.arrow {
  display: inline-block;
  vertical-align: middle;
  width: 0;
  height: 0;
  margin-left: 5px;
  opacity: 0.66;
}

.arrow.asc {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid #fff;
}

.arrow.dsc {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #fff;
}
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name></name></author><category term="development" /><summary type="html">Custom Column Selection on a Vue Datagrid</summary></entry><entry><title type="html">Getting Rails 6 ActionText and Tailwind to Play Nice</title><link href="http://corinnpope.com/development/2020/01/23/rails-6-action-text-tailwind.html" rel="alternate" type="text/html" title="Getting Rails 6 ActionText and Tailwind to Play Nice" /><published>2020-01-23T15:08:49+00:00</published><updated>2020-01-23T15:08:49+00:00</updated><id>http://corinnpope.com/development/2020/01/23/rails-6-action-text-tailwind</id><content type="html" xml:base="http://corinnpope.com/development/2020/01/23/rails-6-action-text-tailwind.html">&lt;h1 id=&quot;i-love-tailwind&quot;&gt;I love Tailwind&lt;/h1&gt;

&lt;p&gt;I love tailwindcss. It makes styling everything so much easier and more intuitive. That’s why I use it everywhere in my current project.&lt;/p&gt;

&lt;p&gt;However, my current project also called for a rich text field.&lt;/p&gt;

&lt;p&gt;ActionText and it’s ability to “easily” add a rich text area was the obvious fit. So I followed the installation instructions on the &lt;a href=&quot;https://edgeguides.rubyonrails.org/action_text_overview.html&quot;&gt;edge guides site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Much to my dismay, after following all the instructions, my text field area looked like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tailwind_rich_formatting_wrong.png&quot; alt=&quot;That don't look right!&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I can’t say this for certain with my limited programming knowledge, but I think having the trix styling code in actiontext.scss was messing everything up. I tried a bunch of different things, mostly by process of elimination, and eventually stumbled on something that worked.&lt;/p&gt;

&lt;p&gt;Here’s what I found…&lt;/p&gt;

&lt;h2 id=&quot;how-to-modify-the-rails-edge-guides-installation-instructions-for-tailwind&quot;&gt;How to modify the rails edge guides installation instructions for tailwind&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;TL:DR; Move the content of actiontext.scss into application.scss.&lt;/em&gt;&lt;/p&gt;

&lt;h4 id=&quot;step-one-run-rails-action_textinstall&quot;&gt;Step One: Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rails action_text:install&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;That is, if you haven’t already. This will create the migrations needed to allow actiontext to function.&lt;/p&gt;

&lt;p&gt;You’ll also need active storage set up as well but I’ll let you take care of that one.&lt;/p&gt;

&lt;h4 id=&quot;step-two-include-trix-and-actiontext-in-applicationjs&quot;&gt;Step Two: Include Trix and ActionText in application.js&lt;/h4&gt;

&lt;p&gt;We still need trix and action text in our application.js pack.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// application.js
require(&quot;trix&quot;)
require(&quot;@rails/actiontext&quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h4 id=&quot;step-three--cut-out-the-code-from-actiontextscss&quot;&gt;Step Three:  Cut out the code from actiontext.scss&lt;/h4&gt;

&lt;p&gt;Go to actiontext.scss and cut out all the code underneath all the comments. That’ll be this ditty of code right here:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@import &quot;trix/dist/trix&quot;;

.trix-content {
  .attachment-gallery {
    &amp;gt; action-text-attachment,
    &amp;gt; .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%;
    }

    &amp;amp;.attachment-gallery--2,
    &amp;amp;.attachment-gallery--4 {
      &amp;gt; action-text-attachment,
      &amp;gt; .attachment {
        flex-basis: 50%;
        max-width: 50%;
      }
    }
  }

  action-text-attachment {
    .attachment {
      padding: 0 !important;
      max-width: 100% !important;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;step-four-paste-that-code-under-your-tailwind-code-in-applicationscss&quot;&gt;Step Four: Paste that code under your tailwind code in application.scss&lt;/h4&gt;

&lt;p&gt;Paste your actiontext.scss bit after your tailwind imports in application.scss.&lt;/p&gt;

&lt;p&gt;Your file will now look something like this:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@import &quot;tailwindcss/base&quot;;

@import &quot;tailwindcss/components&quot;;

@import &quot;trix/dist/trix&quot;;

.trix-content {
  .attachment-gallery {
    &amp;gt; action-text-attachment,
    &amp;gt; .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%;
    }

    &amp;amp;.attachment-gallery--2,
    &amp;amp;.attachment-gallery--4 {
      &amp;gt; action-text-attachment,
      &amp;gt; .attachment {
        flex-basis: 50%;
        max-width: 50%;
      }
    }
  }

  action-text-attachment {
    .attachment {
      padding: 0 !important;
      max-width: 100% !important;
    }
  }
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;step-five-refresh-and-enjoy-your-nicely-formatted-trix-editor-the-way-it-was-meant-to&quot;&gt;Step Five: Refresh and enjoy your nicely formatted trix editor the way it was meant to&lt;/h4&gt;

&lt;p&gt;Ah, much better!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tailwind_actiontext_right.png&quot; alt=&quot;That does look right&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That’s it! Hope this helps someone! :-)&lt;/p&gt;</content><author><name></name></author><category term="development" /><summary type="html">I love Tailwind</summary></entry></feed>