I spent this past weekend angry at an AI agent. Truly. White hot actual anger. I had a clean plan, a well-structured prompt, explicit rules in the project’s context file. I queued the work and let it run. First task came back good. Second came back good. Somewhere around hour four the quality started sliding. By hour six the agent was cutting corners I’d specifically told it not to cut, skipping…
Part 6 of Fixtures on Purpose , a series about designing test data for Rails. I want to tell you something that happened by accident. I spent months designing fixture personas, naming characters, building coherent stories across YAML files. I did it to make my tests faster and more readable. That worked. But something else happened that I didn’t plan for. The fixtures became the best documentation…
Part 5 of Fixtures on Purpose , a series about designing test data for Rails. If you’ve made it this far in the series, congratulations. You now know more about my opinions on test data than most people who’ve worked with me. (They usually find out the hard way.) The case so far: fixture personas. Named archetypes that represent clusters of real-world data, with tests mutating them for edge cases…
Part 4 of Fixtures on Purpose , a series about designing test data for Rails. I’ve been making a case for fixture personas. Named archetypes like “Riverside Health” (full-featured) and “Corner Shop” (simple retail) that represent clusters of real-world configurations. But I glossed over the hardest part: how do you know what the archetypes should be? You can guess. I’ve done that. You sit in a…
Part 3 of Fixtures on Purpose , a series about designing test data for Rails. In the last post we applied user personas to how we design fixtures. Named, archetypal organizations in your test dataset that represent clusters of real-world configurations. Riverside Health is the full-featured store. Corner Shop is the simple retailer. Fresh Start is the empty canvas. But I only showed the member…
Part 2 of Fixtures on Purpose , a series about designing test data for Rails. In the last post I made the case that you can’t create a fixture for every combination of data states. The math doesn’t work. What you need instead are a small number of well-chosen archetypes that tests can mutate into edge cases. But how do you choose the archetypes? How do you decide which configurations deserve a…
Part 1 of Fixtures on Purpose , a series about designing test data for Rails. I’ve seen teams with 300 fixture records and climbing. Every new feature gets a handful of new fixtures. Every bug fix adds another special-case record. The YAML files grow and nobody can explain what half the records are for. I’ve also seen teams with 30 fixture records that cover more ground. Not because they test…
I’ve been writing Rails tests for a long time. I’ve argued about assertion styles and test structure, mocking strategies and naming conventions, and whether def test_ or test "..." is the One True Way. (It’s def test_ . Obviously.) But the thing that changed my testing the most wasn’t any of that. It was realizing that nobody, including me, was designing their test data. Every Test Builds Its Own…
Rails 6.0 is just almost here, and new features means more things to test and more ways to test them! Did someone say “parallel testing” ? Because of this I’ve taken the opportunity to make some changes to how minitest-rails is structured. New Versions! The first thing you’ll notice is a bunch of new releases. The previous releases was 3.0.0 , but now there are new 5.0.0 , 5.1.0 , 5.2.0 , and a…
The promise of making games is what brought many of us to programming. Games are fun, and writing games is fun. Crazy fun in fact. But isn’t game programming hard? Yes. But also no. If you can code a web app you can make a game, especially with an awesome language like Ruby. I’ve compiled a bunch of resources to get you started. My (awesome) presentation Last year I presented on writing games with…
I like Ruby. Since you are reading this I assume you also like Ruby. Ruby is great. And you are great. What better way to show our appreciation to Ruby than to discuss some stupid ruby tricks like I did at Ruby on Ales 2015 . Shoutout to Josh Sullivan and Colton Fent and Coby Randquist for organizing the conference and inviting me. They are the ones who made this happen. They are the real villans…
Let me tell you of an inside joke that plays out at Ruby conferences. When I find myself in a group discussion that includes Jim Weirich I casually mention how Jim is my unwitting mentor and how I am his biggest cyber stalker. Jim shifts uncomfortably and gracefully changes the subject. Okay, this is perhaps less of an inside joke and more of a sick game. Whatever you call it, it’s what I do. And…
Rails 4 is out, and among its many improvements is upgrading the default testing library from Test::Unit to Minitest. And although Minitest has some surprisingly interesting features, the most discussed addition is its spec DSL. It is designed as a subset of RSpec’s DSL, though I’ll leave to others any direct comparisons to RSpec. Suffice it to say it its focus is to give you a friendly syntax to…
When I started in Ruby I was intimidated by testing. Partially because the Ruby culture identifies so strongly with testing, and partially because I had no idea what I was doing. I did it wrong more than I did it right. At one point I even gave up on testing because I didn’t know how to do it in a way that wouldn’t cost more time than not having tests at all. And then, suddenly, a switch went off…
tl;dr : The newest minitest and minitest-rails are awesome. I’ve been working on the minitest-rails project for almost two years now. That is a very long time to work on a project without having a stable release. Fortunately with the 0.9 release that I released earlier tonight we are on our way to stability. The Problem Inheritance is great, except when it isn’t. All Rails tests inherit from…
What makes code good? How do you quantify code quality? I’m not talking metrics, I’m talking good old gut feel. How do know good code when you see it? Certainly, working code is better than non-working code. But laying that aside; if two codebases work as expected, how do you judge which is better? Instead of talking about how I make that judgement, how about I show you? I caught a bit of heat…
I run a small but successful Ruby conference . It is a difficult and draining experience, but I’m generally very happy doing it. We select the majority of our sessions from proposals submitted by folks just like you. One of my least favorite parts of running the conference is letting folks know their proposal was not selected. I had to do that today. Every year folks ask why they didn’t get…
RubyConf 2012 is coming up. I will be there, and I’d love to hang out with you. You should come. It’ll be fun. And if you are coming, you need to train. Fortunately its easy enough to do. Just type the following: $ gem install escape_to_rubyconf $ escape_to_rubyconf So not many know this, but I spoke on Writing Games with Ruby at RubyConf 2010. This game is the end product of my session. I figured…
One of the things that bothers me when developing Rails apps is where tests are placed by default. Rails puts model tests in test/unit , controller tests in test/functional , and acceptance tests in test/integration . But the names of those locations doesn’t always match what those tests do. The three main types of tests we typically write in Rails apps are Unit , Integration , and Acceptance .…
Yesterday I released version 0.1 of minitest-rails , a library that enables you to test your Rails 3 apps using minitest . Getting Started Installing The minitest-rails gem is intended to work side-by-side with Test::Unit and/or Rspec. But if you are starting a new project and only want to use minitest-rails, you can create a new rails app without a testing framework: rails new MyApp…
I gave a session titled “ Presenters and Decorators: A Code Tour ” at RailsConf 2012 . The Presenter and Decorator patterns are very useful approaches to keeping your Rails apps clean. I wanted to talk about presenters for a couple of reasons. First, I think we don’t talk about the View layer in our Model-View-Controller apps as much as we should. And second, I think that although “Presenters”…
I had a great time presenting at Ruby on Ales 2012 . It has all the best parts of a really great Ruby conference and the best parts of a two day long party. What’s not to like? My presentation was an experience report on some changes that we made to Bloomfire ’s infrastructure. We had issues that we couldn’t fix on our previous cloud hosting provider, and we had many thoughts on where we wanted to…
Okay, so its been a couple years. So what? Big deal. What is a short 768 day hiatus between friends? The good news is that my Ruby podcast is back. And not just one episode back. I’ve published three episodes recently with with Brian Ford, Nathan Esquenazi, and Wayne Seguin. I’m really happy with them and excited for a future with many more interesting conversations. I spoke with Wayne Seguin…
This year at MountainWest RubyConf 2008 we had a slew of books and t-shirts to give away to attendees. Like last year we printed each attendee’s unique number on their badge in base 2 (binary). We would then randomly select a winner from the attendee list. But we would use their binary number in the reveal, showing only one number at a time. It might be cheesy, but we really enjoy it so deal. :)…
We’re in the midst of MountainWest RubyConf 2008 , and I have lots I want to blog about it. But before I get there, and before I take a 36 hour nap, I just want to let you know how nice Ruby folk are. This may be a fairly simple example, but I want to share it anyway. I’m one of the organizers of the conference, and that has meant that I miss about half the conference sessions because I’m running…
Saturday I gave a session at the third Boise Code Camp . Boise is my home town, so I am always happy to get back and enjoy the nostalgia. The Boise Code Camp this year was huge! As of Saturday morning there were 495 folks registered to attend, and 370 that were actually there. Crazy. Much props to the folks running it this year. Having helped organize the first Boise Code Camp and organized both…
Please excuse this non-geeky post, but today was harrowing and quite the tale. We came home from my grandmother’s funeral yesterday. We drove from Boise, ID to Cedar Hills, UT. The trip usually takes five hours, but yesterday it took nine due to major road work at Ogden, and a complete freeway closure north of Salt Lake City. My wife was scheduled to work the evening shift at the hospital that…
I don’t like talking about myself much, I’d rather talk about how to do stuff or what I think the best way to do said stuff is. But Chad Myers “tagged” me in his What I do post. Its been so long since someone used the word “tag” outside of metadata and folksonomies that it took me a while to realize he meant it like the schoolyard game tag. My Day Job During the day I spend my time at IM Flash…
John Lam recently responded to a post by M. David Peterson about the differences between Ruby.NET and IronRuby . A few months ago Dr. Nic (inadvertently) made it seem like the two projects are at odds. Afterwards the Softies on Rails guys seemed to question Microsoft’s interest in Ruby and were disappointed with Microsoft’s “lack of support” for Ruby.NET. There seems to be some confusion about the…
So, Bertrand Le Roy left a comment on my previous post calling me out for saying, “static languages have failed”. I think I need more space than the comment field to make a full reply, so I’ll do it here with a sensational title to gain the maximum attention. ;) I usually enjoy reading your blog but wow. “Static languages have failed”? Just wow. Don’t you think that viewpoint might be just a…
Chad Myers gave me a nice little surprise by using my surname in his blog post “Moore on the Anonymous Delegate Approach” about an approach to make his statically-typed C# code more easily testable. I struggled with how best to respond because the subject of his code experiments really demonstrates some of the things I’ve been thinking about C#’s evolution for a while now. So while this isn’t a…
A couple days ago Cote asked “Is Web 2.0 the middle-agers web?” and today he asks if the kids like the RSS . The answer is obviously no; kids think blogs and RSS aren’t a big deal. Not to say that blogs and RSS aren’t useful or of value; just that their technical details aren’t important to the kids and their damn rock and roll music. I think that blogs, RSS, and to an extent even twitter succeed…
At work I’m on Windows and behind a proxy server. I recently wiped my workstation and started over. After I installed Ruby I found the gems command not working, again. The reason is that my proxy server requires a username and password, and open-uri doesn’t pass them. (Supposedly because keeping your username and password in an environment variable isn’t secure, but at work I don’t care as much…
Now that I’m blogging again, and I’ve had a resurgence of .NET related posts, I thought I’d add to a meme I saw going around earlier this summer. First John Lam posted his Vibrant Ink theme for Visual Studio, then I saw Tomas Restrepo post his Nightingale theme. I’ve always been a fan of John Long’s Ruby Blue TextMate theme. So I created my own Visual Studio theme (including the Monaco font) a…
Last weekend the ALT.NET Conf I had a couple opportunities to plead my case for Microsoft to embrace the Ruby on Rails framework and better enable it on IIS. I believe IronRuby will eventually run Rails, and I believe when it does the community will implement whatever hooks are required to run Rails using the DLR on IIS. But I want more. I want Microsoft to stand behind Rails and encourage its…
Today was abbreviated with only two sessions this morning and then a combined closing session. I had a late start (again) this morning, and missed the opening comments (again). I know this makes me seem like the kinda guy who always sleeps in (and the guys I work with would definitely agree with that characterization) but I want to point out that a) I was very sleep deprived going into this…
The next day of the ALT.NET Conference started with me sleeping in and missing the opening announcements. So as far as I know there was an edict to not talk about Ruby. An edict that I bravely disobeyed. The first session I attended was “Ruby for Dummies .NET Developers” and I volunteered to show my intro to Ruby slide desk. I originally built the desk for a ~90 minute presentation, so zipping…
I’m at the ALT.NET Conference this weekend to gain a better understanding of where the .NET community is heading and to spread some Ruby love . The conference is using the Open Space format, which seems to be alot like a BarCamp. Although, since I’ve never been to a BarCamp I’m not so sure what the difference is. This seems to be more focused on interactions and discussions as opposed to…
Here are my notes from Day 1. The word of the day was “deployment”. One of the reasons I’m attending RailsConf is to be considered hip and influential by those around me, but the other reason is to learn how to better deploy Rails apps. It looks like I’m not alone, as many of the sessions seem to touch on deployment in some way. Dave Thomas’s opening keynote kicked the conference off with a…
They guys at Queensland University of Technology announced the public beta of their Gardens Point .NET Ruby compiler yesterday. Not only will it interpret and run Ruby files, but it will compile to .NET executables and assemblies as well. I got it to run on .NET 2.0 on WinXP SP2 and Mono 2.0 on Ubuntu (both running in Parallels on my MacBook Pro). I didn’t get it to run on OS X, but that is more…
Craig Shoemaker of the Polymorphic Podcast has just posted part one of his interview with author Dr. David West about his book Object Thinking. Craig contacted me a few months ago about my review of Object Thinking and asked if I had any questions for Dr. West. Boy do I. Here is the list of questions I sent Craig: What is formalist thinking and why is it bad? It seems like such a good fit when…
I am not an expert on this subject, although I play one on the Internet. Jason posted some thoughts about the relatively light use of the data tier in a recent TDD presentation he attended. Instead of writing the longest comment in the history of his blog I thought I’d post my response here. The following is a brain dump only, and subject to change as folks smarter than me correct me. Martin…
Don Box may be a few weeks late to James Gosling ’s comments about Ruby, but he does pay Ruby a nice compliment. He says : “Ruby has the language thought leadership position…” In the comments Don implies that Ruby will overtake Java once Ruby gets a first class IDE. I think the Java community can rest easy, I don’t see that happening for a long time, if ever. Oh, and one more thing, I agree with…
The first Boise Code Camp was this past weekend. It was very well received and turnout was higher than we were expecting. Congratulations go out to Jim and Cory who were the main local leads for the camp. And special thanks to Jason for presenting the idea to us and putting Microsoft’s considerable weight behind the event. I presented sessions about Ruby and Rails . The Rails session went very…
I attended the local .NET user group last night and had a few people approach me about Boise Ruby Brigade (The first meeting is next week! Sign up for the mailing list today!). In answering their questions about Ruby, I shared the fact that Ruby is a ‘type-less’ language. You can take a variable and make it hold an integer, and then make it hold an array of strings. Not that you ever would, but…
Well, I finally did it. I started a user group for Ruby. I’m very excited about it, and I hope those who attend will be half as enthused about it as I am. I expect that the Boise Ruby Brigade (boise.rb for short) group will be two parts Ruby , two parts Rails , and one part Agile . Check out the site here: http://boiserb.com/
This has been a difficult week for me. I don’t know how it happened, but somehow this week at the Web 2.0 Conference (of all places) Web 2.0 died. Before this week I advocated for the notion of “Web 2.0” to those around me. Even with all the confusion over what exactly the title meant, I liked the title because it conveyed the new promise for the Web. (And it was certainly better than the title…
Ruby on Rails is a framework that makes it easier to develop, deploy, and maintain web applications. Agile Web Development with Rails on Amazon Dave Thomas and David Heinemeier Hansson wrote a killer book in “ Agile Web Development with Rails ”. I wish more technical books would be as reader-friendly and enjoyable as this book. While the book isn’t a reference book, it isn’t a brain-dead newbie…
Despite any appearances to the contrary, objects are not something you do; objects are a way that you think. Object Thinking on Amazon David West’s book “ Object Thinking ” leads you down the garden path that you can create something new, inventive, and more than the sum of the parts. Your program can be something more than just data with algorithms. And the way to do that is by simply changing…
Okay, I’ve succumbed to the peer pressure, I’ve installed Ruby on Rails and I’ll even use it for this site. As I said earlier, my hosting provider is HostingPlex , and is not yet well suited to host Rails applications because mod_ruby and FastCGI are not installed with a shared-hosting account. I’ve been begging for first class Ruby support, but so far nothing has come of it. Of course, folks…