Nate Hopkins Profile Banner
Nate Hopkins Profile
Nate Hopkins

@hopsoft

5,662
Followers
1,436
Following
425
Media
9,808
Statuses

Software writer, maker. Creator of UniversalID, TurboBoost, StimulusReflex, CableReady, and several other Ruby/JavaScript libraries.

🇺🇸
Joined March 2009
Don't wanna be here? Send us removal request.
Pinned Tweet
@hopsoft
Nate Hopkins
2 years
Programming is most interesting and challenging when "Best Practices" are in conflict. Working to understand fundamentals & approaching problems with first principle thinking will help you stay relevant in a world where AI can outperform everyone with "Best Practice" techniques.
2
6
49
@hopsoft
Nate Hopkins
2 years
When I discovered Ruby and Rails, it was literally a 10x boost to my productivity. Nothing... and I mean NOTHING has come close to matching it. It's baffling to me that the industry doesn't hold new tech to this standard. It's why I continue to bet on Ruby and Rails.
64
138
1K
@hopsoft
Nate Hopkins
2 years
How many of y'all knew that Ruby has a native retry mechanism?
Tweet media one
27
69
631
@hopsoft
Nate Hopkins
5 years
Devs: We moved away from Ruby. It's a dying language... and it has scalability problems. Also devs: Let's host our projects on GitHub, use Stripe as our payment processor, crowdfund with Kickstarter, and livestream on Twitch.
21
193
567
@hopsoft
Nate Hopkins
2 years
I've been helping my daughter with her JavaScript/React bootcamp, and my God... we forget how much we take for granted in the Ruby/Rails world. If you work professionally in Ruby, take a moment today and thank your lucky stars.
13
38
316
@hopsoft
Nate Hopkins
4 years
It’s a great time to be a Ruby/Rails developer.
10
23
319
@hopsoft
Nate Hopkins
3 years
Here's what my Gemfile structure looks like these days. It's designed to make upgrading Rails less painful in the future, but it's also very clean. I love it.
Tweet media one
13
42
269
@hopsoft
Nate Hopkins
8 months
Last weekend I helped a young programmer add a boolean toggle/checkbox to a React form in a large app. It took us 3.5+ hours of discovery and updates to 7 files to get things working. Something that would have been a 10 min change to a single file in a typical Rails app. 🙃
25
13
230
@hopsoft
Nate Hopkins
2 years
React... because why edit only 1 file when you could edit 3 instead?
23
13
206
@hopsoft
Nate Hopkins
2 years
The same is true of most of the "modern" tech that's hyped today. Ruby and Rails still runs circles around most of it. The trick is to embrace the framework instead of fighting it.
11
6
192
@hopsoft
Nate Hopkins
2 years
I remember being reprimanded by the consulting firm I worked at because I was finishing projects in 2 weeks that had been scheduled for 6+ months... since I proposed Rails over of C#, Java, etc. I was told the sales cycle was too long for me to be finishing projects that quickly.
4
11
172
@hopsoft
Nate Hopkins
7 years
Ruby 2.5 - String interpolation 72% faster - String #prepend 42% faster - String #scan 10%-50% faster - Enumerable #sort_by ,min_by,max_by 50% faster
2
69
153
@hopsoft
Nate Hopkins
11 months
I’m excited to announce the new game changing Universal ID Ruby GEM. 🚀 It allows you to recursively serialize any Ruby object into a small URL-safe string (including Arrays, Hahes, ActiveRecords… with Associations, even ActiveRecord::Relations).
7
22
163
@hopsoft
Nate Hopkins
1 year
ActiveJob is the only service layer your Rails app needs. Some folks seem to get tripped up on this paradigm shift, so I created a simple "service" job to help illustrate.
Tweet media one
@hopsoft
Nate Hopkins
4 years
Rails has a great built in mechanic for service objects & similar patterns. It’s called ActiveJob. You can use jobs to encapsulate all sorts of business logic that doesn’t belong in the model or controller. They’re composable & testable & can be called sync or async as needed.
14
18
151
17
32
188
@hopsoft
Nate Hopkins
9 months
Ruby is exceptionally well suited to scripting and building CLI tools. 💞
9
9
147
@hopsoft
Nate Hopkins
4 years
Rails has a great built in mechanic for service objects & similar patterns. It’s called ActiveJob. You can use jobs to encapsulate all sorts of business logic that doesn’t belong in the model or controller. They’re composable & testable & can be called sync or async as needed.
14
18
151
@hopsoft
Nate Hopkins
2 years
@DRBragg @trunarla What was it like to start your programming career as a senior engineer?
2
0
140
@hopsoft
Nate Hopkins
2 years
Loving all the anti Rails hot takes. I seriously hope y'all are my business competitors.
7
2
133
@hopsoft
Nate Hopkins
2 years
The Rails background job ecosystem is an underutilized (and misunderstood) super power of the framework.
5
8
133
@hopsoft
Nate Hopkins
2 years
Would anyone be interested if I productized and open sourced my Docker development setup for Rails? I try to match production deployment locally to help teammates grok infrastructure. It includes commands for bringing complete environments up/down, running one off commands, etc..
17
2
133
@hopsoft
Nate Hopkins
9 months
I love that folks, who've wrapped their identity in complexity, are saying this is a bad idea or can't be done... after they've already done it.
@dhh
DHH
11 months
We've gone #NoBuild on the CSS with . 21 individual CSS files, all fetch concurrently over http/2. No transpiling, no bundling, no need. Just raw HTML and CSS, deployed with Kamal/Skiff. You don't need a build pipeline to work with the web ✌️
Tweet media one
Tweet media two
69
141
2K
9
2
126
@hopsoft
Nate Hopkins
4 years
Ruby is one of the few programming languages that’s expressive enough to support writing code at pretty much the same speed as thought. It often just flows out like prose. ❤️💎
11
16
127
@hopsoft
Nate Hopkins
3 years
Async Ruby is stable and production-ready, but it doesn't work with Rails.
6
32
128
@hopsoft
Nate Hopkins
2 years
"It's like I'm a caveman finding fire for the first time." -My nephew who's been learning to program (mostly JavaScript and SQL) for over a year... after trying Ruby and Rails for the first time recently.
4
13
121
@hopsoft
Nate Hopkins
3 years
I've been writing Ruby for 15 years and still have to look up how to create rake tasks that accept arguments... every time.
9
3
124
@hopsoft
Nate Hopkins
1 year
I'd like to make it explicitly clear how excited I am for Hotwire's evolution. When I started CableReady and StimulusReflex over 6 years ago, my hope was to see our ideas and techniques folded into Rails. We've learned a lot of lessons over the years and have some battle scars
4
10
125
@hopsoft
Nate Hopkins
4 years
It's difficult to overstate how well @heroku nailed the space of commoditizing devops. You’ll pay a premium for it, but it’s actually very affordable when you consider that time is more valuable.
7
14
115
@hopsoft
Nate Hopkins
2 years
Every Sinatra app eventually turns into an inferior non-standard variant of something that sort of resembles Rails but with painful edge cases.
18
10
100
@hopsoft
Nate Hopkins
4 years
I just created a tiny Rails app that anyone can clone & run locally to learn about StimulusReflex. It should lower the barrier to entry for folks just getting started or tinkering. Would love to hear feedback & am happy to accept PRs.
7
19
102
@hopsoft
Nate Hopkins
11 months
Non RESTful routes in a Rails app are a massive code smell and will make your application much harder to reason about as it grows.
11
4
100
@hopsoft
Nate Hopkins
3 years
The most productive stack I've ever worked with. - Ruby on Rails - Hotwire - StimulusReflex - CableReady - Postgres - Redis
@hopsoft
Nate Hopkins
3 years
It's so satisfying to build a robust and complex reactive web application that can boast these LOC stats.
Tweet media one
3
0
16
6
11
96
@hopsoft
Nate Hopkins
4 years
A huge thank you to both Digital Ocean and Ryan Bates. Thank you, thank you, thank you. You have no idea how much this means or how timely it is. 🙏
@rbates
Ryan Bates
4 years
To make amends, @digitalocean donated $5,000 to an open source project of my choice. I chose Stimulus Reflex, @hopsoft and team have done an amazing job. What a classy move DO, thanks!
14
43
518
4
3
97
@hopsoft
Nate Hopkins
2 years
What are folks considering as a legit Heroku alternative? I'm not looking for bespoke K8 solutions. I want a service that treats devops as a commodity so I don't have to think about it. - - - What else?
35
7
98
@hopsoft
Nate Hopkins
2 years
Experiencing weirdness with a Rails app during local development? Remember that caches are the enemy. - export DISABLE_SPRING=true - bin/rails assets:clobber - rm -rf tmp
7
8
92
@hopsoft
Nate Hopkins
4 years
"Reactive Rails means an order of magnitude less lines of code, & an order of magnitude more productivity... adding StimulusReflex & ViewComponent to Rails changes everything... I can’t overstate the magnitude of how much developer effort this saves!"
4
23
93
@hopsoft
Nate Hopkins
2 years
If you properly design the Rails' ActiveRecord model layer (relationships, scopes, etc...) so many things in your application will become much simpler.
12
5
93
@hopsoft
Nate Hopkins
10 months
Universal ID can create a deep true-copy of an ActiveRecord including it's associations to help you create a new unrelated set of "identical" records (minus db keys, timestamps, etc). Here's a benchmark showing a copy of 100k db records in < 26 seconds. Note that I'm still
Tweet media one
7
8
91
@hopsoft
Nate Hopkins
5 years
@chriswallace @dhh My favorite is 200 with a shitty version of reimplemented HTTP within the response body. HTTP/1.1 200 OK {"status":"error"}
5
2
90
@hopsoft
Nate Hopkins
2 years
I still marvel at the elegance of Stimulus JS. It's such a well designed library. It's conceptually simple, easy to use, and provides all the power you need while staying out of your way.
6
7
91
@hopsoft
Nate Hopkins
8 months
The role of senior engineers is to build architectural solutions that enable less experienced teammates to have an outsized impact. In a way, seniors should be constantly working themselves out of a job. In many ways... this is the job.
4
9
89
@hopsoft
Nate Hopkins
1 year
This is why we’re starting to see more folks adopting tech stacks, like Rails, again that emphasize productivity. I’m optimistic and looking forward to the return of sanity in the industry, with a focus on revenue over growth… and with highly productive small teams. I sense a
@Jason
@jason
1 year
The herd is being culled
Tweet media one
91
212
1K
4
10
90
@hopsoft
Nate Hopkins
2 years
Working on a new Ruby gem that I’m pretty excited about.
4
0
90
@hopsoft
Nate Hopkins
2 years
Who knew that Ruby conferences could be so impactful and inspiring? So many great people, incredible speakers, and wonderful new friendships. First, Sin City Ruby, then RailsSaaS, next RubyConf and RubyConf Mini, …
4
2
88
@hopsoft
Nate Hopkins
2 years
Microservices do nothing to reduce complexity. The hoped-for modularity improvements are not guaranteed, the performance and reliability costs are significant, failures become much harder to diagnose, and they introduce significant accidental complexity.
4
17
84
@hopsoft
Nate Hopkins
2 years
Seeing all the folks who pushed full stack fronted as the future now telling us about the value of server side rendering.
5
11
85
@hopsoft
Nate Hopkins
1 year
An Inconvenient Truth: A story of "No Build" featuring import maps and HTTP/2(3). --- "This is a wake-up call that cuts through myths and misconceptions..." 😜 --- Loving all the dunk replies and retweets claiming it's impossible... after they've done it and are running it in
@dhh
DHH
1 year
"The state of the art is no longer in finding more sophisticated ways to build JavaScript or CSS. It's not to build at all. To lean on HTTP/2 and the now universal support for import maps to avoid bundling."
Tweet media one
50
119
943
7
4
85
@hopsoft
Nate Hopkins
2 years
In a capital-constrained startup environment, engineering efficiency is vital. Tools like Hotwire, CableReady, and StimulusReflex can reduce the code required to build rich user experiences by 5x or more. Less code means your team will ship features faster and with fewer people.
6
15
80
@hopsoft
Nate Hopkins
3 years
It looks like JSONAPI::Serializer is around 50x faster than ActiveModel::Serializer. Also, it ensures your API is JSON API compliant rather than some bespoke custom variant.
4
10
84
@hopsoft
Nate Hopkins
2 years
🙏 I'm so thankful I work for a low drama company. Calm and steady progress toward improving the lives of customers is simply the best.
5
0
82
@hopsoft
Nate Hopkins
1 year
The “dunks” on this post are incredibly reminiscent of the FUD spread about Ruby and Rails in the early days. People losing their minds over tools while others just ship value to customers while making money... and having fun in process. 🤷‍♂️
@dhh
DHH
1 year
Gotta love the pivot from "it doesn't scale" to "you can't write real systems without types" as the new ding-dong argument against dynamically-typed languages like Ruby (and vanilla JavaScript and Smalltalk and...).
Tweet media one
203
184
2K
1
5
81
@hopsoft
Nate Hopkins
1 year
Rails and Hotwire with the TurboBoost suite is a legit competitive advantage.
3
4
80
@hopsoft
Nate Hopkins
2 years
#protip For anyone using Rails < 7 export DISABLE_SPRING=true
7
5
81
@hopsoft
Nate Hopkins
2 years
How many of y'all knew it's possible to use ActiveRecord to configure an in-memory SQLite database, define and create a table (migrate), and seed it with data in just 3 lines of Ruby?
Tweet media one
12
14
108
@hopsoft
Nate Hopkins
8 months
Always opt for less infrastructure whenever possible. Fewer moving parts == less complexity, lower hosting costs, lower maintenance costs, and fewer bugs.
5
13
79
@hopsoft
Nate Hopkins
11 months
The role of principal, staff, and senior engineers is to create tools and establish patterns that enable other less experienced engineers to be highly productive. Then mentor them so they can be.
3
10
82
@hopsoft
Nate Hopkins
3 years
The sad thing about JavaScript build tooling is that you feel smart and accomplished whenever you succeed at getting things to work, but in reality you haven’t actually accomplished anything.
4
9
78
@hopsoft
Nate Hopkins
3 years
Rails models don’t always need to map to database tables. Using models to map the business domain should be common practice. This can help identify some of the REST resources your app should expose, but resources don’t always need to map directly to models either.
5
11
80
@hopsoft
Nate Hopkins
2 years
I prefer defaulting to double quoted strings when linting/formatting Ruby. It seems I'm in good company with GitHub, Thoughtbot, Test Double, et al. on this... even though the Rubocop style guide defaults to single quotes. What's your preference?
54
4
80
@hopsoft
Nate Hopkins
3 years
One of the most exciting things in web dev right now is HTML over the wire (via both HTTP & web socket) coupled with multi-region geo aware infrastructure. The geo tooling isn't quite there yet, but it will mark a sea change in how web apps are built & deployed in the future.
5
10
76
@hopsoft
Nate Hopkins
4 years
This is how I’m starting to organize the Gemfile in my Rails projects. It’s an attempt to be more mindful of additional dependencies with the hope of easing the Rails upgrade path in the future.
Tweet media one
8
7
78
@hopsoft
Nate Hopkins
3 years
It doesn’t have to be crazy at work.
4
9
76
@hopsoft
Nate Hopkins
2 years
Very excited about the projects I've been working on. Some great new tooling for Rails developers is coming together and shaping up. Most of it is foundational at this point. It will provide plenty of opportunity to build even better UX and DX on top of it.
5
4
76
@hopsoft
Nate Hopkins
3 years
I’ve been learning Hotwire/Turbo and must admit that I’m impressed. I love that Rails has so many options for building reactive user experiences without forcing complexity on the developer. HTML over the wire FTW. 🙌
2
3
75
@hopsoft
Nate Hopkins
2 years
I love Rails encrypted credentials. I only need to store a single decryption key in ENV and stuff just works... everywhere.
4
4
74
@hopsoft
Nate Hopkins
4 years
@dhh @basecamp “The carpets are always clean, let’s fire the janitors.”
1
1
73
@hopsoft
Nate Hopkins
2 years
Last night I upgraded one of my StimulusReflex projects to Rails 7 and esbuild. It feels like I just stepped into the future. It's simple and fast as hell. 🔥
9
3
67
@hopsoft
Nate Hopkins
1 year
Rails is evergreen.
1
1
68
@hopsoft
Nate Hopkins
9 months
The time has come... I'm so ready for this. 🚀
@dhh
DHH
9 months
We're going to make Rails 8 the damn best framework for creating full-stack PWAs. Web Push, badges, install prompts, service workers, the works. I was motivated before, but now it's really on. Let's get back to making apps where we don't have to beg for permission or mercy!
108
246
3K
1
2
66
@hopsoft
Nate Hopkins
2 years
Here's a quick intro to some of the new libs I've been working on. Still early days with this, but I'm just too excited not to share with y'all. Lots of cool stuff to unpack here. Let me know what you think.
11
11
66
@hopsoft
Nate Hopkins
3 years
TIL about `Bundler::Dsl #eval_gemfile ` This is what my Gemfile looks like now... a tiny bit cleaner.
Tweet media one
@hopsoft
Nate Hopkins
3 years
Here's what my Gemfile structure looks like these days. It's designed to make upgrading Rails less painful in the future, but it's also very clean. I love it.
Tweet media one
13
42
269
3
8
69
@hopsoft
Nate Hopkins
1 year
In case you didn't know... @andrewkane is a hero. 🦸
9
4
66
@hopsoft
Nate Hopkins
2 years
I'm almost done extracting the first set of reusable TurboReflex behaviors (with state management) into a new UI/UX focused lib. I expect this is the start of something that will prove to be pretty terrific for Rails developers.
3
3
68
@hopsoft
Nate Hopkins
2 years
SQLite with LiteFS and Write Forwarding is a game changer. The way we build and deploy highly performant reactive SSR apps is going to change. I just wish that SQLite had support for array and json datatypes.
2
7
66
@hopsoft
Nate Hopkins
2 years
The real test will be when we can prompt the AI with, "Convert this React application to Hotwire." and watch the codebase shrink by 10x.
4
8
64
@hopsoft
Nate Hopkins
4 years
Ruby’s Array #count is probably more powerful than you realize.
Tweet media one
2
7
67
@hopsoft
Nate Hopkins
2 years
Every additional gem dependency adds friction to upgrading Rails. Be sure to apply a healthy dose of scrutiny to all gems before including them in your projects.
3
4
66
@hopsoft
Nate Hopkins
2 years
Did you know that you can use `sidekiq_options` with ActiveJob on Rails >= 6.0.1 and Sidekiq >= 6.0.1? 🤯 Gone are the days of giving up ActiveJob's beautiful API and abstractions in order to use advanced Sidekiq worker features. 🎉
2
7
66
@hopsoft
Nate Hopkins
2 years
Could use some beta testers for TurboReady. If you have a Rails 6.1+ app that's already using Turbo. Give it shot and let me know how it goes. 🙏
@coderberry
Eric Berry
2 years
TurboReady extends Turbo Streams to give you full control of the browser’s DOM! (call JS from anywhere in your Rails app) by @hopsoft
Tweet media one
4
14
91
3
13
63
@hopsoft
Nate Hopkins
2 years
Simplify your stack whenever you can. Fewer moving parts makes for faster development, deployment, and maintenance.
0
5
61
@hopsoft
Nate Hopkins
1 year
We handle roughly 400M visits/mo between our 2 flagship products (both built with Rails) which puts us in the top 25 most visited websites in the world according to Semrush.
@hopsoft
Nate Hopkins
1 year
@dhh We're building ClickFunnels with Rails and Bullet Train... and we love it. We also have parts that aren't Rails and even use TypeScript 😱 in some places where it makes sense or the team prefers it. I'm just glad I get to spend my days mostly in Ruby.
3
1
57
4
6
63
@hopsoft
Nate Hopkins
4 years
You haven’t lived until you’ve dropped a production database on a Friday.
12
4
63
@hopsoft
Nate Hopkins
2 years
Had a major breakthrough today with optimistic UI updates for "ephemeral state" management using the TurboReflex library for Rails. I believe it will be a leap forward for SSR driven reactivity across multiple stacks and I'm excited to start producing content around this stuff.
6
4
61
@hopsoft
Nate Hopkins
8 months
Refresher for Rails library naming conventions for folks that may not be aware.
@strzibnyj
Josef Strzibny
1 year
I feel like this slide by Eileen M. Uchitelle must be highlighted as many Rails devs don't get the Active vs Action name split in Rails:
Tweet media one
5
21
117
2
3
62
@hopsoft
Nate Hopkins
3 years
One line pattern matching in Ruby for destructuring assignment is pretty sweet.
Tweet media one
2
0
63
@hopsoft
Nate Hopkins
1 year
@coderberry @pinzonjulian To further clarify... the omission of the db enforced FK constraints allows you to parallelize data modifications. It also makes general scriptability of the db much simpler. It does comes with tradeoffs (data integrity risks), but it's totally worth it at a certain scale.
3
0
59
@hopsoft
Nate Hopkins
2 years
PostgreSQL is more capable than most people think.
7
1
62
@hopsoft
Nate Hopkins
4 years
Rails can’t scale 😜 - 56M+ developers - 60M+ new repos last year - 1.9B+ contributions last year - 72% of Fortune 50 using GH enterprise
0
8
61
@hopsoft
Nate Hopkins
10 months
Yeah... morphing is cool, but have you ever recursively serialized an ActiveRecord model with its associations into a SignedGlobalID?
1
4
60
@hopsoft
Nate Hopkins
4 years
If you’re too lazy to setup ActiveJobs in your Rails app, pull in the hopsoft/bg GEM to add behavior similar to Goroutines or Elixir processes. It allows you to run model methods in the background.
Tweet media one
5
7
61
@hopsoft
Nate Hopkins
11 months
Universal ID is such a powerful low level tool for Rubyists, it can be challenging to think through all the ways you might leverage it... so I added a few more use cases to help you get started.
2
3
57
@hopsoft
Nate Hopkins
5 years
@JamesClear This is spot on. Unfortunately authoritarian and opportunistic management often squashes level 2-3 efforts from ICs... which is generally the root cause of burnout.
2
1
58
@hopsoft
Nate Hopkins
4 years
“I recently wrote a chat application that is fast, responsive, and was simple to build while leveraging StimulusReflex. I also wrote a total of 24 lines of JavaScript - you can't beat that.”
1
13
60
@hopsoft
Nate Hopkins
3 years
ActiveRecord scopes are so incredibly powerful. I absolutely love them.
1
2
59
@hopsoft
Nate Hopkins
4 years
"...with this new way of thinking about and building Rails apps, I suddenly found myself single-handedly launching features again. ...Developing an app feels fun again."
2
9
59
@hopsoft
Nate Hopkins
1 year
@dhh We're building ClickFunnels with Rails and Bullet Train... and we love it. We also have parts that aren't Rails and even use TypeScript 😱 in some places where it makes sense or the team prefers it. I'm just glad I get to spend my days mostly in Ruby.
3
1
57
@hopsoft
Nate Hopkins
4 years
It’s fun to watch the cognitive dissonance starting to surface from people just discovering that HTML over the wire techniques can produce great modern web experiences.
4
12
59