Slide 1

Slide 1 text

Thoughtful AI for the Rubyist A Discovery in Three Acts Christine Seeman

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

DISCOVERY → CONFLICT → RESOLUTION ↓ ↓ ↓ 🎸 Guitar ⛪ Priests 🔮 Oracle

Slide 6

Slide 6 text

Discovery I can’t wait to share this new wonder… Act 1

Slide 7

Slide 7 text

You love Ruby because it is a delight to program in. But AI feels... different. The people will all see its light

Slide 8

Slide 8 text

Ruby code (clean, readable) vs AI output (verbose, unclear) Let them all make their own music

Slide 9

Slide 9 text

"I designed Ruby for humans, not for machines." —Yukihiro Matsumoto, aka Matz

Slide 10

Slide 10 text

Ruby's Community Core Values: MINASWAN ● Matz is Nice And So We Are Nice ● Developer happiness ● Readability ● Expressiveness

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Am I becoming dependent on a crutch? Am I cheating by using AI to write code?

Slide 13

Slide 13 text

What the Ruby Community Says ● Ruby developers are split on AI ● AI often generates code that works but doesn't feel idiomatic ● Real concern about "use it or lose it" with fundamental skills ● Most used for tests, but tests often need complete rewrite

Slide 14

Slide 14 text

Regular users (Daily/Weekly) 35% 1.8/5 AI can’t handle Metaprogramming 65% of AI users Used AI for writing tests

Slide 15

Slide 15 text

"Don't bring a forklift to the gym. Human skills are use it or lose it.” — Individual contributor , 11+ years experience "My biggest concern is that dependency on LLM tooling creates an indentured class of developers, who are then at the whim of whatever premiums these companies decide to charge." - Developer comparing AI dependency to calculator use

Slide 16

Slide 16 text

What if we could have both? Working faster while building deeper knowledge AI that enhances our craftsmanship rather than replacing it The Ruby community collaborative spirit applied to human-AI partnership The Priests praise my name on this night.

Slide 17

Slide 17 text

The people will all see its light DISCOVERY ✅ → CONFLICT → RESOLUTION ↓ ↓ ↓ 🎸 ⛪ 🔮

Slide 18

Slide 18 text

Conflict I know it’s most unusual To come before you so… Act 2 ⛪

Slide 19

Slide 19 text

Where AI Excels with Ruby ✅ ✅ 🥳✅🥳 ✅ Code generation Refactoring Documentation Testing ✅ Git Commits ⛪ Yes, we know

Slide 20

Slide 20 text

Where AI Struggles 🫣 😩 🫤 👎 Metaprogramming Ruby idioms/style Rails conventions Blocks and iterators ⛪ It’s nothing new

Slide 21

Slide 21 text

Code That Doesn't Feel Ruby-like ⛪ It’s just a waste of time

Slide 22

Slide 22 text

Thoughtful Prompting aka Teaching AI to speak Ruby ⛪ We have no need for ancient ways

Slide 23

Slide 23 text

Prompting with Purpose Before: "Write a method to get users" ❌ Ineffective (Vague) After: "You are a senior Ruby developer following the Ruby Style Guide. Context: Rails 7.1 application Task: Write a method to find a user by ID Requirements: - Follow Rails conventions - Use idiomatic Ruby patterns - Avoid explicit nil checks - Handle missing user gracefully" ✅ Effective (Specific Context ⛪ Our world is doing fine

Slide 24

Slide 24 text

Prompting with Purpose ❌ Ineffective: Write a commit message ✅ Effective (Convention + Context): Generate a conventional commit message: Context: User authentication Changes: Added password reset validation, fixed token expiration bug, added RSpec tests Format: (): Use imperative mood, 50 chars max ⛪

Slide 25

Slide 25 text

Advanced Prompting ⛓ Chain-of-thought: "Explain your reasoning step-by-step" 📏 Constraint-based: "Refactor this method to make it 5 lines or less" ❓Error analysis: "Spot potential errors in this code" ✅ Verification Prompting: "Does this feel Ruby-like?" ⚠ Avoid Negative Instructions 🐣 Beginner-friendly: "Explain this concept like I'm a beginner" ⛪

Slide 26

Slide 26 text

— Avdi Grimm "To work faster I leveraged an LLM as my hands" ⛪

Slide 27

Slide 27 text

The Hidden Cost - Context Switching 🧠 Human limitation: We can only truly focus on one thing at a time 🧐 AI creates context switching: Jumping between writing code and evaluating AI suggestions 󰷻 The cost: Each switch takes 15-25 minutes to regain deep focus 🧠 Research backing: 20% of cognitive capacity lost during context switches (PMC Research 2023) 🧐 Brain imaging: fMRI shows frontal and parietal lobes respond to unexpected task switching (Wake Forest 2024) ⛪

Slide 28

Slide 28 text

Survey Dependency Concerns Fear of becoming "indentured" to expensive AI tools Don't bring a forklift to the gym. Human skills are 'use it or lose it. Brain-task-based skills can be very 'use it or lose it'. The difference between using basic autocomplete and having an LLM generate entire blocks or even files, is significant. ⛪ Concern about junior developers not learning fundamentals

Slide 29

Slide 29 text

Automation Bias - Don't Lose Yourself ⛪ ● Automation bias: Tendency to assume computers know more than humans ● The Ruby perspective: AI doesn't understand Ruby's philosophy or your codebase ● Healthy skepticism: Your instincts and knowledge matter more than AI confidence ● Research backing: Professional experience and domain expertise are most protective factors against automation bias You're the Ruby expert, AI is just a tool

Slide 30

Slide 30 text

Tools of the Trade ⛪

Slide 31

Slide 31 text

The dream is still in my head… DISCOVERY ✅ → CONFLICT ✅ → RESOLUTION ↓ ↓ ↓ 🎸 ⛪ 🔮

Slide 32

Slide 32 text

Resolution I wish that it might come to pass Act 3

Slide 33

Slide 33 text

From discovery to understanding 💎 We've seen what AI can do (and can't do) 💎 We've learned how to prompt thoughtfully 💎 We've explored the partnership model AI as tool, not replacement Not fade like all my dreams

