HNHacker News
TopNewBestAskShowJobs

srbaker

13 karma · joined September 26, 2014

submissionscomments
srbaker··on History of RSpec
I am a fan of pytest, and mightn't have thought to make the same thing in Python land.
srbaker··on History of RSpec
Exactly this. My main point, I think, is that once people learned how to _think_ about these problems, they could be shown the "normal" syntax and it would click.

This is why I thought it was valuable as a teaching tool, and not valuable beyond that. Others disagreed. I'm just a dude trying to help people, though. What do I know?

srbaker··on History of RSpec
Like every human, even our mentors can be flawed. This one turned out to be an utter shit show who tried to take my own creations and make them his own.

In his defense, he certainly had a hand in creating _me_, but he didn't have much to do with RSpec.

srbaker··on History of RSpec
I think this format is the logical conclusion, and improvement over, mixing what are effectively global assertions on to every object.

The ideal is a single method (call it `assert` if you want) that takes a block, and does the right thing, is the overall best.

srbaker··on History of RSpec
I also find this fascinating. My thesis, if I have one, is that everyone learns and internalises things in different ways. And I just wanted to provide a new way of learning.
srbaker··on History of RSpec
At first glance, I disagree with about half of what is written here. I honestly get the impression that whoever wrote this missed the point. :/
srbaker··on History of RSpec
Thank you. I have received this kind of feedback from many, and I appreciate it. It makes my day.
srbaker··on History of RSpec
It's true. This is why I never understood why people used RSpec for real software. It was only intended to teach people how to think.
srbaker··on History of RSpec
A generic assert that fails on AssertionFailedException, and errors on all other exceptions is the ideal.
srbaker··on History of RSpec
Absolutely. I got lucky with RSpec. I was doing the thing that was needed at the time.

The thing that causes me a lot of angst is that I used to feel like I was "on the frontier." Skating to where the puck is going.

These days? I am confused by where the puck ends up, and am left scratching my head.

They say "luck is the intersection of preparation and opportunity." As a straight white dude, opportunity is not my problem. But I increasingly find myself being ill-prepared for the weird places this industry is going. :/

srbaker··on History of RSpec
Thank you. This is what I'd hoped would be (at least partly) the reception of this.
srbaker··on Spec-me-maybe: Introduces the “maybe” syntax to RSpec
I'd like to thank Jesse Cooke for pointing me at this. The history of RSpec is something that's often misunderstood by many folks.
srbaker··on Spec-me-maybe: Introduces the “maybe” syntax to RSpec
That's not quite true.

I created RSpec (in early 2005) to draw people's attention away from the word "test" because it was a huge hangup while I was teaching TDD. I kept hearing "You can't test something that doesn't exist, therefore your entire idea is bunk." I wanted to introduce TDD to people without ever using the word "test", and then switch them to using xUnit instead.

Not a joke, but I guess you could reasonably describe RSpec as a tool for performing a good old fashioned bait and switch. In a classroom. (I never intended for it to be used outside of a classroom setting.)

Around the time I was looking for ways to "teach TDD without using the word", Aslak Hellesøy introduced me to Dan North's ideas of Behaviour Driven Development. That's where the word "should" came from. I don't know if it was actually Aslak or Dan (or possibly even Liz Keogh) that first used the word "should", but that wasn't my idea.

Also, I'll point out that mixing #should onto Object wasn't my fault. The original syntax looked very close to the expect().to() syntax of today. It was actually assert(foo).does_equal(bar) at one point, and this was the syntax I was most fond of. I tried dozens of different combinations. "#should" was one of many, and I didn't like it. It got released this way because I was talked into it after that variant was demonstrated (by someone else) to a positive audience.

People liked it. RSpec took off. Whoops.

I later said on twitter, jokingly, that RSpec was a huge troll. That was kind of a joke on a joke. RSpec wasn't a joke, but I didn't build it for actual use. That was a happy accident. That said, it's a great tool these days, if a bit heavy. And it has certainly served my original wish of teaching many people TDD very well.

My $0.02 on the "maybe" syntax: if you need this, I suspect your problems are a lot larger than whether or not an assertion will pass or fail. It's symptom solving.