Skip to main content
thoughtbot thoughtbot
  • Live on Twitch!

    thoughtbot is livestreaming

    Work alongside the thoughtbot team as we collaborate with each other and our clients, live. Ask us anything, we're live right now!

  • Case Studies
  • Blog
  • Let’s Talk
Live on Twitch!

thoughtbot is livestreaming

Work alongside the thoughtbot team as we collaborate with each other and our clients, live. Ask us anything, we're live right now!

Let’s get started!
View all Services
Development
  • Ruby on Rails
  • Hotwire
  • AI and Machine Learning
  • Maintenance
  • Mobile
Design
  • Discovery Sprints
  • UX, UI, and Product Design
  • Design Systems
Product
  • Product Management
  • Accessibility
Team and Processes
  • Team Augmentation
  • Fractional Leadership
View all Services
View all Resources
Development
  • Tech Leadership Resources
  • Open Source
  • Books
  • The Bike Shed Podcast
  • Live Streaming on YouTube
  • Conference Talks
The business of great software
  • Playbook
  • Purpose Built
  • Giant Robots Smashing Into Other Giant Robots Podcast
  • Design Sprint Guide
  • Live Streaming on LinkedIn
View all Resources

Good Code Articles

Written by thoughtbot, your expert strategy, design, product management, and development partner.

    • All Topics
    • Design
    • Web
    • iOS
    • Android
    • More topics
  1. is_male, or how NOT to encode gender

    Gender is not a binary, and a binary is not a boolean.

    Summer ☀️
    November 6, 2024
    • Modeling
    • Good Code
    • Trans
    • LGBTQ
    • Inclusivity
    • Diversity
  2. Wrap your dependencies

    It will make your code more flexible and easier to maintain.

    Matheus Richard
    August 26, 2024
    • Refactoring
    • Good Code
  3. What's a counter cache?

    Running a separate query to count how many records are associated with another record is inefficient. Using a counter cache can save the day!

    Jose Blanco
    November 21, 2023
    • Rails
    • Ruby
    • Web
    • Active Record
    • Good Code
  4. Structuring Conditionals in a Wizard

    Branching early helps structure multi-step forms.

    Joël Quenneville
    August 8, 2023
    • Good Code
    • Elm
    • Ruby
    • Rails
  5. Building Value Objects in Rails with composed_of

    Learn how to improve the interface of your existing Active Record Models with this underutilized API.

    Steve Polito
    July 20, 2023
    • Rails
    • Ruby
    • Web
    • Active Record
    • Good Code
  6. What happens when you stop maintaining your Rails application?

    Here are the risks and common scenarios we see when a team doesn’t have a plan for ongoing maintenance for their Rails application. We also share how we support clients in these situations with our new, flexible, Rails Maintenance offering.

    Jeanine Soterwood
    November 21, 2022
    • Good Code
    • TDD
    • Testing
    • Rails
    • Web
    • Technical Debt
  7. Data Modeling Resources in Elm

    Links to some of the best Elm data modeling resources around the web.

    Joël Quenneville
    November 15, 2022
    • Elm
    • Good Code
  8. Value Object Semantics in Ruby

    What is the correct behavior of hash, ==, eql? and equal? for value objects?

    Joël Quenneville
    July 18, 2022
    • Ruby
    • Good Code
    • Domain Modeling
    • Web
  9. Reducing Leaky Abstractions Introduced by ActiveRecord

    ActiveRecord provides a comprehensive interface for querying the database, but at what cost?

    Josh Clayton
    March 30, 2022
    • Rails
    • Ruby
    • Web
    • Good Code
  10. Write Readable Code

    Techniques and reasons to optimize your code for people, not metrics.

    Edward Loveall
    March 18, 2022
    • Good Code
    • Programming
    • Refactoring
    • Stories
  11. Sign up to receive a weekly recap from thoughtbot

1 2 3 4 5 … Next › Last »

Footer

thoughtbot
  • Services
  • Case Studies
  • Resources
  • Let's Talk
  • Our Company
  • Careers
  • Purpose
  • Blog
  • Sponsor
  • Mastodon
  • GitHub
  • Instagram
  • YouTube
  • Twitch
© 2025 thoughtbot, inc.

The design of a robot and thoughtbot are registered trademarks of thoughtbot, inc.

  • US: +1 (877) 9-ROBOTS
  • UK: +44 (0)20 3807 0560
  • Beware of fraudulent thoughtbot job listings Learn more
  • Code of Conduct
  • Accessibility Statement
  • Privacy Policy