• 0 Posts
  • 121 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
    }
    


  • We might already have reached peak carbon emissions. There’s also the thing where renewables are so much cheaper that it’s in most countries best self interest to build renewables.

    The thing the world is doing now is more energy but the cheapest one is electricity so more electricity. The duck curve is an energy storage opportunity that’s being taken advantage of more and more. Things are heading in the right direction but it’s not fast enough.

    The next emissions on the chopping block are household heating and cement and low-med industrial heat with more advanced heat pumps or heat pumps set up in series.

    I’ve decided to become cautiously optimistic recently the more I learn about how science is advancing the renewables despite governments sometimes being in the way.





  • 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.






  • SS7 protocol for 2G and 3G is vulnerable to man in the middle attack, easy to spy on people with. They use a walled garden approach al the primary defence mechanism and you can gain access through in for the low low price of couple of thousands of USD.

    Couple of exploits are intercepting or monitoring calls and texts and triangulating position by checking what cell towers are in range.




  • As a sidenote here I have a different issue where handing people your CC info is basically handing out the private keys to your bank account to a third party.

    I’d really like it if a credit card would use a public key system where you can verify that I have the funds and that the payment originates from the payment provider instead of getting my full CC details. I don’t really see why it’s necessary for a business to know who I am instead of just getting a green light from Mastercard or Visa to make the payment.