July NOVA RUG Recap
I went to the NOVA RUG meeting tonight. It was my first NOVA RUG meeting and I’m glad that I went.
There were three presentations, one on Ruby Mocking Libraries, one on HAML and SASS, and one on working with legacy databases in Rails. My thoughts follow.
Mockfight
Patrick Reagan, Director of Application
Development, Viget Labs
slides
I’ve heard a lot about mocking, but as someone who is still pretty new to test driven design I haven’t used it before. This presentation really showed me the benefit by walking through the example of testing a method that tests if a given URL exists. All examples were given in both FlexMock and Mocha.
Patrick has used both FlexMock and Mocha. He is currently using Mocha. He said that they are roughly feature equivalent so it comes down to a matter of taste regarding syntax style. From the examples I thought that the Mocha syntax seemed more natural.
HAML and SASS
HAML (HAML Aint a Markup Language) is an alternative to using erb for view templates. HAML is less verbose than rhtml and uses indentation to denote nesting and end tags. It generates well indented, valid xhtml. It is an interesting idea, but I haven’t ever felt real pain with writing xhtml and erb, so I doubt I will use it.
The fact that indentation is significant is reminiscent of Python. A lot of people were complaining about that similarity because they don’t like it in Python. I have wrote a little bit of Python a few years ago, but not enough to have a real opinion. That said, I think that you should always have consistently indented code or markup so I don’t see how a language that enforces that is a problem.
SASS (EDIT: SASS Aint Style Sheets Syntactically Awesome StyleSheets) is an alternative to css. It is really cool. It has a simple syntax and allows you to define constants, include other files, and eliminate duplication by nesting rules. I like CSS, but the inability to declare constants for things like border colors has always driven me crazy. SASS looks like it was designed specifically to adress all my pain points. I think that designers would love this.
The talk centered on examples, namely on Devin converting the scaffold generated view from rhtml to HAML and on showing the use of SASS.
I don’t see myself using HAML. I’m definitely going to investigate SASS.
Working with Legacy Databases
Matt Scilipoti, Possiamo Consulting, LLC
The talk centered on his experience in working with legacy databases. He is working with a large SQL Server DB that is used for protein sequencing data.
I am tired of typing and I don’t plan on having to work with legacy databases from Rails anytime soon so this is going to be short.
He started out specifying all the non standard schema stuff in his active record models. That grew painful as he had to specify the keys and table names with each relationship.
Next he moved to using Views to create an interface to the legacy DB that conformed to rails naming conventions. This was an improvement, but still sort of a pain.
Now he uses a class method whose name escapes me at the moment to handle the conversion. If anyone has slides or knows what it was that he did please leave a comment and I’ll update this section.
He also has started a Ruby Forge project Working with Legacy Databases in Rails. He will be releasing his class method as a plugin shortly.
Check it out at http://rubyforge.org/projects/weldir/
It was a good, and at times funny, talk. I learned quite a bit and am glad I heard it.
More Articles on Software & Product Development
- Agile With a Lowercase “a”
- ”Agile“ is an adjective. It is not a noun. It isn’t something you do, it is something you are.
- How Do You End Up With A Great Product A Year From Now?
- Nail the next two weeks. 26 times in a row.
- Build it Twice
- Resist the urge to abstract until you've learned what is general to a class of problems and what is specific to each problem.