Hi, this is Jackson.
This is my first time working in the Geomorph lab, and I've been looking into some problems on the software side of things. The first thing I fixed was a problem with the way the software did calculations for lead. The calculations originally were modified to compensate for a problem that we have since found another solution for, so I had to find and remove that section of the code. The person who originally wrote the code is no longer part of the lab, but his comments were helpful in learning how the code worked. There were also a number of samples that threw errors when calculating. Some of these only had errors in the batch calculations.
There did not seem to be a pattern the errors, which meant that there had to be more than one cause. I found that some of them had a problem with the names. The batch search matched names by only looking at the first two parts separated by hyphens and underscores. This lead to problems in two situations. When the name had no hyphens or underscores, it would throw an error due to trying to call the second element in an array that had only one. I inserted a quick if statement to make it work with an array with length one, fixing the problem.
The problem had another side, which is that when the name had only one part, and then a date, the first part of the date would be added as part of the name. This was, unfortunately, a problem I could not solve, as some of the names were supposed to have numbers as the second part, so simply making it so that it would drop a part if it was just the number would cause those ones to fail instead. As such, it is just increases the importance of naming the files with the proper system, which always involves at least two parts of the name.
Currently I am working on altering the program so that it can avoid redoing calculations on samples it has already done calculations on, but I am having some trouble with understanding the section of the code I'd need to use to change this, so I will be studying SQL databases some more, and trying to figure out the other causes of errors. This was my first experience working with code somebody else had written and data, outside of classes, which was a challenge, but gave me a window into a more practical and professional way of coding.
No comments:
Post a Comment