1. 40
  1. 7

    This is the reason I feel apathetic being a web developer for the last half decade or so

    I love the platform but it seems like the bar to entry for being a professional keeps rising, and I am disassociating from what employers desire? Perhaps I have not seen the right methodology that clicks with me yet.

    1. 8

      For being a professional in web development you need to be able to solve the problems in a understandable, maintainable way, as simple as possible, imho. And for that, you don’t need the modern frontend nonsense.

      I would say, if you want to learn, the way is back to basics: HTML and CSS. And Vanilla JS if you need some interaction. You’ll be able to do a lot with just that. Once there is something hard to do, maybe a library or two starts to make sense. You will know while on the road.

      The entry point for new web professionals shouldn’t be create-react-app hello-world. Should be the html snippet from the article.

      1. 1

        Can you think of an open source web app project that is understable, maintainable, simple and doesn’t use any modern frontend library/ framework?

        1. 1

          Couldn’t think of one right now, but a quick search returned this, and seems like a good example: https://github.com/cristianbote/hnpwa-vanilla

          When I talk about the modern frontend nonsense, what I mean is being lazy about solving problems, solving them poorly just importing some massive library, or focusing on a pretty niche functionality that my development tool needs instead of solving the problem that needs to be solved in the first place. Giving more importance to smart and full featured tools without noticing that the JS bundle is now x10 the size.

          I’ve been working on closed source for the company I work on, and doing many frontend solutions of all the sizes. And it’s possible to build medium-big web apps with just JS.

          Some projects eventually need something modern to build UIs easier, let’s say Vue. We added Vue and just Vue, not Webpack or anything else, because we didn’t need webpack or any transpilation at that moment, just Vue.

          The problem is when the hello world of an application is already half a megabyte, when it’s a simple webpage that could be perfectly done with vanilla JS and added Vue later, once it needed it. I’ve seen landing pages with React just to put an image slideshow.

          EDIT: The linked project structure is nice and the code is pretty simple and clear about what it’s doing, but I would have simplified the bundling process by using Rollup directly, maybe.

          1. 1

            There is of course a third alternative to both - i.e., where wasm is heading. This is what we do at work–write the frontend in Haskell and compile it to JS (future-proof’ing to wasm via using ghcjs[1])–and we get all the maintainability/ simplicity of Haskell, and not to mention FRP.

            [1] https://www.reddit.com/r/haskell/comments/97cwg5/what_is_the_status_of_ghcjs/e47yrgg/

            1. 4

              Compiling from another language to WASM doesn’t seem like a simple solution for me. Requires many layers of knowledge and more niche technology (so, less documentation available) for many projects in which just doing it in Javascript would be enough.

              But, as always, it just depends. If the resulting bundle size is reasonable, the team is used to the technology, documentation is good enough and maintainability improves, it’s an option.

              At least there are implementations and implementations. Blazor downloads whole Mono into the browser and then downloads .dll files to run them, which is a complete tragedy.

                1. 3

                  Compiling from another language to WASM doesn’t seem neither like an easy solution. But again, talking from today’s limitations as it’s not mature enough.

                  And if we go on that path, I would probably prefer something like Mint Lang. Which is a language specifically designed for SPAs.

      2. 5

        I’m like you but I dislike the platform, and I’m not a web developer anymore. My cynicism springs from the fact that it isn’t very different from how it was 20 years ago when we were writing Perl scripts to spit out HTML.

        Twenty. Years.

        Browsers can do so much more now, but the dev experience can be summarized as, “software to make software to make software.” And I’m supposed to be impressed that I get to learn in excruciating detail what each layer of that fractal nonsense is supposed to do.

        Unfortunately, the issues you mention will always exist so long as we tolerate a celebrity pop culture that values easy over simple.

        1. 1

          Perhaps I need to broaden my scope for things I wish to do for money.

          2019 may be the year I try some new and exciting thing and just go for it :-)

          1. 1

            The limited computing environment offered by the web is good at what it tries to do, but I really believe technologists should venture beyond it if only to hone their thinking and expose themselves to beautiful concepts.

            Best wishes!

      3. 6

        I have mixed feelings about this article. On one hand, I agree with the philosophy that knowing your tools and understanding when to reach for certain ones is absolutely something that every developer should do. I also agree that making a web Thing involves a lot more code than it used to. The frontend/backend dichotomy didn’t really even exist until 10 years ago; modern JavaScript (i.e. “ES6”), Webpack, PostCSS, TypeScript/Flow, React, etc. definitely increase the learning curve and effort it takes to make a web Thing; and you could make the case that all of these new tools that we have don’t necessarily translate into faster development or better performance.

        On the other hand, this post very much feels like “I like the old way of doing things and I do not care to learn the new ways”. C people didn’t like C++ because it introduced classes, Java people didn’t like PHP and Perl because it eschewed explicit types, and now we have people complaining that React and Sass and so forth are unnecessary when the way that they wrote web code 10 or 15 years ago works just fine. Fortunately, you don’t have to buy into all of it if you don’t want to:

        • You don’t have to use ES6, but I would argue that TC39 has been doing some tremendous work in making JavaScript as a language better and more fun to work with. You don’t have to write 1000-line jQuery files, you can actually organize code into files :)
        • You don’t have to funnel ES6 through Babel, as Chrome and Firefox have been really good about introducing new features in a timely manner, but then again, you will have to keep up with what browsers do and don’t support manually.
        • You don’t have to use Webpack/Rollup/Parcel — if you want to funnel assets through some kind of processing step, you can write a Makefile if you so choose — but this seems like a lot of work.
        • You don’t have to use npm to manage JavaScript dependencies, you can download them manually and stick them in your project if you really want to, but package management is a proper thing in JavaScript now and it seems a little stubborn to not take advantage of it.
        • You don’t have to use Sass, Less, or PostCSS; there are some new things happening in CSS-land (like variables) that are supported in Chrome and Firefox, but there are also interesting things happening that the W3C has not introduced, like CSS Modules.
        • You don’t have to use React, but I don’t think you should dismiss it completely, either. The idea that view code can be declarative and functional is pretty powerful. Of course it necessitates doing things differently, but so does everything else.
        1. 1

          Java people didn’t like PHP and Perl because it eschewed explicit types

          This is a good example of a newer thing that’s not necessarily better. While dynamic typing certainly has productivity benefits in the short term, it also has more bugs. I’m not so sure if it’s an improvement when writing larger programs.

          I agree that not all improvements are bad ones, but on the other hand you have “static site generators” such as Gatsby that use React to load your site. No JavaScript? No HTML for you! (also see my comment on reddit).

          I’m not hating on React specifically here, but loading a basic HTML weblog post via an XHR request to a JSON document is just incredibly stupid. I have a lot of patience and understanding for viewpoints I don’t agree with, but I have no idea how anyone could possibly think this is even vaguely a good idea. I simply can’t.

          I think that some of the pushback is against this sort of very silly stuff.

        2. 5

          I mostly do it the same way, except I’ve given up on boilerplate like the <html> and <head> tags and end tags.

          <!doctype html>
          <meta charset=utf-8>
          <link rel=stylesheet href=index.css>
          <script src=index.js></script>

          Works fine!

          But I also like React. Sometimes I do want to make an interactive UI in JavaScript with a bunch of moving parts, and using virtual DOM to write a render function can be very significantly easier than the vanilla JS alternative.

          When I do use React, I like to define a simple tag function to avoid JSX tooling, so building DOM trees looks like

          tag("ul", { className: "things" }, (
            things.map(x => tag("li", {}, x.name))

          And I’m quite uninterested in “state management frameworks” like Redux. Many of my projects are single file JavaScripts whose state is simply global variables declared at the top of the file. Contrary to popular wisdom I think this is not only fine but preferrable. Of course that depends on whether the thing is a limited scope gadget or an ever-sprawling kitchen sink application—but I prefer to work on the former kind of thing.

          In some sense when you start by setting up a complex infrastructure you already imagine creating a behemoth and so that’s what you get. I think it’s valuable to at least consider the question: is it at all possible that our business could replace its hundred-file monstrosity with a 1000-line index.js and a 50-line index.css and still thrive?

          1. 10

            And yet the author posts this rant on medium.

            1. 20

              I don’t like Medium, but I don’t think publishing this article on that website discounts the author’s message. I think his angle is “I’ll do the simplest thing to get the job done”, rather than following some minimalist philosophy.

              1. 5

                I mostly agree, but at the same time it seemed to me that he was also using simple tech. likely to be around forever. So publishing on a unicorn’s (fat) web app. is ironical.

              2. 2

                That was my first thought also.

                Perhaps if I wouldn’t see the article comes from Medium I would read it. Or perhaps clicking on it and close it quickly. No offense, but lately I simply can’t enjoy any article on that site due to bad UX.

                Once a place for admiration (their typography) now Medium is the only channel I have a bias against.

              3. 3

                His websites load instantly! That’s so cool. I love this guy. Maybe I should learn how to actually use html/css/js instead of base.css and stolen javascript snippets. Great article.

                1. 3

                  Although I can’t find it, there was an article that visualized it as a pyramid. Most of it was HTML representing the content. A small part was CSS representing layout. The tiny tip on top was Javascript doing whatever wasn’t possible in HTML or CSS. If it was possible, use no Javascript at all. Then, you also use compression not just to boost transfer speed: to be considerate to the many, many folks on dial-up (slow) and mobile (data charges).

                    1. 1

                      That’s it! Thanks! Also, I recommend his articles on the subject because they’re as entertaining as they are informative.

                2. 3

                  I tried making a website with my bare hands a while ago, but I eventually had to give in and use a text editor.

                  1. 2

                    I make my sites in minimal ways like these, but I did end up making a small script for my personal site to make common tasks simpler.

                    1. 1

                      I just built a webapp for work. From the client’s view, there is no code. Just html, CSS. The client sees no JavaScript (except for one page of the administrator view, where I need JS). In this way, I respect the goals of the author.

                      But there are no HTML files on the server. The whole thing is dynamically generated in about six hundred lines of Clojure. The webserver needs to ask an embedded webserver in the JAR for every single page, even when the resources (CSS, JS) are not being generated at all. In this way, I have a very complicated server. It’s not a particularly clever server, straightforward stuff, but it’s a full program. All to make sure I didn’t have to write any JavaScript.

                      Minimalist and fast? For the client, yes, and I think that’s the ideal.

                      1. 1

                        So here I am, it’s 2019, I’ve been writing code for almost 20 years, and I’m surrounded by people making 2–10 times as much money as I am

                        Is he serious? Either he makes $10k or his colleagues are making close to $1MM? Or is he referring to non-developers like CEOs and such?

                        Other than that, I liked the article. I actually just finished making a 7 page site completely in HTML. Like, didn’t even use backend templating for the nav section. I figure if the site is supposed to be static and likely won’t change much, and the only real interactive piece is a contact form, why not just roll the whole thing in plain ole HTML+CSS? It actually felt really refreshing to do. I like Vue, and use it every day at work building web applications, but it’s refreshing to build a small, lean, pretty little static website once in a while.

                        1. 3

                          He wrote that he’s a grad student. Don’t know if that’s CS or something else, but I don’t think a grad student stipend would be over $30k except in the rarest of circumstances.

                          1. 1

                            Ah, I guess I saw 19 years of experience and assumed he’s been in the field for that long.