Sunday, February 22, 2009

Tom found a meeting place in Central Square

Hi All,

Tom Marx, through the extraordinary effort of calling dozens of churches in Central Square, has found us a place to meet.

There's a church on Columbia Street, probably just a 5 minute walk from Sidney Street, that is willing to rent us a room for $30 a night. The room has a blackboard and is available at our regular meeting time.

We tried meeting via Skype once and I thought that it went pretty well. It also had the advantage of allowing our former colleague (and current UMass graduate student) Boxun to join us. Unfortunately, many of the usual students were unable to make it. It seems that the time and medium were not necessarily conducive to keeping this class going. Plus, I feel that though it's nice to have the option to meet in cyberspace if we need to, there is no substitute for face-to-face teaching and learning.

That said, I'd like to get a feel for how the group would like to proceed. Does Tuesday night at 4:30 in Central Square still work for most of us? Or is the Skype option better? Please let me know via comment to this posting which you prefer.

Thanks!

Glenn

Tuesday, February 17, 2009

Can't make it to Hackfest tonight

Something came up at home, can't make the Hackfest tonight.

For those of you who want to go, it's actually in Cambridge this week, not far from us. Check out the location at the Boston Ruby Group's web site at http://bostonrb.org/.

Thanks,

Glenn

Sunday, February 15, 2009

No Ruby class on February 17th, Hackfest instead

Hi,

I will not be holding class on Feb. 17th. I am considering going to the Hackfest in Boston instead.

Please let me know via comment to this blog if you are interested in joining me at the Hackfest.

Thanks,

Glenn

Tuesday, February 10, 2009

Glenn,

My Skype name is Tom_Marx

The Ruby Group is on for tonight

We are planning to meet over the Internet starting on Skype at 7:00 tonight. The class will probably go to 8:30.

If you are planning to attend tonight, please let me know via email (or, better yet, post a comment to this post). I would need to know your Skype name. If you don't have a Skype name, you can gt one at www.skype.com.

The topic for tonight is Test::Unit, Ruby's built-in testing framework.

Hope to see you all tonight!

Thanks,

Glenn

Sunday, February 8, 2009

Topic for the next session: Test::Unit

Hi,

I am planning to go over Test::Unit in the next session.

Test::Unit is the basic testing framework that is built into Ruby. There are other frameworks for testing that are probably better (RSpec, Shoulda), but I figured that Test::Unit would be a good place to start.

There is a program that I found in a excellent introductory book called the Ruby Visual QuickStart Guide written by a guy named Larry Ullman. The program is called testing.rb, and it's in a zip file at the following link:

http://www.dmcinsights.com/ruby/downloads.php.

The link for the zip file is towards the bottom of the screen and a bit to the left. Once you unzip the file, you'll file the testing.rb file in the scripts/11 folder.

I recommend taking a look at the program before the session this week. Basically, it's a program with a Rectangle class with an initialize method that defines a rectangle. Pretty basic stuff that the regulars to the Ruby sessions should be familiar with. There is also another class in there which will be new to most of you. It's the TestRectangle class, and it is a subclass of Test::Unit::TestCase. There are various assertions in TestRectangle. Assertions are what the tests are called. If you execute the program, the tests in TestRectangle are executed and the results are written to the console. There are 3 tests, 11 assertions, 0 failures and 0 errors in this example.

To understand what is going on in TestRectangle, I recommend messing with the code a bit. If you change the code on line 35 to:

assert(Rectangle.new(6, 6.1).is_square?)

you will get an failure as expected, because the inputs to Rectangle are not equal, and therefore the shape created is not a square.

You can even mess with the code in the Rectangle class. For example, if you change line 15 to:

(@height + @width) * 2.1

you will get a failure because the perimeter method is no longer correct.


See you (via the Internet) at the next session.

Thanks,

Glenn

Tuesday, February 3, 2009

No Hackfest Tonight

Hi,

I am feeling a bit under the weather, and, with the snow and all, decided not to go to Hackfest tonight. Let's try again in a couple of weeks. They usually have them on the 1st and 3rd Tuesday of each month.

Glenn

Monday, February 2, 2009

No class on February 3rd, Hackfest in Boston instead

Hi,

There will be no Ruby class on February 3rd. A group of us -- possibly including Charles, David, John, Christophe, Tom and me -- are planning to go to the Boston Ruby Group's Hackfest instead of having the class. Hopefully, more of the regulars from the Tuesday night class will be able to join us (Yiqiang? Christine?).

The Hackfest is a bunch of Rubyists who get together once a month to hack and help on each other's projects. I think that this will be a good environment for us to work on RubyRx and the CPE together. There won't be any lecture part. We can spend the time going over the code in its entirety -- not a bad thing to do now that it's reached a stable point -- and working on new stuff to add. I will add another post shortly with a list of the new features that I'd like to start working on very soon.

Our next class will be held over the Internet via Skype on February 10th starting at 7:00 pm.

Thanks,

Glenn