The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
My Apprenticeship - Wednesday, July 7, 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 - Wednesday, July 7, 2004 Posted: Jul 7, 2009 8:07 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jake Scruggs.
Original Post: My Apprenticeship - Wednesday, July 7, 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.

Wednesday 7-7-04

Most of today was the State Map Compiler. We got it to work, but almost all the work was being done in a 600+ line class. Armed with a bunch of passing tests, we proceeded to brake just about all of them in the refactoring process. But, and this is important, we only broke one test at a time. The goal was to offload a whole mess of functionality into a bunch of other classes. By the time we got back to a refactored green, we had about 100 lines in the controlling method and much more readable code. Whoo!

Then it was time to do a real conversion of the OMwiki to FitNesse. Previously Paul and I had used a copy of the OMwiki files for practicing purposes. Today we shut down the OMwiki and ran our program on the wiki pages. Due to an unfortunate use of a backslash in a program designed to deal with Unix, our conversion program created a few thousand extra files. Sigh. You see, the Unix system uses forward slashes to denote directories so it sees backslashes as just another character. All those directories we thought were being created became strangely named files. And all the real files got dumped in the main directory. Too many files to delete, oddly enough. The 'rm' command stands for remove in Unix-speak. But apparently it has a limit as to how many files it can address. We actually had to write a program in Python just to delete the files. Then, on our second try we saw the resurgence of the strike-through (double dash) problem. Apparently there had been some changes after I left yesterday, but we went back to an earlier solution and that worked. As I had to dash out the door to make my train, everything was working on the new OMwiki site except for an unfortunate spelling of refactor (as 'refacator'). I'm sure they'll be able to fix that one without me.

Anyway, I'm putting today in the win column.

I'm not really sure why we couldn't have just copied the files, ran the program, got it up and working on the new wiki, and then shut down the old wiki. That would have involved too little stress I suppose.

As to the State Map (Machine?) Compiler, I think that may have been the first time I was able to see the power of having a comprehensive test suite so you can refactor at will. More and more I work with developers who've had testing forced on them and see it as a necessary, or perhaps unnecessary, burden. I really don't get that -- I find a well tested application very satisfying.

Read: My Apprenticeship - Wednesday, July 7, 2004

Topic: Jeremy Evans: How do I learn and master Sinatra? Previous Topic   Next Topic Topic: Presentation : ReST explained

Sponsored Links



Google
  Web Artima.com   

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