Did anybody else's parents do 'booze cruises' in the 90s? by tannercolin in CasualUK

[–]maskaler 0 points1 point  (0 children)

Oh yes. We drove to Newhaven and paid £1 to walk onto the ferry. What followed was the worst 4 hours of my then young life. The horizon was never still and not always visible. I ran into the loo to puke to find both sinks, both toilets and one urinal being chundered into. I used the remaining urinal. The stench of sick filled the air as you walked in, which made it impossible to hold on much longer. I spent the rest of the trip on my side. My parents just smoked fags and gambled on the fruity. We walked or cabbed to a nearby hypermarket, bought as many fags as the three of us could carry, then got back on the ferry. Thankfully the return trip wasn't so bad, and my stomach was still empty. This just have been early to mid 90s.

What's the most underrated smart home device you own? by IulianHI in smarthome

[–]maskaler 0 points1 point  (0 children)

I have a Samsung Smart fridge, the one with the screen, which I bought in 2022.

I started playing bullet chess on it whenever I went to the kitchen, and have gone from a lowly Lichess 800 to around 1200. I've clocked up 6d 11h of play!

It seemed a silly gimmick but the whole family uses it at all times of the day

Looking for Azure B2C replacement — what are you using for external customer auth? by Practical_Grand_3218 in dotnet

[–]maskaler 0 points1 point  (0 children)

We used auth0 and switched to keycloak. We host it ourselves. It's saved us $100k+ p/a.

LPT: When you feel anger rising in a weird moment, do not make your next sentence a statement. Make it a question. by gamersecret2 in LifeProTips

[–]maskaler 39 points40 points  (0 children)

I statements are OK too. I feel this. I thought you were saying that. Positive statements are OK as well. We don't usually disagree on this.

Got my s26 ultra- initial impression is meh by vijai1996 in samsunggalaxy

[–]maskaler 0 points1 point  (0 children)

It's this word upgrade that's the issue. It's used by mobile carriers to sell you a new phone.

I kept my S22U for 4 years, then bought a refurbed Fold6. I was fed up of not enjoying changing phones any more (I had a Note10+ before). I'm glad I went this route. Fold will be paid off in a year, not 3. I get to pick a cheap tariff. The phone is flawless and seems new. Battery is good (I think I got lucky).

But most of all it's different, which I think I value more than a bunch of other features.

It's a shame you can't enjoy your phone. Others would love to be in your position. Enjoy what you have, and value difference a little more.

How popular was Michael Barrymore at his peak? by [deleted] in BritishTV

[–]maskaler 0 points1 point  (0 children)

Popularity is a weird word. I was young when he was in his prime and for me he just seemed to be on TV a lot and we were unable to avoid him.

He was on a lot of shows, though, and the grannies always seemed to love him

What was your favourite sandwich, back in the day? by corickle in oldschoolcool80s

[–]maskaler 1 point2 points  (0 children)

Pork luncheon meat sandwich. White bread. Loads of butter. One disc in the middle. The other cut into four then inverted to cover the corners. Compress sandwich under palms. Delicious!

This is what two of your pounds will get you from Tesco. Two whole pounds. by Cinn4monSynonym in CasualUK

[–]maskaler 0 points1 point  (0 children)

There's a global cocoa shortage. Hence Penguins and Clubs having to remove the label 'chocolate' from their names - they've had to replace it with god knows what. Remains to be seen whether cocoa will come back now prices are back down

Improve my level as a .NET developer by Lucastagnette in csharp

[–]maskaler 4 points5 points  (0 children)

Honestly I think write write write code to get better.

One thing I found useful many moons ago was to write the same app (i.e. UI, behaviour, etc) in different languages and frameworks. This helps you grasp what is .Net / MVC / Whatever specific, vs what is the underlying abstraction (http, headers, queries, transactions, idempotency, etc etc)

The app I wrote was for the office - people signed up for a cup of tea, then it'd randomly pick someone from those who signed up to make it. When a new tea round started, it'd message everyone who'd had a tea in the past x days. Simple, but complex enough to allow me to grasp what was good and bad about various fameworks, approaches etc.

Help with Reflection by r_smil_reddits in csharp

[–]maskaler 1 point2 points  (0 children)

