LambTracker Meets the Lambs


We’ve been using LambTracker to document all the births during this lambing season. I’ve uncovered several bugs and there are some workflow issues that are being dealt with but by and large everything is working as planned.

For now I am also keeping my standard paper backup of the data and also entering it into my old spreadsheet record system so there is double work for every birth.

I have fixed the duplicate tag issue for LookUpSheep but need to do some work to make it accessible everywhere. The other 2 issues are not done. I’ve been fixing the minor bugs as they show up during lamb processing rather than adding new features.

Lambing Module First Testing

First Lambs of 2014

Pair of ram lambs. First of 2014 and also via AI.



LambTracker Lambing module encountered live sheep for the first time today. 2 sets of twins. We uncovered a few work flow issues. It’s important to get all the tags ready and enter everything but the weight in LambTracker before you actually tag the lambs or weigh them due to going back and forth with the screen and input. Lamb slime is not good for a touch screen. Neither is snow melting and falling on it causing erroneous key presses.

However, in spite of the weather issues the program worked well and all 4 lambs born so far today were processed properly.

3 known issues that need work:

  1. LookUpSheep only looks up the first sheep with a given tag. Fine for ear tags that are not duplicated but a problem for the paint brands we put on the sheep at birth.
  2. I didn’t get the edit the Lambing History record part finished so for now adding the details of the birth is being done on my Mac by hand directly into the database.
  3. Related to above I also didn’t finish adding the paint brand to the ewe record section. SO I am also adding that by hand on the Mac directly into the database.

The items are not really bugs, just functions that are not written yet or not finished.

We are having snow storms and we have a number of ewes looking ready to go in the next 24 hours so LambTracker is likely to get a workout.

Lambing Module Update

The Lambing Module went to feature freeze about a week ago and I’ve been working on bug fixes. As of yesterday the main Lambing Module and the AddLamb activity are both working properly.

There are some issues with LookUpSheep because handling multiple sheep with the same ID is not supported yet. So looking up a lamb with a paint brand will only get you the first lamb not all lambs with that number.

I did make one modification to LookUpSheep to add display of the birth date, birth type and sex on the main screen.

I will be taking out the debug code today and tomorrow in preparation for testing with real live sheep. Lambing is due to start on Thursday for the early date (142 days gestation) and next Tuesday for our most likely date (147 days gestation).


As you can see programming is just barely done in time.

Notes vs Evaluations vs Alerts

Just finished a major change to the database structure. We’ve always had the concept of Alerts – things that you want to check next time you work the sheep, Notes – Things that stay with the sheep record for life but don’t really fit into any other table and Evaluations – ranking and scoring and measuring the sheep in some fashion.

What became obvious is that the udder status (none, small, medium or large) is really an evaluation at a given time for a sheep and all that data is not really a note but is another type of user defined evaluation. I had already created user evaluations for the estrus status and pregnancy status so I had the structure there. I’ve added the udder status to the user defined evaluations and completed fixing EvaluateSheep to handle dynamic creation of multiple user defined traits with custom results. Next task was to update the database and fix the historical records already in it to reflect the new structure.

I suspect each flock owner will have a slightly different take on what should be a note vs an alert but that is why the system is designed to support either option. For now the new structure seems to make more sense to me.


Shearing and Sheep Management


Last week we had the first field trial of the shearing and sheep management modules. We learned several things that are being incorporated into the LambTracker program now.

First, during shearing it was too much effort to use the checkboxes for notes about each sheep on the handheld computer. It slowed things down far too much. So by the second set of sheep to be shorn I had created a paper form with the checkboxes. We used the Print Labels function and set it to print 2 labels for each sheep scanned. I could attach one label to the shearing sheet, check off the boxes for that sheep and used the other label to go on the fleece bag.  This worked well. Data entry time back in the office was a bit longer than I wanted because I didn’t have a desktop data entry screen set but I am thinking that I can integrate a bar code scanner and use that to scan the printed label and bring up the sheep record along with a screen with checkboxes just like the paper sheet for data entry. That module is being designed and planned now.

Second, the workload during vaccinations and worming was also high. I do not yet have the group medication modules written on the desktop so the only way to add a medication record is to do it individually for each sheep. The LambTracker standard of click to enable the scanner, then scan a sheep, then click to look up a sheep, became cumbersome to use. However, if we set it to always do an automatic scan and lookup there is the risk that a second sheep will get scanned and the data entry screen change before you’ve saved the data for the previous sheep. I’m still struggling with what is the best way to handle that case. I like the multistep method as it prevents erroneous data or missing data but it is much slower. I’m considering a user option to set the mode but haven’t worked out how to do that yet.

Third, there is the concept of notes about a sheep. Notes are permanent records and I have a number of predefined notes that can be attached to a sheep record. Examples of notes include things like the date shorn, some data on fleece (sticky or nice) behavior notes, udder status etc. It became clear during this exercise that I needed to be able to attach several notes to a single note record for a sheep. So I made a change to the database to implement up to 5 predefined notes per sheep at one time. Now I am in the process of adding those note options to all places where I have a “Take Note” button.

The lambing module is undergoing bench testing now but we won’t get to test it with live sheep until later this month. One initial discovery. There needs to be a simple way to add a tag or other id to a lamb after you’ve already entered it. That’s probably going to be added to the Lookup Sheep module.

Data entry of historical data is also proceeding. I have 17 years of past data on our flock to enter. I have started developing blank LibreOffice spreadsheets that can be used to collect the data for the various sheep database tables. The procedure is I enter in the data onto the spreadsheet. Save the file as a CSV file. Then, using a CSV to SQL tool, I can create the insert or update statements for the database as required. Lastly, I go back into the free Firefox SQLite tool and copy and paste the SQL statements into the execute SQL window and run them. So far it’s working well.

My existing records are in a huge LibreOffice spreadsheet but I combined things in some cells that are in separate tables in the database so there is some parsing out of stuff to make it all work. That’s why the need for separate blank spreadsheets for each type of table entry. I have started putting a background color of green in my main spreadsheet for all cells where I have transferred the data to the LambTracker database. This makes it easy to see what is left to enter.

LambTracker is designed so that you do not have to enter in all the data in order but can start where you are and slowly enter in the back data. This method has advantages and disadvantages. One advantage is obvious, no huge initial data entry task but one disadvantage is that you will need to go back and update or edit individual records. For example, when I enter in a sheep I do not require that there be a sire and dam listed. But once I do finally enter in the parents and grandparents of sheep I need to go back and make those linkages. It’s not hard but it is tedious. Which way a flock will choose to go depends a lot on how much back data they have and how much they eventually want in the LambTracker database. In my case we want the entire flock history in LambTracker so we’ve got to slowly get it all in there.