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.

Activity for Alexei‭

Type On... Excerpt Status Date
Edit Post #285884 Post edited:
added relevant tags
almost 3 years ago
Edit Post #285884 Initial revision almost 3 years ago
Question Preloading some data at application startup as fast as possible
I am caching some very static information (changes once per day) in my ASP.NET Core application. This is normally done when needed ("lazy"). One such cache item is a 50K list of items that are taking less than 500ms when the application is deployed and about one second in the development environme...
(more)
almost 3 years ago
Edit Post #285843 Post edited:
added more code for the caching example
almost 3 years ago
Edit Post #285873 Initial revision almost 3 years ago
Question 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 JSON serialization of the actual result with a JSON file named after the test name. The first run w...
(more)
almost 3 years ago
Comment Post #285865 Software recommendation questions are [offtopic on Software Development](https://software.codidact.com/help/on-topic), but they seem [to be welcomed on Power Users](https://powerusers.codidact.com/posts/284817/284902#answer-284902).
(more)
almost 3 years ago
Edit Post #285865 Question closed almost 3 years ago
Edit Post #285843 Post edited:
added Derek's suggestion
almost 3 years ago
Comment Post #285843 @#53398 Yes, you are right. TransactionScopes should be avoided. The only valid case where I needed explicit transaction management (as opposed to context save changes one) was when the transaction performed both reads and delete on the same records (read -> archive -> remove) and EF could not figure...
(more)
almost 3 years ago
Edit Post #285844 Post edited:
minor fix
almost 3 years ago
Edit Post #285844 Initial revision almost 3 years ago
Question Detecting if a user has stopped interacting with a web view for a certain time
I am interested in finding out all the aspects I need to cover in order to correctly assess if a user has stopped interacting with a web page. So far, I found the following: - Idle Detection API - this seems to do most of the work for idle detection. However, it requires user permission - Detect ...
(more)
almost 3 years ago
Edit Post #285843 Post edited:
added more information
almost 3 years ago
Edit Post #285843 Initial revision almost 3 years ago
Answer 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 The provided references explain why ORM and relational databases are quite incompatible but do not prov...
(more)
almost 3 years ago
Edit Post #285841 Initial revision almost 3 years ago
Question 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 production. After quickly reading the aforementioned article I understand that there are many incomp...
(more)
almost 3 years ago
Edit Post #285839 Post edited:
added changes performed based on received feedback + add out run output
almost 3 years ago
Edit Post #285839 Post edited:
fixed the initialization code
almost 3 years ago
Comment Post #285839 @#53305 Ref. to "Just a stupid idea: What if the observed results are not due to the use of checked, but an artifact of the JIT compiler or due to external factors influencing your benchmark run (like, do you have other stuff running on your box that might possibly intermittently load the CPU and che...
(more)
almost 3 years ago
Edit Post #285838 Post edited:
added information based on feedback
almost 3 years ago
Comment Post #285838 @#53305 Not familiar with how SonarQube actually works, but I guess it computes the cyclomatic complexity and complains about going beyond a certain threshold. So it ignores the actual instructions. Ref. how to avoid I have never used anything beyond the simple mapping. And also in this case, I wo...
(more)
almost 3 years ago
Edit Post #285839 Post edited:
Fixed the title
almost 3 years ago
Edit Post #285839 Initial revision almost 3 years ago
Question Measuring arithmetic overflow checking overhead in C#
Overflow checking for integral-type arithmetic operations is disabled by default and it can be explicitly enabled by using using `checked` function or the `-checked` compiler switch. Since I mainly develop business applications where the main focus is correctness, I am wondering if globally switch...
(more)
almost 3 years ago
Edit Post #285838 Post edited:
added complexity clarification
almost 3 years ago
Edit Post #285836 Post edited:
minor fixes
almost 3 years ago
Edit Post #285838 Initial revision almost 3 years ago
Answer 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, the higher the number of `case`s, the higher the complexity. While a simple switch such as the ...
(more)
almost 3 years ago
Edit Post #285836 Post edited:
added language tag
almost 3 years ago
Edit Post #285836 Post edited:
added relevant code
almost 3 years ago
Edit Post #285836 Initial revision almost 3 years ago
Question Why static code analyzers such as SonarQube indicate a high code complexity for switch statements?
During a presentation of a pipeline configuration, a colleague showed a SonarQube integration and one of its reports. A warning was caused by overrunning the max value for the code complexity threshold in a function containing a fairly large switch statement. Why are switch statements considered t...
(more)
almost 3 years ago
Comment Post #285829 I agree and I will wait for a few days for other feedback before adding a line to the on-topic list.
(more)
almost 3 years ago
Edit Post #285828 Post edited:
fixed the title
almost 3 years ago
Edit Post #285828 Initial revision almost 3 years ago
Question Should we allow questions about software quality assurance?
I would like to ask a question about the pros/cons of using a library or more generally a way of assertion of complex data models. This is more related to testing than it is to actual coding, but it is certainly tied to writing code. I am wondering if we should allow such questions in our comm...
(more)
almost 3 years ago
Edit Post #285823 Initial revision almost 3 years ago
Question Migrating HTML strings to a more secure alternative
Our team will have to migrate an old application to use a new tech stack. One of the features involves the usage of HTML editors which serialized the content as HTML and I am able to see valid HTML in the database for those fields. The HTML editor is quite limited (text formatting, links, but no s...
(more)
almost 3 years ago
Edit Post #285784 Question closed almost 3 years ago
Edit Post #285810 Post edited:
added relevant tag + minor title fix
almost 3 years ago
Edit Post #285812 Post edited:
added relevant tags + minor fixes
almost 3 years ago
Edit Post #285807 Initial revision almost 3 years ago
Question 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: ```c# try { // get the connection // begin transaction // optional execution of some changes // optional call stored procedure // optional execution of o...
(more)
almost 3 years ago
Edit Post #285769 Post edited:
removed irrelevant tag
almost 3 years ago
Comment Post #285800 @#8176 I have used "branch prediction" in this case. Your answer already has +4 and I can make amendments to the on-topic/off-topic section as feedback comes.
(more)
almost 3 years ago
Edit Post #285801 Post edited:
added relevant tag
almost 3 years ago
Comment Post #285800 I have already integrated your feedback in the What type of questions can I ask here? section as it provides a good explanation about what is on-topic and what is not. Thanks.
(more)
almost 3 years ago
Edit Post #278625 Post edited:
added UI/UX feedback from Lundin
almost 3 years ago