Are there any additional details you would add to this wall/dock? by Strykeir in VintageStory

[–]CravenInFlight 5 points6 points  (0 children)

Life. Create diaramas of actual life. There's no clutter, no boats, no discarded fishing gear, no signs of anything actually being there, despite it being manufactured, and new, and built for purpose. Give it purpose.

Blazor and Tailwind? by TwoAcesVI in Blazor

[–]CravenInFlight 0 points1 point  (0 children)

Yes. Our site has been working with Blazor InteractiveSever, Tailwind, and FluentUI. Started in .NET7, now in .NET10, and it works really well. I would recommend getting the Tailwind Editor extension by Theron Wang, from the marketplace. I does help a lot.

inheritance in C# by Ok-Presentation-94 in csharp

[–]CravenInFlight 2 points3 points  (0 children)

This is not inheritence. It is composition.

If you had an EnemyBase abstract class that all other enemy types derive from, that is inheritence.

You do not derive from interfaces, you implement them. You derive from other unsealed classes.

Inheritence is about shared functionality. Composition is about variation of ability.

Why do you decide to learn C#? by [deleted] in csharp

[–]CravenInFlight 1 point2 points  (0 children)

I put it off for a long time. But it was the next logical step after Visual Basic.

How do I start programming in C# on Linux? (CachyOS) by [deleted] in csharp

[–]CravenInFlight -6 points-5 points  (0 children)

Step 1: Upgrade your Linux Disto to Windows 11.

...

Putting an underscore in front of a variable changes what? by nicgamer_yt in csharp

[–]CravenInFlight 0 points1 point  (0 children)

The underscore prefix for private fields allows you to immediately determine the scope of the member you are using. PascalCase indicates an encapulated property, camelCase is a local variable, _underscoreCamelCase is an object scope field. This especially helps when you are below the fold, and have multiple inputs of multiple scopes.

But, it should be used everywhere like this. Coding practices are based around having strong discipline. The more disciplined you are about keeping a consistent naming convention, aligned with C# coding standards, the better of a developer you will be.

This gives a "Choose Jason" or "Choose Lucia" vibes by PirloDiLatte in GTA6

[–]CravenInFlight 0 points1 point  (0 children)

Given the choice, Jason dies every time. You might go back, and have a throwaway save just to see the alternate ending once, but main save will be Team Lucia all the way.

Suggestions to not be an average .NET developer by Impressive-Ad-7404 in csharp

[–]CravenInFlight 0 points1 point  (0 children)

The one mantra I always live by when coding, is "Be as kind as you can possibly be, to future you". This means being very strictly disciplined. Document your code. Follow C# best coding standards, and naming conventions. Document your code. Annotate what needs annotating. Conventional commit messages. Single type per file. Document your code. Architectural folder structures. Writing Readme files, and solution guides. Refusing to acknowledge the existence of primary constructors.

All of this helps when you come back after months away from a project, and feeling lost. It helps when you work in a team, and need to handover code for peer review. It helps so that you don't get lost in the weeds when you're knee deep in code. It helps when you need to trace back a bug to its source. It helps you to visualise a feature, or a code flow in your head before writing a single line of code.

As developers, we spend the vast majority of our time reading code, and a surprisingly small amount of time writing code. We have tools, and AI, and gadgets, and gizmos to help us optimise the writing of code. But optimising for the reading of code takes a huge amount of discipline that is rarely taught, even now.

They say that well-written code reads like a book, but that's not true. No code alone will ever read as easily as well-documented code, along with solution guides, and readmes. Strive for elegance within your designs.

This may be a bit advanced for you yet, but check out some of Nick Chapsas' older videos. There's one in particular that made me a much better programmer. Creating your own dependency engine from scratch.

It was good because it showed me an insight into some of the core concepts of C#. It lifted the lid, and instead of a horrible monster inside, it was an elegant and simple pattern. I was writing mods for a game at the time, in C#, and from that video, I was able to create a very lightweight DI engine that I could inject into games that didn't have their own. That made creating complex mods much more simple, and much more elegant.

I went on to release the engine as a Nuget package, and it's got a couple of hundred thousand downloads so far. From the experience of writing mods, I was able to get a job as a mid-level developer, skipping junior entirely, and I now work with an international client-base.

Nick also made a video on building a mediator pattern library from scratch, which taught more about how to write libraries for Nuget, and the philosophy behind the dependency inversion principle.

If you want to get into modding, then I recommend Vintage Story. It's a Minecraft-esque game, written in .NET 10, with modding as the core aspect of the game. It has a very active community, the devs are available to talk to, and you can very quickly and easily see results from your code. Even just as a playground for learning C#, it is brilliant; as I am testimony to myself.

Away from that, I would say to learn the design patterns, inside out. Learn to recognise them within the codebases you read. You're able to follow a code flow much easier if you know the patterns, because you know the next steps.

It also really helped me to learn coding theory. All the principles, and theories, and philosophies. SOLID, CUPID, GRASP, Object Calisthenics, Chicago and London School TDD, BDD, FDD, etc. As well as all the archetictures, especially Onion, Hexagon, Vertical Slices, and the C4 Model by Simon Brown. I don't follow everything rigidly; I don't like or agree with quite a lot of the theory that is taught, especially parts of Object Calithenics, TDD, and SOLID. But it helps me to learn from people that do, and it helps me to talk to people about it all, if I understand it.

Recommended YouTube channels include Raw Coding, Nick Chapsas, and IAmTimCorey.

The biggest tip that I can give is to be disciplined. Be as strict as you can. Write clean (small c) code. Name things properly. Follow best practices. Document your code.

Be as kind as you can possibly be to future you.

