• 3 Posts
  • 301 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.









  • Don’t know why you would jump to that conclusion straight away. Mín billable hours and time spent thinking on the problem is a thing. Taking regular 5m breaks (pomodoro technique) also helps with getting things done and so on and people should be paid for it.

    I mean, you should technically stop the clock if the wife calls to ask if there’s pasta at home but nobody really cares.

    Adding significant amount of hours to a report would not be ethical but adjusting 10% to get paid for time laying in bed thinking about problems is still ethical from my point of view. It’s way more value than most meetings.

    Your cultural context way vary.





  • One of the things LNG has over coal is that it’s very easy to turn off and on in case cheaper sources aren’t producing enough. LNG plays much better with renewables and coal also produces ton of pollution and particulate matter. It’s the lesser of two evils when there are no methane leaks.

    Methane leaks will still punch the climate in the gut so any leaks are unacceptable and all methane gas needs to be accounted for.

    Both obviously need to be replaced with renewables and large cost efficient energy storage. Hydrogen is attractive since energy doesn’t degrade over time, pumped hydro for weekly to monthly high quantity and power, flywheels/lithium batteries to stabilise the grid frequency, heat storage with district heating for households and redux flow batteries with massive containers for winter/summer differences.