X Stats

Login Sign Up
@fractaledmind

Stephen Margheim

@fractaledmind

699 Tweets
1,303 Following
4,462 Followers

Modern CSS • Web Platform APIs • Rails + SQLite

Date ↓ Tweet ❤️ 🔄 💬 👁 📝
Dec 24 The goal here is to have very literate and very composable SQL in Ruby. I personally love SQL, but the fact that it isn't naturally very composable and working solely in strings in Ruby doesn't cut it. I want to make a 10x simpler and leaner ARel basically. 8 1 0 619 257 .
Dec 24 CASE statements are particularly fun. You pass a Hash of "branches" where the keys and values both need only be "expressible" to build the WHEN ... THEN. You can use the :ELSE symbol key to define the ELSE ... clause. 4 0 1 524 217 .
Dec 24 👀 this beautiful Ruby. This Expression class converts structured Ruby to SQL strings. These ~80 lines cover 80+% of the expression syntax available in SQLite. You compose basic Ruby objects into structured hashes to describe your expression, like `{ 2 => { BETWEEN: [1, 3] }` https://t.co/MwOwFgR0lT 64 2 6 6.9k 302 .
Dec 18 This opens up many new intriguing possibilities for #SQLiteOnRails applications, but the primary one is a smooth transition from vertical to horizontal scaling. I look forward to playing with this more soon. 43 7 1 4.5k 207 .
Dec 12 First community contribution to https://t.co/fkM8WrW1j8 from @t27duck! He added Linode as a hosting provider: https://t.co/2tMcPYbJGk This is a new, small, and simple Rails app, so it is a great place to get some open-source contributions in and get more experience with Rails. 5 0 0 705 278 .
Dec 12 Anytime you use a flex container for your design, don't forget to define the flex wrap and build a specific wrapping behavior that works well for that particular compoent. https://t.co/dZOtcJPHH3 2 0 0 353 196 .
Dec 12 I use flex containers a ton; I love them. But, I find myself overlooking the same responsive detail time and time again—I don't properly handle wrapping. Here's a real example from the https://t.co/oFqm6BuJyC header. I originally saw the left on small screens, but want the right. https://t.co/XAPxdibJfr 0 0 1 371 304 .
Dec 12 Made some improvements to https://t.co/fkM8WrW1j8 yesterday, and I found myself needing to make a number of fixes around the mobile responsiveness of the UI. So, I wrote about a common pattern I have found useful when working with responsive design—using `flex: wrap;` 10 0 1 967 268 .
Dec 11 Got some excellent feedback and added an updated section on using Signed Global IDs to prevent tampering and implanting a model concern to define and implement a shared interface for models that can be used in the polymorphic association: https://t.co/QQ8DoFxbjp 8 0 0 895 263 .
Dec 10 I just listed https://t.co/oFqm6BuJyC on https://t.co/oFqm6BuJyC! Do you have a web app that uses SQLite as either the primary db, job backend, cache, or something else? List it so that we can gather a mountain of evidence that SQLite is a production-ready web technology. 14 1 1 1.1k 272 .
Dec 10 And if you want to apply this pattern globally (pun intended) in your app, you can define an initializer that patches Active Record's association builder to automatically define these *_gid accessor methods. Post updated with this suggestion https://t.co/SP2XOylndB 5 0 0 747 265 .
Dec 10 TL;DR — For regular associations, use `#{association}_id` with a flat <select> For polymorphic associations, use `#{association}_gid` with a grouped <select> 6 0 0 638 171 .
Dec 10 https://t.co/QQ8DoFxJ8X 4 0 1 663 23 .
Dec 10 Wrote a new blog post today on the simplest, most elegant way I know of to encode a polymorphic association in a form. The secret is to lean on Global IDs. Link in next tweet https://t.co/xAeRbp1StA 75 9 8 8k 198 .
Dec 09 If you want to follow along, I'll also keep writing about progress on my blog: https://t.co/vpckqJigL9 0 0 0 274 102 .
Dec 09 I've started simple and minimal, but there are all kinds of additional data we could gather about production applications that rely on SQLite. Let me know your thoughts on how to make https://t.co/oFqm6BuJyC the best possible collection of information on production SQLite usage. 1 0 1 285 279 .
Dec 09 The extended conference season greatly delayed the initial release of this simple directory to gather the largest collection of web applications that use SQLite in some meaningful capacity in production. Check it out and list your SQLite-backed app today https://t.co/fkM8WrW1j8 https://t.co/KVt5PlU1UU 17 4 5 2.5k 303 .
Dec 08 Both gems are now properly setup to take advantage of this new feature. So, jump onto Rails `main` and start taking advantage of the added power of SQLite extensions. 1 0 1 446 166 .
Dec 08 The other makes the `sqlpkg` package manager available to Rails apps and Ruby projects: https://t.co/Fabmk11dnA 2 0 1 465 111 .
Dec 08 Rails continues to expand its lead as the single best platform for building web applications backed by SQLite! You can now load extensions directly from the database.yml file. This now means you have quick and easy access to the full range of SQLite extensions 🧵 73 8 2 5.6k 263 .
Dec 03 This is one of my favorite talks this year. Check it out if you haven’t yet 6 0 0 764 75 .
Dec 03 RT @balticruby: Let’s take another look at Stephen Margheim's (@fractaledmind) talk, one of the most viewed one on our YouTube channel. htt… 0 2 0 0 140 .
Dec 02 Then, allow them to determine among and for themselves what the specific implementation and solution will be that fits within those goals, constraints, and deadline. So long as everyone is happy and on the same page, you have a successful project. 2 0 1 435 247 .
Dec 02 In my experience leading an engineering department of 45+ developers, estimations are useless but deadlines are great. Give a small team of people—with everyone who needs to be responsible, consulted, and informed—a clear set of goals and constraints a clear deadline. 4 1 1 450 268 .
Dec 02 I see people in tech complaining about estimations all of the time. Understandably so. Estimations don't work and mean next to nothing. These two images (one from @dave_stewart and one from @basecamp) beautifully capture the true reality of understanding work 🧵 https://t.co/QvXLXbLblM 44 16 2 3.1k 285 .
Nov 19 If you thought JSON columns in your PG tables were cool, just imagine the power of SQLite columns in your tables 🤯🤯 This new PG extension lets you stores the raw bytes of a SQLite db in a column then use the SQLite engine to work with it. https://t.co/OuUx7gpUUw 368 51 25 37.8k 265 .
Nov 17 Which feather do you prefer? A or B? https://t.co/LHT00WDgi4 10 0 30 4.2k 60 .
Nov 16 RT @rubyconf: 🚨 #RAILSCONF2025 UPDATE! 🚨 We are hoping to host our FINAL RailsConf in Philadelphia in July 2025. Help us make that happen!… 0 10 0 0 140 .
Nov 12 Anyway, can you tell I’m excited? I love this topic so much, and I think it is so important and only growing in importance. 2 0 0 328 123 .
Nov 12 I am so excited to share more about the two gems I have built to help Rails developers build and test resilient jobs. With 👾 Chaotic Job (https://t.co/7oYt7Ybous...) and 🧪 Acidic Job (https://t.co/7oYt7Ybous...), things are so much easier now. 2 0 1 396 243 .
Nov 12 So, we can’t simply ignore resiliency and reliability in our background jobs. I’d argue, in fact, that they are the most essential characteristics of jobs. Remember, eventual consistency requires idempotency. 1 0 1 28 208 .
Nov 12 Tomorrow at #RubyConf, I’ll be talking about some tools and techniques to make your background jobs more reliable and resilient. This is a growing concern for more and more companies as we integrate AI deeper into our apps, adding many more external API calls. https://t.co/9MBAY1DPiV 22 2 1 1.2k 284 .
Nov 12 If you see me there, please do come and say hi! 3 0 1 426 47 .
Nov 12 To close what has been the wildest, most fun year I’ve ever had in the Ruby community, I am flying out for @RubyConf to speak at my 10th conference in the last 12 months 😳🤯. I’m excited to hang out w/ old and new #RubyFriends and to talk about something other than SQLite 😅 41 1 1 1.4k 273 .
Nov 08 And then being able to write specific tests for specific failure scenarios with targeted assertions allows me to hone in on weak points in certain jobs, clearly describe how the system should behave after that particular glitch. My job tests have never been more effective. 3 1 0 549 273 .
Nov 08 I am so happy with how the interface for Chaotic Job came out. It is minimal and lean, but *so* powerful. Running simulations with transient errors occurring in every possible location within my job execution flow allows me to have strong confidence in the reliability of my job. 3 1 1 564 279 .
Nov 08 In preparing my @rubyconf talk, a new gem sprouted into existence. Use 👾 Chaotic Job to help you test your background jobs for reliability and resilience. https://t.co/oj2MKkqCwq 🧵 53 3 4 3.2k 182 .
Nov 07 RT @excid3: Rails 8.0 is officially out! 🎉 https://t.co/hUpswu17Ph 0 117 0 0 67 .
Nov 07 If you are scaffolding a new gem, and you want to use SimpleCov, heads up that you will likely run into a problem with Minitest and SimpleCov not playing nicely together. I've opened an issue to explore resolution: https://t.co/VXsLWQMTUI 14 0 0 1.2k 238 .
Nov 01 I like to say, if you have a job that needs to be resilient, put it through the crucible. So, I have called it JobCrucible. Check it out in the upcoming release of Acidic Job: https://t.co/a0ITo6hkgk 2 0 1 431 200 .
Nov 01 You can't be certain your job is resilient until you have defined a set of assertions that should be true no matter what errors may have occurred and verified that the job ends in this state in every error state. 0 0 1 506 212 .
Nov 01 I think of it as simulation testing for Active Jobs. By running the job, and all of its retries, with an error occuring at every possible location—before and after every line executed in the job—you can ensure that your job is truly resilient. 1 0 1 293 243 .
Nov 01 Then, it runs each of those scenarios calling your assertions block for each. You can specify how deep you want the permutations to be, for example, you could test scenarios with 3 random error locations. It defaults to 1 tho. I use it to stress test various job workflows. 1 0 2 393 273 .
Nov 01 Continuing to work on Acidic Job and I've cooked up a very nice testing utility. You give it a job instance and a block where you have assertions, it traces every line called in the execution of your job, generates every permutation of possible positions an error could occur ... 12 1 1 1.5k 279 .
Nov 01 @joeldrapper Enjoyed this post? Subscribe to @fractaledmind for my mix of frontend, backend, SQL, Rails, and random content. 0 0 0 497 126 .
Oct 31 🦋 4 0 0 713 1 .
Oct 31 @joeldrapper Here's a gist for those who want it: https://t.co/8tZcdIm0qW 6 0 0 743 73 .
Oct 31 Yesterday @joeldrapper and I were pairing and came up with this lovely test that ensures you have no controllers with public methods that do not have a corresponding route defined. https://t.co/heZNjc22Kc 116 5 10 6.4k 204 .
Oct 30 Love the new PlanetScale site: https://t.co/AxcWF152Pj This aesthetic is just so lovely. No frills. Just quality and clear value propositions. 27 0 2 3.2k 143 .
Oct 30 Also, you should absolutely read Cloudflare's "Rules of Workflows", which are applicable to any durable execution workflow, regardless of what execution engine you are using: https://t.co/RsJ8X0MV85 1 0 1 376 199 .
Oct 30 It is validating to see how similar Cloudflare's take on Workflows is to what I am building with Acidic Job: https://t.co/bHina8v8Vi Durable execution workflows are reliable and repeatable multi-step, linear cohesive units of code. And Acidic Job brings them to any Active Job. 23 2 2 2.5k 278 .
Oct 24 Working on Acidic Job and stumbled across a bug in Active Job. Took 30 mins to prepare a reproducible bug script and submit an issue: https://t.co/JJ3Qwb8WSn Rails is only ever as good as we make it via well made bug reports. Be sure to always provide a reproducible bug script with your issue. 25 1 0 1.9k 296 .
Oct 21 Elvinas for the win! In all honesty, connecting with so many amazing people online has been a highlight of my career. I know that Twitter kinda sucks in some key ways, but as a place to meet amazing people, it is still unrivaled. 14 0 1 2.6k 231 .
Oct 21 Odds are I’ll reach 3k followers today 🤯 What a wild ride it has been the last couple years. I have so enjoyed actually getting active and involved in the Rails community. https://t.co/cthkpNHYiU 66 0 6 4.5k 197 .
Oct 20 If you want to learn more about how SQLite supercharges Rails 8, have I got a YouTube video for you: https://t.co/8G1JZVmZSV 4 0 0 911 124 .
Oct 20 Rails 8 is the first web framework that provides a production-ready SQLite experience out-of-the-box. Plus, with the suite of Solid gems, Rails 8 + SQLite make the `rails new` command production-ready. This combo of conceptual and operational compression enables #noPAAS. https://t.co/3TGkGhnauE 76 4 2 4.6k 295 .
Oct 20 RT @dhh: Rails 8.0: The first release candidate has been pushed. We're getting close now! https://t.co/aiAhuEspzf 0 90 0 0 113 .
Oct 20 Enjoyed this post? Subscribe to @fractaledmind for my mix of frontend, backend, SQL, Rails, and random content. 1 0 0 629 113 .
Oct 19 If you want to see more considerations when using SQLite, check out my #RailsWorld talk on how SQLite supercharges Rails as the One Person Framework. Give you the whole talk a watch when you have a spare 30 minutes. I promise you, you will enjoy it. https://t.co/DW288W9HdH 0 0 0 487 274 .
Oct 19 Litestream is available to Rails apps via a gem (https://t.co/DvTnNrPMrg) so installation and setup is truly a breeze. 1 0 2 550 118 .
Oct 19 Yes, I love SQLite on Rails as an application architecture. And yes, I truly believe that you should try it for your next project. But, it isn't a silver bullet and it isn't the right fit for everyone. Plus, even if it is a good fit, there are considerations to be aware of. https://t.co/WJJPizLILp 20 2 2 3.1k 299 .
Oct 19 Yippee is Joel and I’s vision for how to build web apps today, and at the center of that vision is giving devs the ability to expand and contract complexity (how intertwined things are) as needed across the codebase. Split files as needed where needed. 19 1 4 4.7k 252 .
Oct 18 RT @timtilberg: @strzibnyj @fractaledmind It’s quite a bit more inspirational than technical compared to his other ones. This isn’t to say… 0 1 0 0 139 .
Oct 18 This is a clip from my #RailsWorld talk on how SQLite supercharges Rails as the One Person Framework. Give you the whole talk a watch when you have a spare 30 minutes. I promise you, you will enjoy it. https://t.co/DW288W9HdH 4 0 0 598 226 .
Oct 18 SQLite needs fine-tuning, but with Rails 8, the Rails framework now does *all* of the configuration and usage tuning for you, invisibly. This is the culmination of over a year of effort from myself and the community at large, and I could not be more proud or excited! https://t.co/ZjgLWSLbzj 131 9 2 10.3k 291 .
Oct 18 This is my vision from my #RailsWorld talk, where I lay out how SQLite supercharges Rails as the One Person Framework and truly enables the #noPAAS mindset. Give you the talk a watch when you have a spare 30 minutes. I promise you, you will enjoy it. https://t.co/DW288W9HdH 3 1 0 505 275 .
Oct 18 Rails is a rocket engine that can take your idea from "hello, world!" to IPO, but you shouldn't need to be a rocket scientist to deploy and run your application in production. #noPAAS https://t.co/StvNkUbocf 10 0 1 967 207 .
Oct 18 RT @Dominus_Kelvin: Now watching @fractaledmind’s #RailsWorld talk https://t.co/qgYaU8pjk7 https://t.co/HDXO8j559H 0 1 0 0 115 .
Oct 17 RT @dimitribosch: It’s technical video night ! @fractaledmind https://t.co/8e3aB70iub 0 1 0 0 85 .
Oct 17 If you haven’t seen my “well delivered talk” yet for yourself, find it on YouTube here: https://t.co/lGcZ5xhCvo 2 0 1 324 111 .
Oct 17 Loved seeing the shoutout in #RubyWeekly by @cooperx86. I still get that little tingle when I see my name in something I’ve been reading for so long. https://t.co/S0TrAyC64K 21 0 2 973 173 .
Oct 17 What is an example of a bug you've hit that arose from the complexity of orchestrating different external services and idempotency? For example, users getting multiple duplicate email because a different API endpoint was rate limited and on each job retry the email was resent. 2 2 0 1.2k 277 .
Oct 17 Enjoyed this post? Subscribe to @fractaledmind for my mix of frontend, backend, SQL, Rails, and random content. 1 0 0 450 113 .
Oct 17 This is a clip from my #RailsWorld talk on how SQLite supercharges Rails as the One Person Framework. Give you the whole talk a watch when you have a spare 30 minutes. I promise you, you will enjoy it. https://t.co/DW288W9HdH 0 0 0 366 226 .
Oct 17 I have spent the last year shaping and enhacing _my_ vision for how to take advantage of the power and simplicity of Rails to bring the beauty of server-driven web application development to as many people as possible. Spoilers, but the linchpin is SQLite! https://t.co/kI8CNbqudr 16 0 2 1.5k 281 .
Oct 17 This is a clip from my #RailsWorld talk on how SQLite supercharges Rails as the One Person Framework. Give you the whole talk a watch when you have a spare 30 minutes. I promise you, you will enjoy it. https://t.co/DW288W9HdH 2 0 0 484 226 .
Oct 17 You can't truly understand why #SQLite is the way that it is until you understand this reality: https://t.co/LfeiqBDJTy 31 0 1 2.6k 119 .
Oct 16 RTing for reach, because NYC is my wife and I's absolute favorite city to visit, and I would love an excuse to jump the ocean and hang out early next year 😄 8 0 0 1.2k 156 .
Oct 16 My blog post that stitches together my original speaker notes and slides from my #RailsWorld talk is slowing crawling up the ranks on Hacker News. I am incredibly proud of my slides for this talk, so I wanted them to have a proper permanent home on my blog. https://t.co/JFWeFtIIEk 17 0 0 1.1k 281 .
Oct 16 Or, if you prefer, I have my slides and speaker notes stitched together as a blog post as well: https://t.co/Fi26z2Lmc5 26 1 0 39.5k 119 .
Oct 16 If you haven't seen it yet, find the talk recording on YouTube: https://t.co/DW288W9HdH 13 1 1 1.4k 87 .
Oct 16 Up to 2k views within the first 24 hours! It warms my heart to know that this talk is interesting and resonates with people. It is the best talk I have ever given on a topic I am so passionate about. I want #SQLiteOnRails to be the goto tool for starting new web apps. https://t.co/xT5LT9SZ6R 76 3 4 4.5k 292 .
Oct 16 I know I'm probably a bit late, but checking out @linkinpark's new stuff with the new lead singer (Emily Armstrong), and it is actually so good! She isn't doing some Chester impression, but also sounds like a natural evolution of Linkin Park. Looking forward to the album. 9 0 2 735 272 .
Oct 16 For the curious, you can find all of my speaking gigs on my blog: https://t.co/3dH8MeEUJa 2 0 0 338 89 .
Oct 16 @fxn @crplanas @palkan_tula @rstankov @marcoroth_ @inazarova PS. This is the fun (and meaningless) leaderboard from the Ruby Video site by @adrienpoly: https://t.co/rNhdGFqhb0 4 0 2 462 175 .
Oct 16 I have had a wild 2024 (and end of 2023). I've gotten to visit so many amazing places (Taipei, Nairobi, Toronto, and so many more), talk with so many amazing Rubyists, and preach the gospel of #SQLiteOnRails! Plus, I have 3 more talks still waiting to be released to YouTube 😅 https://t.co/1UgTbrS9Lp 37 1 4 2.7k 301 .
Oct 16 RT @andycroll: Wrote up a little bit about the technology and thinking behind UsingRails https://t.co/fuU27pJOSI 0 15 0 0 112 .
Oct 16 This is a clip and some excerpts from my #RailsWorld talk on how SQLite supercharges Rails as the One Person Framework. Give you the whole talk a watch when you have a spare 30 minutes. I promise you, you will enjoy it. https://t.co/DW288W9HdH 0 0 0 319 244 .
Oct 16 This is a *viable* application architecture today, unlocked by Rails 8 and SQLite. https://t.co/ckT5XJHRV7 2 0 1 353 106 .
Oct 16 Complexity *isn't always* the price that we have to pay for progress. Sometimes earned simplicity is the path to true progress. https://t.co/KMc0hu1DEW 9 0 1 1.3k 151 .
Oct 16 RT @coorasse: This is the talk I appreciated the most at Rails World this year because of its clarity and high quality slides. 0 1 0 0 126 .
Oct 16 RT @soubiran_: @fractaledmind This was an amazing talk. For real, it's good to have a calm, sensible and rational speech on this. Far from… 0 1 0 0 139 .
Oct 16 Acidic Job is a toolbox for building cohesive and resilient business operations. No extra layer in your app, just use Active Job. No extra infra requirements, just use your db. Minimal conceptual overhead, just tell us which methods to call in which order w/ what behaviors. 8 0 0 1.1k 274 .
Oct 16 If you haven't seen my #RailsWorld talk yet, here's the link. Enjoy! https://t.co/DW288W9HdH 4 1 0 394 93 .
Oct 16 If you saw my #RailsWorld talk and were interested in the blog post I reference that digs into the technical details of everything done in Rails 8 to fine-tune performance, you can find that post on my blog: https://t.co/gKwgzy8Q5z 14 0 1 1k 232 .
Oct 16 Fast is a feature. https://t.co/r2rB3BtWDU 3 0 0 627 42 .
Oct 16 RT @marcoroth_: @fractaledmind Really awesome talk, and super cool how you were able to help bring all of the goodness to Rails 8! I also… 0 1 0 0 139 .
Oct 16 This is my rally cry to at least *try* building your next app with Rails 8 and SQLite. Mark my words: this time next year, we will have a rich collection of examples of people who built their business on this stack. https://t.co/DW288W9HdH 1 0 0 290 240 .
Oct 16 My #RailsWorld talk is doing very well today, the first to 1,000+ views. If you haven't seen it yet, I am confident that you will love it. I poured every ounce of knowledge and passion that I have for this topic into this presentation. https://t.co/HxhrQYldf5 86 9 6 4.9k 259 .
Oct 16 I don't talk politics often, but I hold a very strong and strict view that the death penalty has no place in modern society. We *know* that our justice system is flawed; it is intentionally flawed. We would rather guilty people go free than punish the innocent. The government murdering an innocent person is a stain on our entire country, each and every time. And we are all soaked in these deadly mistakes. I pray that Robert is spared, but so so many have not and will not be spared. It is well beyond time to abolish the death penalty as a legal punishment for any crime. 13 1 0 1.1k 575 .
Showing 401-500 of 699 tweets