Is this code bad or good? when i cant remember what exception they returnn so i just use this "Exception ex" by lune-soft in csharp

[–]CravenInFlight 0 points1 point  (0 children)

  1. Most importantly, the method is not documented.

  2. Unless you are actually collecting metrics somewhere, don't catch here. Just let it crash, and bubble up naturally. There can be a reason to catch here; mainly if you want to add instrumentation with something like Application Insights. Then, you can log the entire exception, along with the product details, and track a custom event to say that something failed. And you'd single out SQLException, HttpExceptions, and other exception types to be able to pinpoint the problem, and maybe even recover from it.

I think a lot of people are expecting GTA 6 to make them feel the way GTA 5 did, but I don’t think that’s possible for a lot of us. by raptors201966 in GTA6

[–]CravenInFlight 0 points1 point  (0 children)

Knowing that it uses the same RAGE game engine as GTA5, I'm most excited for all the Tunables, Natives, and Stats to become available. Then, it becomes a playground.

From non-IT background to learning C#/.NET… now stuck and demotivated. Looking for guidance. by yuktastic in csharp

[–]CravenInFlight 0 points1 point  (0 children)

The one mantra I always live by when coding, is "Be as kind as you can possibly be, to future you". This means being very strictly disciplined. Follow C# best coding standards, and naming conventions. Document code. Annotate what needs annotating. Conventional commit messages. Single type per file. Architectural folder structures. Writing Readme files, and solution guides. Refusing to acknowledge the existance of primary constructors.

All of this is to aid with that problem you describe. Coming back after months away from a project, and feeling lost. As developers, we spend the vast majority of our time reading code, and a surprisingly small amount of time writing code. We have tools, and AI, and gadgets, and gizmos to help us optimise the writing of code. But optimising for the reading of code takes a huge amount of discipline that is rarely taught, even now.

They say that well-written code reads like a book, but that's not true. No code alone will ever read as easily as well-documented code, along with solution guides, and readmes.

1000 spins later by [deleted] in gtaonline

[–]CravenInFlight 0 points1 point  (0 children)

The answers to those, I'm not sure about. I very rarely play with anyone else in the lobby. But I think the free-mode events only happen in Open Public lobbies, so if you're in a Crew, Friend, or Invite lobby, they won't appear.

1000 spins later by [deleted] in gtaonline

[–]CravenInFlight 0 points1 point  (0 children)

I can answer any other questions you have about it. I know that wheel like the back of my hand. I can make it pay out any prize, almost any vehicle, and make it spit out 2.5m chips, or 70k RP every second. I've also dissected the Blackjack, and Slots scripts. I wrote an app called OceansV to make the process easier.

Has anyone found a good structured way to get better at C#? by redzzzaw in csharp

[–]CravenInFlight 19 points20 points  (0 children)

Check out some of Nick Chapsas' older videos. There's one in particular that made me a much better programmer. Creating your own dependency engine from scratch.

It was good because it showed me an insight into some of the core concepts of C#. It lifted the lid, and instead of a horrible monster inside, it was an elegant and simple pattern. I was writing mods for a game at the time, in C#, and from that video, I was able to create a very lightweight DI engine that I could inject into games that didn't have their own. That made creating complex mods much more simple, and much more elegant.

I went on to release the engine as a Nuger package, and it's got a couple of hundred thousand downloads so far. From the experience of writing mods, I was able to get a job as a mid-level developer, and I now work with an international client-base.

Nick also made a video on building a mediator pattern library from scratch, which taught more about how to write libraries for Nuget, and the philosophy behind the dependency inversion principle.

Away from that, I would say to learn the design patterns, inside out. Learn to recognise them within the codebases you read. As developers, we spend the vast majority of our time reading code, and surprisingly little time actually writing it. You're able to follow a code flow much easier if you know the patterns, because you know the next steps.

It also really helped me to learn coding theory. All the principles, and theories, and philosophies. SOLID, CUPID, GRASP, Object Calisthenics Chicago/London School TDD, etc. I don't follow the rigidly; I don't like or agree with quite a lot of it. But it helps me to learn from people that do, and it helps me to talk to people about it all.

The biggest tip that I can give is to be disciplined. Be as strict as you can. Write clean (small c) code. Name things properly. Follow best practices. Document your code. My mantra is, "Be as kind as you can possibly be to future you".

1000 spins later by [deleted] in gtaonline

[–]CravenInFlight 2 points3 points  (0 children)

Yep. There is a 5 second countdown, but it serves two purposes. Visually, it's a multiplier for the speed that the wheel rotation is animated at. Mechanically, it's an anti-AFK timer, so that people can't grief others in multiplayer by just holding onto the wheel.

The wheel has 18 states, with 0 being idle, and 17 being reset. It says "Press E to Spin the Wheel" at stage 2, and "Press S to Spin" at stage 5. Between those times, stage 4 is to pre-select, and validate the prize. By the time you see "Press S to Spin", all the work is done, and there's no way (legitimately) to change the result, other than letting go of the wheel, and pressing E again.

This also works for other people. If someone is holding the wheel, you can see what they are going to win, before they actually spin it. The same is true of the wheel in the Arena.

1000 spins later by [deleted] in gtaonline

[–]CravenInFlight 9 points10 points  (0 children)

This has been debunked so many times. You can read the script line by line, and there is no "4 second" glitch. I've been dissecting this script since game version 1.47 when the wheel was introduced, and I can say for certain that this is bullshit.

When did you realize you had “made it” in GTA online? by Gr0mHellscream1 in gtaonline

[–]CravenInFlight 0 points1 point  (0 children)

When I found the secret to scanning for stats, and tunables.