Did you like how we did? Rate your experience!

4.5

satisfied

46 votes

Question to kernel mode C programmers.?

As something of a specialist in obsolete systems', I have often come across driver code that was clearly written by someone who didn't understand what was needed to make it work*. What do I do, after ranting and complaining to myself about this non-optimal chunk of code, when I should be active somewhere else? I take a step back (sometimes figuratively, sometimes literally), take a deep breath, take a moment to ponder, and ask myself, Does this code actually achieve what it needs to do? If the answer is Yes", then no matter how inefficient, messy and uncoordinated the code is, I let sleeping dogs lie, and move on to the area that I should really be working on. If my manager did not understand code (it was unusual, but one of my best managers didn't), I might say This code here, is sloppy and inefficient. It barely does the job, but it does. It uses 4K of ROM but could be rewritten in 3K. As we have 2K spare, that's fine, but if the API needs extending in the future, we could run into problems. The manager would ask pertinent questions, I would answer, maybe offer my preferred way forward, and they would decide the actual way forward. Unless it was idiotic (not common but it sometimes happened), I accepted and moved on. If idiotic, I would express my feelings and ask them to reconsider. If they persisted, I accepted it; I had pointed out the folly of their ways, and after I got home and vented my frustration to my wife, she would point out that I was being well paid by the hour, and to move on. * Sometimes, I'm somewhat embarrassed to say, that someone was me, some months or years earlier.

100%
Loading, please wait...