thoughtbot
thoughtbot
Blog Post
  • Photo by NCWRC and courtesy of Ohio University. Licensed CC-BY-NC. Cocaine was originally extracted from how Paperclip handled shelling out its commands to ImageMagick. I named it “Cocaine” because, one, I really enjoy puns and, two, I fully didn’t expect anyone else to use it. But, as they say, no matter what you assume, people will do something differently. Is that what they s...

thoughtbot
thoughtbot
Blog Post
  • As a Web app grows more complex, it gets easier and easier to introduce bugs. Building up a suite of automated tests from the beginning helps you refactor with confidence, and catch regressions more quickly. But committing to test-driven development can be daunting: How do you know what tests to write? Is it worth the time you’ll put into building the test suite? If you’re a regular reader of our...

thoughtbot
thoughtbot
Blog Post
  • Lucky catches bugs, returns responses quickly, and helps you write maintainable code. Lucky’s actions help you to process requests and return responses as reliably and productively as possible. To make Lucky actions rock solid, we looked at the problems we often experience while building apps. Problems that we wanted to solve with Lucky These issues often slow down development or cause emba...

thoughtbot
thoughtbot
Blog Post
  • These days, most Rails projects use some form of factories in their test set up. What problem do they solve and why are they needed? Too much info Given a User model with first_name, last_name, and location fields, we could write a test like: describe "#full_name" do it "combines first and last name" do user = User.new( first_name: "Joël", last_name: "Quenneville", lo...

thoughtbot
thoughtbot
Blog Post
  • For those unfamiliar with Jelly, it was started in NYC in 2006 by roommates Amit Gupta and Luke Crawford for people who work remotely and don’t regularly get to experience the “creative brainstorming, sharing, and camaraderie of a traditional office.” Jel·ly (noun) “…a casual working event…where people have come together (in a person’s home, a coffee shop, or an office) to work for the day. ...

thoughtbot
thoughtbot
Blog Post
  • This blog post is based on a conference talk I gave at the PyTexas and North Bay Python conferences. The blog post is a little more detailed, but if you prefer watching video to reading text you can watch the talk on YouTube. Machine learning seems to be everywhere these days, but a lot of the information about what it is and how it works can be somewhat opaque. On one end of the spectrum there’s...

thoughtbot
thoughtbot
Blog Post
  • I’m a big fan of Android development - but there’s no denying that there are some rough API’s in the Android ecosystem. I spend a non-trivial amount of time scratching my head and muttering under my breath trying to figure out what incantation I need to speak before something works the way I expect it to. As a result, whenever I have the opportunity to write a wrapper around a particularly nasty A...

thoughtbot
thoughtbot
Blog Post
  • In July of 2017, CircleCI released their new platform, 2.0. It’s much more powerful and flexible, but it’s also more complex to get up and running with for Rails apps. Let’s walk through it… A Base Configuration The CircleCI configuration file is now in .circleci/config.yml. Initially, it should start looking something like this: --- version: 2 jobs: build: working_directory: ~/y...

thoughtbot
thoughtbot
Blog Post
  • Ghost is a publishing platform, great for personal and professional projects. Since 2013, the Ghost team has been building a robust tool for crafting content and sharing it with the digital world. I first begun using Ghost as soon as it was publicly available and have seen it grow in to a fantastic solution for the needs of many clients and friends. In the second half of July 2017, Ghost v1.0....

thoughtbot
thoughtbot
Blog Post

I Work in Politics

  • Our biggest value as a consultancy is our ability to say “no.” We do this with strategic diplomacy and in an effort to steer your organization away from issues we’ve encountered many times before. But sometimes there’s a line: we’re saying “no” not because of your business plan, but for ethical or moral reasons. We use our purpose statement to guide us in these decisions. A Little History...

thoughtbot
thoughtbot
Blog Post
  • 2017 was a big year for podcasts at thoughtbot! This year Giant Robots returned to an interview format under the hosting of CEO Chad Pytel. The Bike Shed continued to grow and celebrated our fifth year recording at RailsConf. Tentative returned refreshed after a brief hiatus. Finally, we added Crossroads, a show highlighting pivotal moments in the careers of experienced developers. We love having ...

thoughtbot
thoughtbot
Blog Post
  • You’ve learned the basics of decoding JSON in Elm and are comfortable converting JSON into records. However, real life has a tendency to give you tricky JSON to work with that doesn’t fit neatly with this approach. Here are five scenarios I commonly run into and how to decode them. In all these examples, you can assume the decode library has been imported like: import Json.Decode as JD exposing ...

thoughtbot
thoughtbot
Blog Post
  • ActionCable was introduced in Rails for its 5.0 release as a way to seamlessly integrate WebSockets in Rails applications. I was curious to know more about it, and the opportunity presented itself while doing a React frontend to a Rails API. How could we interact with it with plain Javascript? ActionCable basics By allowing easy use of WebSockets on any Rails codebase, ActionCable add...

thoughtbot
thoughtbot
Blog Post
  • If you’re an Android developer, chances are you’ve written a looooot of screens that show a list of something or another. Chances are you’ll also write a lot more. And my guess is that they all look pretty similar - an activity with a layout that has a RecyclerView in it. Maybe it’s wrapped in a FrameLayout or something to house a FAB. Then you have an Adapter. And that Adapter has a custom ViewHo...

thoughtbot
thoughtbot
Blog Post
  • A recent client project featured a subtle misconfiguration which left the application susceptible to losing jobs performed by worker processes. This post explores the issue and builds a demonstration on Heroku. A Primer: Why Use Worker Processes? When a user makes an HTTP request sometimes it’s necessary to perform a slow task like sending an email or generating a report. If this slow...

thoughtbot
thoughtbot
Blog Post
  • Back in 2015, we announced the public beta of a book on roguelike development using Ruby. Unfortunately, a lot has happened since then, and the project has been stuck for a while. We’ve decided to refund everyone who’d originally purchased it and opensource the project. It’s very exciting to be creating a book with the help of the community! As we write this, the source for the build system is c...

thoughtbot
thoughtbot
Blog Post
  • When learning a functional language, you’ll notice that map functions are everywhere. Coming from Ruby, I wasn’t familiar with map functions other than Array#map. Now the best way to learn these is to actually use them and get a feel for what they do. After doing that, I noticed that among other things map functions solve two big problems: It’s tedious to wrap/unwrap data structures just to run...

thoughtbot
thoughtbot
Blog Post
  • thoughtbot is a consulting company that designs and develops software for our clients. We’ve also invested our own time to create, improve and support products that come out of our consulting work, like Upcase, Hound, FormKeep and FormLinter. We built FormKeep to be an easy-to-use cloud database that gives developers and web designers a simple way to capture, store, and share data collected from ...

thoughtbot
thoughtbot
Blog Post
  • It’s common to host a blog on wordpress.com, wpengine.com, or to use a self-installed blog on AWS or Heroku. If you have the option of hosting your blog on https://blog.example.com, please just do that and stop reading now. It’s much easier. But if you’re familiar with terms like SEO, “link juice”, or “google juice”, and someone is telling you that it’s better to host your blog in a subdirectory i...

thoughtbot
thoughtbot
Blog Post
  • As an agile product consultancy, we often have to make adjustments to team sizes to accommodate new clients and optimize current teams. Our current scheduling process gets the job done, but it has its problems. In our offices we have several people doing sales and scheduling and several other people serving as directors for designers and developers. Sometimes there is overlap in those roles and s...

thoughtbot
thoughtbot
Blog Post
  • Design Sprints, a five-phase process pioneered by Jake Knapp and Google Ventures, are a great way to get a team working together with a shared understanding of a problem, coming up with potential solutions, and quickly testing those ideas. We’ve found the process great for products or features that haven’t been validated. Because of the amount of new knowledge and thinking that goes into the spri...

thoughtbot
thoughtbot
Blog Post
  • Ruby and Elixir make it fun to write beautiful code, but I still see bugs in production that could have been caught with a better type system. Rails is productive, but I quickly run into speed issues that require view caching. Then there’s Elm. It’s beautiful. Fun. But only available on the front-end. Where’s my Holy Grail! Enter Lucky, a new web framework and ORM written in Crystal ...

thoughtbot
thoughtbot
Blog Post
  • It was Startup Week here in Austin a couple weeks ago, and it was an excellent opportunity for our local team to get a better sense of the businesses that call Austin home. Our favorite events during Austin’s Startup Week were: A Startup in Government: The First Year of the City of Austin’s Design, Technology, and Innovation Fellows Program Ben Guhin and Marni Wilhite presente...

thoughtbot
thoughtbot
Blog Post
  • Elm is a programming language for building client-side web applications that compiles to JavaScript. Because it’s strongly-typed and pure, Elm provides a handy mechanism for interacting with the “unsafe world” that is JavaScript to help maintain boundaries between the two. That mechanism is ports. Why Ports? Because Elm relies on an explicit understanding of the data it describes via...

thoughtbot
thoughtbot
Blog Post
  • I recently worked on a daemon application. No web stuff in this one. It served as a sink for real-time vehicle location data. It took all that data in on a normal TCP port. While I’ve done this kind of thing before, it’s been a while, and I hadn’t done it with Elixir before. The actual mechanics of the port were simple and quite standard: Listen on a port. Accept incoming connections. Receive d...

thoughtbot
thoughtbot
Blog Post
  • Testing a scenario where an app sends an email is easy, but how do you test something random in an email, like a password reset token? When we test a function that intentionally returns random data, it’s a little tougher. In those times, we often tackle the problem by: Testing behavior and static data, ignoring the dynamic data. Using a mock to rid the randomized data, and then test everything. ...

thoughtbot
thoughtbot
Blog Post
  • I’ll be at the Release Notes Conference in Chicago this week. The conference is for the iOS and Mac development community to share our experiences, our struggles, and our victories in the face of an ever-changing software market. In addition to the conference, I’ll be at the Relay.fm live recording Sunday night. If you see me around, please say “hi”, or get in touch on Twitter or in the confer...

Out-Market Your Competitors?

Get complete competitive insights on over 2.2 million companies to drive your marketing strategy.

Create Free Account Log in

By signing up, you agree to the Terms of Service and Privacy Policy.

Out-Market Your Competitors

Get complete competitive insights on over 2.2 million companies to drive your marketing strategy.

Create Free Account

Already a user?  Log in

By signing up, you agree to the Terms of Service and Privacy Policy.