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 Charlie Brumbaugh‭

43 posts
88%
+13 −0
Q&A Is it wrong to demand features in open-source projects?

It is not wrong to ask for changes or features or report problems, so long as you realize that the maintainer of the project is under no obligation to make those changes. You aren't paying them, so...

posted 3y ago by Charlie Brumbaugh‭

Answer
87%
+12 −0
Q&A Are there best practices for sticking conditions in WHERE clauses vs the JOIN statement?

Lets say I have two tables, A and B and I need to join a subset of them. Is there best practices of sticking the conditions in the WHERE clause like this, SELECT * FROM A JOIN B on a.fk_b = b....

3 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 7mo ago by billkarwin‭

Question mysql join
87%
+12 −0
Q&A For scripting what are the pros and cons of command line arguments versus capturing input at the start?

Let's say I have a script that needs the user to set X number of variables at the start. One can either Pass the arguments in on the command line. Start the program and then have the user input...

6 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 10mo ago by Dirk Herrmann‭

83%
+8 −0
Q&A Is there a way to estimate the execution time of a statement in MySQL?

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...

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

Question mysql
81%
+11 −1
Q&A Why would excluding records by creating a temporary table of their primary keys be faster than simply excluding by value?

I have two tables with millions of records. Every so often I need to join them and exclude just a handful of records where a bit(1) column is set to 1 instead of 0. I can do it with either, WHERE ...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

80%
+6 −0
Q&A Is there a naming convention for table aliases?

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...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

80%
+6 −0
Q&A How can I make --reset-author the default?

You should be able to alias the string to something short. For example, I have git config --global alias.a 'add .' git config --global alias.ci commit and so instead of git add . git commi...

posted 3y ago by Charlie Brumbaugh‭

Answer
80%
+6 −0
Code Reviews PHP script to create a KML square centred on a point.

The objective here is to create a set of square kml coordinates centered on a point. I use this to create a square map centered on a mountain peak and then turn that into a STL that I can 3D print....

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Moshi‭

Question php stl-format
80%
+6 −0
Q&A How to store credentials for PHP scripts on a Windows machine?

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...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Charlie Brumbaugh‭

Question php windows
77%
+5 −0
Q&A What would the pros and cons of storing the compiled CSS output of SASS in version control?

If one is using SASS to build a websites CSS and using version control one can either, Keep both the SASS and the resulting CSS files in version control. Only storing the SASS files in version con...

4 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by ben‭

77%
+5 −0
Q&A Is an ORDER BY required when looping through MySQL records with LIMIT?

Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once I select 1,000 at a time like LIMIT 0,1000 LIMIT 1000,1000 etc. Without an ORDER BY statement the or...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 2y ago by Alexei‭

77%
+5 −0
Q&A Is it unsecure to use a password on the command line to run a MySQL script on Windows?

Its possible to execute a MySQL file from the command line like so, mysql -u USER -pPASSWORD < FILENAME which triggers a warning, mysql: [Warning] Using a password on the command line int...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by ghost-in-the-zsh‭

Question mysql windows
77%
+5 −0
Q&A Is it possible in MySQL to require each row in a table have at least one foreign key record in a join table?

I have tables A and B and then I have a many to many join table with foreign keys to both called a_b. Neither foreign key can be null and the combinations for the foreign keys to A and B are unique...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

Question mysql referential
75%
+4 −0
Meta How does the community feel about resource requests?

I would like to see questions asking for help finding resources be considered on topic, but I would suggest creating a seperate category for them, like how Photography and Outdoors have one for Gea...

posted 3y ago by Charlie Brumbaugh‭

Answer
75%
+4 −0
Meta What is the point of tagging a question with both a parent and a child tag?

On the old sites, if you wanted to tag something with [sql] and [mysql] that required two tags. However, because we have hierarchal tags where [mysql] is a child of [sql] you only need to tag it wi...

3 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Peter Taylor‭

Question discussion
75%
+4 −0
Q&A Is there an equivalent way of returning early in a MySQL stored procedure?

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...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Moshi‭

75%
+10 −2
Q&A What are the pros and cons of a composite primary key versus a unique constraint?

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...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭

75%
+4 −0
Q&A Is there a way to automatically fix MySQL tables where the auto_increment has fallen behind the correct value?

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...

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

75%
+4 −0
Q&A Would a MySQL database run more efficiently with smaller varchar lengths?

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 ...

3 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by manassehkatz‭

72%
+6 −1
Q&A What are the pros and cons of using objects vs associative arrays for JSON results of a CURL request in PHP?

I have a PHP script that uses CURL to return a JSON result that looks //Curl set up code $result = curl_exec($ch); //Error checking code $json = json_decode($result, true); //Code to process r...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Yaskur‭

Question php json
71%
+3 −0
Q&A How to create a MySQL generated column that uses a join in a concat?

I have a column that is a concatenation of 5 other columns plus a join to a different table. UPDATE db.a JOIN db.b ON fk_b = b.pk SET concat_field = CONCAT(field1,field2,field3,b.field,field4,fi...

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

71%
+3 −0
Q&A In PHP what is the use case for include instead of require when including PHP scripts?

In PHP one can either use include or require to include files, the difference is that if the file doesn't exist it will emit a fatal error and halt with a require and only emit a warning with inclu...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Marijn‭

Question php
71%
+3 −0
Q&A In MySQL is there a limit to the number of keys in a IN() clause?

I have a PHP program that does a SELECT and then updates some of the values based on an algorithm. Rather than updating one row at a time UPDATE example_table SET COLUMN_A = 1 WHERE primary_k...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by Alexei‭

Question mysql
71%
+3 −0
Q&A Iterating through a MySQL table with a LIMIT clause and PHP gets progressively slower

I have a very large table that I need to iterate through with a PHP script and I can't do all of the results at once so I do it in sections with a LIMIT like for ($x = 0; $x < 10000000; $x += 1...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by ArtOfCode‭

Question php mysql
71%
+3 −0
Q&A Why would an unique index get moved to the primary key after the underlying column is dropped?

So I had a table with a primary key and a bunch of different columns. Columns A, B, and C were all unsigned ints (like the primary key column) and each column had a unique constraint I dropped the...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by Alexei‭