I absolutely love ❤ your videos, they hold immense value. Creating functional features is great, but ensuring they are developed in a way that facilitates easy maintenance is a whole different level. Thank you for your videos, and you truly deserve many more subscribers.
Excellent video! thank you! Could you centralize all the error logs in the same handler? and so when there is an exception monitor it either in a file or in a database. How do you manage the whole log system for a robust application?
@@gamenation9706 There are if-else. If you have a defined enum to switch over, it's more clear and performant to first switch on the enum and inside the case statement do an additional if-else. If you somehow think if-else is ugly, there is the State Pattern. You can also take other architectural decisions ahead of time to make sure you have precomputed enum values that you could use in a match ($enum) statement without additional if-else. switch (true) or match (true) is a huge code smell. You're either trying to be too fancy or you're fixing problems that you shouldn't have in the first place.
I absolutely love ❤ your videos, they hold immense value. Creating functional features is great, but ensuring they are developed in a way that facilitates easy maintenance is a whole different level.
Thank you for your videos, and you truly deserve many more subscribers.
Thank you so much! This means a lot!
Excellent video! thank you!
Could you centralize all the error logs in the same handler? and so when there is an exception monitor it either in a file or in a database.
How do you manage the whole log system for a robust application?
excellent
Nice!
Comment for the algo
Yikes, switch(true) is such a nasty language feature. Pls avoid
I wish we had range matching like in rust but that's not the case unfortunately 😕
Could you suggest a better way to do it please ?
@@gamenation9706 There are if-else. If you have a defined enum to switch over, it's more clear and performant to first switch on the enum and inside the case statement do an additional if-else.
If you somehow think if-else is ugly, there is the State Pattern. You can also take other architectural decisions ahead of time to make sure you have precomputed enum values that you could use in a match ($enum) statement without additional if-else.
switch (true) or match (true) is a huge code smell. You're either trying to be too fancy or you're fixing problems that you shouldn't have in the first place.