About the author

Steven HarmanSteven Harman is a passionate developer who believes that writing great software isn't just a job, its a craft.

ASP.NET MVP

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

Jobs

Badges

  • Subtext Project
  • Support Subtext
  • HiddenNetwork.com Banner

ruby

There are 6 entries for the tag ruby

Ruby Has Ranges, and So Does C#

Creating a Range in Ruby is dead simple. 1: my_range = (1..10) 2:   3: my_range.each { |i| puts "My number is: #{i}." } Running that little snippet will do just what you think, push the numbers 1 through 10 out and shove them into the sentence my number is x. ...

On Geek Hero Worship

After last night's Columbus Ruby Brigade meeting several of us were over at a local watering hole soaking up some Guinness and a great conversation. Like all great conversations, at some point the conversation devolved into war stories, then then one-upsmanship, and finally a lot of hero worship. And no adulation is complete until some one points out that those folks we put up on pedestals are normal people, much like the rest of us. Of course being a bunch of Ruby enthusiasts, with several bordering on fanatics, that statement when something like They...

Expectation Based Testing with Mocks

Last week I talked about Rubifying your C# code by adding the .Each() extension method to the IEnumerable<T> interface. I was discussing that code with one of the guys at work and he asked a brilliant question So, how did you test that? I was floored. Being such a test-first fan boy I couldn’t believe that I had failed to write that little extension method in a TDD manner. Hell, I hadn’t even done TAD! So how do I test it? There are no doubt a plethora of ways to test this...

Get Ruby-esq Each Iterators in C# 3.0

Yes, Ruby and other dynamic languages are all the rage these days. Yes, using Extension Methods in C# 3.0 is overplayed. But you know what... I don’t care! So I’m going to show you an Extension Method that will bring a little Ruby-goodness to your hum-drum C# world. The Ruby goodness One of my favorite control structures in Ruby is the each method. This method can be used on any string, array, or hash to quickly iterate over each character of a string, item of an array, or key/value pair of a hash. That’s...

Value Type Parameters Are Still Value Types, Even in a Lambda Expression

Today I was refactoring some unit tests, trying to get rid of some funky smelling tests, I made the all to common mistake of trying to be too clever. The smell This particular project has several entities that have a Timestamp field, represented by a byte array in the domain objects - err, code... depending the semantics you use. What I found to be particularly stinky was the inline byte arrays that were scattered all through the test code. And what’s worse, most of the arrays weren’t even of the correct size! For the record, they should...

Sharp Tools for Sharp People

Today at CodeMash I had the opportunity to sit on Joe O'Brien's What makes Rails possible, an introduction to the Ruby language session. Let me just say... despite all of the hype, I'm really starting to get excited about the power (and other cool stuff) that dynamic languages like Ruby have to offer.  Joe did a really great job of giving us noobs a quick intro to not only the Ruby language, but also to why dynamic languages are so powerful, and how useful they can be. Naturally some of the attendees started to raise questions about Ruby's lack of static type checking...