If you code HTML, Zen Coding will change your life
downloadsquad.com
downloadsquad.com
If something is so cumbersome that it needs to be abstracted away, do it right. It's really fun to press a few keys and watch a bunch of code show up, but it's even more fun to not watch it show up. Because then you have something that's not a write-once operation.
Also, there is a simple solution to this problem -- a program that converts $foo into HTML and a program that converts HTML into $foo. pandoc is an example.
If I have both web designers and programmers on my team having them communicate can most certainly be my problem (or at the very least a problem I am gravely effected by).
I'm not talking about zen-coding or pandoc or any tool specifically, you can make the same argument for e.g. clojure vs java: as much as you'd like to use the shiny new tech, you must at least consider the fact that it's a hell of a lot easier to find x new programmers that can use java proficiently than even x/10 that can use clojure proficiently.
It doesn't mean it should be the overriding deciding factor, but the cost of retraining/learning should at least be taken into account when making that decision.
You really can't compare the level of complexity of HTML vs. assembler or microcode, especially as HTML has no control structures like a for, a while or a setjmp.
Now, if HTML were not so easy to parse-at-a-glance, then you could had a point.
Take SASS's variables and arithmetic, for instance. I agree that CSS desperately needs some way to abstract out common values. But any decent webapp will already be using some sort of template system, and the template system will have some sort of variable. Why not use it and be consistent with the rest of your UI? If you introduce SASS into the mix, you just have to do things one way in your CSS and another way in your markup.
Same thing with Zen Coding. Instead of using an editor plugin that expands abbreviations (which then have to be maintained), why not use your template system and avoid writing all that code in the first place? If I were writing the example listed here, it'd look something like this:
<div id=menu>
<table>
<tr>
{{#CELL}}<td><a href="" class=nav></a>{{/CELL}}
</table>
</div>
(That's using google-ctemplates because it's what I work with daily, but substitute in Django, Cheetah, Mako, or erb as necessary.)Yes, there's still room for improvement, and yes, I wish my editor were more aware of available template variables. But I also don't have to maintain the 5 separate <td> tags once I've typed them out, I can change one and have its updates be reflected across all the generated code. I can avoid those pesky closing tags by simply not typing them; the HTML spec doesn't require them, all browsers handle it fine, and it saves end-user latency as well. And I don't need to learn a new tool, I just have to use my existing tools better.
Almost any homepage I create that's not a one-shot throwaway for a client is going to running on top of some sort of framework. That means that for any table like this, I'm only going write a single row (at most), and then have my framework iterate over it and turn it into pretty code.
I love any time-saving or code-saving functions and features in my code as much as the next guy, but this seems like an unnecessary complication to already rather streamlined coding.
Also the fact that any IDE with decent auto-complete will be able to do the same thing with just three strokes instead of all that. (For example, in Eclipse if I type "<tab" then press enter, I get a fully formed pretty table in 5 key strokes.
I see a system like Zen Coding not for tackling the same tasks as a template system, where the bulk of your work effort might be spent. It's for the irritating little bits around the edges where, instead of taking 5 minutes per page bashing out boilerplate, it now takes 30 seconds. Not a huge win, but a win nonetheless.
At this point you have implemented most of Sass/Less/etc but you have a bunch of templating gunk, less documentation, and hundreds fewer eyeballs looking at the code. Or, you have not implemented most of Sass/Less/etc and you are still writing CSS like a chump.
Doesn't seem all that life-changing to me, but I guess it could speed you up if you churn out a lot of html every day.
a) Dead-easy to write;
b) Dead-easy to read; and
c) Dead-easy to 'compile' into HTML whenever you're ready (e.g. at runtime).
I'd be interested in knowing if this is available for some OS X editor (pref a free one) and whether they have vim support. (Cant recall if TextWrangler is free)
I hope those shortcuts are writing CSS?!
Towards the bottom is a pretty long list of what it's available for.
There are several OS X apps it supports, but Aptana is the only free one I believe. It's quite good if you can deal with how big of a program it is - you should check it out if you haven't already.
Writing lengthy boilerplate code becomes trivially fast.