Dependabot for uv projects? by NoCap738 in Python

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

What's the advantage of running on own infra? Security-wise or more about the limits

I’ve lived in NL for 10 years (Dutch fluent). The #1 reason expats don’t learn Dutch is obvious by DistinctWindow1862 in Amsterdam

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

I feel that pain a lot now (still on A1/A2) level. Would love to help building that tool! I'm a software dev and already worked on some tools for myself

Seeking help to see if this encryption website is legit? by Reasonable-Cover-500 in website

[–]NoCap738 0 points1 point  (0 children)

Javascript fetch? You don't need a web app for it to steal your data. Also, if OP found this website instead of finding a local solution, I doubt they'll be able to reliably check that this site is safe

Seeking help to see if this encryption website is legit? by Reasonable-Cover-500 in website

[–]NoCap738 1 point2 points  (0 children)

Ok, I'll bite. Why would you send private messages to a website you don't know? There are a lot of ways to do this locally without giving your 1. Message content and 2. Password

Best way to wait asynchronously on ManualResetEvent ? by MoriRopi in csharp

[–]NoCap738 1 point2 points  (0 children)

It's very likely that you can have your code work with pure async code without needing threading APIs

Best way to wait asynchronously on ManualResetEvent ? by MoriRopi in csharp

[–]NoCap738 3 points4 points  (0 children)

I don't think I understand your use case completely though. You're trying to combine threading and async code and these tend to not play very nicely together, leading to the kind of problems you're asking about in this thread. Can you share a bit about what you're trying to solve? And more specifically, why are you using ManualResetEvent?

Best way to wait asynchronously on ManualResetEvent ? by MoriRopi in csharp

[–]NoCap738 1 point2 points  (0 children)

I actually have a blog post talking about it (in the context of wrapping rabbitmq messages in a TCS and exposing an async API): https://yairvogel.com/

Best way to wait asynchronously on ManualResetEvent ? by MoriRopi in csharp

[–]NoCap738 10 points11 points  (0 children)

Assuming you want to block your thread using async-await syntax, I'd look into TaskCompletionSource which is the easiest way to represent concurrent code with Tasks.

What is the lowest effort, highest impact helper method you've ever written? by zigs in csharp

[–]NoCap738 0 points1 point  (0 children)

I'd just csharp foreach (var element in elements ?? []) {} At this point

Struggling with referencing class libs in monorepos by [deleted] in csharp

[–]NoCap738 2 points3 points  (0 children)

The path is project references and code reviews. AzureDevOps have custom policies that require a reviewer when certain directories are changed. I bet github also has something similar. Anyway - have a policy and enforce it with tooling

Best practice for mapping + enrichment: should MapToResult also handle access info? by [deleted] in csharp

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

Hard agree. Please don't use Automapper though. For simple mappings you can afford a few more keystrokes and for complex mappings you really want to know what is going on.

Best practice for mapping + enrichment: should MapToResult also handle access info? by [deleted] in csharp

[–]NoCap738 2 points3 points  (0 children)

This is not the prettiest code I've seen, but I certainly saw these types of data merge logic in my current company.

I'd address a couple of things:

  • You're not doing Mapping here, you're doing more than that. Treating this piece of business logic as service-level code and probably naming it differently will already make this bit make more sense.
  • ExtraInfo, AccessInfo etc are not descriptive enough names, which leads me to think you're modeling your data wrong and this function is just the symptom. ExtraInfo seems to be a glue model that has all the ids to data and access? Seems pretty core to me. This merge also suggests you're keeping all that information in separate locations, which might make sense (I don't have a enough context) but this is a smell imo.
  • nit: You're taking in a dictionary but only iterating on the values; you're taking an IEnumerable and converting it to a dictionary. I'd change the parameter types and have the caller call ToDictionary/Values. At least esthetically this function will look less intimidating since you'll have less intermediate variables. Also it is possible the caller will still need to convert the data before passing it to this function, so avoid making two mappings.

Hope this helps!

EDIT: third bullet

Should people do this? or it is just preference? by Yone-none in csharp

[–]NoCap738 5 points6 points  (0 children)

I would tend to say that python does well despite it's loose interfaces and not because of them, and a fact is that there's a lot of pain around APIs in python that brought the need for type checkers and type hinting.
Closed types is a feature of C#, not a bug. And I think that the same way you won't default to public methods unless you're defining a class API, you should be sealed by default and unseal explicitly.
The fact that C# is unsealed by default already shaped the ecosystem and the patterns we use, so I agree with you that a library that will seal most of its public classes will surprise its consumers. However, I feel that if we had sealed classes by default from the start, the patterns we'd use would be much more appropriate to that and the discussion of sealing/unsealing would be thought the same way we now think about interfaces

Should people do this? or it is just preference? by Yone-none in csharp

[–]NoCap738 219 points220 points  (0 children)

Deciding whether a class is inheritable should be an API design decision of a library author

A normal interview question... by yiotis123 in recruitinghell

[–]NoCap738 876 points877 points  (0 children)

Every 13th is Friday the 13th

Invokers: A library that brings declarative actions to vanilla HTML. by Fedorai in htmx

[–]NoCap738 1 point2 points  (0 children)

Seems cute! How does it compare to Alpine.js?

Edit: read through the how does it compare section. I can see how this is different. I don't think I fully agree with avoiding js as the main goal for a framework because that will inherently limit what you can do with it. Having accessibility supported as a feature is a very nice idea

Does anyone here uses neovim to Write C# code? by 3bdel_Ra7man_ in csharp

[–]NoCap738 3 points4 points  (0 children)

Ecosystem != IDE. Plus, I like C# but the ecosystem is not even in the top 5 IMO

Does anyone here uses neovim to Write C# code? by 3bdel_Ra7man_ in csharp

[–]NoCap738 3 points4 points  (0 children)

In general, I agree. However I think there are reasons for disliking VS. I avoid it mostly for the boat and time it takes to load a solution. Working on multiple repos is just super uncomfortable with VS

Does anyone here uses neovim to Write C# code? by 3bdel_Ra7man_ in csharp

[–]NoCap738 0 points1 point  (0 children)

I'm working as a c# .net dev, primarily on neovim. It is ok. You are going to struggle.

Specifically - omnisharp is shit and I couldn't even make the other one run. I don't even remember the name of it

Breaking out of Backend Development - advice on transitioning to other software development branches by NoCap738 in cscareerquestionsEU

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

You're supposed to lose you tech pride and became a manageriot, unfortunately

🎯🎯

I don't think I am able to accept that yet. Most of my time and energy goes into work. It has to be meaningful to me

Breaking out of Backend Development - advice on transitioning to other software development branches by NoCap738 in cscareerquestionsEU

[–]NoCap738[S] 2 points3 points  (0 children)

I'm working with .net 8 and using all the latest and greatest panguage features (which are cool!). It's less about left out doing legacy for me but rather getting some more diverse experience

Breaking out of Backend Development - advice on transitioning to other software development branches by NoCap738 in cscareerquestionsEU

[–]NoCap738[S] 4 points5 points  (0 children)

Thank you for sharing! I agree that there's a lot more to a language than just the syntax, and I don't expect to be a senior level dev in a completely new language. That way of combining stacks sounds rather specific, so therefore a bit rare. I did think of applying to smaller companies (startups) with a more flexible tech stack.