Zen Coding 175
Download Squad has a quick review, with video, of Zen Coding (Google Code project page here), an extremely well-thought-out accelerator for anyone who codes HTML. Its syntax is CSS-like. Zen Coding has been around for a while — here's its author Sergey Chikuyonok's introduction in Smashing Magazine from last November — and it has now picked up support for more than a dozen editing environments, including Notepad++ and TextMate.
Zen (Score:5, Insightful)
Let's see... (Score:5, Insightful)
Re:Let's see... (Score:5, Insightful)
Please keep your SQL and HTML separate. Don't punish those who will come after you.
Not sheer genius (Score:5, Insightful)
TFA shows how Zen lets you type in a terse message and have it expanded into a chunk of html code and describes it as sheer genius. Thats neat but I have nedit macros which do pretty much the same thing. They are time savers for sure.
But nothing which you couldn't do a thousand ways. With perl, awk or sed.
Re:don't mock the Notepad++ (Score:3, Insightful)
Yeah, god forbid someone pay money for software they use and like.
Re:Zen (Score:3, Insightful)
The wise programmer is told about Tao and follows it. The average programmer is told about Tao and searches for it. The foolish programmer is told about Tao and laughs at it.
Re:Let's see... (Score:3, Insightful)
What the hell, why not add another syntax?
To be fair, the syntax is very much like CSS. Further, it's not like it stays in the file for those who come after; it's just that the editor expands things for you.
Re:forgot to mention Notepad++'s line dup (Score:2, Insightful)
GNU nano also has syntax highlighting, http://how-to.wikia.com/wiki/How_to_use_syntax_highlighting_with_the_GNU_nano_text_editor [wikia.com]
Accelerator (Score:5, Insightful)
I don't think that word means what you think it means.
Re:Let's see... (Score:2, Insightful)
But again, with the instant feedback when it expands it for you, if that happens you can just hit undo and type it out yourself.
Re:Let's see... (Score:3, Insightful)
So it's kind of like Lisp macros, except that they are expanded in the source to make maintenance both more difficult and less efficient than just starting over from scratch.
If that's your attitude, feel free to go ahead and use Markdown or ASCIIDoc or one of the other markup lanugages that you can compile to HTML.
However, this is something you can use in documents that are already HTML, need to be HTML because that's what your employer or customer demands, etc. without affecting the end result. Saying "let's replace HTML with something better" is not exactly a realistic proposition.
Re:Let's see... (Score:3, Insightful)
How do you suggest separating PHP, HTML, and JS? Sure, the bulk of your code - especially reused libraries - should be separate but how do you use them without inline JS? And if you're using PHP, what are you using it for if not writing HTML (with the aforementioned JS)? Your PHP, even if it calls stored procedures, will also have SQL in it - and do you really need a stored proc for every one-shot thing? Repeated code, sure, but... And do you make one-shot CSS classes or blocks for everything?
Half of what you say is impossible, and the other half is not always practical. I appreciate the spirit... but let's not go overboard
You don't "code" HTML (Score:4, Insightful)
You code in java,C++,javascript, but HTML is a formatting language - you do not code in it because it isn't a coding language. I know it makes fluffy web page designers feel like their playing with the big boys to talk about "coding" in HTML but you might was well talk about "coding" .ini files.
Writing HTML is not programming (Score:3, Insightful)
HTML is a formatting language, not a programming language
Re:don't mock the Notepad++ (Score:4, Insightful)
Yeah, god forbid someone pay money for software they use and like.
The price and license are important software characteristics whether you like it or not. A non-zero price can make it a practical impossibility to use in many organizations because of the paperwork involved. A license that doesn't allow you to install it where ever you need it, as you need it can also be a problem.
Since their are many free alternatives available in this category it's easily possible that the pay software is more trouble than it's worth even if it is otherwise superior, as the GPP was implicitly pointing out.
---
Like software, intellectual property law is a product of the mind, and can be anything we want it to be. Let's get it right.
Re:Zen (Score:2, Insightful)
It's mysticism, so it doesn't matter how "serious" you try to be, It's still dressed-up psychobabble in the vein of similar New Age practices. Just because it's old, doesn't mean it should automatically get belief or respect (see also: Christianity, Islam).
So, you don't understand Zen. (Score:3, Insightful)
Zen philosophy also has the principle of "nothing superfluous". You see something of this in the iPod, or an old Lotus sports car. No irrelevant decoration, no junk, just form fitting function as perfectly as possible.
Zen is not a religion; it is a way of life. Zen masters are famous for anti-religious statements, like the sermon that is said to have gone "What are the spiritual masters? The spiritual masters are a dirty toilet". You do not have to believe in and kind of God to follow Zen, but it helps if you can find an advisor who you relate to. Zen masters, like rabbis, will put off anyone who they think is not yet ready for teaching, or unsuited to their kind of teaching.
However, you show in your third paragraph that you don't have a clue what schizophrenia is either. My advice to you is to do the research, proper research, before posting bullshit. And until you start to overcome your childish and self-important prejudices, you are nowhere near ready even to approach Zen.
Re:You don't "code" HTML (Score:1, Insightful)
Whether they're writing C#, HTML or even assembler.
Re:don't mock the Notepad++ (Score:3, Insightful)
Re:forgot to mention Notepad++'s line dup (Score:1, Insightful)
I wish they would queue the updates to roll out once a week or something along those lines.