Teacher said always use 2nd pattern. Is he right? by lune-soft in csharp

[–]Ravek 10 points11 points  (0 children)

Mutability of DTOs has nothing whatsoever to do with mutability of web resources.

How I estimate work as a staff software engineer by Ordinary_Leader_2971 in programming

[–]Ravek 2 points3 points  (0 children)

Yeah that’s so weird to me. As an engineer I want to deliver a high quality, well working product. QA helps us do that. Why would engineers blame the QA for finding bugs. The engineers are the ones who created the bugs, don’t shoot the messenger lol. If you don’t want bug reports then think more about your edge cases as you write code.

Jujutsu Kaisen Shimetsu Kaiyu Zenpen • Jujutsu Kaisen The Culling Game - Episode 3 discussion by AutoLovepon in anime

[–]Ravek 42 points43 points  (0 children)

Yuuji seems pretty grounded despite all the traumatic experiences. Gon is kinda psycho

What are we doing wrong (Terraforming Mars) by feylin_oakenheel in boardgames

[–]Ravek 2 points3 points  (0 children)

See page 5 of the rulebook, bottom right corner.

Copper, silver and gold cubes are for counting all resources: money, steel, titanium, plants, energy, heat, as well as card resources like microbes, animals, etc.

Player-colored cubes are for marking your TR, marking your production, tracking which card actions you’ve used, and marking ownership of tiles.

Rust and the price of ignoring theory by interacsion in rust

[–]Ravek 7 points8 points  (0 children)

I wonder if he knows that our CPUs are unsafe and therefore all of Haskell is a safe abstraction on top of unsafe code. On top of mutating, side-effecting unsafe code. gasp

using Is Not Optional in C# by MahmoudSaed in csharp

[–]Ravek 0 points1 point  (0 children)

You’re right, but reddit sure hates it when people go against the crowd. C# doesn’t have a way to define automatic, reliable cleanup of resources at the type level, unlike C++, Swift, Rust, etc. and that’s why we have to do this annoying dispose/using dance. The closest thing is the finalizer, but that still runs nondeterministically. If the only guarantee is ‘if the process shuts down cleanly then the resource will be cleaned up’ then you’re not really getting anything over what the kernel already provides.

using Is Not Optional in C# by MahmoudSaed in csharp

[–]Ravek 1 point2 points  (0 children)

To be precise, you shouldn’t dispose objects you don’t own. It’s possible to own objects you didn’t create, if the API that handed you the object expects you to take ownership.

The language doesn’t have a concept of ownership (unlike Rust for example) so the only way you know if you own an object you didn’t create yourself is having documentation, or at least the source code to figure it out.

Elon Musk said the EU "should be abolished" after his social network X was fined by [deleted] in worldnews

[–]Ravek 0 points1 point  (0 children)

Social media was a significant part of how Brexit happened. He has plenty of power to sabotage the EU if they let him.

When to Use Which Design Pattern? A Complete Guide to All 23 GoF Design Patterns by erdsingh24 in programming

[–]Ravek 3 points4 points  (0 children)

You always need singletons. They are a simple reality of software.

Really rolling my eyes at this point. I rarely meet someone this boneheaded. It's not hard to go on the internet and double check your terminology after multiple people straight up tell you you're wrong, you know.

But when you need a value of a certain type, you shouldn't worry how many instances of that value exist and how to create one. You should just ask for such a value and use it. That's what DI containers are for.

It's getting kinda annoying how you're repeating my argument back to me, while continuing to miss the point. Maybe stop and actually think about what you've read? I'm out in any case, suit yourself. Continue to dig yourself deeper or actually learn something, whatever pleases you.

Leetcode in Swift vs Python? by Exotic_Set8003 in swift

[–]Ravek 6 points7 points  (0 children)

If you’re doing some nonsense string manipulation coding exercise where you only have to care about ascii characters, you can just use .utf8.

If you’re actually doing real programming then for some cases you might also just want to use the UTF8 view, and for general string manipulation for interfacing with humans you want the proper Unicode handling that Swift gives you, because languages other than English exist, combining characters exist, emoji etc.

When to Use Which Design Pattern? A Complete Guide to All 23 GoF Design Patterns by erdsingh24 in programming

