Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming

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.
This discussion has been archived. No new comments can be posted.

Zen Coding

Comments Filter:
  • Zen (Score:5, Insightful)

    by mindbrane ( 1548037 ) on Sunday May 02, 2010 @11:08PM (#32068826) Journal
    Is there a better commentary on the west's general inability to grok zen than our endless bastardization of the word, zen?
  • Let's see... (Score:5, Insightful)

    by oljanx ( 1318801 ) on Sunday May 02, 2010 @11:31PM (#32068960)
    When I "write HTML" I'm actually writing HTML, CSS, JavaScript, PHP and SQL queries at the same time. On a good day. What the hell, why not add another syntax?
  • Re:Let's see... (Score:5, Insightful)

    by pavera ( 320634 ) on Sunday May 02, 2010 @11:44PM (#32069008) Homepage Journal

    Please keep your SQL and HTML separate. Don't punish those who will come after you.

  • Not sheer genius (Score:5, Insightful)

    by MichaelSmith ( 789609 ) on Sunday May 02, 2010 @11:57PM (#32069078) Homepage Journal

    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.

  • by EvanED ( 569694 ) <evaned@NOspAM.gmail.com> on Monday May 03, 2010 @12:21AM (#32069156)

    Yeah, god forbid someone pay money for software they use and like.

  • Re:Zen (Score:3, Insightful)

    by chill ( 34294 ) on Monday May 03, 2010 @12:26AM (#32069178) Journal

    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)

    by EvanED ( 569694 ) <evaned@NOspAM.gmail.com> on Monday May 03, 2010 @12:28AM (#32069182)

    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.

  • Accelerator (Score:5, Insightful)

    by neoform ( 551705 ) <djneoform@gmail.com> on Monday May 03, 2010 @12:30AM (#32069192) Homepage

    an extremely well thought-out accelerator for anyone who codes HTML.

    I don't think that word means what you think it means.

  • Re:Let's see... (Score:2, Insightful)

    by EvanED ( 569694 ) <evaned@NOspAM.gmail.com> on Monday May 03, 2010 @12:49AM (#32069306)

    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)

    by EvanED ( 569694 ) <evaned@NOspAM.gmail.com> on Monday May 03, 2010 @01:07AM (#32069390)

    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)

    by slimjim8094 ( 941042 ) on Monday May 03, 2010 @03:41AM (#32070012)

    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

  • by Viol8 ( 599362 ) on Monday May 03, 2010 @04:22AM (#32070118) Homepage

    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.

  • by Viol8 ( 599362 ) on Monday May 03, 2010 @04:33AM (#32070148) Homepage

    HTML is a formatting language, not a programming language

  • by bit01 ( 644603 ) on Monday May 03, 2010 @04:45AM (#32070192)

    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)

    by Anonymous Coward on Monday May 03, 2010 @05:14AM (#32070294)

    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).

  • by Kupfernigk ( 1190345 ) on Monday May 03, 2010 @06:52AM (#32070584)
    I don't know what you have read, but you do not understand Zen. Satori is not a "total zero" state. It is what you experience when you suddenly realise that you have spent a whole day coding without distraction, that you have never been conscious of thinking about what you are doing, and the compiled program just works. Or when you realise that you have just driven from London to Birmingham (or your local equivalent) without ever thinking about it: it just happened. Satori is the state when you are "just doing", what programmers (and market traders) call being "in the groove". Zen training can help develop the mind to achieve this state.

    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.

  • by Anonymous Coward on Monday May 03, 2010 @08:02AM (#32070902)
    Anyone who talks about "coding" is pathetically trying to sound more impressive than they actually are.

    Whether they're writing C#, HTML or even assembler.
  • by simoncpu was here ( 1601629 ) on Monday May 03, 2010 @09:29AM (#32071492)
    Why did you include an OS in this editor war?
  • by paperdiesel ( 809538 ) on Monday May 03, 2010 @12:08PM (#32073474)
    I'm a huge n++ fan as well. But one thing about it drives me absolutely nuts: The constant UPDATES. Don't get me wrong, I am grateful for free software that automatically updates itself. But it seems like every other time I open n++, it wants to update itself (which takes about 30 seconds start to finish). When I'm trying to do a quick edit to a file, the delay can be maddening.

    I wish they would queue the updates to roll out once a week or something along those lines.

The Tao is like a glob pattern: used but never used up. It is like the extern void: filled with infinite possibilities.

Working...