Slashdot Mirror


Zen Coding

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.

20 of 175 comments (clear)

  1. Zen by mindbrane · · Score: 5, Insightful

    Is there a better commentary on the west's general inability to grok zen than our endless bastardization of the word, zen?

    --
    ideopath @ play
    1. Re:Zen by chill · · Score: 2, 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.

      --
      Learning HOW to think is more important than learning WHAT to think.
    2. Re:Zen by Anonymous Coward · · 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).

  2. Let's see... by oljanx · · Score: 4, Insightful

    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?

    1. Re:Let's see... by pavera · · Score: 5, Insightful

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

    2. Re:Let's see... by EvanED · · 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.

    3. Re:Let's see... by EvanED · · 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.

    4. Re:Let's see... by EvanED · · 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.

    5. Re:Let's see... by slimjim8094 · · Score: 2, 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

      --
      I have developed a truly marvelous proof of this comment, which this signature is too narrow to contain.
  3. Not sheer genius by MichaelSmith · · Score: 4, 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.

  4. Re:don't mock the Notepad++ by EvanED · · Score: 3, Insightful

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

  5. Re:forgot to mention Notepad++'s line dup by simcop2387 · · Score: 2, Insightful
  6. Accelerator by neoform · · Score: 4, Insightful

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

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

    --
    MABASPLOOM!
  7. You don't "code" HTML by Viol8 · · 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.

    1. Re:You don't "code" HTML by Anonymous Coward · · Score: 1, Insightful

      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.

  8. Writing HTML is not programming by Viol8 · · Score: 2, Insightful

    HTML is a formatting language, not a programming language

  9. Re:don't mock the Notepad++ by bit01 · · Score: 3, 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.

  10. So, you don't understand Zen. by Kupfernigk · · Score: 2, Insightful
    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.

    --
    From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
  11. Re:don't mock the Notepad++ by simoncpu+was+here · · Score: 2, Insightful

    Why did you include an OS in this editor war?

  12. Re:forgot to mention Notepad++'s line dup by paperdiesel · · Score: 1, Insightful

    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.