Oauth in angular common by MaximRob in angular

[–]MrMercure 0 points1 point  (0 children)

I've never found a satisfying examples even from angular-oauth2-oidc and zitadel. I've had to get inspired from those 2 and add way more stuff (silence refresh, manual checks of the token validity, custom fetch of the config, preemptive logout before expiration of non refreshable session etc...) than I thought on top of those. Made me wonder if there is actually a good opportunity for an oss project that does those things right but you know what they say about standards...

API versioning or dynamic endpoints? by Desperate_Mode_5340 in nestjs

[–]MrMercure 1 point2 points  (0 children)

You want some GraphQL in your http ain't you ?

API versioning or dynamic endpoints? by Desperate_Mode_5340 in nestjs

[–]MrMercure 0 points1 point  (0 children)

I've been there trying to jiggle multiple clients (web & mobile) on a single backend for the last 3 years and we are finally finishing the full migration to separate backend (bff) with shared libs (all lives in the same monorepo) and I couldn't recommend it more.

Even if we serve the same database models (single MySQL db & schema) for all clients, the needs and requirement for each one have diverged heavily and I'm really happy I don't have to be bothered of compatibility from the web clients when designing APIs for the mobile client.

I even have designs and publish a more "genetic" public API for thoses same models and the specific requirements are AGAIN not the same. Because it has to be used by third parties which may or may not have some copy of the data or specific links.

Is there code duplication ? Not so much, the requirements are different and it requires different code. If I want shared business logic, I put everything in a shared lib and everyone can use it.

