|
Re: writing reusable code / preparing for the future
A good way to handle library changes is to not call the library in your classes. This will do two things:
1. make the code usable in places where you did not intend on using it, e.g. if you had a pot + motor you could now use it for an encoder+motor instead.
2. Allow you to handle library changes.
Last years code dosen't compile now? it *should*, since there were no modifications to the interface of existing VI's, just modifications within and new ones, at least in LabVIEW.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
|