Announcement

Collapse
No announcement yet.

Documentation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Except about the firing thing.

    Comment


    • #32
      Originally posted by Asher View Post
      I don't think you fully understand DOM if you're comparing it with JSON.


      Readability, helps ensure data integrity at the parser level and isolate errors. Try missing a bracket in JSON and debug that.
      XML is not readable, especially when you haven't tabbed correctly.

      EDIT: Oh yeah and the missing brackets? Come on. Vim can find missing curly brackets. Is [insert asher's favorite editor here] not able to do that?
      Attributes are a powerful tool. With them you don't need closing brackets explicitly, either. Eg, <element attr="blah"/>
      There's nothing about attributes that can't just be done as elements unless it's markup, which is pointless for data interchange. There is also no structure to attributes and no way to just list all attributes and loop through them with DOM.
      This really doesn't make any sense. XML has rigid schema definitions which makes it ideal for interchange. JSON is ad hoc. JSON is most certainly not in all languages in some form or another (unless you count the free JSON.org libraries). This is also true for XML in all important languages.
      Well if you live in lots-o-programmer-land then yeah I suppose XML is better for the dufuses (just kidding ) but honestly it's a pain in the ass to work with DOM. DOM could be a hell of a lot better.
      "translating it a little bit" should never have to be done in a real data interchange format.
      THAT'S WHAT THE XML PARSER DOES ANYWAYS.

      Do you think Microsoft should've implemented XAML in JSON instead of XML, by the way?
      For markup? **** no don't use JSON for markup. I'm talking about data interchange.
      If there is no sound in space, how come you can hear the lasers?
      ){ :|:& };:

      Comment


      • #33
        Asher, is there any easy way to tell Firefox to just completely ignore any elements with position:fixed?

        Comment


        • #34
          Originally posted by Hauldren Collider View Post
          XML is not readable, especially when you haven't tabbed correctly.
          If you're using any decent editor, it'll auto format XML documents to tab properly if this isn't the case.

          It most certainly is readable -- far moreso than JSON.

          There's nothing about attributes that can't just be done as elements unless it's markup, which is pointless for data interchange.
          I disagree.

          For example, when I wrote the XML for a video publication process, it included 100s of videos every night. The document had two "videos" tags, with an attribute called "lang". One was "en", one was "fr". Each was a collection of videos, one of English videos and one of French videos. When the XML parser reads the "videos" tag, it knows which language they are. Yes, this COULD be done using elements also, but it would not be intelligent to do so. The parser would need to go down a level in the tree and parse the next element, and hope it was ordered properly to have a "lang" element inside it. Not ideal.

          Well if you live in lots-o-programmer-land then yeah I suppose XML is better for the dufuses (just kidding ) but honestly it's a pain in the ass to work with DOM. DOM could be a hell of a lot better.
          What specific problems do you have?

          The simple fact is the world is full of idiots. With XML I can define a schema and say "THIS element is a STRING". "THIS element is a DOUBLE." "THIS element has to have a value between X and Y". It makes life MUCH easier when the XML parser can handle some type safety checks and integrity checks. JSON doesn't permit this.

          THAT'S WHAT THE XML PARSER DOES ANYWAYS.
          It transforms. And it's got a formal schema to assist in it, it's a far different situation than "translating" JSON.
          "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
          Ben Kenobi: "That means I'm doing something right. "

          Comment


          • #35
            Originally posted by Kuciwalker View Post
            Asher, is there any easy way to tell Firefox to just completely ignore any elements with position:fixed?
            Probably easiest to write a Greasemonkey script to just strip that out? I'm not sure.
            "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
            Ben Kenobi: "That means I'm doing something right. "

            Comment


            • #36
              xml : json :: java : javascript, hc

              Comment


              • #37
                Without RelaxNG, a lot of your argument for XML would be bunk I think, since schemas seem so complex and DTDs so incapable.

                By the way, I spent my whole summer writing something that translates RelaxNG into an XHTML form using XSLT stylesheets and then fills the values with an XML document. It then takes XPath:value pairs sent back from the form to create a new document. So XML was nice for that form generation stuff, I will concede that, but I hate XSLT with a burning passion and if I ever get to rewrite this the first thing I will do is switch to something other than XSLT for the translation.

                XSLT is a complete functional programming language, which is absurd and annoying. I got around this by having the stylesheet call PHP functions, thereby implementing state and completely subverting the functional nature of the language
                If there is no sound in space, how come you can hear the lasers?
                ){ :|:& };:

                Comment


                • #38
                  Schemas in XML are as complex as you want to make them.

                  The real power in XML is in data transformation capabilities and specification.

                  XSLT is insanely powerful and useful if you know how to use it. It's not absurd and annoying at all.
                  "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                  Ben Kenobi: "That means I'm doing something right. "

                  Comment


                  • #39
                    XSLT is a functional programming language and those suck almost by definition. And if I want to have a templating engine smarty is clearly the correct way to do it for a website.

                    Also it's XML, which means it's even more verbose than ****ing COBOL.
                    If there is no sound in space, how come you can hear the lasers?
                    ){ :|:& };:

                    Comment


                    • #40
                      PS: SimpleXML really is the mostest bestest thing ever. That's how it's described in the PHP Cookbook and it's 100% ****ing TRUE.
                      If there is no sound in space, how come you can hear the lasers?
                      ){ :|:& };:

                      Comment


                      • #41
                        Tech people are always at the bottom of the totem pole because they don't understand the simple fact that what you do is more important than how you do it.
                        12-17-10 Mohamed Bouazizi NEVER FORGET
                        Stadtluft Macht Frei
                        Killing it is the new killing it
                        Ultima Ratio Regum

                        Comment


                        • #42
                          Tech people are brought in to determine how to do something, not determine what to do. If that's your idea of being at the bottom of the totem pole, then it'll be true by definition.

                          But many tech people move into determining what to do also, but when they do they cease to be tech people.

                          Seems most companies out here are run by people who used to be tech people. It's an engineering culture out here.
                          "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                          Ben Kenobi: "That means I'm doing something right. "

                          Comment


                          • #43
                            Say I manage to implement a relatively simple 3 factor CVA model in less than a day in order to verify an existing methodology. Say I then push this model to production as a library with minimal commenting, poor formatting and some redundancy in code.

                            Do you think my boss gives a damn about that? Or do you think that he thinks to himself "wow, that guy just did in 8 hours what a lot of other people would have taken a week to do"? Do you think he will ever actually look at the code himself?
                            12-17-10 Mohamed Bouazizi NEVER FORGET
                            Stadtluft Macht Frei
                            Killing it is the new killing it
                            Ultima Ratio Regum

                            Comment


                            • #44
                              Originally posted by KrazyHorse View Post
                              Say I manage to implement a relatively simple 3 factor CVA model in less than a day in order to verify an existing methodology. Say I then push this model to production as a library with minimal commenting, poor formatting and some redundancy in code.

                              Do you think my boss gives a damn about that? Or do you think that he thinks to himself "wow, that guy just did in 8 hours what a lot of other people would have taken a week to do"? Do you think he will ever actually look at the code himself?
                              It depends on what you are being paid to do.

                              At my last job, I was being paid to solve problems AND generate ideas (R&D). At the time I left, I was the most senior technical person left in the corp so no one was overseeing what I was doing technically. I wasn't at the bottom of the totem pole.

                              My new job is different, as I'm at a strictly tech company. Tech people are not at the bottom of the totem pole here, either.

                              Other people are paid to simply "code in <lang> for project A". They're not paid to determine what to do, but how to do it.
                              "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                              Ben Kenobi: "That means I'm doing something right. "

                              Comment


                              • #45
                                Yet here you are arguing about the relative merits of ****ing XML versus JSON.

                                The fact is, nobody other than a tech person cares. The trick is to get yourself in a situation where you can figure out what non-tech people want (even if they don't know it yet) and then build it yourself/get somebody else to build it for you.

                                My best days are when I provide a service that makes the life of some total tech incompetent easier. When it comes to comp time, that's what matters.
                                12-17-10 Mohamed Bouazizi NEVER FORGET
                                Stadtluft Macht Frei
                                Killing it is the new killing it
                                Ultima Ratio Regum

                                Comment

                                Working...