• 0 Posts
  • 131 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.











  • There is nothing preventing business from running without making a profit as long as they pay any expenses or bonds that are due.

    The current tech setup depends on high stock valuations. They issue stock, sell it at a high rate and use that to pay expenses. The sale of stock does not count as net positive in revenue since they are effectively selling a part of their business to investors, making them “owe” their new shareholders equal the amount they gained from them.

    As long as investors are interested and the business is growing it’s possible to keep this going for a long time and never pay taxes since they spent everything they gained.

    If they are not able to pay their expenses they will have to file for bankruptcy like every other business, whether it’s restructuring bankruptcy, transfer of ownership of dissolution.

    So why can’t small businesses do the same? They absolutely can, but the money they get from selling stock is nowhere close. These tech companies are sold sometimes at 20x the revenue where small businesses are likely going to get 20x profit or less.