19
buried
6y

A Vue application I'm tasked with fixing consists of one single huge component, wouldn't survive even the most liberal use of linting, and has a reloadPage() function.

How fucked am I?

Comments
  • 0
    "Our users and content partners uploaded over 4 million videos in 2017, including 810,000 amateur videos. That’s more videos than the number of people who visit the Great Wall of China each year. In total, 595,482 hours of video were uploaded, which is 68 YEARS of porn if watched continuously. To put that number into perspective, in 1949 (68 years ago) the world’s first commercially available computer was released. If you somehow managed to log into Pornhub on your new Ferranti Mark 1, you would still be watching new videos from 2017 today."

    https://pornhub.com/insights/...
  • 3
    @CoffeeNcode Yeah, luckily our deadline was moved back one week. I'm already rewriting the entire API layer for this component. I'm thinking of pretty much only keeping the styling. I only skimmed the code, but wouldn't be surprised to find DOM selectors in there as well...
  • 4
    methods: {

    reload() {

    this.$nexttick(() => {

    location.reload()

    }

    }

    }

    Life hack: how to vue while avoiding its features (Evan You hates this secret trick)
  • 1
    @ltlian Simple trick:
    ```
    import React from 'react';
    import ReactDOM from 'react-dom';
    import $ from 'jquery';

    ReactDOM.render(<span>we're all fucked</span>, $('#app-root')); // it will fail
    ```
    Dan Abramov hates this trick!
  • 1
    How not to vue 101
  • 1
    Status update:
    I had to scrap the whole thing. I would complain about juniors, but I know I wrote way better code when I was one. Completely unmaintainable, and they spent several WEEKS on it. I'm not sure how many man-hours went into it and I don't think I wanna' know to be honest.
Add Comment