Aussie living in the San Francisco Bay Area.
Coding since 1998.
.NET Foundation member. C# fan
https://d.sb/
Mastodon: @dan@d.sb

  • 12 Posts
  • 5.11K Comments
Joined 3 years ago
cake
Cake day: June 14th, 2023

help-circle


  • If you use TypeScript (which you really should), using the read-only types (Readonly, ReadonlyArray, ReadonlyMap, ReadonlySet, etc) helps catch issues like this, as the type checker will throw an error if you try to mutate the object/collection. Pretty much all React prop and state types should be read-only.

    Methods like toSorted are baseline now, with 95% compatibility, so they should be safe to use unless you’re in a very limited environment (like building a TV app, since some TV brands are stuck with extremely old Chromium versions)



  • danAtoSelfhosted@lemmy.world•Git control for novice gamedev?
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    1
    ·
    edit-2
    3 days ago

    I’d recommend learning Git entirely locally first. Git is a distributed version control system, which means that it doesn’t need a server. All of Git’s features are available to you even with just a local repo.

    Honestly, using Github is totally fine as a beginner. Similarly, using a GUI is totally fine. Dont let people shame you into using the CLI all the time if you don’t want to. It’s good to have a high level understanding so you can deal with things when the GUIs play up, but day-to-day usage is totally fine in a GUI. I like gitg because of how simple it is, but I like the Git integration in VS Code, and Jetbrains IDEs (Rider, WebStorm, etc) too. I’ve heard good things about GitKraken but it felt a bit slow last time I tried to use it.

    When you do want to have the repo on a self-hosted server for your own use, you don’t actually need anything fancy like Gitlab or Gitea. Technically all you need to do is copy the repo from your computer onto the server and set up a Git server on it. That’s it. Git works over SSH, so you’d just add a “remote” that points to the server.

    The best place to start with that is probably the official documentation: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols

    The repo on the server is not really any different to the one on your computer. All you’re doing when pushing is synchronizing them - pushing new changes from your local repo into the one on the server.

    Where web UIs have an advantage is that they make it easier to browse the repo, show it to others, have pull requests and CI support, etc. Lots of value-add features on top of Git itself.

    I’d highly recommend Forgejo instead of Gitea. The Forgejo site has a list of reasons why, so I don’t go over that in detail. Forgejo is what powers Codeberg, so you could try Codeberg first, then if you like it, self-host the exact same system. Note that Codeberg only allows open-source projects.


  • danAtoLemmy Shitpost@lemmy.world•Pro gamer move.
    link
    fedilink
    arrow-up
    45
    arrow-down
    2
    ·
    3 days ago

    I think you need to be an uninsured American to really appreciate this joke. Ambulance coverage is $55/year where I’m from (Melbourne Australia), including air transport when needed. I’m in the USA now but ambulance rides are covered as part of the copay for ER visits ($100 on my plan).



  • If you do buy refurbished drives, ideally get manufacturer refurbished ones that come with a manufacturer warranty. If you’re in the USA, ServerPartDeals is a great store for it.

    Manufacturer refurbished drives tend to be pretty reliable because they’ve been tested to meet the manufacturer’s specs, usually including a deep stress test, and come with a warranty from the manufacturer.

    The thing that sucks at the moment is that refurbished drives cost more than the new ones used to cost.




  • There’s definitely some negatives about data centers.

    However, there’s also a lot of misinformation. All the data centers in the entire USA use less than 1/20 of the water consumed by golf courses, and modern designs use closed-loop water cooling rather than the older evaporative cooling. Evaporative cooling is the type that uses a lot of water.

    I live in Silicon Valley, and most of the data centers here are in Santa Clara County. 65% of the water usage by data centers is recycled water.


  • Yeah, the last mile problem is definitely an issue in some areas. There’s been some attempts at solving it (like bikes or scooters you can rent) but the best solution is to have more transit-oriented development. I love the pedestrian malls in cities like San Mateo and Mountain View for example - streets that are close to the train and blocked off from cars. It’s a nice vibe for a downtown.

    Part of the rising costs are unfortunately because people think that transit should try and make a profit, and thus don’t want to fund it even more.

    In reality, all cities with great public transit see it as a service to the community, and treat it as a cost center rather than a way to try and make money. It’s the same as other government services like parks, firefighters, public schools, police, public libraries, etc. Their aim isn’t to make money!


  • I already upgraded to a heat pump water heater because my old gas one was getting pretty old. The new one was only $400 or so with all the rebates last year: 30% federal tax credit, Tech Clean California rebate, Peninsula Clean Energy rebate in San Mateo County, and some other rebate for putting it in TOU mode (essentially turns it off from 4 to 9 pm during peak electricity rates - I monitor the temperature via Home Assistant to ensure it doesn’t drop too low).

    That included the water heater itself, a new electrical circuit from the main breaker, and a pump and drain line for the condensate.

    The recovery time is slower, but we upgraded from a 50 gallon gas to a 65 gallon heat pump which helped. It’s just my wife and I, but we haven’t had issues with running out of hot water.

    It only uses around 500-550W when running in heat pump mode. It has resistive heating (like an old-school electric water heater) if it ever needs to heat more quickly, but we just have it in heat pump mode all the time.

    There’s some models that just have the heat pump (no resistive heating), and those ones can plug into a regular 120V outlet.


  • This is great. Transit doesn’t just benefit the people that use it; it benefits drivers too. Caltrain carries the equivalent of three lanes of highway 101 traffic. A reduction in service would significantly worsen traffic.

    Having said that, I don’t doubt that there’s mismanagement in the various agencies. Why are there so many different transit agencies that each do their own budgeting, planning, etc? Seems like a lot of overhead. I’m from Melbourne Australia and we also have multiple transit agencies, but everything is overseen by the local government and they handle the planning.




  • See if your CPU has integrated graphics - you could use that.

    I was going to say that you could get a low end graphics card like an RX550, but even those have gone up in price. They originally sold for $70 for the 4GB model and were around $30-35 second-hand before everything went up.

    Avoid low-end Nvidia on Linux, as they become VRAM-constrained. Nvidia’s Linux driver doesn’t let GPUs swap to system RAM like AMD’s and Intel’s do.

















Moderates