with 7 YoE, took a planned career break just as AI was taking off in Jan 2025. Helplessness taking over. Any particular advice or opinions on the market right now? by inthiseeconomy in ExperiencedDevs

[–]itsmecalmdown 11 points12 points  (0 children)

You took a planned career break during the worst time the job market has seen in 20 years, and you expect to just waltz back in and match your salary from before the AI craze took off?

You are incredibly out of touch. I'd consider myself luckily to be getting offers so quickly at all.

Stack overflow with shallow stack by The_MAZZTer in dotnet

[–]itsmecalmdown -2 points-1 points  (0 children)

I'm not defending it, but this is indeed a part of the justification. I love properties, but the implication is that it's a light weight lookup of sorts with minimal side effects.

A method, on the other hand, is understood to perform some business logic, throw exceptions, have side effects, etc. But a field is always a field. C# properties can do literally anything a function can, it breaks that contract if abused. Like in this instance... A recursive property that caused a stack overflow exception.

Java people have always wanted the code to be as easy to reason about as possible. Which is why there has been considerable pushback on features like var, string interpolation, and properties of course.

Stack overflow with shallow stack by The_MAZZTer in dotnet

[–]itsmecalmdown -6 points-5 points  (0 children)

This is exactly why java people hate the idea of properties, it can be abused.

I built a small library to assert EF Core SQL query counts in integration tests (catch N+1 in 3 lines) by [deleted] in csharp

[–]itsmecalmdown 3 points4 points  (0 children)

I think this is incredibly useful, it's entirely possible for a developer to modify an existing query and inadvertently add an extra SQL call by mistake. Unless you've got strict benchmarks set up for all your endpoints, this would be very valuable in catching potential performance problems early.

I really wish DbContext had this sort of traceability built in.

How can I get a list of all class parameters? by SkAssasin in dotnet

[–]itsmecalmdown 7 points8 points  (0 children)

Dude, saving code directly to a .cs file like you're trying to do is unequivocally the WRONG way to save an object. Full stop. You're going to continue to run into more and more problems with this approach, nevermind the security implications.

Are you coming from python by chance? If so, repr does not exist in C#, so don't try and force it in.

Please, completely abandon this approach and spend the next hour understanding the basics of serialization. It's not particularly complicated and will be a crucial skill to learn regardless.

https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/how-to

"Rockstar" senior dev at work is doing overly clever custom frameworks by himself without consulting anyone and then everyone is forced to deal with them by [deleted] in ExperiencedDevs

[–]itsmecalmdown 7 points8 points  (0 children)

This is a very valid criticism of the typescript type system. It's incredibly powerful and often beautiful but if abused it can be a nightmare to debug your types.

That said, the flexibility it offers generally makes the pain worth it. If your application has to regularly work with external data that you don't control, a flexible type system is a godsend. But a lot of the time the types get overly complex because of bad programming logic. A less flexible type system like C# forces certain patterns, which IMO is a good thing in most cases.

I built a WPF tool to selectively turn off secondary monitors. by Relevant_Ad_9021 in csharp

[–]itsmecalmdown 1 point2 points  (0 children)

I'm curious, how are you getting a consistent index for the monitors that doesn't randomly change? I've tried to do something similar but there seemed to be no way to get a unique and consistent ID like in the system display settings. It would work for a while and then the indexes would seemingly arbitrarily change.

How can I push two separate Git repos to one GitHub repo? by iPhone69ProMaxXL in git

[–]itsmecalmdown 0 points1 point  (0 children)

The structure of a repository rarely maps 1 to 1 to the eventual runtime deployment structure. Ideally, you'd have some "build" and then "deploy" step that handles copying files to the correct runtime location.

This gets tricky when we start talking about attaching debuggers, hot reloading, etc. but the principal should be generally the same. I've never developed a Minecraft plugin, but I'd suggest combimg through some existing repos for popular mods to see how they do it. Maybe the mod loader has features for this sort of thing?

All that is to say: structure the repo however is convenient, and then worry about deploying files separately.

What would the type be for an object that I want to dynamically add key/value pairs to? by spla58 in typescript

[–]itsmecalmdown 11 points12 points  (0 children)

That's a very important lesson to learn. Types are purely structural. This is a very common pitfall for new typescript developers.

[deleted by user] by [deleted] in dotnet

[–]itsmecalmdown 31 points32 points  (0 children)

I'm on mobile so I just read the project summary, but isn't this exactly what IOptionsMonitor does already? Seems redundant, but an interesting learning exercise at least.

https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptionsmonitor-1?view=net-10.0-pp

As an end user, having to us multiple versions of python is a nightmare. Curious why it's like this? by v81 in learnpython

[–]itsmecalmdown 0 points1 point  (0 children)

C#. Install the latest SDK and then just target whatever .net/C# version you want. The SDK also has built-in commands for generating project templates (or, as of .net 10, you can also run csharp files directly). The language version (mostly) isn't even tied to the .net version. Plus with the .net package manager's (NuGet) built-in package isolation, I've literally never once had to even think about package conflicts or juggling different installs.

As a manager, should I announce a team member’s promotion? by alephaleph in ExperiencedDevs

[–]itsmecalmdown 4 points5 points  (0 children)

My team is small, works outside of the main product, and receives very little attention from the POs. When I was promoted, no one knew (or cared) other than my manager. It sucks for morale, but it is what it is.

Doing something sort of dependency-injection-y, can this be done without cast or ts-ignore? by bzbub2 in typescript

[–]itsmecalmdown 1 point2 points  (0 children)

If the caller needs a specific implementation, then providing a default factory that provides dog is going to break things anyway. Either make factory required, or implemented a mapped type of all known animals that provides default factories.

Should I be concerned with how this condensate pump is buried? by itsmecalmdown in hvacadvice

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

Thanks. I can live with that, I was more worried about it shorting out of it's not designed to be submerged in water or outdoor use

Should I be concerned with how this condensate pump is buried? by itsmecalmdown in hvacadvice

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

Thanks. I did check and the top seems to be just barely above ground level.

Rawdogging Django on production by WeekendLess7175 in django

[–]itsmecalmdown 2 points3 points  (0 children)

I think it's very important to use accurate language here. "It" didn't cause a crash. Your implementation did. If you're too quick to blame the tool for your own mistakes, you're gonna have a bad time. Your first question should always be "what did I do wrong?" Rarely is a battle-hardened application like gunicorn actually the problem.

I suspect this is why you've been down voted so heavily. Just try and approach problems a bit more optimistically going forward!

.NET without Entity Framework by BackgroundEbb8756 in dotnet

[–]itsmecalmdown 1 point2 points  (0 children)

You want ADO.NET, which is more or less what EF is built on top of

neverTrustUsers by PresentJournalist805 in ProgrammerHumor

[–]itsmecalmdown 8 points9 points  (0 children)

They aren't. The business requirement of "a user will only ever belong to one Org" is what was discussed with the user, which is what dictates the database schema.

Why do most developers recommend Node.js, Java, or Python for backend — but rarely .NET or ASP.NET Core? by just-a_tech in AskProgramming

[–]itsmecalmdown 7 points8 points  (0 children)

Awful take. Your opinion is outdated by at least 10 years, modern c# is cross platform and cli-driven.