I recently had to work with an SDK that had a lot of crazy parts*. Not using the SDK was not an option as it had to talk to some third party software.
What is the best way to deal with the crazy code? I genrally used static methods to convert between sensible data types to the format they required (ie bool to yesNo). That method did however lead to lots of calls to very unintuative static methods (which one of the three dateToString methods should be called where?)
Would a better approach be to store almost everything as a string in the database? Or possibly convert each datatype inline so its clear (although with repeated code). Possibly there is some more elegent solution I hadent thought of?
*Certain methods required an enum called yesNo which contained "Yes","y","No" and "n". There were also multiple diffrent formats of string they wanted to represent datetimes used inconsistently. There were also other smaller bits of crazy code.