1. 8

    AMP is bad for the open web. Google is touting AMP as a way to reduce page load times, but it’s actually about pushing their proprietary HTML standard.

    Google could easily reduce page load times if they penalized slow loading sites, but they won’t, because doing so doesns’t help push their agenda.

    Until the AMP specification allows loading JavaScript from somewhere other than https://cdn.ampproject.org AMP cannot be considered an open standard.

    1. 1

      “…it’s actually about pushing their proprietary HTML standard.”

      I don’t think that is quite it. AMP is Google’s equivalent of the Facebook walled garden, not socially, but attempting to constrain you to their walled off part of the internet. The longer they can keep you on a google server the better tracking they can do. See also gmail, YouTube, android, chrome. Don’t get me wrong, it’s still horrible, but I think tracking is the exact reason they created/bought all these products.

    1. 5

      :) Very entertaining read. I’ve been picking up some smaller components in GO lately. I’ve also rewritten a component I originally built in Python in GO. Which gives a nice but anecdotal comparison:

      Python: 11 days of development, performance, 160ms for ranking 3600 activities GO: 3 days of development, performance, 6ms for ranking 3600 activities

      The project is quite simple. It reads a ranking formula and turns it into a function which runs scoring on a large list of activities. Here’s an example ranking config:

      {
      "functions":{
        "simple_gauss":{
          "base":"decay_gauss",
          "scale":"5d",
          "offset":"1d",
          "decay":"0.3"
        },
        "popularity_gauss":{
          "base":"decay_gauss",
          "scale":"100",
          "offset":"5",
          "decay":"0.5"
        }
      },
      "defaults": {
          "popularity": 1
      },
      "score":"simple_gauss(time)*popularity"
      

      }

      So you basically you need to parse the score expression, translate it to AST, configure the defaults in the context, setup partials for the specified functions, add a bunch of builtin functions and create a huge set of test cases to make sure you’ve covered every possible way in which people can break it :)

      With Python most of the time was spent on benchmarking and performance optimization. The GO code started out at 15ms and with some super simple optimization came down to 6. (GO also had the unfair advantage of a better expression parsing library being available.)

      I used to believe that GO gives you better performance at the cost of developer productivity. For certain projects it definitely seems to beat Python at both productivity and performance though.

      1. 6

        Is it possible that some of the drop in development time was due to being familiar with the application because you had already written it once before?

        1. 3

          You beat me to it. There’s been a lot of rewrite stories debunked because the developers just got better at solving the problem since the first try. That included one with formal methods at IBM that got me where nobody mention it was a second implementation.

          The proper comparison is doing them both the same way with same primitives. That is closer to apples to apples.

          1. 2

            Yeay, it’s comparing apples and oranges :) On the other hand this was my first non-hello world GO project. I’ve been working with Python for 10 years now. GO is super easy to switch to if you’ve been working with Python.

            Most of the time with the Python version was spent on performance optimization. I think GO hits a sweet spot. The language is easy to use and quite productive. Maybe not as easy as Ruby or Python, but pretty close. GO is also not as fast as C++ or Java (it depends a bit on the code you’re running, but in general it’s a little bit slower).

            Basically you get close to C++ level performance at close to Python level ease of use. Now for most use cases i’d still recommend Python. (usually it’s just glue between heavily optimized databases and the overhead of python doesnt matter). But for use cases where the language performance matters, GO really hits a sweet spot.

            1. 3

              Nit: it’s Go, not GO.

              1. 3

                People are never going to get this right. It’s Go: not Golang, GO, Google’s Go, etc.

                1. 2

                  haha, that’s probably the hardest aspect of learning Go :)

          1. 8

            Sorry this happened. As a US resident, I didn’t realize how crazy it can be entering or leaving the United States until I did so for the first time. The US was by far the hardest country to get into for me (even though I’m a citizen). It’s a shame that interactions with customs is such a mixed bag, and I worry that it is actually going to get worse for the time being.

            1. 3

              I cross the border every single day (not a citizen), and have only ever been brought in once. But I also don’t do anything that would be considered suspicious by anyone.?

              1. 11

                “I don’t mind <blank> because I have nothing to hide” is a slippery slope.

                1. 6

                  I don’t think that @zzing is making that argument.

            1. 3

              Is this meant to be ironic? All I see rendered is a blank white page with two URLs and a short orange line on it.

              1. 6

                Author here. Could you provide your OS and browser? I’ll look into a fix.

                1. 3

                  Sure: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 on Debian Jessie with NoScript, but I whitelisted the site in NoScript.

                  1. 6

                    Should be fixed. Looks like it was a bug in the Fira Sans font itself.

                2. 5

                  The problem is the web-font used in the article. Just overwrite the font-family-tag of <article> and the text is readable. A shame you have to go through this to read this article…

                  A quick fix would be to run on the site:

                  javascript:document.getElementsByTagName("article")[0].setAttribute("style", "font-family:Helvetica, Arial, sans-serif");
                  
                  1. 3

                    Firefox lets you disable custom fonts for all sites via the UI settings. Chrome has an extension called ‘Disable Web Fonts’. Since I’ve disabled web fonts, I’ve found my web experience has generally improved.

                    1. 1

                      That worked; thanks. Whether the irony was intentional or not, it greatly amused me.