Lambing Bugs

We are nearing the end of lambing season, we only have 6 more ewes to lamb, and this year we uncovered a few more lambing bugs. Most have been fairly minor, things like forgetting to update the sheep record for new lambs with some of the new fields for management group and location. Others are on hold until lambing is done since it’s working fairly well as is and I don’t want to break anything until I don’t need it for real data.

I am also entering in historical lambing data and have developed a workflow to get the information in. I am going back to my original paper lambing books and crossreferencing with my calendar and my original spreadsheep records. I have the database up on another computer looking at all the sheep sorted by dam and then by birth date. I have a spreadsheet I created to insert lambing history records and I have a copy of the database that I am working on on a second computer.

The procedure is I look up a lambing record in the paper book, start creating the insert record in the update spreadsheet. Look to find the sheep_id for the dam then use that to look at the other copy of the database to find all her lambs. Verify that the number of lambs in the database matches the paper record. Add the lamb numbers to the lambing_history_table record. Go to my calendar and pull any notes about that lambing and add those. Go into the sheep_table and add the reference to the soon to be adde4d lambing_history record to each lamb’s sheep record. When I have a batch of maybe 10 or so done, I save the update spreadsheet as a .CSV file and then run the CSV to SQL converter to create insert statement. Copy and paste the code into the database and execute it. Then I save a copy of the database as a backup. I continue tis until all lambing records are entered for the year. Then I go to my population history records and figure out all the ewes who failed to lamb in that year and enter in a record with them listed as barren for that year. This step is necessary to allow for more accurate reporting of percentages of lambs born and weaned each year.

My final verification step takes place after I have entered in an entire year from the paper and calendar records. I pull up all my old spreadsheet records on the entire flock and look at the lambing notes for that year and make sure I have the right lambs and the right data in the lambing_history record. I do this final step at least a day after I have finished the original data entry. This is my final chance to catch any data entry errors.

So far I’ve managed to enter in 10 years worth of lambing records and only have 7 more years to go. It’s slow and tedious but necessary.

Database Changes

Making some changes to the database structure based on feedback from other rare breed breeders. I’ve moved the registration info out to a separate set of tables to account for sheep that may be registered with more than 2 registries. I have found some breeds with 3 or more different registrations, example US BWMS, UK BWMS and Natural Colored, so needed to allow for more than 2 different registration numbers per sheep. I’ve also started to add the tables and placeholders necessary to handle semen collections and dealing with lambs sired by rams that have died. Also embryo collection or eggs and handling lambs with a genetic mother who is different from the rearing mother for embryo transfer. That part is still a work in progress but I’m making headway.

Squashed a few more lambing bugs. Just in time. We are within the gestation period now and expect lambs any day now.

Back in the Saddle

After a bit of a hiatus while we did normal things like moving breeding rams in and out of pens, all handled by making any required changes to the database by hand I am back at updating LambTracker.

Current top priority task, integrate the pull requests from other developers and update the demo and blank database structures to be the current design.

As we’ve added new modules I’ve added to the database tables but I haven’t gone back to update the demo and blank versions of the database.

Lots of Clean-up

I’m doing a lot of code clean-up and fixing the GitHub Repository. I am also adding the manual into GitHub although I am writing it in Scrivener. Up next is attempting to create a repository for my SQLite queries.

The model I am moving to for branching and development is described here:

a-successful-git-branching-model

Hopefully it will make the code a bit easier to understand for new people.

Some LambTracker Bugs

We just finished sheep experiment week. We are working with the USDA on developing non-surgical AI procedures for sheep. Last year we successfully used LambTracker to collect a lot of data during the week on insemination depths, estrus characteristics etc. However, since then I had added the days in age calculation to the Evaluate Sheep function and did not test that the custom evaluations still worked. So LambTracker failed during the inseminations. I didn’t have time to debug it then but I do now and I need to do some re-writing of the days in age code to get it working again. I re-used a cursor I thought was not being used at all and that caused all sorts of database errors.

I am also adding a lot of the desktop functions to create and set breeding records, both the ram side and the ewe side that I did by hand last year. So far that is working fairly well but it’s slower than I’d like to get the data all in correctly.

Desktop Progress & A Request

I have been doing further work on the chromeos-apk system for running an Android program within the Chrome browser. It appears to be working well enough and is getting better all the time so at this point that is my focus for making the desktop portions of LambTracker.

So far the first function I am working on is setting and removing Alerts. I have the setting of them down but removing them is proving more difficult.

The biggest issue seems to be Android’s way of handling listviews and trying to use list adapters to manage the data.

My request if for additional programmers. At the Livestock Conservancy meeting I got many ideas and suggestions for enhancements. Since I am really the only programmer working on this it is necessarily slow going.

The development tools are all freely available and you can do development on Macintosh, Linux or Windows systems. All the code is up on GitHub so you can see where I am.

So I’m asking for any readers who are programmers or who have friends or relatives who are programmers who want to help make freely available flock management software more robust please join in. Go fork the repository and get started. I’m always available to help explain my thoughts and also send out info on specific requests that have been made.

Some new Activities

Moving forward looking at using the Android program as the desktop version. Current task is developing several new Activities that will be used to test the desktop options.

First up is removing sheep. We are butchering and culling stock now and I need a faster way to document the removal of a sheep.
Another one is reviewing an entire sheep record to fill in missing details or other problems.