What I've learned & still learning these past couple of months...
For the last couple of months, I've picked up new ideas and practices from working with several teams in Hashrocket. These are either required on the job or a set of tools that makes the task easier or something that peaks my interests. I will also recommend some screencasts/talks/book that I've seen/read recently.
So here's my list:
HAML
Haml by Hampton Catlin. I don't think I can ever go back to regular erb mark up and html after using haml. It did look daunting initially but now I love it so much. It makes the code views so much readable and pretty as in pretty organized. I don't have to deal with missing closing tags either as long as I know that my haml are structured well plus it keeps me disciplined. Discipline is exactly what you need for those views.
RSpec's Story Runner
RSpec's Story Runner is quite interesting and I'd really like to be able to do this. It adds a business value. I just wish I can do it with Shoulda. Can I? Does it run separately from RSpec? I haven't looked into it very well. But I'd love to know. If someone can explain it to me then I would love you forever in a friend-ish way! :)
Shoulda
I'm in two different projects at the same time where one was running in RSpec and the other one was in Shoulda. I found I was interested more in the Shoulda tests than the RSpec tests. Our RSpec tests were awesome now don't get me wrong with that but the Shoulda tests were more concise probably because of the macros or there maybe an "IT" factor to the Shoulda tests I've been reading and that would be: Tammer Saleh himself wrote the tests. Coincidentally, Josh Susser said he likes Shoulda too during his Great Test Framework Dance-Off at RailsConf 2008. That kind of solidifies it for me.
Selenium Tests
It's one of those tests that I think I'll be doing on a regular basis on any project I'll be in. Takes a little while to get used to but it's fun to watch as it executes in the browser. I've picked it up from Hashrocket and Jon/L4rk Larkowski did a Selenium demo for me while in Portland for RailsConf 2008 so I've been starting some Selenium tests locally on some personal projects too.
Factory and Factory_Girl
Factory is awesome that it makes it so much easier for me from the front-end side as an assigned front-end developer/designer to generate sample data/content in easy mode way. Now I can adjust the layout with the actual content and all attributes are there. That's a plus side for me. Moving into Facory_Girl but either one is good for me considering the sample data generation is just as easy.
Webrat
Already doing Selenium and still doing Webrat? Webrat just works seamlessly with Rspec's Story Runner so why not? You might write some clunky test but you can't over-test anything and over-testing might even lead to benchmarking which is what we're in dire need of with rails web apps.
Git + GitHub
ZOMG gitHub is the sexiest thing ever so far! Everyone was right about git. If you haven't looked into it yet, then do it now. I've watched the Git-Talk that Scott Chacon made available on gitcasts.com. (Git-talk was Scott's session during RailsConf 2008. One of the good sessions I've missed to see during RailsConf 2008). Then, immediately after watching Git-talk, I got the Git Peepcode. If you watch those two screen cast in those order, it gels more better with the ideas since Git-Talk covers the core principles and then the Git Peepcode by Geoffrey Grosenbach gives you the examples in length.
Pragmatic Screencasts
Episode 1 Everyday Active Record by Ryan Bates. I watched this but unfortunately, I didn't get anything new out of it. I've been doing Rails for 2+ years after all. I would have to try Episode 2 soon. I also bought the three episodes on Ruby Metaprogramming by Dave Thomas. I stopped at Episode 1: Objects and Classes and I decided to resume after I finish reading the ruby book that I'm halfway through.
Book: Beginning Ruby
I've been doing Rails for 2+ years but Ruby is still new to me. Two years yet Ruby is new? Yup! I am perpetually on the front layer of a web app cause of my "I can haz CSS & design skills" as my peers would call it. I can still jam with those models, controllers and test files. In all honesty, I've tried reading every "learn" Ruby book out there but they make me sleepy as hell. Then I found Peter Cooper's Beginning Ruby book finally! I'm halfway into this book and if you want to learn Ruby then this book is an excellent start without getting sleepy. So, this book works for me but something else might work different for you so find your Ruby book if you haven't.
Other notable talks/sessions I've watched
I have not attended neither Goruco 2008 nor MountainWest RubyConf 2008 but these two talks are awesome. The SDD (Story Driven Development) talk by Bryan Helmkamp during Goruco 2008 available via confreaks.com. Bryan Helmkamp is also the author of Webrat.
The BDD with Shoulda talk by Tammer Saleh during MountainWest RubyConf 2008 also available via confreaks.com.
- - -
There's another secret sauce but I'm not sure I can talk about that "tracker" yet since it's in beta mode and we're lucky to be the first testers. Boohooo. I know :(
Now the list above are the things that comes to mind real fast. I'm sure there are others that I've completely overlooked. If given the chance, next time I'd want to pick up more on AJAX, Scriptaculous, more javascript goodness, some pairing and myself brushing up on CSS3.
The conclusion: Life and work is good. Learning new things constantly on the job and being resourceful on where to find the good stuff that makes work easier and funner will always be the factors/traits I'd look to when I say I'm happy with what I'm doing. I learn quick and I'm resourceful so I got those covered. But it's the WHO resource that makes Hashrocket the place to be! I'm not sucking up. It's just for realz. ;p
[ Last updated: June 22, 2008 @ 04:59 PM ]
4 Responses to...
“So into work lately”
Sorry, comments are closed for this article.




Excellent post, Carm.
I've tried using HAML. I really have no beef against it, but while I do think it cleans up views extremely well and limits the amount of 'code' that you have to write ... I think it often detours people from helping out in projects (especially in Open Source projects). I think it's seen as 'yet another thing to learn'. HTML, as verbose as it is, is the most simplest of things to read/write especially for a developer. And I would imagine that designers would feel much more comfortable in their native HTML language rather than HAML? Just my thoughts though.
I need to get in to a habit of using Selenium and Webrat more. My views and full integration tests almost always tend to get pushed to the side during my development phases. It's sad, I know.
Thanks for the post, girl.
Posted: June 17th, 2008 at 01:17 PM
Thanks, Bryan. That's the downside to haml. I don't know how I can hand over view codes to another designer who's very familiar with html mark up. That's a downside but I'll likely help them understand it.
Posted: June 17th, 2008 at 02:41 PM
Thanks - this post was really helpful. I haven't tried HAML yet but I think I'm now finally convinced that I should give it a try.
I've caught the Shoulda wave, too. RSpec feels too heavy for me, and I find the assertion syntax too weird.
I wish there were better docs for flexmock; I think Shoulda + flexmock might be a great lightweight combination but I feel I don't understand flexmock well enough yet.
Posted: June 18th, 2008 at 08:50 PM
Thanks for mentioning PeepCode! Our Git screencast and PDF have been quite popular in the last few months.
I've been using Haml extensively for a while. I hate typing the unnecessary angle brackets and close tags required for HTML. Haml simplifies things so much and helps me focus on the content instead of the surrounding boilerplate of a file format.
The basics of Haml take 5 minutes to learn for someone who knows HTML. I've hired subcontractors and they've had no problem working with it.
Posted: June 30th, 2008 at 11:32 AM