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.
Search
I saw at least one compiler (Codewarrior for HC12) warn me if I use a function without using it's return value. Other compilers (clang/gcc) do not issue a warning though, even when using the std=90...
I'm trying to make a trait method callable on mutable slices of a type implementing that trait (see main). Rust doesn't like me for it. use core::convert::AsMut; trait A { type B; fn f(m: ...
After enabling two factor authentication (2FA) for my account I'm only notified It is successfully turned On. I think it should include some recovery codes as well (to be used in case I can't acce...
Facts In relational theory, each row in a relation is uniquely identified by a primary key. That's why some purists say that every table should have a primary key. Foreign keys usually reference a ...
SQL Server uses '1900-01-01' as a "zero-point" in DATEDIFF(dd, 0, some_date): select DATEDIFF(dd, 0, '1900-01-01') --> 0 select DATEDIFF(dd, 0, GETDATE()) --> 44066 days since the "zero-d...
In C#, I have two lists and need to mark records in the first based on the second. Here's a sample: public class Vehicle { public string Make { get; set; } public string VIN { get; set;...
Consider an object for which a method is invoked. Beyond certain point the method no longer accesses this at all. No read/writes of non-static members. No invocation of non-static methods. Is it ...
Is uint8_t guaranteed to be a character type if it exists? Will using a uint8_t* to examine bytes of an object cause violation of the strict aliasing rule? Is the following legal code: #include &l...
No, such an operation is not safe. The documentation of std::unique_lock in the standard states that it's UB for the mutex do be destroyed while the lock still has a pointer to it. However, there ...
Historically, compiling programs could take a long time. Interpreted languages did not need to be compiled. So if developers wanted to change the program, if it was interpreted they could just twea...
tl;dr: Allowing beginner-level "help me diagnose this" questions will generate large volumes of duplicates if the site ever scales. We need to think about how to structure things if we want them. ...
I have developed an Atom package which calls SyncTeX (a utility for reverse lookup for LaTeX), and then opens in Atom the file specified in the SyncTeX response. I'm developing on Linux, but now a ...
As we have set up communities here on the Codidact network we've been appointing temporary moderators. Usually some people stand out from the proposal process and early activity. Ultimately, of c...
I'm trying to learn Linux, and I've got plenty of questions to ask on the subject, especially when it comes to differences between Linux's command line and Apple's. Would such questions be accepted...
Any time an SQL SELECT query does not have any explicit ORDER BY clause, I personally find it useful to mentally read it as saying "I don't care about ordering of the output of this query". If you...
Google Sheets isn't a company name, it's a product name. A tag called google-sheets is perfectly fine. Google doesn't market this product as "Sheets", they market it as "Google Sheets". What is not...
From time to time I will have large structural changes to make on my MySQL DB, things like adding columns, changing datatypes, adding indexes etc. These types of changes result in downtime and what...
The Problem I have a path optimization problem that in some ways reminds me of the Traveling Salesman Problem, but differs in some key respects. I have a group of items that need to be used by a m...
There is a well know trade-off between a site aiming for questions/answers that are of a high quality and useful for people who arrive from Google and a site being nice to new users who often only ...
When doing something simple such as this int a=1; int b=2; int c=3; printf("%d\n", a + b * c); then I was told that operator precedence guarantees that the code is equivalent to a + (b * c)...
This is intended to be a canonical post for this problem which is pretty common. Especially among beginners. I've heard that I should avoid using floating point variables for representing curren...
For some tasks, I find git show-branch easier to follow than git log. For example, inspecting the history on someone's PR before merging it. git show-branch master topic stops at the first common ...
I've just started playing around with pygame and have written a small game in it, of which I'd like a review. Note that I'm not only a complete beginner in pygame, but I also have very little exper...
The size of the "primitive data types" int, float etc is not defined by the standard. In practice, int is either 16 or 32 bits on all known systems. Because of the unspecified size leading to poor...
I'm rather new to using git, so I'm not sure about the best practices regarding it. I have a feature branch branched off, and periodically when the feature needs to be updated I will add some commi...