If you can, using something like Dropbox for backups is probably easier.
You might run into complications if your backup drive is formatted in a different format than what Linux usually reads. E.g. if your harddrive is formated in NTFS, which is what Windows uses. Linux usually uses EXT4 or some other options.
It's possible to setup Linux to read NTFS and FAT32, but it wasn't trivial last time I tried.
In 2023 probably about 95% of games work without any effort. 98% work if you're willing to fiddle with it. When looking at games I want to play, I basically just assume that it works.
Further, everything else is easy as well. Bluetooth headphones that used to not work, work now. Printing is very easy. Only scanning is still hard.
I haven't used Windows since 2013. I've been using Linux exclusively for about a decade now.
In my 16 years of working as a professional software engineer I've never had to change the data source.
Also again, Eloquent is already a repository essentially. It will handle e.g. Postgres or MySQL similarly in around 90% of cases. So as long as you use the Eloquent query builder you should be fine for most cases. The rest you just need to fix manually if you really want to change data sources. That's inevitable either way.
Why not static calls? If you instantiate a class each time you make a database call it makes the code harder to read, because when you're looking class instance variable, you don't know if something has been called on it to alter properties inside it. You'd have to scroll up to where it was instantiated, and then follow the code down to where you call the method you were looking at, and make sure that no other methods were called before it on the instance that could make it behave differently.
When you see a static call, you know exactly what it's doing without having to look at code before it. This is one of the reasons people like functional programming.
If you inject the repository class through the constructor, and other function in the class could have altered something in the repository before. I just makes the code less predictable.
Of course, most people don't put functions in their repository classes that alter class properties. But you never know.
One way just requires me to be familiar with Laravel functionality. The other needs me to be intimately familiar with the code base I'm working on.
I'm actually not a fan of repositories. Especially not when mapped one to one with models. I mean Eloquent practically is a repository already.
The problem is that most database queries that I need to run don't just pull from one table. So I prefer to have service classes or something similar that group functionality together.
Eloquent query builder code is also easy to read. I don't have to guess what it's doing or look inside to know what it's doing. With a repository class I'd like to have to go look inside the class to see what a function is doing.
So for simple queries I prefer to just use Eloquent right where I need it. Even in controllers. If all I want to do is return a list of users in an API endpoint, why do I need it to go through a separate class when I just just do return new UserCollection(User::paginate());
It's one line.
For more complicated queries and especially queries that will be reused I put in service classes.
What you want probably isn't Laravel workers to execute Node processes. You probably want Node workers that read from message queues that you write into from Laravel.
Do you have specific reasons why your code needs to be in Laravel and specific reasons why the job needs to be Node?
Yeah, my feeling is that you'd want to use a different queue implementation. Not Laravel's own. I don't think Laravel's queue implimentation is meant to work well with non-Laravel services. You want messages that are language and framework agnostic.
I'd start by Googling how to use message queues with Node, and then work backwards from there to Laravel.
Calculating on demand based on line items is bad practice because things can change after an order is placed, for example refunds.
I wouldn't say it's bad practice.
You can store the tax rate at the time of the invoice. You do need to make sure that everything the calculations are based on though is stored in the invoice table. I'd actually store tax rate on the invoice items rather. In many countries the tax rates on different items can differ.
Discounts are line items on the invoice. Refunds will generally be in a separate table, like credit_notes or something. Which will have a reference to the original invoice.
I generally only store 'redundant' or 'pre-calculated' data when it's needed to speed uploading times.
I think you should use Mac or something rather if you want that. Adobe is never going to support Linux.
If a company wants to support Linux, having many distros won't deter them. Just test on the top 3 or 4. Should be very similar anyway. If it works on one, the Linux community will make it work on the rest.
We also already have 90% of Windows only games working on Linux as well. Linux doesn't have to stop being Linux to get better.
Yeah, but there are so many frameworks out there, it's almost unthinkable that anyone's own inhouse framework will work better for them than all the other ones out there. There would almost certainly be an existing good one that would work better for you than your inhouse one.
Nothing wrong with you having a side hustle and using 3rd party packages. Especially from vendors like Spatie. Jetsteam isn't 3rd party.
Also nothing wrong with them rejecting you for it. Not everyone wants the same thing or agrees on everything. I think they're silly, but it's their prerogative.
If you can, using something like Dropbox for backups is probably easier.
You might run into complications if your backup drive is formatted in a different format than what Linux usually reads. E.g. if your harddrive is formated in NTFS, which is what Windows uses. Linux usually uses EXT4 or some other options.
It's possible to setup Linux to read NTFS and FAT32, but it wasn't trivial last time I tried.
Only competitive FPS games where people tend to use wall hacks and aim bots.
I play Diablo II and III, StarCraft II, Valheim, Seven Seas, and many other multiplayer games without having to do any tweaking.
A lot has changed in the last 5 years. These days when I want to play a game I just assume it works out of the box.
Very few games don't work anymore. Only really some online FPS games with anti-cheat, which isn't really my jam anyway.
In 2013 almost no games worked on Linux.
In 2023 probably about 95% of games work without any effort. 98% work if you're willing to fiddle with it. When looking at games I want to play, I basically just assume that it works.
Further, everything else is easy as well. Bluetooth headphones that used to not work, work now. Printing is very easy. Only scanning is still hard.
I haven't used Windows since 2013. I've been using Linux exclusively for about a decade now.
Docker runs better on Linux. On MacOS it needs to run in a VM. On Linux it runs directly on the host machine. It's a lot faster that way.
When using Linux, your local environment will also be a lot more like the servers where your code will likely ultimately run on.
Just a feeling, or did you see something that makes you think this?
I don't think many people outside of our small Linux communities give a shit about Linux.
This will never be a reality. Not even with paid software.
About 10 years ago gaming on Linux was really hard. And in many cases basically impossible. Now it's super easy for the most part.
You'll need Vue or React.
https://tanstack.com/table/v8/docs/adapters/vue-table
In my 16 years of working as a professional software engineer I've never had to change the data source.
Also again, Eloquent is already a repository essentially. It will handle e.g. Postgres or MySQL similarly in around 90% of cases. So as long as you use the Eloquent query builder you should be fine for most cases. The rest you just need to fix manually if you really want to change data sources. That's inevitable either way.
Why not static calls? If you instantiate a class each time you make a database call it makes the code harder to read, because when you're looking class instance variable, you don't know if something has been called on it to alter properties inside it. You'd have to scroll up to where it was instantiated, and then follow the code down to where you call the method you were looking at, and make sure that no other methods were called before it on the instance that could make it behave differently.
When you see a static call, you know exactly what it's doing without having to look at code before it. This is one of the reasons people like functional programming.
If you inject the repository class through the constructor, and other function in the class could have altered something in the repository before. I just makes the code less predictable.
Of course, most people don't put functions in their repository classes that alter class properties. But you never know.
One way just requires me to be familiar with Laravel functionality. The other needs me to be intimately familiar with the code base I'm working on.
I'm actually not a fan of repositories. Especially not when mapped one to one with models. I mean Eloquent practically is a repository already.
The problem is that most database queries that I need to run don't just pull from one table. So I prefer to have service classes or something similar that group functionality together.
Eloquent query builder code is also easy to read. I don't have to guess what it's doing or look inside to know what it's doing. With a repository class I'd like to have to go look inside the class to see what a function is doing.
So for simple queries I prefer to just use Eloquent right where I need it. Even in controllers. If all I want to do is return a list of users in an API endpoint, why do I need it to go through a separate class when I just just do
return new UserCollection(User::paginate());It's one line.
For more complicated queries and especially queries that will be reused I put in service classes.
What you want probably isn't Laravel workers to execute Node processes. You probably want Node workers that read from message queues that you write into from Laravel.
Do you have specific reasons why your code needs to be in Laravel and specific reasons why the job needs to be Node?
Yeah, my feeling is that you'd want to use a different queue implementation. Not Laravel's own. I don't think Laravel's queue implimentation is meant to work well with non-Laravel services. You want messages that are language and framework agnostic.
I'd start by Googling how to use message queues with Node, and then work backwards from there to Laravel.
Maybe start by reading this article. https://blog.logrocket.com/scale-node-js-app-using-distributed-queues/
I think probably though you can simplify your stack by just removing Laravel from the equation.
I wouldn't say it's bad practice.
You can store the tax rate at the time of the invoice. You do need to make sure that everything the calculations are based on though is stored in the invoice table. I'd actually store tax rate on the invoice items rather. In many countries the tax rates on different items can differ.
Discounts are line items on the invoice. Refunds will generally be in a separate table, like credit_notes or something. Which will have a reference to the original invoice.
I generally only store 'redundant' or 'pre-calculated' data when it's needed to speed uploading times.
I can confirm. I run Manjaro and had all of those happen to me.
Isn't Arch or Manjaro on there?
So everyone should stop building things they want because you think it will make Linux better?
I think you should use Mac or something rather if you want that. Adobe is never going to support Linux.
If a company wants to support Linux, having many distros won't deter them. Just test on the top 3 or 4. Should be very similar anyway. If it works on one, the Linux community will make it work on the rest.
We also already have 90% of Windows only games working on Linux as well. Linux doesn't have to stop being Linux to get better.
I can justify all of them. Their creators wanted to create them.
Linux is for tinkerers. So people are going to tinker and try things. It's not some big company that has a strategy to corner the market.
Yeah, but there are so many frameworks out there, it's almost unthinkable that anyone's own inhouse framework will work better for them than all the other ones out there. There would almost certainly be an existing good one that would work better for you than your inhouse one.
He probably means minimal JS. As soon as your JS becomes a lot, you're going to need a good framework.
Blade was good back in the jQuery days. Now I would strongly recommend only every using it for email templates. Not web frontend.
Nothing wrong with you having a side hustle and using 3rd party packages. Especially from vendors like Spatie. Jetsteam isn't 3rd party.
Also nothing wrong with them rejecting you for it. Not everyone wants the same thing or agrees on everything. I think they're silly, but it's their prerogative.
You could use Laravel Passport too, with the password grant. Though it's not security best practice. But for a hobby it's probably fine.
https://laravel.com/docs/9.x/passport#password-grant-tokens