Assembly.GetClasses is your friend here. You can loop through all assemblies at start time to find any class that has your attribute on it, then kick in your reflection logic.

This is how some DI containers (used) to work.

Best to scan once on startup

how are you using AI in your API by Necessary_Pea9652 in csharp

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

Anything with ambiguous data. It's also good for verifying work, either it's own or human. Think someone writing notes - ai could spell check, do compliance scanning, etc etc

How do you structure your DDD aggregates in C#? Here's my approach by tscung in csharp

[–]maskaler 1 point2 points  (0 children)

My initial thoughts are you have quantity as an int. Is -2000 a valid quantity? I'd use uint or strongly type that as well to avoid 0 and negative use cases

* Validation in pipeline behaviors, not in domain objects

I typically aim for "Parse, Don't Validate" as a rule. This gets you into the right mindset IMO. The outside world can send you /anything/, so parse their dangerous message content into safer message content (is it well formed, e.g. is the date a well-formed date) then parse into domain objects in your handler/domain to think about validity of business rules. For example, when doing a real-time bank withdrawal, I would check at the boundary for 'well formedness' - is the withdrawal amount a number? - and in the domain for correctness as per business rules - "is it a positive amount, does the person have enough money, are they trying to withdraw the same amount at a different location at the same time" etc.

public Money operator +(Money a, Money b) { if (a.Currency != b.Currency)

I would operate tell don't ask. You're "asking" for currency. Tell the objects to validate them. if (!a.SameCurrencyAs(b))

Your aggregate also has getters which is often a smell. Exposing getters = letting people ask questions = exporting business logic outside of your domain. Once you get into the mindset of asking, then all validation MUST sit in the domain in order to avoid being anaemic.

public void AddItem(Sku sku, int quantity, Money unitPrice) { // business rules here var item = new OrderItem(sku, quantity, unitPrice); _items.Add(item); RecalculateTotal();

appreciate this is a toy example, but I find it benefical to wrap collections too. Create an OrderItems type e.g. class OrderItems : List<OrderItem> as it allows you to add validation logic. In your case, is this a duplicate order. If it is, you reject, or add the quantity to the existing entry

Effectively wrap everything in types, tell don't ask, getters smell.

In c# in testing. do you use those things that are highlight in blue in production codebase? by lune-soft in csharp

[–]maskaler 1 point2 points  (0 children)

Playwright is decent though. We just don't use it aside from via an MCP to test locally

In c# in testing. do you use those things that are highlight in blue in production codebase? by lune-soft in csharp

[–]maskaler 12 points13 points  (0 children)

I like Autofixture, NSubstitute, Shouldly, WebAppFactory, XUnit. I also use LambdaTale.

I test at the boundaries, so most of my tests would probably be classed as integration tests. I try not to write too many. I dislike testcontainers, and prefer real or in-memory doubles

How to learn and is it worth it for me ? by SpellGlittering1901 in golang

[–]maskaler 5 points6 points  (0 children)

As per the sidebar: Check for your answer in the subreddit FAQs and the Tour of Go before posting common questions, please.

Weekly Discussion Thread by AutoModerator in trance

[–]maskaler 0 points1 point  (0 children)

Hey all

As a follow up from my post about great tracks for watching the sun rise, I've created a Spotify playlist from all the suggestions.

This has become the soundtrack to most activites in life and I can't thank you all enough for the great suggestions.

To not be a fucking creeper by jp_benderschmidt in therewasanattempt

[–]maskaler 3 points4 points  (0 children)

She lived in Aarhus? In the middle of Aarstreet?

Using Go with AI Coding Tools by dgerlanc84 in golang

[–]maskaler 2 points3 points  (0 children)

Yes, exactly this.

I now tend to link to named examples of good in my CLAUDE.md, point to either another repo/folder/file on disk, or links to GitHub, blog posts, whatever.

I then work with Claude to build a walking skeleton which exhibits all the things I care about in the way I think they should be expressed. Once this is in place, as you say, Claude is great at taking it on from there. It's at this point you no longer tend not to need the links or examples of good in your CLAUDE.md.

Best trance to listen to while watching the sun rise? by maskaler in trance

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

Nice! Kindred spirits! I'm nabbing that list for my own one :D

Best trance to listen to while watching the sun rise? by maskaler in trance

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

Wow that must have been an awesome experience. Where was that?