BehindTheBarrier

joined 1 year ago
[–] [email protected] 1 points 9 months ago

Completely agree with that, we have the same issue in C# where I work. Just waiting for the day I get to push and update to our shared code style (editorconfig) to force that.

[–] [email protected] 2 points 9 months ago* (last edited 9 months ago) (2 children)

I don't disagree that this is hard to read, but I feel it's worth mentioning python has a pretty acceptable style guide. The problem is, it's far less common in python to bundle parameters into some holding object. So here you have massive function that has to accept a lot all at once. In use it's probably not as bad looking however.

And at least, it actually explains all the damn parameters. It's a lot nicer than seeing functions parameters you don't understand, and all you have is the name. This is not limited to python either

[–] [email protected] 4 points 9 months ago* (last edited 9 months ago)

I think the key fault lies in that most companies are publicly traded stock companies.

It challenges what corporations are at the heart. A company owned through stocks is controlled by those stock holders, and exist to make the stock holders money. It's expected for the stock to be worth it by growing, not paying out dividends. (but that is also another layer)

But that's not why a company should exist, it should turn a profit but ultimately it's about being a source of income to its workers. But stocks go against that, since stocks seek to extract money to the non-working owners. Well paid workers is rather contrary to the goal of the stock owners, as long as you can keep going.

The advantage of stock companies were getting investment to start and grow, but it forever shackles the company bar some rich maniac buys the whole thing for his own crazed ideas.

Private companies aren't guaranteed to be good either, but if they are set up right they at least aren't just a funnel of money for the people at the top.

Its because so much money can be gotten out of the perpetual invest, grow, squeeze and sell that things are as they are today. You're not a worthy company if you just increase your cash flow in line with inflation.

The need to grow also comes back as enshitification, planned obsolescence (or just made as cheap as possible), high focus on consumable products or subscriptions to ensure a steady flow of income. Making a product lasting for life? One and done, you'll grow until the market is saturated and then collapse because the cash flow simply won't be there.

Its especially noticeable when the economy takes a hit, all things go from being good investment objects to being something that needs to turn profit. So all the future profit is dropped, tons of layoffs, and rapidly increasing subscription costs. All to counter the reduced demand. Take streaming, the market fragmented, interest rates spiked so holding debt is bad, consumers have less money to spend easily. So the big ones take steps, more ads, crack down on sharing, layoffs, reduced selection and cancelation of various shows and projects. And then stock holders can be happy they once again have a good year and good growth of profit despite turbulent times.

Edit: By contrast a private company is not beholden to any requirement to cancerous growth. It too will be hurt by not having steady cash flow, but they don't need to grow until they are so big that they need constant growth to stay alive. But a private company can be steady for years without problem.

[–] [email protected] 2 points 9 months ago* (last edited 9 months ago)

It's just the sum. Monitors have 8bit per color, making for 24bit per pixel, giving the millions mentioned. 16bit is actually 4bit per color and then another 4 for a single of those colors. But this has downsides as explained in the article when going form higher bit depth to lower.

HDR is 10bit per color, and upwards for extreme uses. So it's sorta true they are 24 or 30 bit, but usually this isn't how they are described. They normally talk about the bit depth of the individual color.

[–] [email protected] 11 points 10 months ago

Brushing off safety in a single small paragraph sure makes me feel like its not trying to make a serious argument. Sure a handyman likes the simplicity and freedom, but considering this:

In 2019, a Microsoft security engineer reported that 70% of all security vulnerabilities were caused by memory safety issues.[7] 

From Wikipedia, it's pretty clear memory security is a pretty substantial topic in the programming world. Brushing that off because you do not care makes for a bad argument.

[–] [email protected] 8 points 10 months ago* (last edited 10 months ago) (3 children)

I love discord for small communities, not that I have that many I'm in though. But friend groups, and niche topics. Places where the chat generally is a single discussion or two at a single point in time. And the voice chat is superb. Just drop in and out is convenient.

But it sure as fuck doesn't compete with what reddit and Lemmy is doing.

[–] [email protected] 3 points 10 months ago (1 children)

My oneplus has been wonder full with the screen scanner to be honest. I love that it's behind the screen.

[–] [email protected] 11 points 10 months ago

I remember it being used at the "roast me" sub so the person verified they were actually the person in the image asking to be roasted.

[–] [email protected] 5 points 10 months ago (5 children)

