• 0 Posts
  • 5 Comments
Joined 2 years ago
cake
Cake day: July 4th, 2023

help-circle

  • i don’t think it’s so simple as they worship power. i think there’s a very strong inbuilt desire to belong to an “in-group” when you feel insecure and vulnerable

    and if unchecked neoliberal capitalism has done anything over the last half century, it’s made average americans feel insecure. financially and emotionally

    so sort of the same reason there’s race-based prison gangs is the same reason fascism tends to flare up when the system is going through severe stress. just like when your immune system is weak and the herpes virus manages to break out. we always have fascism possible yet most of the time the immune system is strong enough.

    2008 + covid + ukraine + more have left us vulnerable



  • As shady as Mozilla is, they’re competing against a functional monopoly

    yeah this is a part we need to recognize. right now there are essentially three browsers. Chrome, Safari, and Firefox. Every other browser is some derivative of one of these- mostly Chromium.

    Google can change some small detail about how they render HTML or a small part of their JS engine and that has global effects all over the internet. Without a Firefox to compete, they will implement policies to hurt the consumer. People think just because Chromium is open source that this mitigates the risk.

    Google’s V8 javascript engine does not only power all Chrome and chrome-derivatives, it also powers nodeJS and therefore vast swathes of server-side javascript as well.

    it’s actually difficult to understate how much raw power Google has in determining what you see on the internet and how you see it

    we desperately need Firefox. I really hope that an open source alternative could be viable but it’s been decades and we haven’t had a real browser pop into existence. will the death of Firefox mean something else comes out? Or will the death of Firefox be the last nail in the coffin for a free internet?


  • How do devs make this mistake

    it can happen many different ways if you’re not explicitly watching out for these types of things

    example let’s say you have a csv file with a bunch of names

    id, last_name
    1, schaffer
    2, thornton
    3, NULL
    4, smith
    5, "NULL"
    

    if you use the following to import into postgres

    COPY user_data (id, last_name)
    FROM '/path/to/data.csv'
    WITH (FORMAT csv, HEADER true);
    

    number 5 will be imported as a string “NULL” but number 3 will be imported as a NULL value. of course, this is why you sanitize the data (GIGO) but I can imagine this happening countless times at companies all over the country

    there are easy fixes if you’re paying attention

    COPY user_data (id, last_name)
    FROM '/path/to/data.csv'
    WITH (FORMAT csv, HEADER true, NULL '');
    

    sets the empty string to NULL value.


    example with js

    fetch('/api/user/1')
      .then(response => response.json())
      .then(data => {
        if (data.lastName == "null") {
          console.log("No last name found");
        } else {
          console.log("Last name is:", data.lastName);
        }
      });
    

    if data is

    data = {
      id: 5,
      lastName: "null"
    };
    

    then the if statement will trigger- as if there was no last name. that’s why you gotta know the language you’re using and the potential pitfalls

    now you may ask – why not just do

    if (data.lastName === null)
    

    instead? But what if the system you’re working on uses JSON.parse(data) and that auto-converts everything to a string? it’s a very natural move to check for the string "null"

    obviously if you’re paying attention and understand the pitfalls of certain languages (like javascript’s type coercion and the particularities of JSON.parse()) it becomes easy but it’s something that is honestly very easy to overlook