• 4 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • I’ve owned 3 Subarus over the last 15 years. Drove the first two for years with 0 issues. 75k+ on both. First was a lease then buy out and was offered a great deal on the second to trade in. Only got rid of the second due to a change is need for a personal car. When I had a need again I got a third which I’m only at about 60k on but plan to drive this one as long as it’ll go. Only thing I’ve done so far outside oil changes and other routine stuff was brakes. Which I consider routine.

    Another reason is swear by them is AWD in a very snowy climate without SUV gas mileage.





  • Compartmentalize things so they all handle one thing individually and then you call those things from a main class is generally the way you’d do it.

    Splitting things up will make your classes specific to a certain functionality and allow you to keep track of everything without individual files being thousands of lines, though sometimes they will end up that way anyway to achieve a single piece of functionality.

    So for example you might have a service to call the api to get data, a service that exclusively posts to mastodon, etc.

    You can write 500 lines of code to do something in your service and hide it away but then just call it like petInfoService.getPetInfo() from your main class and when you look at the flow it’ll make a lot more sense.

    Any reason you chose typescript out of curiosity? Nothing wrong with it, just curious.

    Feel free to post code if you need help. Just make sure whatever you’re posting or uploading to git doesn’t include any API keys.