• 0 Posts
  • 346 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle
  • Servers: one. No need to make the log a distributed system, CT itself is a distributed system.

    The uptime target is 99%3 over three months, which allows for nearly 22h of downtime. That’s more than three motherboard failures per month.

    CPU and memory: whatever, as long as it’s ECC memory. Four cores and 2 GB will do.

    Bandwidth: 2 – 3 Gbps outbound.
    Storage:
    3 – 5 TB of usable redundant filesystem space on SSD or.
    3 – 5 TB of S3-compatible object storage, and 200 GB of cache on SSD.
    People: at least two. The Google policy requires two contacts, and generally who wants to carry a pager alone.

    Seems beyond you typical homelab self hoster, except for the countries that have 5gbps symmetric home broadband.
    If anyone can sneak 2-3gbps outbound pass their employer, I imagine the rest is trivial.
    Altho… “At least 2 [people]” isn’t the typical self hosting

    Edit:
    Tried to fix the copy/paste.

    Also will add:

    https://crt.sh/
    Has a list of all certificates issued.
    If you are using LE for every subdomain of your homelab (including internal), maybe think about a wildcard cert?
    One of those “obscurity isn’t security”, but why advertise your endpoints? Also increases privacy (IE not advertising porn(dot)example(dot)com)


  • This… Except for contactless payment.
    I used graphene for a month. It was lovely. Even things like banking apps worked.
    I don’t care about absolute privacy, but I do care about controlling my privacy. Grapheme gave me that.

    I had only 1 issue.
    Contactless payment.
    It’s extremely convenient to me, from public transport to groceries. I just bop my phone.

    The fact that Google has that locked down surely violates some EU laws. But I’m sure they wave away the laws because of “financial security” or some other bullshit.
    As if bank card NFC/contactless doesn’t suffer exactly the same issues.
    I looked into some “graphene contactless payment” type systems or workarounds, and I couldn’t find anything that would fill the gap.



  • I don’t use it anymore though because I found the suggestions to be annoying and distracting most of the time and got tired of hitting escape

    Same. It took longer for me to parse and validate the suggestion as it did for me to just type what I wanted.

    I do like the helper for more complex refractors.
    Where you have a bunch of similar, but not exactly the same, changes to make.
    Where a search & replace refactor isn’t enough.
    It manages to figure out what you are doing, highlights the next instance of it and suggests the replacement.
    I don’t think I’ve seen it make a mistake doing that, and it is a useful speedup.
    I guess the LLM already has all the context: the needle, the haystack and the term.


  • Yeh, my example was pretty contrived and very surface level.
    It grouped things that seemed related at a surface level but weren’t actually related at all. Which makes it a bad example.
    And realistically, you would use a timer class that raised events, and passed in an interval class that could be constructed from any appropriate units.

    It was more to highlight that types and classes are a fairly easy way to improve the context around variable.
    It can also use type checker to show incorrect conversions between minutes and seconds, Polar and Cartesian coords, RGB and HSV, or miles and kilometers. Any number of scenarios where unit conversions aren’t a syntax error.



  • I feel like variable or function names that become overly verbose indicate that a specific type or a separate class should be considered.
    I see it as a mild code smell.

    Something like int intervalSeconds = 5 could maybe have a type that extends an int called seconds. So then you are declaring seconds Interval = 5.
    It describes the unit, so the variable name just describes the purpose.
    You could even add methods for fromMinutes etc. to reduce a bunch of (obvious) magic numbers elsewhere.

    To extend this contrived example further, perhaps there are a couple of intervals. A refresh, a timeout and a sleep interval.
    Instead of having.

    int sleepIntervalSeconds = 0;
    // etc...
    

    You could create an intervals class/object/whatever.
    So then you have.

    public class Intervals {
        public seconds Sleep
        public seconds Refresh
        public seconds Timeout
    }
    

    The class/object defines the context, the type defines the unit, and you get nice variable names describing the purpose.



  • Of course a US company is going to jack up prices to cover the import tariffs. They aren’t going to eat the loss.
    So who is paying that tariff, that increase in cost?
    Let’s break it down:
    Is it the government of Canada: No.
    Is it the company in Canada exporting the good: No.
    Is it the company in the US importing the good: No (they increase prices to cover the tariff).
    Is it the consumer in the US buying the good from the US company: Yes.

    So, does Canada pay the tariff? No.
    Does US pay the tariff? Yes.

    It’s the US citizen that is paying more to cover the tariff. The “visible” result of the tariff is that the US pays more.
    The money goes back to the US government, so it stays within the US. But IT IS AN ADDITIONAL TAX TO US COMPANIES AND CONSUMERS.

    So trump can slap a 200% tariff on something, and the US (companies or citizens) will have to pay that tariff.

    Canada doesn’t pay ANY of it.
    They might see a decline in sales towards the US. They will be incentivised to diversify their exports, which means they will rely less on their trade with the US.

    Tariffs makes sense if it’s a 10-year plan to return manufacturing to a country, where the proceeds of the tariff fold back into the economy as investments (along with additional investments) in the manufacturing they are trying to bring back to the country. Gives companies notice, let’s people get trained, and a decade later it’s cheaper to produce a part locally than it is to import it from abroad.

    Massively swinging tariffs every few weeks, throwing a hissy fit because nobody is bending to your childish will, and driving an entire country into an isolated draconian society where foreign companies and talent don’t want to invest… Not the way to leverage tariffs.





  • From the wiki, and I’m simplifying:
    VW was handed over to the German government after being offered free-of-charge to Ford in 1948 by the British government (who ran the factory up till then).
    In 1946 the produced 1000 cars per month. In 1949, 2 cars were sold in the US.
    In 1952, 12 VWs were sold in Canada.
    In 1955 they produced over 1 million Beetles.

    So 3 years on life support being ran by the British. Dunno how long being run by the German government before becoming GmbH.