Couple of months ago I was contacted by my superior about a short but very critical task that needed to be done for another department.
"A client", he said, "had send as some C source that does some calculations about the climate control in a room based on some sensors data and the user preferences. We need you to clean up the source and make a JNI so we can use it in our application We need it ASAP in at most a week."
My first thoughts were "Well the worst case scenario is that they've send as a single large function that does it all reads the sensors and tuns on and of the heating".
I've couldn't be more wrong!
The next day they've handed my a single 150 Kb C file that was developed for some never-heard-of embedded OS. It contained about 170 functions, all of them with the same signature int function(char*, char*, int, int, int)
. (And non of the functions really received char* with the char* arguments)
And on top of that all the comments, function names and variable names were in German.
So, couple of hours into the task I went to the project manager and told him that I'll need a week to make a full assessment of the source and eventually then I'll be able to say how much time will I need to finish the task. And that's excluding the time needed for the translation of the comments. He answered that it had to be done in a week and I have to make it happen.
When I left, I went straight to the technical director and said the I WILL NOT DO THIS TASK NO MATTER WHAT!
Well they are still searching for a sucker