Friday, February 29, 2008

Day Two: Ruby Studio

Day 2 went better than Day 1, I thought. In particular, we spent an hour or so coding up a problem in the morning. Basically, it had to do with creating a "database" and being able to query from it.

I sat by a guy (I should remember his name, but don't) who was playing around with TextMate themes, so I thought I would do the same. The themes have to do with how the colors of the text and background look. The default is color on a white background. I prefer a darker background. The most popular one seems to be one called All Hallow's Eve, which is another name for Halloween. That one uses orange and black, not surprisingly. I ended up using a user-submitted them called RubyRobot, but replaced some of the colors with ones I liked better.

I'm getting a touch more proficient with TextMate. Alas, I have to learn it the hard way, which is to watch people do it, then ask "How did they do that?" and then check out the book on the topic. I realize James Edward Gray, who apparently prefers II over Jr, knows a lot of the ins and outs of TextMate, and this shows, in a demo he does on TextMate, referred to by one of the folks in the class.

Here's a link for the curious. The example he does is a bit sophisticated. However, with just two days of class, I'm more or less able to follow.

Of course, how much you follow something depends on how much you've seen. For example, today they talked about exceptions and closures. I've seen both before, and have used exceptions, and closures somewhat. The more you know about scoping, the better, because Ruby has some unusual ideas about scoping (at least, unusual to a Java programmer). Again, I've seen lots of programming languages, so these weren't surprising to me.

The one big difference I can see between Ruby and Python is Ruby's use of blocks. A block is something like a lambda expression, but it isn't an object (though, by using the keyword lambda, you can convert it to an object). I think it's awkward that it isn't a true lambda expression and that it isn't an object, but Dave Thomas claims that there is an efficiency reason for doing it this way (converting to and from Procs, the names given to these lambda objects, seems awkward, and the language could be conceptually simpler by not doing this).

Closures always give people headaches. In particular, they have no idea how they might use it. Then, it has some weirdness associated with it. However, I know about lambda calculus and lambda expressions, which, admittedly, puts me in the minority of most programmers.

I had intended for people to meet up afterwards, but apparently, this was not announced, and there wasn't huge interest. I know that part of the effectiveness of whether this works or not depends on really simple things. Does it get announced? Does it seem like there's a blessing for it? Are arrangements made so we have a place to meet and talk? Apparently, being so last minute, and being in a hotel, rather than in one's own building creates issues.

Oh, the hotel. Yeah, there's always an issue with hosting in a hotel. It seems only nice hotels bother with conference rooms and such and the ability to host an event. You rarely get a place that charges 100 bucks a night or so to have one of these things (to be fair, the event at Charlotte wasn't priced too badly). There's a sense that people should not host it at a place that's too cheap looking, especially if they plan to charge a bit for it.

For example, suppose there were a facility that could be rented. But then you'd have to deal with catering, and then transportation to the facility, and then if the place looked kinda crappy (say, it was held on a campus), then people might complain that it looks crappy, and how can they not host it at some place really swank? So it ends up that these things are held at nice hotels that charge an arm and a leg. Having said that, the place does look really nice.

I decided after the meeting to go to the bar area where they allegedly had something called "Beer:30" which starts at 5:30 PM each day. Apparently, despite this name, it's only a small sample. Being in Denver, I get to try beers I wouldn't ordinarily try. I've had Fat Tire two or three times since I've been here. I tried something called Golden Bull or some such. I'll have to look it up. It's sad you can't get this east of the Mississippi. I might get a chance to try one more tomorrow.

I went to the bar area, at a little after 5. The hotel I'm staying at has complimentary shuttle service for places nearby. However, the service only runs til 6. Presumably, they don't want you going out to dinner and doing late night stuff, or whatever. Still, it would be nice if they ran til 7.

So I was in a hurry to get drinks, then run back to the hotel. While sitting at the bar, a woman struck a conversation. In the past, I would probably have felt uncomfortable at the idea of talking to someone random. But then she mentioned she was in the class (goes to show you how many people I recognize). That made it easier to have a conversation. Then, a somewhat older guy sat between us, and that was kinda it for conversation. He talked a bit to her. He was from the Portland area, and they talked a bit about beers.

Tomorrow's the last day. I'll be cutting it close (perhaps too much) to get to my flight. The class ends at 4:30, the flight is just before 7, and it's about 30 minutes to get to the airport, with no traffic. 4:30 is like rush hour. The only good news is that I've been told the traffic to the airport isn't as crowded as other places. Another attendee is planning to drive his rental back, so I'll tag along with him. My hope is my flight is delayed like half an hour or so, so I can make it comfortably.

I'm not sure what's on the agenda for tomorrow. I'm a little surprised that we haven't done much with unit testing, as that seems big in the Ruby community. We've done it informally by just running code and seeing what happens.

Let's see what happens tomorrow.

I will say that I find a classroom setting much more conducive to the kind of learning I want to do (even if the folks seem to be ignoring my questions lately).

No comments: