Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Posts by Alexei‭

211 posts
66%
+2 −0
Q&A Mixing "operational" database models with archiving ones in the database context

Context Our product owner has realized that some entities are duplicated from time to time and that a merge is required. This should clean up existing duplicates and also allow special users to me...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by meriton‭

66%
+2 −0
Q&A How to automatically add package reference into project file after installing .NET package?

Manually editing the .fsproj file followed by dotnet build worked because some dotnet commands have an implicit restore. I think this is the fastest way to add a dependency when you know its versio...

posted 6mo ago by Alexei‭

Answer
66%
+2 −0
Meta Tag creation/deletion criteria for Software Development?

Yes, but with some notes I think this a good idea, but we will need to provide more details and agree on some details. A tag must be named appropriately, considering Tag naming guidelines. ...

posted 8mo ago by Alexei‭

Answer
66%
+2 −0
Q&A EF-core Find method doesn't include other entities

What you want would be called DbSet<>.Find() combined with eager loading of the related entities. According to the docs, eager loading is not mentioned and its sole purpose is to easily get a...

posted 1y ago by Alexei‭  ·  edited 11mo ago by Sylvester‭

Answer
66%
+2 −0
Q&A What are the drawbacks of using data snapshot testing?

Our team is finally focusing on writing more automatic testing and one of my ex-colleagues recommended to try out the Verify library. The tool does the following: runs the test and compares the...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by Derek Elkins‭

66%
+2 −0
Q&A How to write database friendly code when using an ORM?

Note: this is mostly based on personal experience rather than benchmarks. The examples would focus on using EF with SQL Server, but some points might apply to other ORMs and relational databases T...

posted 2y ago by Alexei‭  ·  edited 2y ago by Alexei‭

Answer
66%
+2 −0
Q&A How to write database friendly code when using an ORM?

There are a lot of articles and presentations that show little love for ORMs. This is mainly because some queries are so complex and heavy on the database that they lead to significant issues in p...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by Alexei‭

66%
+2 −0
Q&A Why static code analyzers such as SonarQube indicate a high code complexity for switch statements?

I would skip the theoretical part of actually computing the cyclomatic complexity of a switch statement and mention that it can see as a bunch of if statements. Since each if adds to the complexity...

posted 2y ago by Alexei‭  ·  edited 2y ago by Alexei‭

Answer
66%
+2 −0
Q&A Rationale of using database-level transactions inside a store procedure when application layer already manages a transaction

One of the legacy applications my team has to maintain has almost always this pattern for dealing with data modification: try { // get the connection // begin transaction // optional...

0 answers  ·  posted 2y ago by Alexei‭  ·  edited 2y ago by Canina‭

66%
+2 −0
Q&A How to create fire and forget tasks Q&A in ASP.NET Core with dependency injection support?

The way I made this work is not very quick but might provide extra benefit in the future. I have added Hangfire support to the application and use its BackgroundJob enqueuing mechanism as follows: ...

posted 2y ago by Alexei‭  ·  edited 2y ago by Alexei‭

Answer
66%
+2 −0
Q&A How to create fire and forget tasks Q&A in ASP.NET Core with dependency injection support?

One of the legacy applications our team manages contained the following pattern (in the controller): // initialization private readonly IServiceScopeFactory _serviceScopeFactory; public FooCon...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by Alexei‭

66%
+2 −0
Q&A How to deeply clone an array in Angular / TypeScript?

These can be achieved in several ways, but there might be some drawbacks: through JSON serialization/deserialization: const cloned = JSON.parse(JSON.stringify(array)); The advantage is that ...

posted 2y ago by Alexei‭  ·  edited 2y ago by Alexei‭

Answer
66%
+2 −0
Meta Sometimes entered tag information seems to get lost

From time to time, I am filling in some information for the Software Codidact tags and I realized that for some tags I filled the information twice. An example would be winforms which I almost cer...

0 answers  ·  posted 3y ago by Alexei‭

Question support tags
66%
+2 −0
Q&A Save migration info in separate DB schema

If you want to use a custom entity framework migration table, you can set it when configuring the database context as shown here: // this code belong to the database context class protected overr...

posted 3y ago by Alexei‭  ·  edited 3y ago by Alexei‭

Answer
66%
+2 −0
Q&A How to break infinite loop in CTE

Estela's answer provides great insight about how to do it also in SQL Server. Unfortunately, there does not seem to be a build-in array functionality, so one way is to rely on strings as shown here...

posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭

Answer
66%
+2 −0
Q&A How to work with current entity changes when working with @ngrx/store and @ngrx/entity?

I am fairly new to working with @ngrx pattern in Angular which is a state management pattern relying on Reactive Extensions. One of the convenient structures is @ngrx/entity which helps with manag...

0 answers  ·  posted 3y ago by Alexei‭

66%
+2 −0
Q&A Submitting a form via XHR/AJAX causes partial data arrival to email inbox (only HTML without input)

I am guessing a little here. By not preventingdefault, the form will POST the data to the server. If you switch to AJAX you have to provide the body as per documentation. However, I do not rememb...

posted 3y ago by Alexei‭  ·  edited 3y ago by Alexei‭

Answer
66%
+2 −0
Q&A How to reason about transaction isolation during development

One way to go is probably to use some kind of transaction scope to include everything (SELECT from order and INSERT into shipment) with a high enough transaction isolation (e.g. SERIALIZABLE for SQ...

posted 3y ago by Alexei‭

Answer
66%
+2 −0
Q&A Is it possible to disable the "mysql: [Warning] Using a password on the command line interface can be insecure" warning?

There are multiple ways to do this. Just picked two that I find more usable (not very insecure or hard to do). Use a configuration file to store the credentials mysql --defaults-extra-file=/f...

posted 3y ago by Alexei‭  ·  edited 3y ago by Alexei‭

Answer
66%
+2 −0
Q&A How to separate DB query logic from the application other than implementing a repository on top of an ORM?

p.s. I'm not sure whether the criticism applies only to generic repositories or not. This applies to generic repositories as most of their operations (e.g. get entity by id, update the entity,...

posted 3y ago by Alexei‭

Answer
66%
+2 −0
Code Reviews C# MVVM Login Project

Things you might consider to improve your code: Use nameof instead of magic strings. Example: OnPropertyChanged("User"); can be replaced with OnPropertyChanged(nameof(User));. This allows for ...

posted 3y ago by Alexei‭

Answer
66%
+2 −0
Q&A What are the cons of directly mocking Entity Framework DbSets instead of working with an in-memory database when unit testing the application?

I have recently contributed to a Clean Code project and had a discussion about how to implement unit tests. The project author argues for using an in-memory database (which easily replaces the rea...

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Goyo‭

62%
+3 −1
Meta Do we really need the [tools] tag?

During my review of the posts and tags, I have seen the tools tags. It is very generic and I am sure if it is helpful. What do you think?

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Lundin‭

Question discussion tags
62%
+3 −1
Q&A How to temporarily disable a MySQL user?

I think the closest thing to what the post body is suggesting is offline mode: Connected client users who do not have the SUPER privilege are disconnected on the next request, with an appropriate...

posted 3y ago by Alexei‭  ·  edited 3y ago by Alexei‭

Answer
60%
+1 −0
Q&A How to upgrade a recent (>= 8) Angular CLI?

Angular CLI official page indicated how to install the CLI, but provides no information about how to upgrade it. I am interested in how to upgrade the CLI.

1 answer  ·  posted 3y ago by Alexei‭  ·  last activity 3y ago by Alexei‭