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 28 For those of you seeing my current work on a structured Ruby SQL syntax tailored to the SQLite dialect, you might not have seen that a couple months ago I manually ported SQLite's lexer into pure Ruby. https://t.co/EX4joupQwA 31 0 2 2.3k 225 .
Dec 28 This structured Ruby quasi-AST will make so many things possible. Just wait, we are cooking so hard right now. 4 0 1 508 110 .
Dec 28 So many great SQLite additions highlighted in this yearly review of the changes made to Rails in 2024 https://t.co/ZVpQrrQXoS 9 0 0 872 126 .
Dec 27 I now have 250 lines that allow me to write ~85% of all possible single SELECT statements. I haven't yet handled CTEs, window functions, VALUES expressions, and compound selects, but literally everything else is covered. So yes, you can write *every* kind of join equally naturally. 20 0 0 1.3k 283 .
Dec 26 Don’t really care about the tech, but I love the style of this website: https://t.co/GEE3FQU8FD Just look at this 😍 https://t.co/ZZOFffCL2z 10 0 3 1.5k 140 .
Dec 26 Both 1. and 2. above instantiate a `ColumnRef` object which the pattern matching uses to build the appropriate the SQL string. The question is simply about which Ruby looks "better" to you, and why if you have a sense of that as well. 0 0 0 415 234 .
Dec 26 What do we prefer for declaring column references? 1. `ref(:schema, :table, :column)`, or 2. `$ref[:schema, :table, :column)` Where schema and table are both optional. So, you could have the fullly specified refs like above, or simply `:table, :column` or even just `:column` 0 0 2 845 277 .
Dec 26 This structure maps to the following SQL query: SELECT * FROM "artists" WHERE EXISTS (SELECT 1 FROM JSON_EACH("artists"."skills") WHERE value IN ('skill_1', 'skill_2') LIMIT 1) 0 0 0 508 177 .
Dec 25 As a reminder, here is the full SQLite expression syntax. This Expression class doesn't cover the optional filter and over clauses for functions, EXISTS with select statements, and IN with select statements. Everything else is covered. https://t.co/Rk1IHsK6eU 5 2 0 560 259 .
Dec 25 I have encoded ~95% of the SQLite expression syntax with structured Ruby. It has all of the functions, the operators, and the expression-bound keyword expressions like CASE, BETWEEN, and LIKE. Share a SQL(ite) expression and I will try to write it using this Ruby structure. https://t.co/kIqONxP6hE 31 2 2 1.8k 299 .
Dec 24 For those curious of what the structured Ruby looks like, here are some tests: https://t.co/IB0I0q0Q82 12 0 0 1.8k 102 .
Dec 24 Some thoughts as I'm doing more "lower-level” work: * defining well-tailored structures for your problem-space is well worth the time * pattern matching is absolutely amazing for working with well-tailored structures * you might not need a full AST with loads of object instances 10 0 0 1k 280 .
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 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 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 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 .
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 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 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 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 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 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 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 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 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 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 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 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 .
Oct 16 RT @nxidis: @fractaledmind It was well done. Your hard work is appreciated 0 1 0 0 74 .
Oct 16 RT @tuomasj: The “Query latencies between SQLite and PostgreSQL” slide in @fractaledmind ’s #RailsWorld presentation blew my mind 🤯🙂 And th… 0 2 0 0 140 .
Oct 16 RT @itsameandrea: Need more reasons to run sqlite in production? Give this a watch! Really great talk by @fractaledmind. I recently switch… 0 2 0 0 140 .
Oct 16 and the YouTube video is here: https://t.co/DW288W9HdH 3 0 0 333 54 .
Oct 16 https://t.co/Fi26z2Lmc5 3 0 1 335 23 .
Oct 16 My #RailsWorld talk is live on YouTube now, and I’m sorry happy with it. But, it doesn’t highlight as many of my slides as I’d love. So I took my slide deck and speaker notes and published a blog post companion. Give it a read and enjoy the immaculate slides 😍 22 1 1 945 260 .
Oct 16 My friend @yukideluxe *always* knows how to find the camera at a conference! PS. Spy @rosapolis's Mochi stickers and @adrianthedev 's Avo stickers! https://t.co/GsbB99sgGu 37 1 3 1.7k 172 .
Oct 16 Rails 8 & SQLite make this setup *so easy*. Spin up a single box, put your Rails app on it, back everything with separate SQLite dbs, and profit. My #RailsWorld talk that was just published is precisely on this: https://t.co/DW288W99o9 15 1 0 2.2k 241 .
Oct 14 By explicitly and exclusively building a web application framework on top of SQLite, we are able to ensure that every single detail in every single layer is well-tuned. But, this does require turning many pieces of "known wisdom" on their heads! 13 0 0 1.6k 245 .
Showing 301-400 of 568 tweets