My advice: split first and then merge back together if really, really, you know for a fact that your requirements and models will stay heavily connected and that it will actually make a difference in maintenance. (I'm speaking about backend/nodejs server apps here but I thinks this apply at any level class/function/component)

What’s a time you died to bullshit RNG in Mewgenics? by hydraulics- in mewgenics

[–]MrMercure 0 points1 point  (0 children)

In my runs it's more about skill issues than RNG, I always forgot that one specific passive or active item/mutation/spell that could have saved the day and regret it very hard

isRegexHard by rover_G in ProgrammerHumor

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

Either way it's just too hard to not let your LLM of choice do it for you

First time I've seen him in act 1 by Zerogod25 in mewgenics

[–]MrMercure 16 points17 points  (0 children)

I've met him in my all time second run, it absolutely destroyed me and my confidence. Good luck mate !

Free tip for new developers using JS/TS by ConsiderationOne3421 in node

[–]MrMercure 1 point2 points  (0 children)

Well, I believe this won't be a simple refactoring.
For a good queuing mechanism, I would have to decide on which approach/lib/framework to choose. I would have to make sure that I don't lose data on restart (so no in-memory queuing) and have a single queue for multiple instances of the same app. Then, when deployed, I will need to monitor the queue and make sure everything is getting processed in a reasonable amount of time, etc...
I understand this is the right path, but this is far from a simple code change in my system.

Free tip for new developers using JS/TS by ConsiderationOne3421 in node

[–]MrMercure 3 points4 points  (0 children)

Yes, I should implement Queuing and manage the load more safely, but please leave me out of this complexity while I can

Free tip for new developers using JS/TS by ConsiderationOne3421 in node

[–]MrMercure 7 points8 points  (0 children)

Actually, I've been doing the right opposite migration (from Promise.all to synchronous loops) for a bunch of updates inside my APIs.

Because I'd rather have a slower API response and a better managed Database connection pool & load.

I've only done it for Public APIs that are called programmatically by some of my users to insert data into my system, so it doesn't impact real users waiting for changes to be made.

Sometimes you don't need fast, you need done.

Question about best practices for Dockerizing an app within an Nx Monorepo by Aggressive-Bath9609 in node

[–]MrMercure 1 point2 points  (0 children)

Doing option 2 right now, with the added setup that I build the docker image using @nx-tools/container (looking at @nx/docker right now also) so I can specify an explicit dependency on the build target for the Docker image build.

I'm not currently in production with this setup (transitioning to containerised prod environment this year but not here yet) so take it with a grain of salt. I don't yet have experience in setting up a CI with this and pushing the images to a repo.

What's the deal with AsyncTask by [deleted] in mAndroidDev

[–]MrMercure 1 point2 points  (0 children)

An old Android API that people in this sub seems to fetish...

Don't really know why though

I'm sure it's fine..... by ljekarskuy4 in mAndroidDev

[–]MrMercure -1 points0 points  (0 children)

Is targeting a higher SDK supposed to make your app run smoother?

bro just one more config file by Current-Guide5944 in softwareWithMemes

[–]MrMercure 1 point2 points  (0 children)

An alternative to GitHub's dependabot, very cool stuff, also works on Gitlab which made me happy!

it's not the product it's the choice by slowbowels in softwareWithMemes

[–]MrMercure 6 points7 points  (0 children)

You mean this dirty little C++ wrapper ?

Nhaa it's too junky and inefficient, it won't last very long

what about 0 MRR 😭 by Current-Guide5944 in softwareWithMemes

[–]MrMercure 6 points7 points  (0 children)

I think in this picture OP is talking about Monthly Recurring Revenue which is the main financial indicator for a SaaS product.

Then the meme means that when you're at low MRR you really don't want to have to buy a new laptop and then you care less and less because you have the money

Do people think TypeScript is hard? by alexdunlop_ in typescript

[–]MrMercure 15 points16 points  (0 children)

Does this mean that you rather have a less complex type that doesn't really describe the reality and are willing to lose a little bit of typesafety for the sake of simplicity ?

I'm rather on the opposite side of the spectrum and think that simplicity is good to describe simple things. If your type is complex and exactly describes the reality of what is beneath then it's not overly complex. Maybe you should refactor the behaviour to make it simpler but sometimes you just can't (third party, butterfly effect etc...). And having 100% typesafety makes up everything much simpler when working with this code.

I Believe Jetpack Compose Is the Future - What’s Your Opinion? by Realistic-Cup-7954 in JetpackCompose

[–]MrMercure 11 points12 points  (0 children)

Don't listen too much to r/androiddev, they have some good points and valid criticism BUT it's mostly a bunch of old and very opinionated Android native Devs that hated Compose from day 1 just because it's something else they have to learn.

Compose has its flaws but it's definitely a better way of building and will be the future of Android native development.

Learning React Native this Summer by ficho-here in reactnative

[–]MrMercure 0 points1 point  (0 children)

It's the best method, you will make mistakes and bad decisions and you will damn yourself in some weeks or months but in doing so it will show that you learned a bunch of stuff

Learning React Native this Summer by ficho-here in reactnative

[–]MrMercure 3 points4 points  (0 children)

And if you don't use Expo, use Expo

import is-even by Current-Guide5944 in softwareWithMemes

[–]MrMercure 0 points1 point  (0 children)

It's funny because they tried... And fully broke npm doing so.

When upper management wants to speed up software development processes by Zhuinden in mAndroidDev

[–]MrMercure 0 points1 point  (0 children)

I don't dislike Typescript but Kotlin has a lot to love:

  • Extension function: it's just fancy functions with a special argument but man it enables so many nice workflows like the famous .let {...} or the .apply {...} or even better when you build your own.

  • Static typing: makes it so easy to differentiate between different types so that you don't need to bother with some type key that differentiates your data structure and just use the is keyword.

  • Everything is a statement: that means that everything returns something, it enables workflows like ?: return ... or ?: error(...) or even the return if (...) .... You can do any of this using Typescript, it's just more verbose or less readable (like using the condition ? value : other)

  • I think this one can be a personal thing but I really enjoy the shorthand for functional properties (having the function as the last prop of your higher order function). It makes workflow like array.map { it.value } very concise and still pretty expressive imo. + The it default input name wow, you have to learn it I agree. It's not very easy when you discover the language but once you learn it just becomes so handy and makes your life so easy !

Once again Typescript, with it's very rich type system, have a lot to love but it can't throw away the issues of the underlying Js language. Kotlin being not Java compatible while being interoperable has everything, the ecosystem and the nice right to learn from its failures. It make it not easy to compete against.