views:

58

answers:

3

I'm a big Haml/Sass fan. Right now I work with a designer who prefers Erb and doesn't speak Haml.

I find that working with Erb is slowing me down considerably, and it doesn't seem fair that he should have to pay for that time (he's the client & I'm paid hourly).

The erb->haml converter works quite well these days, but I don't know if there is a way to go the other direction.

How great would it be if I could work in Haml/Sass, but then automatically convert it to erb/css when I commit to the repo, and vice versa when I pull his changes?

Maybe I'm dreaming, but I'm interested in hearing how other teams have handled this dilemma.

What do you do?

A: 

This video purports to show how to convert from HAML to Erb using Vim. I can't vouch for its quality, however.

I82Much
Man, crazy macroing! Love it, but still too manual for my situation (converting the same files back and forth depending on who's working at the moment).
Logan Koester
+3  A: 

On a team, you all agree on a set of technologies and you stick to them even if that means you don't get to use your favorite technology and that you're slightly less productive. Like it or not ERB is the default rendering engine for rails, and that's what you should use unless you can get agreement to use something else.

Work on getting your teammate to give Haml a try and help them learn it and experiment with it. Maybe they'll come to like it. If not, stick with ERB or agree as a team that Haml is better and then your other coworker will have suck it up. But don't try to have your cake and eat it too in a case like this.

chriseppstein
Offer a 1hr training (more than enough time) on Haml. Sounds like you'd make up the 1hr anyway, and my bet is there a couple things tripping the learner up that you can help out with.
Andy Atkinson
+1 to chris and Andy for being pragmatic about this. Technology isn't always the answer to a problem like this.
I82Much
A: 

I wouldn't mix two technologies like this. It's such a simple thing, both just produce HTML. However, since it's likely that more members of the team do not know haml, I think you're going to have to start using ERB. Either that or they're going to have to start learning haml. Trying to work together on two different template languages is not going to work well at all. I know haml is great, but you don't always get to use it.

AboutRuby