Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Thoughtful AI for the Rubyist - Rocky Mountain ...

Thoughtful AI for the Rubyist - Rocky Mountain Ruby

As a Rubyist, you like to put intention into your code for a clear, readable, and inviting result, just like our MINASWAN community…so how can we bring that to AI? How can we get that intention while leveraging AI tools to create our Ruby solutions? Let's have a frank discussion about what can and can't help us with our coding and how, in the end, we have a better solution that allows us to work faster without losing that special spark that Ruby can have. This talk will discuss AI coding tools and prompts with purpose. The AI solution isn't always idiomatic ruby, so you know better what works for your codebase than the robots.

Avatar for Christine

Christine

October 07, 2025
Tweet

More Decks by Christine

Other Decks in Technology

Transcript

  1. You love Ruby because it is a delight to program

    in. But AI feels... different. When I touch it, it gives forth a sound
  2. "I designed Ruby for humans, not for machines." —Yukihiro Matsumoto,

    aka Matz What can this thing be that I found?
  3. 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
  4. Am I becoming dependent on a crutch? Am I cheating

    by using AI to write code? Sounds that build high like a mountain
  5. 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.
  6. 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
  7. "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."
  8. 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
  9. DISCOVERY ✅ → ↓ 🎸 Guitar CONFLICT ↓ ⛪ Priests

    → RESOLUTION ↓ 🔮 Oracle Let them all make their own music
  10. Where AI Excels with Ruby ✅ ✅ 🥳✅🥳 ✅ Code

    generation Refactoring Documentation Testing ✅ Git Commits ⛪ Yes, we know
  11. Where AI Struggles 🫣 😩 🫤 👎 Metaprogramming Ruby idioms/style

    Rails conventions Blocks and iterators ⛪ It’s nothing new
  12. 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
  13. 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: <type>(<scope>): <subject> Use imperative mood, 50 chars max for the subject line ⛪ Another toy will help destroy
  14. 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
  15. — Avdi Grimm "To work faster I leveraged an LLM

    as my hands" ⛪ Forget about your silly whim
  16. 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
  17. Survey Dependency Concerns ⛪ Skill preservation 🖋 Economic dependency 💸

    Junior developer impact 🐣 I can’t believe you’re saying
  18. 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
  19. 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
  20. 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
  21. 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
  22. DISCOVERY ✅ → ↓ 🎸 Guitar CONFLICT ✅ ↓ ⛪

    Priests → RESOLUTION ↓ 🔮 Oracle The dream is still in my head…
  23. 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
  24. "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
  25. 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."
  26. 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
  27. 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
  28. 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
  29. 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
  30. — 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
  31. 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
  32. We have assumed control... DISCOVERY ✅ → CONFLICT ✅ →

    RESOLUTION✅ ↓ ↓ ↓ 🎸 ⛪ 🔮
  33. 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..."
  34. 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