porgamrer

joined 1 year ago
[–] porgamrer@programming.dev 1 points 3 months ago

eh, i really did look for a joke. all i see is a "well actually" opinion that somebody here probably holds

[–] porgamrer@programming.dev 2 points 3 months ago (2 children)

Yes if you remove all frivolity I'm sure the joke will be funnier

[–] porgamrer@programming.dev 2 points 4 months ago (1 children)

I definitely agree on the last point. Personally I like languages where I can get the compiler to check a lot more of my reasoning, but I still want to be able to use all the memory management techniques that people use in C.

I remember Jonathan Blow did a fairly rambling stream of consciousness talk on his criticisms of Rust, and it was largely written off as "old man yells at clouds", but I tried to make sense of what he was saying and eventually realised he had a lot of good points.

I think it was this one: https://m.youtube.com/watch?v=4t1K66dMhWk

[–] porgamrer@programming.dev 2 points 4 months ago (3 children)

That's what std::move does, and you're right that it's quite an ugly hack to deal with C++ legacy mistakes that C doesn't have.

I say move semantics to refer to the broader concept, which exists to make manual memory management safer and easier to get right. It's also a core feature of Rust.

Also I'm talking about parametric polymorphism, not subtype polymorphism. So I mean things like lists, queues and maps which can be specialised for the element type. That's what I can't imagine living without.

[–] porgamrer@programming.dev 2 points 4 months ago

I would have said the same thing a few years ago, but after writing C++ professionally for a while I have to grudgingly admit that most of the new features are very useful for writing simpler code.

A few are still infuriating though, and I still consider the language an abomination. It has too many awful legacy problems that can never be fixed.

[–] porgamrer@programming.dev 0 points 4 months ago (1 children)

The only conceivable way to avoid pointers in C is by using indices into arrays, which have the exact same set of problems that pointers do because array indexing and pointer dereferencing are the same thing. If anything array indexing is slightly worse, because the index doesn't carry a type.

Also you're ignoring a whole host of other problems in C. Most notably unions.

People say that "you only need to learn pointers", but that's not a real thing you can do. It's like saying it's easy to write correct brainfuck because the language spec is so small. The exact opposite is true.

[–] porgamrer@programming.dev 2 points 4 months ago* (last edited 4 months ago) (5 children)

I'm not a fan of C++, but move semantics seem very clearly like a solution to a problem that C invented.

Though to be honest I could live with manual memory management. What I really don't understand is how anyone can bear to use C after rewriting the same monomorphic collection type for the 20th time.

[–] porgamrer@programming.dev 7 points 5 months ago* (last edited 5 months ago)

In my opinion dependency injection solves a problem that doesn't need to exist, and does it by adding even more obfuscation and complexity.

The problem is that the original gang of four design patterns had very little to say about managing effects. In old java code things like network and file IO often happen deep inside the object graph, hidden behind multiple impenetrable abstractions such that it's impossible to run the logic without triggering the effect.

The wrong solution is to add even more obfuscation and abstraction, so that you can inject replacement classes deep inside the object graph where the effects happen. it solves the immediate problem of implementing tests, but makes everything else worse and more confusing.

The right solution is to surface all your effects at the top level of the call graph. The logic only generates data, and passes it back up to the top level of the program. The top level code then decides whether to feed this data into an effectful operation. Now all your code is easier to reason about, and in you can easily test the logic without triggering unwanted effects.

[–] porgamrer@programming.dev 15 points 5 months ago* (last edited 5 months ago)

Damn, this is a really good write-up.

I came to most of the same conclusions. I really like Rust, I'm glad it exists, I'm amazed by the people who designed it. It is not very good for creative work at all.

Honestly the "rewrite it in rust" meme is actually the use case where it shines: when all the requirements are 100% clear up front, and you just need to make a new version of some software that is much faster and more reliable. That is not what game development is like.

[–] porgamrer@programming.dev 2 points 5 months ago (3 children)

To be honest I have no frame of reference to understand what it's like to try and find a job while navigating the American economic sanctions. It sounds awful. Is there no prospect of finding remote work in the other BRICS nations? I was under the impression that they try to avoid relying on american-controlled software, so I thought this would create some employment opportunities.

[–] porgamrer@programming.dev 2 points 5 months ago (5 children)

You are right that having a shiny education gives people a huge advantage. It's not everything though.

For example, I have a friend who makes 6 figures in europe doing performance-oriented C++ work, with no degree. Once you get the first job it becomes far easier.

Getting the first job is tough, but having personal projects really helps. Don't undersell yourself. You need to give people the impression that you dropped out due to pure happenstance (e.g. health or family issues that are now resolved). Make them think that you are a lucky find; if you had finished the degree you'd already be at a bigger company with a bigger salary.

[–] porgamrer@programming.dev 52 points 6 months ago (4 children)

Wait until this guy finds out that Elon doesn't actually build the cars

view more: next ›