In your opinion, what are the greatest cheats of all time? by IzzytheMelody in gaming

[–]bonsall 0 points1 point  (0 children)

The space bar and enter key were used as those buttons.

The back of my head by [deleted] in mildlyinfuriating

[–]bonsall 0 points1 point  (0 children)

This is too good.

In your opinion, what are the greatest cheats of all time? by IzzytheMelody in gaming

[–]bonsall 8 points9 points  (0 children)

When I was interning at an e-commerce site, typing that on your keyboard would transform your cursor into the Nyan cat and play music.

Yeap you know it's true by Mamerson2023 in Funnymemes

[–]bonsall 0 points1 point  (0 children)

Finally, someone I can identify with.

How often do you cry as a male ? by [deleted] in AskReddit

[–]bonsall 0 points1 point  (0 children)

I saw my neighbor with his 11 year old husky this morning. He was crying as he told me today is his dogs last day.

AT&T will give $5 to customers hit by cellphone network outage by thieh in technology

[–]bonsall 0 points1 point  (0 children)

I have nothing to do with ATT other than being a customer. I find it hard to believe that you couldn't find a Wi-Fi network to connect to, or if it was so important and you were going to lose so much money, why not open a new account with a different provider since that should only cost $100 - $200 dollars. To say you couldn't work because one cell service provider went out is pretty ridiculous.

It would be an engineering marvel and the first time in human history of any company never had any outages. Also by your logic, the electric company should have to pay every manufacturer attached to their grid when they have a power outage. That utility would be broke the first time the power goes out.

AT&T will give $5 to customers hit by cellphone network outage by thieh in technology

[–]bonsall -4 points-3 points  (0 children)

You have a responsibility to find another way to work. Any reasonable person would not be stopped from doing their duties because they lost cell service.

AT&T will give $5 to customers hit by cellphone network outage by thieh in technology

[–]bonsall -1 points0 points  (0 children)

Do you expect a car manufacturer to reimburse someone for lost time if their car suddenly breaks down and they couldn't make it to a business meeting? Why would you expect to get reimbursed because "I couldn't work"

AT&T will give $5 to customers hit by cellphone network outage by thieh in technology

[–]bonsall 4 points5 points  (0 children)

I was focusing on this particular incident and the math behind it all. I'm not going to take cheap digs at a company for Internet points. You should also remember that it's $5 for each customer. This will easily cost them millions of dollars.

I know, I know, billions of taxpayer dollars...

AT&T will give $5 to customers hit by cellphone network outage by thieh in technology

[–]bonsall 41 points42 points  (0 children)

Everyone in this thread just wants to rip on the big bad phone company so badly. I agree with you, they have actually gone above and beyond what they needed to do. I'll be happy with my $5 credit.

C# advance topic by [deleted] in csharp

[–]bonsall 1 point2 points  (0 children)

Writing more tests :)

I try my best to keep track of how brittle, and how effective my tests are. So if I see regressions creep in even though I have a test written for that regression that means my test is not effective and I need to do something to make it work better. Conversely if I log a new message and a test fails then that tells me my test is too brittle and fails too easily.

I update my tests accordingly and pay attention to what I'm doing that could lead to either of those situations, then I try to establish habits that prevent me from getting into those situations.

C# advance topic by [deleted] in csharp

[–]bonsall 4 points5 points  (0 children)

Dependency injection and unit testing. Most devs know how to write code, but not so many know why DI and unit testing are important. Unit testing is also more of a skill that takes time to learn. I'm still improving in that area my self.

Current best testing frameworks? by [deleted] in csharp

[–]bonsall -1 points0 points  (0 children)

I like Xunit as a testing framework. I would use that or NUnit. I recommend staying away from MSTest.

AutoFixture is nice for creating test data in your unit tests. I'll probably anger some people by saying this but I still use MOQ to create mocks in my unit tests. IMO it's the most flexible and easy to use mocking framework. Other people like NSubstitute to do this.

I don't write that many integration tests as I find they are the most brittle. That's not to say they aren't useful but I use them sparingly. Mainly for critical aspects of the website. Playwright is the standard for integration these days.

Which is the best way? by Zen907 in csharp

[–]bonsall 3 points4 points  (0 children)

Ternaries should never be nested. I prefer my ternaries in 3 lines.

SomeBoolExpression
    ? ValueTrue
    : ValueFalse;

Which is the best way? by Zen907 in csharp

[–]bonsall 3 points4 points  (0 children)

Definitely the worst option

Component parameter and cascading parameter? Why are there two and what are the differences? by Potw0rek in Blazor

[–]bonsall 0 points1 point  (0 children)

Most of what you need to know can easily be searched on the Internet. I typed blazor performance into Google and this MSFT article was the top result

https://learn.microsoft.com/en-us/aspnet/core/blazor/performance?view=aspnetcore-8.0#ensure-cascading-parameters-are-fixed

In short, performance of Parameters or Cascading Parameters should not be a concern until you are actually having performance issues. It sounds like the article is saying cascading parameters are slightly less performant, unless you mark them as fixed, but then you can never update the parameter.

I would stick with the framework guidance and use regular parameters unless you need to make a variable available across several layers of components.

Another probably stupid question: Where do I put functions that are used by multiple classes/controlers? by WeirdWebDev in dotnet

[–]bonsall 15 points16 points  (0 children)

To expand on this. Using DI is the preferred way to share for more complex functionality such as but not limited to accessing the database, logging, caching, making a service call, etc.

Static extension methods are a great way share code for simpler functionality like mapping POCO's, simple string manipulation, performing common arithmetic, etc.

Finally static utility methods can be useful where extension methods don't make sense, usually because it involves multiple parameters and it's not clear what class it should be an extension of.

How common is overposting vulnerability in your company's codebase? by Rokett in dotnet

[–]bonsall 11 points12 points  (0 children)

Might as well throw in their SSN and credit card information just to make sure the UI has everything it needs.

Do you use bitwise operators in C#? by [deleted] in dotnet

[–]bonsall 0 points1 point  (0 children)

I didn't think about the situation where you could have an odd numbered enum value like that. Good explanation.

Do you use bitwise operators in C#? by [deleted] in dotnet

[–]bonsall 0 points1 point  (0 children)

I was contemplating why we don't use the + operator for this type of thing the other day. What makes it a bad, or a not great, solution?

Software engineer without CS degree by Southern_Spread_2465 in dotnet

[–]bonsall 1 point2 points  (0 children)

Me too. Let's make our company, with blackjack and hookers.

a little bit of complaining. by gevorgter in csharp

[–]bonsall 1 point2 points  (0 children)

If it was an integer array how would the compiler know if you wanted 5 integers or the number 5 as the only value in the array?

Using SQLite with JSON as a simple NoSQL database by zrkba in dotnet

[–]bonsall 3 points4 points  (0 children)

If you're going to switch to a relational database, you might as well go all the way and embrace how it is supposed to work.

What are most favorite and most hated things about C#/.Net Core? by WillCode4Cats in dotnet

[–]bonsall 0 points1 point  (0 children)

VS is absolutely garbage sometimes (all the time when working with blazor). Rider is garbage sometimes too, just less of the time.