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'm working on an API to respond some data about a bunch of orders and items. The order and item numbers are always an integer (it's the order.id and item.id value, respectively). Originally the re...
When you use the variable without any format specifier (print(f'{variable}')), internally its __str__ method is called. Considering your Test class, it already has this method: class Test: def...
When I want to print a number or a string, I can use f-strings (Python >= 3.6) or str.format, and I can use just the variable between braces, or use format specifiers. Ex: num, text = 10, 'abc' ...
The manual writes: In contrast to CHAR, VARCHAR values are stored as a 1-byte or 2-byte length prefix plus data. The length prefix indicates the number of bytes in the value. A column uses one len...
A simple google search of VARCHAR size, showed that it is not an arbitrarily sized string, which means VARCHAR 150 and VARCHAR 2 would take up the same amount space. So, no-- I don't think there wo...
I have a database with quite a few VARCHAR fields. When the database was first built the lengths of the columns were set a bit larger than absolutely necessary. Now after, having used the DB for a ...
I am considering either removing some columns or changing the datatypes if I could significantly reduce the amount of storage that is currently used by those columns. Some of the columns are ints a...
I have a number of command line PHP scripts that are either run by a user or by Windows Task Scheduler. These scripts use DB and API credentials and I am wondering if there is a better way of stori...
First off, all the things @meriton said, I think overall you would be better in a single repository as your docs and code should be changing at the same rate (or should be). Having said that if you...
The C standard does not speak of "errors" and "warnings", those are not formal terms. The compiler is only required to produce a diagnostic message, as specified in C11 5.1.1.3: Diagnostics A c...
What exactly must a C compiler do when it finds a compile-time error? The most obvious kind of errors are language syntax errors, but the C standard also speaks of constraints, which are rules tha...
When a compiler encounters the statements char arr[10]; char *ptr = &arr[-1] there are three things that it could reasonably do: It can raise an error. It can compile the statements and ra...
This can depend on both your flavor of SQL and your personal preference - I've seen a number of schemes in use. For MySQL, the most common scheme I've seen used (and the scheme that my editor uses ...
The term escape sequence apparently dates back to the telegraph and pre-computer technology, according to wikipedia: https://en.wikipedia.org/wiki/Escape_sequence. So I doubt there's an universally...
I personally would define "escaping" in software development in general and coding in particular as follows: Making an exception to match data which otherwise would not be allowed to be matched: I...
Generally speaking, if two groups of people collaborate on the same software, I'd recommend they put everything in a shared git repository: Documentation is intimately tied to the version of the ...
Sometimes, either to reduce the amount of typing big table names or when joining a table to itself one will need to alias a table. Personally I find SQL statements with aliases harder to read and a...
We have two teams, dev and doc, and I'd like them to have shared access (via git) to a common subset of content. Specifically, I would like the examples that are used in the doc and that are scrip...
This is a bit opinionated, but personally, I would not do it. It would just clutter the code and could hide sources of bugs. But it depends a lot on what function it is. It's also hard to give a ve...
Yes, it is generally good practice to always cast the return value of functions to (void) if not used. This is self-documenting code showing that you aren't using the return value on purpose and di...
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 was inspired by the contests on Outdoors and Writing, and thought that having some challenges over here would be fun as well. What do you all think about adding a new category where people can po...
In Office 365 and Excel 2019 there is a TEXTJOIN: =TEXTJOIN(",",,A1:A10) which can be written into the cell where the output is required. Assumes A1:A10 has been populated to suit.
In a new tab, type A1 in cell A1, Type A2 in Cell A2 Use fill series to complete the values in column A Type A1 in cell B1 Use this formula in cell B2 =B1&","&A2 Copy the formul...
In Excel I would like to concatenate several strings into one. I could type and fill in the blanks CONCATENATE(A1, A2, ....) but it is a lot of work This would be cool, but it does not work CONCATE...