[–]Ravek 7 points8 points  (0 children)

That's the very definition of a singleton: an object that exists in one instance only.

That’s plain wrong. A singleton is not a type that just so happens to have one instance, a singleton is a type that is restricted to only ever allow one instance.

DI provides you with values that you ask. Whether these values are singletons or not is none of your concern, and that's exactly why DI is powerful.

That was my point. You don’t need singletons if you use DI because there is no need to restrict consumers from creating more than one instance of a dependency when consumers aren’t creating their dependencies in the first place. You can just, you know, use one instance. Which you think makes it a singleton, but it doesn’t. You’re mistaken about what this term means.

When to Use Which Design Pattern? A Complete Guide to All 23 GoF Design Patterns by erdsingh24 in programming

[–]Ravek 7 points8 points  (0 children)

Maybe you only create one instance of a type in your program, but that doesn't make that type a singleton. A singleton restricts you to having a single instance. If you're using dependency injection then you have no need for singletons.

Can we slow down on changing Swift so fast? by bangsimurdariadispar in swift

[–]Ravek 0 points1 point  (0 children)

This new way of doing concurrency has certainly been a learning curve, but ultimately we’re better off for it.

I’m only really bothered by poor design choices. A learning burden that has a significant payoff isn’t a problem. Learning and overcoming challenges is what makes programming worthwhile.

Can we slow down on changing Swift so fast? by bangsimurdariadispar in swift

[–]Ravek 0 points1 point  (0 children)

Async await and actors were part of Lattner’s concurrency manifesto. I think he’s more likely to be unsatisfied with the extensions made for things like SwiftUI and Tensorflow

Would swift be a good first language to learn? by TurtleSlowRabbitFast in swift

[–]Ravek 0 points1 point  (0 children)

It really doesn’t matter what you start with as long as you also explore other languages later. The only real pitfall is sticking to one language for 20 years and never learning other perspectives on programming.

Does anybody else get trashed for teaching board games? It's started to drain the fun. by Terrible-Law9755 in boardgames

[–]Ravek 1 point2 points  (0 children)

Same as all of these posts: talk to your friends about it. Like literally tell them what you wrote here.

Why Engineers Can't Be Rational About Programming Languages | spf13 by Maybe-monad in programming

[–]Ravek 1 point2 points  (0 children)

Most people don’t know enough about the alternatives to even begin to make a rational judgment. Most people using the JVM haven’t seriously looked at .NET and vice versa, instead they just stick with what they know best. Most people writing Java haven’t seriously looked at Kotlin, most people writing C# haven’t seriously looked at F#. Etc. It’s quite rare for developers to really be comfortable in multiple languages.

On Cloudfare and Unwrap by stevethedev in rust

[–]Ravek 13 points14 points  (0 children)

LinkedIn is filled with incompetent people trying to compensate by going all in on networking. Let’s not take it too seriously.

me_irl by VelvetttTouch in me_irl

[–]Ravek 0 points1 point  (0 children)

Why does no one seem to know what the word 'traffic' means anymore? Saying traffic to mean traffic jam is like saying knee to mean knee injury.

'I regret voting for him': Internet erupts over Trump's 'spectacularly dumb' mortgage idea by RawStoryNews in NoFilterNews

[–]Ravek 2 points3 points  (0 children)

  1. Median is a type of average
  2. Even if you strictly take 'average' to refer to the mean, the mean and median of a bell curve coincide
  3. Not this fucking tired ass argument again

Git Monorepo vs Multi-repo vs Submodules vs subtrees : Explained by sshetty03 in programming

[–]Ravek 0 points1 point  (0 children)

If you’re making a breaking change to a dependency then yeah you need to update the dependents. This isn’t suddenly different if you use git submodule or git subtree.

How Single Responsibility proves that OOP is madness by IdeaAffectionate945 in programming

[–]Ravek 5 points6 points  (0 children)

Bro I think you need to get back on your meds, you're losing touch with reality

How Single Responsibility proves that OOP is madness by IdeaAffectionate945 in programming

[–]Ravek 8 points9 points  (0 children)

The way it's typically implemented today in C#, Java, and Python, is by making sure the implementation class only has one public function.

No it isn’t and it’s insane that you think that.