Slide 34

Slide 34 text

"In a world of abundant cheap code, what becomes scarce: Understanding. Judgment. The wisdom to know what not to build" - Kent Beck "Any fool can write code that a computer can understand. Good programmers write code that humans can understand" - Sandi Metz "AI is going to be more valuable in helping programmers understanding existing code rather than generating new code" - Martin Fowler Just think of what my life might be

Slide 35

Slide 35 text

When to Use AI 👍 ✅ Rails generator-style boilerplate ✅ Basic CRUD operations and controllers ✅ RSpec test skeletons ✅ Migration file generation ✅ Simple refactoring (rename methods, extract variables) ✅ YARD documentation comments ✅ Git commit messages: Transform "fix stuff" → "Fix user authentication bug in SessionsController:42" In a world like I have seen

Slide 36

Slide 36 text

Beware the path you take 🚫 🤖 ❌ Complex metaprogramming and method_missing ❌ Security-sensitive authentication logic ❌ Performance-critical optimizations ❌ Gem architecture decisions ❌ Advanced ActiveRecord relationships ❌ Custom DSL design (leave that to the humans!)

Slide 37

Slide 37 text

Community-derived wisdom for AI usage 🗣 "Let it rough draft, and you refine. If it doesn't get it right on the first or second try, don't get frustrated, just dip into the code and do it yourself." 🗣 "Never assume the LLM is right, challenge everything they tell you." 🗣 "Don't try to replace your brain with it, rather ask, how can I augment my abilities with it." 🗣 "Narrow the scope of the task and be specific - give the AI tool bite-sized, well-defined tasks with clear guardrails."

Slide 38

Slide 38 text

How to use AI without losing Ruby's essence Human-centered design 󰰧󰰤󰰚 Developer happiness over efficiency 🥳 Readability over cleverness 📖 "Ruby is the most 'human' language I know: written for humans, with interesting human foibles, reads like human language" — Sean Goedecke Attention all planets…

Slide 39

Slide 39 text

We shape how AI develops ● Share your experiences (good and bad) ● Mentor thoughtful usage ● Contribute to Ruby-specific AI tools

Slide 40

Slide 40 text

— Rich Steinmetz The whole midterm future of the 'AI coding thing' is us collaborating with the IDE/editor

Slide 41

Slide 41 text

Key Takeaways - The Resolution Your expertise guides Trust your instincts Share knowledge freely AI is a tool, not a replacement Does this feel Ruby-like? Community matters

Slide 42

Slide 42 text

We have assumed control... DISCOVERY ✅ → CONFLICT ✅ → RESOLUTION✅ ↓ ↓ ↓ 🎸 ⛪ 🔮

Slide 43

Slide 43 text

Our Complete Journey ✅ Discovery: Found AI tools and faced our fears ✅ Conflict: Explored capabilities, limits, and learned thoughtful use ✅ Resolution: Found wisdom in community and choose our path "We have assumed control..." but this time, WE control how AI serves Ruby, not the other way around

Slide 44

Slide 44 text

CREDITS: This presentation template was created by Slidesgo, and includes icons by Flaticon, and infographics & images by Freepik Thanks! What questions can I answer? christine-seeman.com github.com/cseeman/thoughtful-ai

Slide 45

Slide 45 text

References and Further Reading Thank you Rush, rush.com/songs/2112/, and RIP Neil Peart Full Reference can be found at: github.com/cseeman/thoughtful-ai/blob/main/resources/community-resources.md