The state of web development


  • :belt_onion:

    Which would, of course, actually look more like this:

    var myDiv = (DivHtmlElement) DOM.GetElement("#divMain");
    // Which of course, would throw in several ways so:
    
    try {
        var myDiv = (DivHtmlElement) DOM.GetElement("#divMain");
    } catch /* Cast exceptions, ElementMissingException, etc., etc., etc. */ 
    
    DivHtmlElement alternately;
    if (DOM.TryGetElement<DivHtmlElement>("#divMain", out alternately)) {
    
    } else {
    
    }
    

    Which is pretty :wtf: in itself.

    ๐ŸšŽ

    Yes, having someElement.clicks += SomeDelegate would be pretty sweet ... but that's something that might happen in JS too



  • @dkf said:

    and the horrible lack of key things like proper libraries in the majority of deployments just piles suck on suck.

    JavaScript is designed specifically to be embedded in other applications. The lack of a large standard library is a feature, not a bug.

    It's not JavaScript's fault that it's being used WAY out of its wheelhouse.



  • @dkf said:

    All languages are compromises. Every last one. A language is defined by its compromises.

    Not C#. C# is perfect.


  • area_deu

    @svieira said:

    Which would, of course, actually look more like this

    No. Me want div, me get div. If someone fucked up my DOM so it isn't a div anymore, the app can crash and burn for all I care.



  • @blakeyrat said:

    Not C#. C# is perfect.

    And it keeps getting better.
    I do miss some metaprogramming, alรก nemerle, but mostly for fun.



  • @blakeyrat said:

    Not C#. C# is perfect

    here here, speaking as a C# dev ๐Ÿ˜„



  • @blakeyrat said:

    Not C#. C# is perfect.

    C# 6 would be a step back then?



  • C# was always perfect. It's just even more perfect.

    We were always at war with Eastasia.



  • conflating strong typing and static typing

    Yeah, that's something I do. Strong typing without static typing is like JavaScript without the Dom.



  • Ok, I've been thinking about this, and I've had a few thoughts:
    Firstly, I have used document object models in strongly typed languages, though obviously not The DOM. For integrations work, I generally do prefer to deserialize into an xmlnode or jsonobject and go from there, unless 99% of the work of generating an object model has already been done for me.

    So I don't really see where you're coming from when you say you have to write a lot of code to integrate things in strongly typed languages. Because the only difference between a weakly typed object and a dictionary is the getter syntax, and I personally am ideologically opposed to having x.y === x["y"] (I see the latter as more explicit, and therefore better). So given that you can you can have weakly typed variables in strongly typed languages, the question becomes: Why are you writing all that extra code then, if it doesn't have any value.


  • Discourse touched me in a no-no place

    @Buddy said:

    Why are you writing all that extra code then, if it doesn't have any value.

    That's part of the reason why I dislike the DOM. It manages to mandate being awful in all languages (by virtue of being specified via an IDL in a way that precludes doing much nice at all). Once you make the objects not suck, you typically aren't matching the IDL spec. Lovely.

    The underlying model of the DOM in relation to XML and HTML is right though. You do need those types of nodes arranged in that sort of way, and yes, a lot of the node types could be taken out the back of the barn and put out of everyone's misery. (Also, XML Namespaces. Ugh, and I know how and when to use them!)



  • @Buddy said:

    So I don't really see where you're coming from when you say you have to write a lot of code to integrate things in strongly typed languages. Because the only difference between a weakly typed object and a dictionary is the getter syntax,

    A strongly typed dictionary has strongly typed values of a single type. That's not the same as a weakly typed object literal. Try again please.


  • Discourse touched me in a no-no place

    @Ragnax said:

    A strongly typed dictionary has strongly typed values of a single type.

    Or values that are actually subtypes of that single type. If you define all values as being instances of subclasses of a value type, you can do the strongly typed schtick. In a way that will annoy people, sure, but it's legal.

    Unless you hate subtypes, but then you're in a much more unusual type world than that used by most programmers.



  • @dkf said:

    Or values that are actually subtypes of that single type. If you define all values as being instances of subclasses of a value type, you can do the strongly typed schtick.

    Right. Dictionary<string,object> it is then; because that's more or less the only way to capture the expressiveness of holding 'anything' as a member property on a weakly typed object literal.

    @dkf said:

    In a way that will annoy people, sure, but it's legal.

    Spot on.


  • I survived the hour long Uno hand

    This rant, on a similar topic, came across my desk today:



  • I came across this yesterday: http://stackoverflow.com/questions/31960031/3-checkboxes-different-names-and-only-select-one/

    Explains a lot about what's wrong with modern web development. And SO, in passing.


  • Discourse touched me in a no-no place

    Ugh, there's exactly one insane requirement there:

    It's important that the names of the radio's should be different

    It's important that the name of the person who came up with that should be placed on a No Hire List.



  • People likely to be featured here :

    @JBert you know there is no correct or wrong way in software development. There is only recommended ways. But in the end you need to get your work done. โ€“  Vivek Gupta
    

    How do I get that to break sensibly?


  • Discourse touched me in a no-no place

    @swayde said:

    How do I get that to break sensibly?

    ?



  • @PJH said:

    @swayde said:
    How do I get that to break wrap sensibly?

    As in break on line end.
    But I'm probably really wanting it to wrap around.


  • Fake News

    @swayde said:

    How do I get that to break sensibly?

    Try a quote " > " instead of a code block " ` " :

    @JBert you know there is no correct or wrong way in software development. There is only recommended ways. But in the end you need to get your work done. โ€“ Vivek Gupta


  • Discourse touched me in a no-no place

    @swayde said:

    But I'm probably really wanting it to wrap around

    Ah - was on widescreen so didn't notice it since there was no scroll bar for me.

    Code fences seem to have a few bugs at the moment. Alternatives:


    <tt>:

    @JBert you know there is no correct or wrong way in software development. There is only recommended ways. But in the end you need to get your work done.
    ย ย ย โ€“ Vivek Gupta


    <pre>:

    @JBert you know there is no correct or wrong way in software development. There is only recommended ways. But in the end you need to get your work done.
       โ€“  Vivek Gupta
    

    <code>:

    @JBert you know there is no correct or wrong way in software development. There is only recommended ways. But in the end you need to get your work done.
    ย ย  โ€“ Vivek Gupta


    Or if you don't mind not having monospace, the previously mentioned
    >

    @JBert you know there is no correct or wrong way in software development. There is only recommended ways. But in the end you need to get your work done.
    ย ย  โ€“ Vivek Gupta

    (And the <blockquote> and [quote] alternatives.)



  • @Arantor said:

    Explains a lot about what's wrong with modern web development. And SO, in passing.

    Yes, the question is bad, but why does that make SO bad?

    This question is currently at -6 Internet points (specifically 1 upvote and 7 downvotes) which means more people dislike the question than like it.


  • Discourse touched me in a no-no place

    @powerlord said:

    This question is currently at -6 Internet points (specifically 1 upvote and 7 downvotes) which means more people dislike the question than like it.

    And that means a net drop in the questioner's internet points of 9 (1ร—+5 + 7ร—-2). There is some justice.


  • :belt_onion:

    So @JBert, do you understand that? Or do you still require enlightenment? There is only recommended ways. But in the end you need to get your work done. Only with this may you achieve the software.

    Interestingly though it appears the SO community (or maybe the WTDWTF community, since we got linked to it...) dislikes that question too since it's been pretty heavily downvoted.


  • Fake News

    By the end I was just agreeing to disagree. He was after all just "helping", you know.

    My dear friends there might be some scenario where html control is not in your hand where in you can edit the html like if you need to edit GUI of OBIEE. I am not able to understand asker is happy with the answer, why you guys are making an issue out of it. โ€“ Vivek Gupta

    Reminds me of the "but what if the server doesn't have a filesystem" shtick we once saw on the FPC.

    ย 

    The other answerer rephrased it nicely:

    Making a set of checkboxes behave like radio buttons is not the same as making radio buttons behave like radio buttons. And HTML already has facilities for making radio buttons work like radio buttons... follow the spec for it. โ€“ Jason Spicer


  • :belt_onion:

    Yeah, it sounds like the (common on SO) "Well this is what he was asking, so here's the answer" thing.



  • Yes and that's what's wrong with it.

    It encourages perpetuating bad knowledge.


Log in to reply