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 → ↓ 🎸 Guitar CONFLICT ↓ ⛪ Priests → RESOLUTION ↓ 🔮 Oracle

Slide 6

Slide 6 text

Discovery Act 1 What can this strange device be?

Slide 7

Slide 7 text

You love Ruby because it is a delight to program in. But AI feels... different. When I touch it, it gives forth a sound

Slide 8

Slide 8 text

Ruby code (clean, readable) vs AI output (verbose, unclear) It’s got wires that vibrate, and give music

Slide 9

Slide 9 text

"I designed Ruby for humans, not for machines." —Yukihiro Matsumoto, aka Matz What can this thing be that I found?

Slide 10

Slide 10 text

Ruby's Community Core Values MINASWAN ● Matz is Nice And So We Are Nice ● Developer happiness ● Readability ● Expressiveness See how it sings like a sad heart

Slide 11

Slide 11 text

And joyously screams out its pain

Slide 12

Slide 12 text

Am I becoming dependent on a crutch? Am I cheating by using AI to write code? Sounds that build high like a mountain

Slide 13

Slide 13 text

What the Ruby Community Says ● Ruby developers are split on AI ● The Dependency Dilemma ● Ruby-Specific Challenges ● Persistent Concerns Or notes that fall gently, like rain.

Slide 14

Slide 14 text

Regular users (Daily/Weekly) 38% 2.1/5 AI can’t handle Metaprogramming, lowest rated 60% AI hallucinations and incorrect code I can’t wait to share this new wonder

Slide 15

Slide 15 text

"Having someone to talk to about my ideas and where I want to go. It helps me think things through and validate my ideas... It's like having a blog post custom made to my situation."

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 people will all see its light

Slide 17

Slide 17 text

DISCOVERY ✅ → ↓ 🎸 Guitar CONFLICT ↓ ⛪ Priests → RESOLUTION ↓ 🔮 Oracle Let them all make their own music

Slide 18

Slide 18 text

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

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 - Prefer unless over if for flow control - Handle missing user gracefully" ✅ Effective Specific Context ⛪ The 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 for the subject line ⛪ Another toy will help destroy

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" ⛪ The elder race of man

Slide 26

Slide 26 text

— Avdi Grimm "To work faster I leveraged an LLM as my hands" ⛪ Forget about your silly whim

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) ⛪ It doesn't fit the plan

Slide 28

Slide 28 text

Survey Dependency Concerns ⛪ Skill preservation 🖋 Economic dependency 💸 Junior developer impact 🐣 I can’t believe you’re saying

Slide 29

Slide 29 text

Survey Dependency Concerns ⛪ "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." These things just can’t be true

Slide 30

Slide 30 text

Survey Dependency Concerns ⛪ "I also have grave concerns about nascent and novel devs, at the beginning of their journeys, becoming overly reliant on LLMs and not learning how to solve problems independently through research and synthesis." Our world could use this beauty

Slide 31

Slide 31 text

Top concerns (by frequency) ⛪ AI hallucinations and incorrect code (60%+ of users) Context window limitations (40%+ of users) Data privacy/security concerns Hard to measure actual impact (30%+ of users) Poor handling of metaprogramming/DSLs (25%+ of users) Just think what we might do

Slide 32

Slide 32 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 Don’t annoy us further

Slide 33

Slide 33 text

Tools of the Trade ⛪ We have our work to do.

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

Resolution I wish that it might come to pass Act 3

Slide 36

Slide 36 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 37

Slide 37 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 38

Slide 38 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 39

Slide 39 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) ✅ Debugging assistance ✅ Git commit messages: Transform "fix stuff" → "Fix user authentication bug in SessionsController:42" ✅ Research tasks: Finding information about libraries and APIs In a world like I have seen

Slide 40

Slide 40 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!) I don't think I can carry on

Slide 41

Slide 41 text

How to use AI without losing Ruby's essence Human-centered design 󰰧󰰤󰰚 Developer happiness over efficiency 🥳 Readability over cleverness 📖 Keep learning 󰲎 Attention all Planets of the Solar Federation

Slide 42

Slide 42 text

We shape how AI develops ● Share your experiences (good and bad) ● Mentor thoughtful usage ● Contribute to Ruby-specific AI tools ● Seize this leadership moment Attention all Planets of the Solar Federation

Slide 43

Slide 43 text

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

Slide 44

Slide 44 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 45

Slide 45 text

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

Slide 46

Slide 46 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 to help choose our path "We have assumed control..."

Slide 47

Slide 47 text

References and Further Reading Thank you Rush, rush.com/songs/2112/ RIP Neil Peart

Slide 48

Slide 48 text

wnb-rb.dev

Slide 49

Slide 49 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? @[email protected] christine-seeman.com github.com/cseeman/thoughtful-ai