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
The best practice here is, Don't deploy your .git folder to your web server. Then there's nothing to protect.
Although spreadsheets were never really intended for text processing, I think a formula solution is possible (LibreOffice 5.4.3.2): For the first example above: =(LEN(A1)-LEN(SUBSTITUTE(A1,"XYZ",""...
I was thinking about meaningful content that can be migrated (+ improved) from Stack Overflow. These categories pop into my mind: closed questions: we know Stack Overflow is very picky when it co...
As Lundin points out, there are quite a few whitespace-sensitive programming languages out there, where automatic wrapping would change the apparent meaning of the code, such as Phython or JavaScri...
Code blocks that are wider than the column they're trying to fit in now get horizontal scrollbars. As noted in another answer, it's not safe to assume that line-wrapping won't change the correctne...
tl;dr: No. From an engineering perspective, you might be asking if a concatenation operator can be used in place of a logical ‘and’ operator. This is obviously specific to a particular language, bu...
I believe the term "hook" comes from the Windows API where you can register "hooks" - callback functions - to respond to certain events, optionally replacing the original behavior. Not necessarily ...
The best way to estimate this is to measure it, for instance by importing a backup of the production database into a new instance and run your scripts there. Short of that, you could consult the ex...
In programming instead of arrowcode where one has many layers of indented if statements, you can return a result as soon as possible. So instead of, if if end if end if It looks like if ret...
This is a current limitation of the software. Right now, there is simply no way to add detailed feedback to the close reason. There is a list of pre-written close reasons (which can be set per site...
Solution 1: Honestly, it is a best practice used by current frameworks (symfony, laravel) to use an .env file that you will have into the .gitignore. On the otherside, you will commit a .env.dist o...
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 ...
Context: Azure; Windows Server 2012; IIS 8 First up, here's the (redacted) web.config for reference <rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="false"&...
Just mass-importing from elsewhere is generally bad. Look at the mess this has made of the Outdoors and Scientific Speculation sites, for example. Bringing over your own content is a bit different...
is_excluded = 1 is very different from do_not_touch != 1. Whenever possible, try to structure your data and queries so that you can do an equi-join - that is, compare things using an = comparison. ...
Let's say we have two tables A and B and a join table C that has foreign keys to both A and B and the combination of those foreign keys is unique. One could either do a unique constraint or a comp...
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...
If I understand your question correctly, i.e. Is it possible to enforce that constraint at the database level? Then the short answer is: No. In the business logic for the program, every re...
I'm in the "Use the braces. Just use them every time" camp [1]. As others have suggested you or your tooling will catch a lot of cases where you screw up on this, but the ones that slip through can...
Summary/Context I'm currently working to improve performance and throughput of our automation infrastructure, most of which is a combination of Bash/Shell scripts, Python scripts, Docker, Jenkins,...
I can't say that I fully understood what you did, but I think I got the explanation: removed 1+ columns that were part of the index. The index will be updated to not include that column. If...
LIMIT/OFFSET, fundamentally, is slow for large datasets. With a clause like LIMIT 10000 OFFSET 150000, you're asking the query engine to find 160,000 rows, then throw away 150,000 of them. Hardly e...
Due to a series of unfortunate events I have some tables where the auto_increment value got behind what it should be. If the auto_increment value is 9 and there are 20 rows in the table the next 1...
Is there any guarantee regarding initialization of static and thread_local objects? In example, is there any guarantee about the value printed by the following program? #include<iostream> s...