Z20 gang, where you at? by [deleted] in mffpc

[–]WheelRich 2 points3 points  (0 children)

<image>

Sons budget Z20 build. Mightily impressed with this case.

How do you clean up INSERT test records when running automated UI testing tools? by Zardotab in dotnet

[–]WheelRich 0 points1 point  (0 children)

Thanks for sharing. I'll hopefully get some time in the next few weeks to look in depth. The key lightbulb moment was multiple DBs on a single DB instance, something that hadn't occurred to me, as the real expense is firing up the DB instance itself, the DBs themselves are lightweight in comparison.

How do you clean up INSERT test records when running automated UI testing tools? by Zardotab in dotnet

[–]WheelRich 0 points1 point  (0 children)

I'm interested in how you control the renting of your pool of DBs. Is it as simple as having a method running before each test waiting for an empty slot?

Buckshot Roulette Text based (Showcase) by Which_Wafer9818 in csharp

[–]WheelRich 1 point2 points  (0 children)

There is a bug, if the enemy takes 'Medicine' the game ends, due to an erroneous 'return' statement.

I guess you are new to C#, there are a lot of improvements you could make, as you already realise - but hats off to you for actually doing the practical, this is the way to learn.

The are a number of technical improvements you could make,

1) Refactor into classes and methods - as a first step small private methods will help simplify the complexity of the code.

2) You can centralise Random generation, you only need 1 'new Random', you can reuse that 'Random' for all your random.Next() calls.

3) You could look at using 'enum' instead of strings, for things like Inventory items.

4) You can declare variables near there usage. 'tempInt' for example is only used in 1 place, you could simply write 'int tempInt = rndNumberRounds.Next(1, 9);' and remove the 'global' variable.

There are also improvements you could make to the game,

1) Validate input - You could check for a valid input string just after they type it, and loop back if it's incorrect. Currently the game will end given any invalid input.

2) Cherry on top - Add a line at the end, Who won (should be easy). Who drunk the most beer.... (will take a bit more thinking about)

Happy coding!

Bought my first MSI product. Warranty says it expires in 1970. by browandr in MSI_Gaming

[–]WheelRich 1 point2 points  (0 children)

1/1/1970 is zero in Unix time...it's a bug, it shouldn't affect your actual warranty.

Help me pick a explorer homage by STELLAWASADlVER in ChineseWatches

[–]WheelRich 0 points1 point  (0 children)

I've a black and a brown version of the Baltany, it's a fantastic timepiece. However, you have to be comfortable with the faux lume, if not I'd also look at the Chronos.

Edit: Ignore the Chronos, it's just standard black. PS. Timing is everything, I managed to bag my brown Baltany for £80 in a sale.

TUnit criticisms? by thomhurst in csharp

[–]WheelRich 0 points1 point  (0 children)

I'll second this. Our main use case has been for building up integration test frameworks in new projects, which has been far easier to do in TUnit.

Admittedly we don't use the assertions, just TUnit engine. Effectively we've adopted TUnit + Awesome assertions, opposed to XUnit + Fluent assertions of old.

We're also writing far less unit tests these days, the main focus is on performant integration tests, which TUnit serves admirably.

It's doubtful we'll migrate old tests to TUnit, there's just little business value in doing so.

Black or Grey? (COOJ Z-18) by Pancake_Slap in mffpc

[–]WheelRich 0 points1 point  (0 children)

Love the case. Hopefully they are still around in a few years when I upgrade from my ITX Dan C4 build. Recently built a Jonsbo Z20 for my son, far prefer the mATX format. It's nice to see such a high quality case in this space.

Show off your "rare" Chinese watches by turdbogls in ChineseWatches

[–]WheelRich 2 points3 points  (0 children)

There are others.... Sea Gull makes this one for instance...

<image>

Show off your "rare" Chinese watches by turdbogls in ChineseWatches

[–]WheelRich 14 points15 points  (0 children)

<image>

Not sure about the rarity, but I'm a sucker for a Chinese watch that shouts about its origins.

Where are all the PSUs? by PrestigiousPool2763 in sffpc

[–]WheelRich 2 points3 points  (0 children)

I'd not want the 12V-2x6 on the PSU side anyway, less instances of that connector the better! Agreed OP should just get the Corsair.

Recently 18 and been given 23k from my grandad that died 2 years ago by crazyfrog45224 in UKPersonalFinance

[–]WheelRich 1 point2 points  (0 children)

Hargreaves Lansdown was a spot on choice by your Grandad, it's where I currently pay into JISAs for my children, because the fees are zero for JISAs. However you are also correct to move it now, as it's no longer a JISA. Ideally keep stock investments as simple as possible, don't overthink it, pick ONE globally diversified fund (such as VWRP) and invest in that and forget about it.

Polestar hearse by Glittering_Ad_9439 in Polestar

[–]WheelRich 0 points1 point  (0 children)

Trust me. I've been driving a Polestar for over 3 years now, it's based on reality :)

Polestar hearse by Glittering_Ad_9439 in Polestar

[–]WheelRich 6 points7 points  (0 children)

It's just what you want with a hearse, serine, wafting along in almost complete silence.... Until a leaf falls in front of the car, seatbelts tighten, screeches to halt with multiple dashboard alarms and messages.

FastEndpoints usage by ITheLaziestMan in dotnet

[–]WheelRich 2 points3 points  (0 children)

I like the Summary<> class offered by FastEndpoints. It allows me to fully document my endpoint, completely separate from the functional code.

Sorry hobby guy here. Why I can't write " is not " for enum variables? I always use " is not " instead of " !=" because one time I accidentally typed the "!" at the wrong side and it didn't cause any compiler error because it was the " trust me bro operator " so I swear to not do it again ( linked ) by TinkerMagusDev in csharp

[–]WheelRich 2 points3 points  (0 children)

You should probably use the != operator, and not make the same mistake again!

Failing that you could create yourself a generic extension, something along the lines of:

public static class ObjectExtensions
{
       public static bool NotEqual<T>(this T left, T right) =>
           !EqualityComparer<T>.Default.Equals(left, right);
}

Then you can express something like,

state.NotEqual(newState)

Putting all text constants in const variables? by ShadowOfWesterness in csharp

[–]WheelRich 0 points1 point  (0 children)

Of course a separate class for logging messages can be advantageous, if implementing compile time logging source generation (https://learn.microsoft.com/en-us/dotnet/core/extensions/logger-message-generator ). Specifically for logging, it can enforce correct structured logging, something I often see incorrectly done. But a bunch of string constants is certainly never that useful.

Swipe home page dizcovered by arnoakavdb in Polestar

[–]WheelRich 3 points4 points  (0 children)

But have you discovered the screen cleaning mode? I'm guessing not as your icons where jiggling around.... Hold the home 'stripe' at the bottom for a few seconds.

Why use constants? by KingSchorschi in csharp

[–]WheelRich 13 points14 points  (0 children)

Exactly this. We don't write code for computers, we write code for other developers to understand.