Adopting EVs is an important step imo. The primary achievement of going EV is reducing oil/gas use. Moving away from cars as a society is a separate goal that can happen alongside this. We can never make gas green, at best net zero. EVs on the other hand can be better, with electricity from renewable sources, to batteries made with better materials. Both things which are happening and actively being researched.

So we can make EVs much better environmentally, and reduce gas demand significantly alongside reducing car use. Because we won't just stop needing gas magically, so replacing that is important for any transition away from it in the grand scheme.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

And that's is the part that irks me a little. How should I expect anything when I don't expect the undefined behavior to begin with?

Say I manage to accidentally do something undefined, I do some math incorrectly on some index, and try to read out of bounds on an array that didn't implement bound guards. Now already it's my fault for several reasons, but in a complex project what the array is, and the details of the array may be "vague", especially if it's not something you did yourself in the project. So as a scenario, it's not completely out there. (some other dev knew the index was "always" right, and did premature optimization and used unguarded arrays instead) Still completely avoidable, but it can happen.

But if only an edge case actually leads to an out of bound read, the problem will probably never happen where the issue is. An experienced dev might never step into this mess, but sometimes this happens when other people change up what others did. I've had similar problems at my workplace, just not with undefined behavior as a result. At the end of the day, you sitting there with hard to know issues that have hard to know consequences.

This doesn't require a special programming language to solve, it just requires a guarded array first and foremost, tests and good reviews might see the bug as well before production. Which in C++ we were taught about from the beginning. If performance actual was a problem, then I guess we'd maybe still end up with this bug in the example. But my point is something along the lines of, all the good practice comes down to the choices of the individual developer. And the choices of one, also affects the next one.

If we could instead place those choices a step up in the chain however. Have the language enforce safety, unless you specifically say you need the be unsafe. So in my example, other the code would be safe already or someone threw and unsafe block to do their "fast" read of the array. In one case, I'll make a crash due to a bad read, the other I'll have to really evaluate why this is unsafe to begin with and apply extra caution. That extra caution goes away when everything is unsafe. Kinda like a small PR will have 15 comments, a huge PR will have less. You won't dedicate your all for every line of code, but if a line is tagged "unsafe" you sure as hell will.

Nothing is a magic solution to everything, and unsafe array reads are just a simple example of fucky behavior. I'm not sure if it still stands, but even something like this was/is undefined in C++

a[i] = i++;

That is to me something you quickly can forget about. And it happens because of compiler optimization that happens even if it breaks the code, because normally the index in the array should be a different variable. Again, here is something that should have obviously stopped me. If the compiler still follows through (I'm sure there warnings for it) then it's just letting me do an error no one should be allowed to. There is no reason this should ever compile.

If we cna do that for everything at the language level, it's a win in my book.

[–] [email protected] 14 points 10 months ago* (last edited 10 months ago) (5 children)

I'm just a noob when it comes to low level languages, having only been in C# and python. But I took a course on C++ and encountered something that didn't seem right. And I asked and got the "that's undefined behavior". And that didn't quite sit tight with me. We don't know what will happen? It'll probably crash? Or worse? How can one not know how a programming language will perform? I felt it was wrong.

Now, it's quite some time since that happened, and I understand why it's undefined. But I still do not think it should be allowed by default. C and C++ both are "free to do as you want" languages, but I don't think a language should let you do something that's undefined especially if you aren't aware you're doing it. Everyone makes mistakes, even stupid ones. If we can make a place where undefined behavior simply won't happen, why not go there? If you need some special tricks, you can always drop the guard where you need it. I guess I'm just reiterating the article here though. But that's the point for me, if something can enforce "defined behavior" by default then I'd want that.

[–] [email protected] 3 points 11 months ago

I would say, just see how much shit Hunter x Hunter can do in 100 episodes compared to One Piece. Maybe it's just me but every time I tried one piece the first few episodes were to painfully slow. So I tried an abridged version but it didn't have all the arcs done in order last I remember. Now both shows are different so it's not exactly apples to apples but HxH manages to make each episode good on its own, and throws in a cliffhanger like ending each time to keep you going, especially during longer sequences.

If One Piece just drops all fillers, that too is good. But One Piece also does what Fairy tail does (well, I read at least 600 chapters of one piece manga for this view) and that is having arcs where 90% isn't that important with sporadic information drops and then the big showdown. And the anime mimics that. Some detours are fine, but One Piece often feels like it's filled with detours until the important characters manage to get their asses to the final showdown. And it's why I eventually fell off the manga. I lost interest in going through so many chapters to get the meat of the arc.

view more: ‹ prev next ›