A butt complains about web development, all wacky hipsters get dudehurt



  • There's this article, basically nothing new: [url=https://medium.com/@wob/the-sad-state-of-web-development-1603a861d29f#.b28t8cn44]The Sad State of Web Development[/url].

    Exhibit A: people liking it. https://twitter.com/korchev/status/686639277636190213

    Exhibit B: people hating it.
    https://twitter.com/bodil/status/686711536535080962

    (Follow the whole conversations)

    I just love the arguments wacky hipsters present: "at least it's not XML!" "1998 called!" Look, this all still looks like a shitpile of job security to me.

    Also, those wacky hipsters in love with complexity would love to buy Edwin the connected rubber ducky. Most shit on npm looks just as functional.



  • I've seen this yesterday and tweeted.

    I was the wrong person to post on TDWTF, though, since I mostly disagree with him.

    It IS a good rant, though.



  • I agree with him, to an extent, because I've run into problems he describes and it took me a while to figure that it was actually the module author that was horribly wrong and not me (see, I'm spoiled enough by Python, and to lesser extent, Perl, to expect some level of maturity from the developers).

    Like, selenium-webdriver. 2.47 is ES5 and 2.48 (a minor release!) is ES6. All our tools are ES5. We don't have resources to retest everything on ES6. Now this wacko issues a minor release with major breaking change.

    Now... ever seen how grunt handles command-line parameters? Especially when you mix flags and --option=value pairs? Dammit, we've had libraries that handled it properly, for decades. Grunt, OTOH, looks like it was cobbled together by a high schooler with no clue whatsoever.

    And it's all just turds all the way down, right down to libuv that cannot even into TLS properly.



  • Yeah some points are valid.

    But then he says shit like this

    and this

    and I just can't take him 100% seriously.



  • I would stick with Angular for my own projects, but I'm hesitant about it. See, they deprecate 1.x, and 2.x is a total rewrite, vastly incompatible. When they start investing too much into Angular 2, we are going to get a Python 3 disaster (it's only now that it started recovering) at best, and mind you, Python 3 was not as disruptive (Angular 2 is written in TypeScript, a different language by all means). At worst, we'll get another Perl5/Perl6 soap opera.

    A pity because Angular, while being shit, is one of those better ideas for web.



  • I think b) is exaggerated while a) totally has a point. :smile:

    A language with no fucking integers whatsoever, I kid you not.


  • sockdevs

    @cartman82 said:


    I find the people who complain the loudest about JavaScript are the people least able to use it properly. Once you learn its quirks (of which there's at least one that's a total :wtf:), it's actually pretty good.

    @cartman82 said:


    Ah, the typical overreaction of the impassioned hater; find any excuse to justify your hatred, no matter how asinine.


  • sockdevs

    @wft said:

    A language with no fucking integers whatsoever, I kid you not.

    It has integers! It just doesn't distinguish them from floats, s'all :stuck_out_tongue:



  • @RaceProUK said:

    Once you learn its quirks (of which there's at least one that's a total :wtf:),

    I know there are people who are into BDSM at work, especially the "M" part. I'm not one of them. I don't like to be humiliated and put up with fucking "quirks" (read: language designers and implementors sloppiness) all the time.


  • sockdevs

    If you ever find a language without quirks, let me know :stuck_out_tongue:



  • @wft said:

    BDSM at work

    Oh yeah, it even says so on their business card: Business Development-Sales Management


  • area_deu

    @captain , @antiquarian , what about your favorite languages?



  • Lets take everything that was great in Ruby and re write it in Javascript, I think was the official motto.

    ... What great stuff was that, again?

    Most of the smart magpies have moved on to Go at this point

    I never thought about Go programmers as an annoying bird, but that makes a lot of sense.


  • sockdevs

    @Salamander said:

    > Most of the smart magpies have moved on to Go at this point

    Wait... does that mean @ben_lubar is a magpie?



  • @cartman82 said:

    But then he says shit like this

    I know, right? Coldfusion is the worst language ever designed.


  • area_deu

    @cartman82 said:

    and I just can't take him 100% seriously.

    I can. Because he's right on every single fucking topic.

    See also: https://what.thedailywtf.com/t/the-state-of-web-development/50088/1



  • @ChrisH said:

    I can. Because he's right on every single fucking topic.

    See also: https://what.thedailywtf.com/t/the-state-of-web-development/50088/1

    Ah yeah. I thought the rant sounded familiar.

    Same old arguments then. See my posts in the other thread.

    Putting aside all the web-based complaints, saying that javascipt is the worst language ever and npm a bad package manager is a WTF.



  • Java :stuck_out_tongue:
    Python :stuck_out_tongue:


  • mod

    @RaceProUK said:

    it's actually pretty good.

    :rofl: no.

    I get it. I've been using it. I understand how Node works. But it's not good. When you have to have a huge laundry-list of best practices to work around the fucking language 'design' that will bite you at every turn, that's not a good language.


  • sockdevs

    @Yamikuronue said:

    @RaceProUK said:
    it's actually pretty good.

    :rofl: no.

    I get it. I've been using it. I understand how Node works. But it's not good. When you have to have a huge laundry-list of best practices to work around the fucking language 'design' that will bite you at every turn, that's not a good language.

    gotta agree with you there.

    there is a beautiful and good language buried in there somewhere, but it's buried pretty deep which is why all those best practices need to be created to help people find it.

    JS is never going to be a good language unless they actually break backwards compat and start removing all the crap that's in there along with the good bits. and that's just not going to happen.



  • I don't care what people do to make websites, I just want them to be less than 0.5MB per page.


  • sockdevs

    @LB_ said:

    I just want them to be less than 0.5MB per page.

    woah, now... let's not get crazy.

    let's set an actual achievable goal for step one.

    @LB_ said:

    I just want them to be less than 0.5MBGB per page.

    there. now that's something we could possibly make happen!!


  • Winner of the 2016 Presidential Election

    Dude, don't you know that the Modern Web™ requires your homepage to be a fancy image carousel, full screen size (8k photos of course, because we have to be ready for those people with dual 4k screens!), at least 5 stock images in rotation.

    If you're lucky, the scroll will work and there is actual content underneath, too!


  • sockdevs

    @wft said:

    Java :stuck_out_tongue:

    Which forces you to declare every single exception you might throw maybe once a year.

    @wft said:

    Python :stuck_out_tongue:

    Where whitespace determines program structure; $DEITY forbid you mix tabs and spaces...


  • Winner of the 2016 Presidential Election

    Ah, yes, the only language in which you get broken code because you forgot to turn autoindentation on, instead of just looking ugly.



  • @Onyx said:

    If you're lucky, the scroll will work and there is actual content underneath, too!

    These days scroll is just a way to say to the page "show me the next slide of your awesome presentation". Treating it as a simple navigation interface is so 2012.


  • mod

    A quote:

    A language must be predictable. It’s a medium for expressing human ideas and having a computer execute them, so it’s critical that a human’s understanding of a program actually be correct.

    Typeof({} + []);
    “string”
    

    A language must be consistent. Similar things should look similar, different things different. Knowing part of the language should aid in learning and understanding the rest.

    "Did you know that typeof null evaluates to “object”? 
    Or that “5” + 2 is “52” while “5” - 2 is 3? 
    Or that [“10”,”10”,”10”,”10”].map(parseInt) is [10, NaN, 2, 3]? 
    Or that [0] == 0 is true but [0] == [0] is false?"
    — Javascript Testing Recipes, by James Coglan
    

    A language must be concise. New languages exist to reduce the boilerplate inherent in old languages. (We could all write machine code.) A language must thus strive to avoid introducing new boilerplate of its own.

    fs.readdir(source, function(err, files) {
      if (err) {
        console.log('Error finding files: ' + err)
      } else {
        files.forEach(function(filename, fileIndex) {
          console.log(filename)
          gm(source + filename).size(function(err, values) {
            if (err) {
              console.log('Error identifying file size: ' + err)
            } else {
              console.log(filename + ' : ' + values)
              aspect = (values.width / values.height)
              widths.forEach(function(width, widthIndex) {
                height = Math.round(width / aspect)
                console.log('resizing ' + filename + 'to ' + height + 'x' + height)
                this.resize(width, height).write(destination + 'w' + width + '_' + filename, function(err) {
                  if (err) console.log('Error writing file: ' + err)
                })
              }.bind(this))
            }
          })
        })
      }
    })
    

    ([source][1])

    A language must be reliable. Languages are tools for solving problems; they should minimize any new problems they introduce. Any “gotchas” are massive distractions.

    @RaceProUK said:

    1. catch(reportError); means catch() calls reportError()

    1. catch(reportError(err)); means catch() calls the return value of reportError(err) as a function
    2. catch((err) => reportError); means catch() calls an anonymous function with err which returns reportError
    3. catch((err) => reportError(err)); means catch() calls an anonymous function with err which in turn calls reportError() with err

    The source of those criteria? "PHP: A Fractal of Bad Design".
    [1]: http://callbackhell.com/


  • sockdevs

    To be fair, I did acknowledge it has quirks


  • mod

    Yup :) It just amuses the hell out of me to see people bash PHP and love on JS as though they weren't both awful languages. JS is powerful, and the Node ecosystem is really coming into its own... but you could say the same thing about PHP 5-6 years ago, too.

    There are good reasons to use Javascript, but the design of the language ain't one of them



  • @cartman82 said:

    These days scroll is just a way to say to the page "show me the next slide of your awesome presentation". Treating it as a simple navigation interface is so 2012.

    Discover this one designers radical new direction - Real designers hate him!

    JS is powerful, and the Node ecosystem is really coming into its own... but you could say the same thing about PHP 5-6 years ago, too.

    @Yamikuronue People say a lot of things about PHP. And usually it's true!


  • sockdevs

    @RaceProUK said:

    Which forces you to declare every single exception you might throw maybe once a year.

    great idea in theory.

    in practice...... OUCH!

    @RaceProUK said:

    Where whitespace determines program structure;

    well, at least it does away with the great code style holy war. now all that is left to fight about is tabs vs spaces

    [poll type=multiple]

    • Tabs or death!
    • 2 Spaces is the only true indent!
    • 4 spaces or I-Kill-You!
    • I'm a rebel! 3 spaces!
    • What is a tab?
    • What is a space?
    • Why are we fighting?
    • Can I have cake?
    • E_TAB_NOT_FOUND
    • E_SPACE_NOT_FOUND
    • E_SANITY_NOT_FOUND
      [/poll]


  • @Onyx said:

    (8k photos of course, because we have to be ready for those people with dual 4k screens!)

    Dual 4K != 8K. Just sayin.



  • @accalia said:

    in practice......

    ...it's not that big of a deal.


  • mod

    Discourse, how the hell do I get a 500 AND a body too similar?!

    I feel like there must be a compromise between the excessive, annoying verbosity of Java and the sheer anarchy of JS. I'd like to know what a library is going to throw at me, but in JS I have to grep for error strings, because it's all just a generic Error with a string description.


  • Winner of the 2016 Presidential Election

    @loopback0 said:

    Dual 4K != 8K. Just sayin.

    I know, but calculating the actual sizes would be work.


  • sockdevs

    @Yamikuronue said:

    I feel like there must be a compromise between the excessive, annoying verbosity of Java and the sheer anarchy of JS.

    C#? :stuck_out_tongue:

    Actually, in all seriousness, C# is about halfway between; it avoids the worst verbosity of Java, and the worst fuckery of JS.


  • mod

    Yes, but you have to use Visual Studio, and fuck that shit ;)


  • sockdevs

    @Onyx said:

    I know, but calculating the actual sizes would be work.

    quad 4k in a 2x2 would ~=8k

    that's because 4k and 8k is the measurement of the long edge of the viewport, so dual 4k's in a 2x1 would be as wide as 8k, but half as tall.

    /me continues to geek out about geometry


  • sockdevs

    @Yamikuronue said:

    Yes, but you have to use Visual Studio, and fuck that shit ;)

    :scream: HEATHEN! Thou shalt be smite unto oblivion!

     

     

     

    :stuck_out_tongue:



  • @boomzilla said:

    @accalia said:
    in practice......

    ...it's not that big of a deal.

    @Yogi Berra said:

    In theory, there is no difference between theory and practice. In practice, there is.

    <Toast!


  • Discourse touched me in a no-no place

    Heh heh heh:

    The next comment was "party like it's 1988".



  • @RaceProUK said:

    I find the people who complain the loudest about JavaScript are the people least able to use it properly. Once you learn its quirks (of which there's at least one that's a total :wtf:), it's actually pretty good.

    JavaScript is one of the worst languages I've had to learn. However Node.js is good enough that I'll deal with it. If Node was set up to use a more sane language (Maybe Python?) it would have been a slam-dunk. Or if they'd made it a little more .NET-y so it could use a bunch of different languages...

    On the other hand, it is nice for web applications where you use the same language and often even the same libraries on both client and server. It avoids lots of the "Oops I spent a lot of time in C# on the backend and accidentally wrote C# in the web page's client-side scripts" moments.


  • Discourse touched me in a no-no place

    @Yamikuronue said:

    Yes, but you have to use Visual Studio, and fuck that shit

    Tell your bosses to stop buying you Pentiums; problem solved.



  • @Yamikuronue said:

    Yes, but you have to use Visual Studio, and fuck that shit :wink:

    E_COGNITIVE_DISSONANCE


  • area_deu

    @mott555 said:

    On the other hand, it is nice for web applications where you use the same language and often even the same libraries on both client and server.

    I'm repeating myself, but that's exactly what Silverlight could have been.

    It avoids lots of the "Oops I spent a lot of time in C# on the backend and accidentally wrote C# in the web page's client-side scripts" moments.
    Never happened to me (apart from ignoring the stupid JS convention that object member names should start with lower case).

  • sockdevs

    @mott555 said:

    JavaScript is one of the worst languages I've had to learn. However Node.js is good enough that I'll deal with it.

    I think a lot of the issues people have with JavaScript is because they first learnt it in the browser, where it was tacked on without any thought aside from 'i cna moev squars round nao LOL'; as a result, they never really learn how the language really works. With Node though, you quickly find you have to write better JS, otherwise you get nowhere; as a result, when you go back to the browser, you write far better JS than you would have before.

    At least, that's how it worked out for me.


  • sockdevs

    @ChrisH said:

    @mott555 said:
    On the other hand, it is nice for web applications where you use the same language and often even the same libraries on both client and server.

    I'm repeating myself, but that's exactly what Silverlight could have been.

    The problem with Silverlight is it was never going to get anywhere unless it had proper Linux/Unix support, which never happened.



  • @ChrisH said:

    I'm repeating myself, but that's exactly what Silverlight could have been.

    I loved Silverlight. It was my main environment for a few years at a previous job. Then Apple did the "We're going to singlehandedly kill Flash" thing, then Microsoft was like "No, Silverlight's not going anywhere. No, we're not killing Silverlight. Silverlight will never die. Silverlight is strong! Silverlight is the future! Ha, just kidding, Silverlight's dead too. Go play with JavaScript newbs."



  • @Yamikuronue said:

    > A language must be concise. New languages exist to reduce the boilerplate inherent in old languages. (We could all write machine code.) A language must thus strive to avoid introducing new boilerplate of its own.

    fs.readdir(source, function(err, files) {
    //...
    })

    A proper way to write this code:

    // Main
    
    resizeAllFilesInDirectoryToWidths('/tmp/source', '/tmp/dest', [100, 200], function (err, results) {
      if (err) {
        console.error(err);
        return;
      }
    
      results.forEach(function (result) {
        if (result.error) {
          console.error('Failed to resize ' + result.fileName + ' to ' + result.width + ': ' + result.error);
        } else {
          console.log('Resized ' + result.fileName + ' to ' + result.width + ' and saved it to ' + result.destPath);
        }
      });
    });
    
    // Code end
    
    return;
    
    function resizeAllFilesInDirectoryToWidths(sourceDir, destDir, widths, callback) {
      return fs.readdir(sourceDir, function (err, files) {
        if (err) {
          return callback(new Error('Error finding files: ' + err));
        }
    
        return resizeFilesToWidths(files, destDir, widths, callback);
      });
    }
    
    function resizeFilesToWidths(files, destDir, widths, callback) {
      var results = [];
    
      files.forEach(function (fileName) {
        widths.forEach(function (width) {
          resizeFile(dir + fileName, width, destDir, onResizeDone.bind(null, fileName, width));
        });
      });
    
      return true;
    
      function onResizeDone(fileName, width, err, destPath) {
        results.push({
          fileName: fileName,
          width: width,
          destPath: destPath || null,
          error: err
        });
    
        if (results.length === files.length * widths.length) {
          callback(null, results);
        }
      }
    }
    
    function resizeFile(filePath, width, destDir, callback) {
      var f = gm(filePath); 
      return f.size(function (err, values) {
        if (err) {
          return callback(new Error('Error identifying file size: ' + err));
        }
    
        var aspect = values.width / values.height,
          height = Math.round(width / aspect),
          fileName = path.basename(filePath),
          destPath = destDir + 'w' + width + '_' + filename;
    
        return f.resize(width, height)
          .write(destPath, function (err) {
            if (err) {
              return callback(new Error('Error writing file: ' + err));
            }
            return callback(null, destPath);
          });
      });
    }
    

    Whoever wrote that code is a hack. He'd be a hack in any language.

    Javascript does make it easier to shoot yourself in the foot, though.



  • @RaceProUK said:

    The problem with Silverlight is it was never going to get anywhere unless it had proper Linux/Unix support, which never happened.

    It was great for internal business applications. Hardly anywhere cares about Linux in that world.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.