Please help contribute to the Reddit categorization project here

    [–] [Question] What bundler should I use? 4spooky6you 1 points ago in javascript

    It depends on what you're building. Rollup is better suited for writing libraries, it's easier to configure and will benefit your consumers more.

    Webpack is better for projects since there is lots of flexibility, it has a great ecosystem and community.

    I haven't really looked into parcel much tbh, but if you're into bleeding edge you might check it out. But be forewarned, its very new so there probably won't be the same level of support that you get with more mature projects.

    [–] Idea: Using CSS Content to store Data (like themes, colors, etc.). Is this too crazy? 4spooky6you 1 points ago in javascript

    I know this kind of problem is solved in stylus . Maybe this will give you another perspective:

    The advantage here is that the variables will be known at compile time, so you'll save yourself the overhead of parsing at runtime. As well as the additional css payload (the content)

    This is all assuming you have a build process of some kind.

    [–] A CSS Keylogger. 4spooky6you 2 points ago in javascript

    It's kinda cool, but what's it have to do with js?

    [–] TIL 'GoodBye' is a shortened form of the phrase "God be with ye" 4spooky6you 77 points ago in todayilearned

    'It may originate from the phrase "God be with you".' Also, there are zero references on this wiki article

    [–] hmmm 4spooky6you 1 points ago in hmmm

    Must be an Impala

    [–] My copy of Windows has been around for over 400 years 4spooky6you 1 points ago in softwaregore

    I saw this neat 'feature' while writing some code that checked a files last write time. Windows usually uses this as the date when the real date can't be found.

    Some history on this dates significance

    TL;DR The Gregorian calendar operates on a 400-year cycle, and 1601 is the first year of the cycle that was active at the time Windows NT was being designed. In other words, it was chosen to make the math come out nicely.

    [–] Had a run in with a kid crossing a road on a bike without looking yesterday, I came off worse! 4spooky6you 4 points ago in bicycling

    Make sure you take a look at the stem and fork. I had a similar incident a few years back, head on collision. Everything seemed to be ok aside from the wheel. Then about a year later I hit a pot hole, the fork snapped and I face planted into the pavement. The fork had been damaged the whole time and I never knew until it was too late.

    [–] After the last update my desktop flashes or refreshes every second and I cant do anything. Any advice? 4spooky6you 2 points ago in Windows10

    I'm having the same issue. Seems that the latest update failed to update key files correctly. Running

    sfc /scannow

    fails with the message

    Windows Resource Protection found corrupt files but was unable to fix some of them.

    Sites have suggested running:

    DISM /Online Cleanup-Image /RestoreHealth

    to reapply the latest update. However, this also fails for me with the message:

    Error: 1726 'The remote procedure call failed.'

    I'm currently unable to get past this step. Any advice/help would be much appreciated!

    [–] Best selling music artists in each US state [2000x1362] 4spooky6you 2 points ago in MapPorn

    Where was the data for this map scraped from? I only ask because I'm slightly skeptical about Illinois, since The Smashing Pumpkins are also from Illinois. I like both bands, and it's quite possible Chicago outsold them (especially considering they had way more time to sell records) but I just couldn't find the data for either of them.

    [–] Forgive me if this question has been asked before... 4spooky6you 2 points ago in wowservers

    Haven't gotten a chance to play on any of their realms yet (the queue is insane), but according to their realm list the PVE realm has a pop of 5.8k. The other realms are 8k and 10k.

    So, my guess is the PVE realm would be pretty good too (if people are actually playing there).

    [–] I can't seem to connect to the Elysium website? 4spooky6you 1 points ago in wowservers

    It's been down all day, they reported 'heavy DDOSing' earlier in the day. You can at least get the client while you wait.

    [–] My mom died. I need music. Help. 4spooky6you 1 points ago in Music

    I love this song, it helped a lot when my mom died. This cover of it is particularly sad and beautiful

    [–] catch(object) { } 4spooky6you 4 points ago in ProgrammerHumor

    While it does run fine, I wouldn't consider it 'good' code. There are a couple of issues that should be fixed:

    // The toss function is currently a global variable named toss, that points to an anonymous function.
    // The difference is subtle but naming a function makes debugging much easier.
    // For example, if an error occurs in this function (which it does), 
    // the stack trace will list this as an anonymous function instead of 'toss'
    toss = function(object){
        throw object;
    try {
         // Here, while it's legal to throw a string it's not recommended, 
         // since people using your code may expect to catch an object.
         // If someone caught your error and attempted to call message() on it, their catch would throw an error
    // Just a minor detail, but the name object implies you intend to catch an object,
    // but instead you catch a string which is misleading.
    catch(object) {
        // Since this is sample code, it's not a big deal.
        // But you need to be careful with console.log since it will cause IE's JS engine to crash unless the debugger is open
        console.log("I caught a " + object + "!");

    Here is the revised sample with all of that in mind (note: I kept the naming the same for the sake of the joke):

    function toss(object){
        throw new Error(object);
    catch(object) { 
        console && console.log(`I caught a ${object.message}`);

    I also decided to use template literals since they're new and sexy. And I added 'console && console.log' to check the existence of console first before attempting to log. In the real world, I would do something else and not use console.log at all.

    [–] catch(object) { } 4spooky6you 5 points ago in ProgrammerHumor


    careful with that global variable eugene