The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
My Apprenticeship - Thursday, June 24, 2004

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jake Scruggs

Posts: 336
Nickname: aurorae314
Registered: Feb, 2008

Jake Scruggs is a developer at ThoughtWorks
My Apprenticeship - Thursday, June 24, 2004 Posted: Jun 24, 2009 10:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jake Scruggs.
Original Post: My Apprenticeship - Thursday, June 24, 2004
Feed Title: Jake Scruggs
Feed URL: http://jakescruggs.blogspot.com/feeds/posts/default
Feed Description: Ruby, Rails, Metrics, Testing, and pursuit of clean code.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jake Scruggs
Latest Posts From Jake Scruggs

Advertisement
This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day.

Thursday 6-24-04

You Cowboy has taken to saying 'sankyou' when Cowboy helps him out. Cowboy replies with an even more Asianized 'sankyou' and we move on. You Cowboy is also fond of saying 'RefRactor' and 'Ohh Cowboy'' (with this sort of world-weary sigh that's just perfect) There were times when I couldn't code because I was laughing so hard. A quality experience.

The pattern that established itself is this: Micah introduces some concept in C#, such as event handling, and we stare at him confusedly. Then we do a project involving said concept. I get really confused, while the Cowboys trade barbs. Eventually we figure it out. And Cowboy checks his eTrade account. Repeat cycle.

Incidentally, 'delegates' are really cool. They are methods that you can pass around. I have this problem in my Tic Tac Toe game where I keep having to cycle through all the spaces in the board. So my code is littered with things like this:

for( int row = 0; row < 3 ; row++)
{
for(int column = 0; column < 3 ; column++)
{
[[some function or other]]
}
}

The functions in the middle do all sorts of different things. I think that with a delegate I might be able to have just one place where that nested 'for' loop happens, but with an assignable method inside. Which would be cool. Except that TTT is written in Java and delegates are in C#. Micah thinks that using 'runable' will work, but David thinks it'll be tricky (David thinks it'd be a snap to do in Python -- always with the Python). Anyway, I'm gonna try.

When pairing goes well it's like hanging out with your friends all day, getting work done, and getting paid to do it.

To be totally honest I never did try to use Python or 'runable' to solve the TicTacToe repeated code problem. I did later learn Ruby and blocks which solved the problem quite nicely. As my friend Pat Farley once said: "Ruby is great at removing the duplication where you're doing the exact same thing repeatedly but all the words are different." I had to think about that one for a week before I got it.

Read: My Apprenticeship - Thursday, June 24, 2004

Topic: Ruby on the Upswing Previous Topic   Next Topic Topic: Follow 10+ Rubyists using Sinatra on Twitter

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use