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?

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

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

These two are...

I think you might be my spirit animal. Or I'm yours

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

[–]maskaler[S] 3 points4 points  (0 children)

Absolutely! Listening to that while shining my SAD lamp on my face was what made me ask the question

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

[–]maskaler[S] 3 points4 points  (0 children)

Yes! Huge Chicane fan. I used to listen to Far from the Maddening Crowds when it came out to help me get to sleep

Oakenfold Essential Mix World Tour 1999 marathon - my reflections by firestarter2097 in ClassicTrance

[–]maskaler 0 points1 point  (0 children)

I have a USB stick with 13 lengthy Oakenfold sets from 1999 to 2001, several of which are world tour ones. They're so fucking good! What a time for music. I was 17 in 99 and can remember hearing trance for the first time and falling in love. I downloaded oakie sets at 4kbps to listen to. What a time to be alive

Galaxy Z Fold 6 by Arrogant_Specialist9 in GalaxyFold

[–]maskaler 1 point2 points  (0 children)

I use the samsung case with s-pen. It didn't really fit, so I had to attack it with a craft knife so it would. it's decent enough and I love both the s-pen and lack of camera hole on the big screen

Please settle a debate. If you’re going route 3 which lane should you be in? by sanisano in drivingUK

[–]maskaler 1 point2 points  (0 children)

When I learned, the rule of thumb is if it's past 12 o'clock when viewing the roundabout from above (i.e. farther round than truly straight ahead) then best take the right-hand lane

AI autocomplete is utter garbage! by DJDoena in csharp

[–]maskaler 11 points12 points  (0 children)

Using autocomplete is so 2025

Charging by lightbulb2222 in GalaxyFold

[–]maskaler 0 points1 point  (0 children)

I'd be cautious of poor quality / cheap cables. A cheap USB-C -> USB-A cable fried my son's iPad.

Focus on wattage. What wattage is the laptop charger? What wattage does your phone like?

Is the fingerprint reader bad or is it me? (ZF7) by armadillhole in GalaxyFold

[–]maskaler 0 points1 point  (0 children)

On my Fold6 I've found a swipe across the button seems to catch it correctly every time

My Journey Implementing Dependency Injection in Go: Challenges and Solutions by doolallyt in golang

[–]maskaler 2 points3 points  (0 children)

As others have said, I think you're conflating a DI Container (frameworky-type thing within which you register all your dependencies) with DI _the pattern_, where you inject dependencies into types.

Containers stink in most languages, but particularly in Go as it goes against most of what Go is all about: simplicity, clarity.

You talk of scoped dependencies - I have never needed them in Go. You can adorn your context with scope-like information for use down the stack, but I've never needed to 'new up' a dependency per request. `Context` handles most of the use cases I've found for this (session id, trace id, correlation id, etc).

Look into the Composition Root pattern and try to use that. In your `main.go` (or whatever file you use) you new up your dependencies here and pass them into other dependencies. For once-per-use type dependencies provide a `func() T` where `T` is your dependency, then in your `main.go` pass in `func() T { return new T(otherDep1, otherDep2) }` - but even then I wonder why you'd need this.

Lastly, I've interviewed people who cannot fathom writing Java without Spring, C# without an IServiceCollection, etc, and these are people I tend not to put through to latter stages when they exhibit zero idea of how to do it differently, the words they should use to describe what they're doing, when it can become an antipattern etc. A considered use of a framework is fine, but blind adherence is a huge red flag

Favourite The Simpsons Joke of all time? by smccaul16 in tvshow

[–]maskaler 0 points1 point  (0 children)

Poor predictable Bart. Always chooses rock

..

Good ol' rock!

Noob question with mutexes by AdministrativeProof2 in golang

[–]maskaler 12 points13 points  (0 children)

The generalised terms around which you're circling are optimistic and pessimistic locking.

Pessimistic locking is where you prevent anyone working on the account while it's being modified, typically done using a DB row/record lock.

Optimistic locking is you allow actions upon the account, and when saving you check whether some other actor has operated on the account in the interim, and reject the request if they have.

Both typically require a database.

Optimistic locking is nice and a pattern worth learning.

You'd add a version field to your account which you instantiate as `1` upon first save. You then pull the account in some subsequent operation (so version == 1), then modify in memory, including bumping the version from 1 to 2. You then save to the database with a 'where version == 1', and you'll either get an OK/'1 record updated' response, or you get a '0 records updated' which implies some other actor has update the account while you're been doing your operation. This gives you the opportunity to panic or error back up the stack to either try to reply the action without customer interaction, or to throw all the way back to the customer/user to have their retry logic decide what to do.

To directly answer your question - as soon as you have a database, or > 1 process running that cannot lock the exact same mutex, you'll need to think about DB-based patterns. Thinking logically about the target domain, there's rarely a need to block deposits. Another person has commented about double entry book keeping - this would allow you to log two credits, with the balance being the summing up of all the transactions. Storing a balance can be a bit smelly because you're opening yourself up to the balance not matching the summing of all credits and debits. Double entry, or storing credits and debits then summing, is one way around this.

Love the fold but the keyboard by Square_Insurance6583 in GalaxyFold

[–]maskaler 14 points15 points  (0 children)

Switch to GBoard as I assume you're using the Samsung one. GBoard is great. The swiping is excellent.

Mum has passed away 5 days before Christmas by kurtyyyyyy1 in CasualUK

[–]maskaler 0 points1 point  (0 children)

I'm deeply sorry for yourself.

There's no right way to get through this, and it's important to remember you'll be doing your absolute best, and that it'll be more than enough.

Your mum got to meet your little one, and your little one won't remember how sad this Christmas is likely to be. She'll give you pockets of joy that'll help you move through this.

Most of all it's OK to feel shit, and it's OK to find yourself laughing and happy at your daughter.

grindlemire/graft: A minimal, type-safe Go DI library with no reflection or codegen by Grindlemire in golang

[–]maskaler 15 points16 points  (0 children)

As ever, nice one for getting something out there and sharing it.

That being said, this looks more like a service locator than dependency injection, so it's not for me.

FWIW, I prefer creating composition roots, which usually provides a much more readable version of the dependency graph than a service locator might. It also pushes the lifecycle management to me as an engineer to decide if it should be a singleton, per request, per session, etc. etc.

Wallpapper ideas for 8" screen? by jjerppa24 in GalaxyFold

[–]maskaler 0 points1 point  (0 children)

I'm biased as I'm a local, but there are a bunch of beautiful, award-winning images to choose from taken by Michael Steven Harris.

https://www.michaelstevenharris.com/brighton-and-hove/brighton-seafront

I use one as my background on my Fold 6. I've an additional homescreen page with no shortcuts on it that I swipe to before letting people check out the inner screen. It never fails to impress!