• 0 Posts
  • 93 Comments
Joined 1 year ago
cake
Cake day: August 19th, 2023

help-circle


  • More or less the same but the user gets passed as a method parameter each time. Validators would be in my opinion a long function inside the service also with named variables like this because it’s just easy to read and there are no surprises. I’d probably refactor it at around 5 conditions or 30 lines of validation logic.

    I recommend trying out using the constructor in services for tools such as a database and methods for data such as user. It will be very easy to use everywhere and for many users and whatever

    const passwordIsValid = ...
    if (!passwordIsValid){
      return whatever
    }
    


  • I always thought of the “how” being better explained by the code itself where you can see string.replace(" ", "\ ") as the actual fix while the message says the “why”.

    I would still have “Fix a bug where strings containing whitespace break CSVExporter” as my go to message.

    I guess our viewpoints are different based whether we want the commit messages to represent tasks or changes. They both have their uses of course. Looking at changes to a file to know what people have done to it is better with a “changes” type message but looking at the history to check “did we actually complete this or was it just marked as completed in the issue tracker?” is better with a task based message.

    Task management where every issue is put on a ticket and tracked would my type of messages obsolete but at my current company theyre very useful.




  • https://www.iea.org/countries/china/

    Not a tanky or China apologist but it’s actually doing fine (not great but very well might be soon).

    Here’s the information you’re looking for. China is doing a lot of things right and is ahead of schedule. They’re making good progress on electrification and their renewables are growing exponentially at an insane rate.

    They’re still addicted to coal but with the developments in solar and wind and a very large geography and energy storage programs they’re going to be phased out and really fast in the coming years.

    Given the fact that they’re pretty much producing everything for western economies and is recently industrialised China is actually doing fine. They emit a lot less per person than the average European while producing goods for 2x their population.

    It might sound weird but China is one of the countries that’s actually taking climate change seriously.









  • I feel like a lot of people here assume that you’re going to be automatically arrested when going to DPRK but it’s not completely true. You can get easily arrested and you have to follow strict cultural/government imposed rules.

    The DPRK previously has done a “put it’s best foot forward” and keep tourists in a bubble where you’re not allowed to take pictures or videos unless in specifically permitted zones. It’s essentially a propaganda tour.

    So you definitely can go to the DPRK as a tourist but for the love of god follow their rules to the letter.



  • I bought a used desktop with 4 SATA ports. Has i5 7th gen and currently 5 TB and an 500GB SSD and has max ram of 64GB. I guess the HDD are not included in the price?

    I’m not sure what your software requirements are but if you go the DIY route a desktop works. I made the BIOS auto turn on on power restored and have services start on startup so it gives the server feeling.

    Bonus is that you can use it as a gaming server and upgrade the components easily for a while depending on the motherboard.