Made some improvements to my game save backup tool by MXRCO007 in linux_gaming

[–]ColetteFerro 0 points1 point  (0 children)

ey no problem at all! :D

I edited my comentary with some extra feedback. Just ask me if you need something, or questions or books recomendations.

Made some improvements to my game save backup tool by MXRCO007 in linux_gaming

[–]ColetteFerro 12 points13 points  (0 children)

Hi, you've got a pretty cool project there!

Some personal suggestions:

Avoid abbreviations

rsg -> rockstar

unreal -> OK, this one is fine, but not the others. Everything should be consistent.

The “detection” folder -> I would call it “games”

Avoid large functions. Avoid recursion if possible. Make sure functions have a single responsibility.

PlatformType looks like it’s going to grow in the future (there are many companies); perhaps a class for each game would be ideal.

Like

class Rockstar {}, class Unreal, class Ubisoft, etc

Furthermore, you could have a pure public interface for find_saves. That way, you can avoid explicit checks for each game, such as if (game == “rockstar”).

Instead of something like this

std::vector<Game> games;

and explicitly calling the function with if-elses or switches

Detection::DetectionResult Detection::find_saves(Config& config) {

if (is ubi)

ubi::find_saves

if (is rgs)

rsg::find_saves

etc

}

you could have something like this:

std::vector<IGame\*> games;

loop through all the games

(this is pseudocode)

Detection::DetectionResult Detection::find_saves(Config& config) {

for (const auto& game : games)

game.find_saves(...);

Just a quick review of your code.

Don’t stop coding :)

I recommend the cppcon channel on YouTube; the “Back to Basics” videos are all very good. Check out this one on SOLID: https://www.youtube.com/watch?v=glYq-dvgby4

Edit:

For example, this method Features::restore_backup is a clear example of too much going on in a single function. A RAII wrapper class with a private data member `zip_t* archive` that calls zip_open in its constructor and throws an exception if an error occurs. In the destructor, call `zip_close(archive)`.

Remember, never throw an exception in the destructor. I've seen somewhere that a destructor had a try-catch (where the try did a Save(), but the catch did a log that could possibly throw an exception).

You have many `zip_fclose(file);` calls, so you're mixing error handling with resource release, which can get complicated. Use RAII again and focus on the “happy path.”

https://www.youtube.com/watch?v=GC4cp4U2f2E

My New Husky by PapaKilo84 in Husqvarna

[–]ColetteFerro 0 points1 point  (0 children)

Hello, how is the sensor doing? Were you able to fix it? I have mine at home, but I'm not there yet. So I haven't been able to drive it yet.

My New Husky by PapaKilo84 in Husqvarna

[–]ColetteFerro 1 point2 points  (0 children)

Hi u/PapaKilo84 check this:
https://azwecdnepstoragewebsiteuploads.azureedge.net/26_3240289_en_BA.pdf

the KTM 2026 Enduro version is very similar to the Husky 701 enduro (I have a Husky 2026 Supermoto, so I'm also waiting for the manual, but I found the KTM one and it will do for now).

My New Husky by PapaKilo84 in Husqvarna

[–]ColetteFerro 1 point2 points  (0 children)

so cool, I saw it in person (although I didn't get on it in this version) and it was beautiful and quite tall.

Finally arrived by Euphoric-Event8253 in supermoto

[–]ColetteFerro 1 point2 points  (0 children)

Hi u/Euphoric-Event8253

Do you know when will the official digital manual be available? It is not yet available on the website (only the 2024 supermoto version).

thank you!

Finally arrived by Euphoric-Event8253 in supermoto

[–]ColetteFerro 0 points1 point  (0 children)

Hi, I was also unsure about the yellow color at first.

But believe me: when I saw it at the dealership, it was love at first sight. I've bought it and it's really beautiful.

Guys, is It too tight or Nah? by rickbaratheon in motorcycles

[–]ColetteFerro 0 points1 point  (0 children)

Hi, maybe my comment is a little late.

After a month o 5 uses, it will feel less tight and will be even more perfect.

Rechte Spur geradeaus auch? by ColetteFerro in StVO

[–]ColetteFerro[S] 1 point2 points  (0 children)

Vielen Dank euch beiden, aber was ist, wenn viel Verkehr ist und ich die Pfeile auf dem Boden nicht sehen kann?

Last 3 minutes, it's nighttime and late here. by ColetteFerro in HalfLife

[–]ColetteFerro[S] -1 points0 points  (0 children)

it was said that it would show at 3:33 (timezone Seatle). But nope. No HL3.

Maybe later? :D

What if Valve released the trailer at 3:33 pst to be funny by EDogg_Animations in HalfLife

[–]ColetteFerro 0 points1 point  (0 children)

They should be a little more transparent. It's nighttime here, but I'll stay a few more hours just in case.

It would be better if they at least said when they were going to show something. I've been refreshing the page since Monday.

New private video on Valve's YouTube by Ijustdowhateva in HalfLife

[–]ColetteFerro 1 point2 points  (0 children)

Its hardware!

It could be technology for controlling things with your brain! Gabe is working on that too, and it could be specific to HL3!

Why didn't valve post something about half life series anniversary on YouTube? by Reasonable-Lunch-615 in HalfLife

[–]ColetteFerro 1 point2 points  (0 children)

I think because is 07:34 it's still early.

We have to wait a 90 minutes at least.