robots.thoughtbot.com Archives - 09 February 2016, Tuesday

  • Write Reliable, Asynchronous Integration Tests With Capybara

    robots.thoughtbot.com 09 Feb '16, 5am

    However, integration tests involving Ruby and JavaScript are fraught with danger. Developers frequently complain of tests which fail erratically. Debugging these tests can be somewhat of a mystery: you see records inserted into your test database during logs, but they somehow don’t sh...

  • thoughtbot is filled with vim and vigor

    robots.thoughtbot.com 08 Feb '16, 5pm

    Slowly over the past year thoughtbot has turned from an all-TextMate (and one Emacs) group into a mostly-vim group. Here are some tips, tricks, and scripts we’ve mastered along the way: From Mike Burns I’ve been a vim user for six years, and brought the vim fever to thoughtbot. I tend...

  • git bisect

    robots.thoughtbot.com 05 Feb '16, 1pm

    git bisect is amazing. You don’t know what it is? Let me fill you in! git bisect is a tool that allows you to find an offending commit. Let’s say you’ve come across a bug in your codebase and you’re unsure of when it was introduced. If you can find a commit where the code works proper...

  • Basic CSS Selector Syntax Explained Using Cats

    Basic CSS Selector Syntax Explained Using Cats

    robots.thoughtbot.com 04 Feb '16, 11am

    Are you a visual learner? Do you resemble our bewildered friend above when trying to target elements for styling? If so, don’t worry, we’ll soon remedy that. If you’re just starting to learn basic selector syntax it can be hard to remember what does what. I’ve created this cat-based p...

  • Controlling color with Sass color functions

    robots.thoughtbot.com 04 Feb '16, 3am

    Sass comes with functions that can easily be applied to colors in your CSS properties. These functions, when used correctly, can be incredibly powerful. They take some of the sting out of choosing and manipulating colors. When used with variables, they can speed up development drastic...

  • Building iOS Interfaces: Views

    robots.thoughtbot.com 03 Feb '16, 12am

    In the previous post , we looked at the different technologies and tools involved in the process of building iOS interfaces, including UIKit . In this article, we will take a closer look at one of the cornerstones of native app design in iOS: views. Conceptual Overview As we’ve establ...

  • Maintaining Open Source Projects: Versioning and Releasing

    robots.thoughtbot.com 02 Feb '16, 12am

    Have you ever wondered when to release a new version of your software? How often should you issue a release? What version number should it be, and why? When will version 1.0 be ready? And that’s taking into account only what version number to use and when to release it. More questions...

  • Creating Custom Xcode Templates

    Creating Custom Xcode Templates

    robots.thoughtbot.com 22 Jan '16, 12am

    Xcode comes packed with useful built in templates, but sometimes you want to add custom ones that tailor to your needs. In this tutorial we’ll walk through creating a custom template. Xcodes iOS Source templates The default template for an empty Swift file includes metadata and an imp...

  • Caching Carthage con CircleCI

    robots.thoughtbot.com 18 Jan '16, 12am

    I hope we can agree that Using a CI system for automating your tests is important. Unfortunately, continuous integration for iOS apps hasn’t always been a great experience. Here at thoughtbot, we’ve run the gamut of services as I’m sure most have. Jenkins , Travis , Xcode bots , Circl...

  • Android Developer Perf Matters

    Android Developer Perf Matters

    robots.thoughtbot.com 14 Jan '16, 12am

    From the Android Performance Udacity course , to the 100 Days of Google Dev videos, Google put out an extraordinary amount of resources to help developers create faster, leaner, and smarter Android applications last year. There was no doubt about it, 2015 was the year of #perfmatters ...

  • Announcing Scenic - Versioned Database Views for Rails

    robots.thoughtbot.com 11 Jan '16, 12am

    Database views are powerful SQL constructs that are unfortunately often overlooked by Rails application developers because views lack out-of-the-box support from Rails itself. Many of the more complex ActiveRecord scopes, relationships, and query objects we’ve come across could more c...

  • Creating your first iOS Framework

    Creating your first iOS Framework

    robots.thoughtbot.com 07 Jan '16, 12am

    If you’ve ever tried to create your own iOS framework, you know that it’s not for the faint of heart – managing dependencies and writing tests doesn’t make it any easier. This tutorial will walk you through creating your first iOS framework from start to finish so that you can go out ...

  • Faster Grepping in Vim

    robots.thoughtbot.com 05 Jan '16, 5pm

    We often search our projects for specific text within Vim like so: :grep sometext However, we have a need for speed. How can we grep faster? Override to use The Silver Searcher grep is a built-in command of Vim. By default, it will use our system’s grep command. We can overwrite it to...

  • Code Sleuthing with Git

    robots.thoughtbot.com 04 Jan '16, 5pm

    Let’s say you want to delete a method foo that seems to be dead code. You use a tool like grep to find callers of foo , and there are no results. It’s tempting to consider foo to be unused at this point, but you want to know the story of this method so you can be confident in removing...

  • Let's Not

    robots.thoughtbot.com 28 Dec '15, 1am

    describe FactoryGirl::EvaluatorClassDefiner do let(:simple_attribute) { stub("simple attribute", name: :simple, to_proc: -> { 1 }) } let(:relative_attribute) { stub("relative attribute", name: :relative, to_proc: -> { simple + 1 }) } let(:attribute_that_raises_a_second_time) { stub( "...

  • User Testing Gone Wild: A Guide to Course Correction

    robots.thoughtbot.com 24 Dec '15, 12am

    Build a rapport before you transition into testing. If you are in their store, allow them to greet you and show you around. If they traveled to your office, ask them how their trip was and if they need any refreshments. Shifting the focus onto them shows that you care about their need...

  • Email confirmation with Clearance

    robots.thoughtbot.com 23 Dec '15, 12am

    describe UsersController do describe "#create" do context "with valid attributes" do it "creates user and sends confirmation email" do email = "[email protected]" post :create, user: { email: email, password: "password" } expect(controller.current_user).to be_nil expect(last_email_conf...

  • Painting a Picture of Mental Health

    robots.thoughtbot.com 22 Dec '15, 12am

    Painting is sort of a general term. I also dabble in aspects of the miniature hobby: doing things like “converting” miniatures by changing them from what their sculptor intended by changing a pose or swapping body parts; “basing” them by giving them interesting surroundings that help ...

  • Announcing Beggar

    Announcing Beggar

    robots.thoughtbot.com 21 Dec '15, 12am

    When you’re working on a project that has a lot going on, it’s easy for a pull request to get missed in the noise. Enter Beggar. Beggar is an open source tool that will automatically ping your Slack channels when a pull request has been opened. All you have to do is configure some tag...

  • Buy Your Customers a Coffee

    robots.thoughtbot.com 18 Dec '15, 12am

    We run a few products and like to periodically reach out to users in cities where we have offices. We typically use Intercom for customer support of our products and our clients’ products. We use it to segment users and send automated messages to keep our users engaged. But those same...

  • Testing HTML in Phoenix Controllers

    robots.thoughtbot.com 17 Dec '15, 12am

    Phoenix has a nice set of helpers for testing HTML responses. The default Phoenix generators offer a great way to get a quick start on testing HTML, but this guide hopes to dive in a bit further. In this post we’ll go over: Using the Phoenix helpers to test your controllers and their ...

  • Beyond the Basics: Mastering Git

    Beyond the Basics: Mastering Git

    robots.thoughtbot.com 16 Dec '15, 7pm

    I’ve noticed something interesting about Git: people learn a little bit about the tool, and then get stuck using the same five commands over and over. I think there are a few reasons for this. First, no one gets into software development just to learn about Git. It’s a supporting tech...

  • Keeping A GitHub Fork Updated

    robots.thoughtbot.com 16 Dec '15, 6pm

    I forked a GitHub repo thoughtbot/dotfiles to croaky/dotfiles and want to keep it updated. Track After I forked the repo to your Github account, I did this one time: git clone [email protected]:croaky/dotfiles.git cd dotfiles git remote add upstream [email protected]:thoughtbot/dotfiles.git...

  • Refactor Until You Feel Almost Comfortable

    robots.thoughtbot.com 15 Dec '15, 12am

    How do you know when you’ve refactored enough and when you’ve refactored too much? I asked Sandi Metz about this once; here is a paraphrase of her answer: Refactor until you feel you are one step behind the solution you want. Avoid your comfort zone. And while you might see extraction...

  • Data Migrations in Rails

    robots.thoughtbot.com 09 Dec '15, 4am

    Every now and again we need to change actual data in the production database. The first obvious option that comes to mind is to use a Rails migration, especially since the word “migration” is already in the task at hand, a “data migration.” But let’s talk about it some more and let me...

  • Solving the Pain of Forms on Static Sites

    robots.thoughtbot.com 07 Dec '15, 12am

    We created a service called FormKeep that makes putting forms on static sites generated by Jekyll or Middleman extremely fast and easy. Recently, we had a new customer who was so excited to find our product that he sent over his company chat logs that showed their process of strugglin...

  • How To Send Transactional Emails from Rails With Mandrill

    robots.thoughtbot.com 04 Dec '15, 4pm

    Set up your Rails app to send Mandrill templates Now that you’ve got the basic setup for Mandrill done, it’s time to set up your mailer to use the template you created in Mailchimp and sent to Mandrill. In my experience, it’s best to encapsulate this logic in a mailer class that all o...

  • Foolproof I18n Setup in Rails

    robots.thoughtbot.com 04 Dec '15, 12am

    Let’s make I18n on Rails better, quickly and easily. These tips have helped us here at thoughtbot and caught some easy-to-fix but hard-to-track-down mistakes. Raise an exception on missing translations When a translation is missing, Rails will fall back to a default translation. For e...

  • Building a New Home for Innovators & Collaborators: NYC

    robots.thoughtbot.com 03 Dec '15, 12am

    Once thoughtbot opened its doors in NYC, we immediately set our eyes toward expansion. Knowing our growing team would be in constant collaboration with clients and the rest of thoughtbot throughout the world, we searched for a space that allowed freedom to brainstorm, pair, and create...

  • Hound Checks JavaScript Code Style

    robots.thoughtbot.com 02 Dec '15, 12am

    Over one year ago, we announced Hound support for JavaScript . Behind the scenes, Hound linted JavaScript code with JSHint . In the past year, JSHint has deprecated several rules, stating: Warning This option has been deprecated and will be removed in the next major release of JSHint....