• 0 Posts
  • 53 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle








  • I don’t think it’s because you grew up poor. It’s because why would you buy coffee everyday?

    I buy coffee almost everytime I’m at an airport or a train station, but that’s like… once every two months? If I would commute by train, I wouldn’t buy coffee everytime I’m at the train station, I would just wait until I’m in the office to grab a cup.

    But I did buy a coffee daily, when I was in university. There was no way to get a coffee besides buying one, so I bought one. So I think thats the main thing about buying daily, necessity. Some companies only have paid machines, so you buy a coffee daily when at work. In school or university you don’t have a coffee machine available, so you buy one daily.






  • DrM@feddit.detoProgrammer Humor@lemmy.mlAverage TS developer
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    8 months ago

    The main problem with JavaScript and TypeScript is that there is such a little entrybarrier to it, that way too many people use it without understanding it. The amount of times that we had major issues in production because someone doesn’t understand TypeScript is not countable anymore and our project went live only 4 months ago.

    For example, when you use nest.js and want to use a boolean value as a query parameter.

    As an example:

    @Get('valueOfMyBoolean')
    @ApiQuery(
      {
        name: 'myBoolean',
        type: boolean,
      }
    )
    myBooleanFunction(
      @Query('myBoolean') myBoolean: boolean
    ){
      if(myBoolean){
        return 'myBoolean is true';
      }
      return 'myBoolean is false';
    }
    

    You see this code. You don’t see anything wrong with it. The architect looks at it in code review and doesn’t see anything wrong with it. But then you do a GET https://something.com/valueOfMyBoolean?myBoolean=false and you get “myBoolean is true” and if you do typeOf(myBoolean) you will see that, despite you declaring it twice, myBoolean is not a boolean but a string. But when running the unit-tests, myBoolean is a boolean.







  • DrM@feddit.detoProgrammer Humor@lemmy.mlNo rest for the virtuous
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    edit-2
    8 months ago

    I don’t really code in my free time, every merge request for a FOSS project I wanted to do so far was for company projects where a feature was missing or buggy. My GitHub and Gitlab accounts are full of outdated forks we needed for a minor change in the FOSS project which I was not allowed to merge upstream