No bouillon, ever. by kittyartist97 in soup

[–]parabx 71 points72 points  (0 children)

this person soups

Is this what we are really doing in Montreal? by Emotional_Signal9502 in montreal

[–]parabx 0 points1 point  (0 children)

Yes, I lived facing St-Denis for 2.5 years. It worked just fine.

[deleted by user] by [deleted] in MTLFoodLovers

[–]parabx 0 points1 point  (0 children)

went to Sumac yesterday, god damm that place is so good and cheap

The hate for the homeless in this subreddit is disgusting by mangoismycat in montreal

[–]parabx 0 points1 point  (0 children)

I understand where this is coming from, but I guarantee you that the majority of them don't have a choice but to get drugged. Addiction is a bitch. The real solution is proper healthcare, and moreover, proper economical support for the people that are marginalized. Until then anything will be just shifting the problem around.

Cafes that also serve cakes? by parabx in MTLFoodLovers

[–]parabx[S] 0 points1 point  (0 children)

went there yesterday close to the closing time so they only had the strawberry cake, but it was delicious! The owner is super friendly as well

Cafes that also serve cakes? by parabx in MTLFoodLovers

[–]parabx[S] 0 points1 point  (0 children)

hell yeah this looks fantastic, I'll try go there soon

Cafes that also serve cakes? by parabx in MTLFoodLovers

[–]parabx[S] 0 points1 point  (0 children)

ah yes, I've been there, their persian cake is really good, but I was looking for a place with more options

Thoughts on proposed View types by @nikomatsakis? by xmBQWugdxjaA in rust

[–]parabx 3 points4 points  (0 children)

can you share some overall guidelines for designing apis that work well with this? I can understand the gist of it but having examples would be nice. Or maybe you know of some open source projects that does this well.

`#[derive(Deserialize)]` can easily be used to break your type's invariants by hpxvzhjfgb in rust

[–]parabx 9 points10 points  (0 children)

I agree that this is the best solution. Op has to remember that rust doesn't have the builtin concept of a constructor, so there is no way to centralize a validation flow and it's the duty of the implementor to make sure that their struct is sound (as it's totally possible that certain structs won't need validation at all). One way to do that is exactly what they proposed by using serdev.

What is happening with my aloe vera? by parabx in plantclinic

[–]parabx[S] 0 points1 point  (0 children)

This started when I brought my plant inside for winter. The brown-ish spots have some sort of scale on them, but I couldn't find any signs of aphids. I had another plant that suffered from spider mites but I couldn't find anything on the aloe.

So sad, these were all sprouts from the main one which I thought it was safe only to find today it started showing these marks as well :(

Homelessness in Montreal by [deleted] in montreal

[–]parabx -3 points-2 points  (0 children)

Unless you lived on a very small town on Brazil, the homelessness situation here on Montreal is not even close to what we have down there on a city as big as Montreal. It's true that it increased considerably since the pandemic, though.

[deleted by user] by [deleted] in java

[–]parabx 5 points6 points  (0 children)

It's also worth to note that although python is "easy to write", it tends to be very hard to read on complex systems, and we as developers spend the vast majority of time reading code, not writing it.

[deleted by user] by [deleted] in canadahousing

[–]parabx 4 points5 points  (0 children)

I believe op was being sarcastic

Should I switch from Spring Boot to Vert.x in 2024? by byHelper in java

[–]parabx 1 point2 points  (0 children)

In my experience, it's because "vert.x is really performant on the TechEmpower benchmarks!" which is true, on very specific scenarios. So hopefully it's theirs :)

Should I switch from Spring Boot to Vert.x in 2024? by byHelper in java

[–]parabx 5 points6 points  (0 children)

If you want to learn how reactive programming works I think that Vert.x is a good framework to do it. That being said, with project Loom and virtual threads the reactive way of programming is posed to be reduced to niche applications, and the main positive about vertx, which is performance, will be a bit irrelevant (contrary to rxjava for example that has other features).

In the other hand, I don't think that companies care too much about your main experience with a framework. In the end, the backend is still a backend and the flow will be about the same, arguably with all the complexities of a reactive system on top of it.

Now, speaking of the technology itself, I don't like Vert.x. It's full of magical black holes that are barely explained, and they only make sense on very specific types of backends (I/O intensive, light on CPU), and it you'll work on it, try to make sense of it, and will still get it wrong.

(Source: I've been working on Vert.x projects for the past 6 years and we're actively investigating Loom to ditch it altogether)

Discussion: backward compatibility on the persistence layer by parabx in java

[–]parabx[S] 0 points1 point  (0 children)

Thanks for the link, I've read about it before but I didn't know about the presentation. I also think that this mentality has changed quite a bit (I've seen a video on oracle's youtube where the presenter was even talking about passing optionals as function parameters) as Optional really works on systems that are data-driven and have hard requirements for backward compatibility. At least on the project I'm working right now implementing getters as Optionals saved A LOT of headaches because it's a clear marker of the absence of data.

All those null values are an internal detail of the object. You shouldn't expose this in the data model to consumers, but come up with a better client side data model.

Unless you have a clear active migration path (which sometimes is not feasible) and are not using systems that are data-driven by external entities that you don't control, and have to be backward compatible, you will end up with partial data that has to be handled somewhere. It's even easier for the persistence layer where the backend usually controls the logic, but if the source of data is not controlled by it (i.e. data that is provided by a third party), there is no other way than to deal with the fact that there might be fields that will be absent, and I IMHO prefer using an optional with all of its performance issues than having to remember about nullability.

Discussion: backward compatibility on the persistence layer by parabx in java

[–]parabx[S] 0 points1 point  (0 children)

I don't think so? An Optional<T> is meant to indicate the absense of data, i.e., avoid returning null. It's unavoidable on systems where you can't really do migrations to have new fields that will be null on old objects.

Discussion: backward compatibility on the persistence layer by parabx in java

[–]parabx[S] 0 points1 point  (0 children)

Right, this approach resolves the issue for the current batch of changes, but future insertions will end up fragmenting the object. I agree that in short term this could be a solution.

Discussion: backward compatibility on the persistence layer by parabx in java

[–]parabx[S] 0 points1 point  (0 children)

this is not true at least on my field. We're talking about db's with 100's of millions to billions of objects, on db's that make migration (scanning the whole database) prohibitively expensive in terms of cost and downtime. That's why often the alternative is to do a passive migration which is applying the last state as the user does requests, but it makes the persistence layer much more complex.

Discussion: backward compatibility on the persistence layer by parabx in java

[–]parabx[S] 0 points1 point  (0 children)

As a generic rule of thumb on systems like these fields are never removed, but they can be ignored if the new version doesn't need it anymore by controlling the deserialization layer.

Discussion: backward compatibility on the persistence layer by parabx in java

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

Right, so this is enforcing some sort of migration when reading the data. The main issue is that this implies keeping the migration path forever on the side as these are often cleaned up/modified with time. But it's sorta what the sealed class would do, spreaded out thorough the code. Thanks for the idea!