I’ve switched over to using the Ruby version of the CLI tool for editing my book database; works great, as far as I can tell.

Short, too:

panini$ wc -l *.rb
    9 author_writer.rb
   18 book_writer.rb
   11 closeable.rb
   24 compound_author_writer.rb
   21 connected_database.rb
   30 connected_insert_row.rb
   24 connected_result.rb
   36 connected_result_row.rb
   37 connected_table.rb
   26 connected_write_row.rb
   60 date.rb
   21 decoder.rb
    9 developer_writer.rb
   85 editor.rb
   17 enumerable_helper.rb
   16 game_writer.rb
   23 link_writer.rb
   38 object_name.rb
   45 row.rb
   11 series_writer.rb
    9 system_writer.rb
   16 table.rb
  100 writer.rb
  686 total

(That’s only the production code; the unit tests add another 941 lines.) Hard to believe how long it’s taken to write, given the number of lines of code; I guess that’s what happens when you only work for an hour or two a week, don’t do that every week, are using a new language, and are working with a technology (SQL) that you’re not completely comfortable with. I hope the “generating HTML” part will go faster; I don’t see why not, since I should be able mitigate all of those problems except for “only work for an hour or two a week”.

I did the refactorings I had in mind after last time, and went and reread all the code looking for more. I found a few more areas for improvement, but in general I’m happy with how clean it’s been staying. I should write a tool to calculate lengths of methods: I’m curious what the proportion of one-line methods is.

Post Revisions:

There are no revisions for this post.