Tom Ramcigam (magicmarmot) wrote,
Tom Ramcigam
magicmarmot

Boinout

Just finished a quickie marathon of coding.

See, the system architect has designed this whole units system/base
number/variable representation system for representing any kind
of measurement in the system. It's a hugely complex set of classes that
all operate together (in theory) to allow for things like conversions
from english to metric, or from one unit to another (feet to inches).

It's really idiotic for what we need, and internally we have chosen not
to use it. That choice has met with a lot of resistance, but we're not
budging.

The problem is that I have to deal with external inter-team interfaces,
and the other teams are using this system to provide information.


So say that I want to get a measurement in millimeters of an offset
value-- a value which I generate BTW-- from the storage server. Rather
than something simple like:

//---------------------------------------------
NorthOffset = pThisLine->GetNorthOffsetValue();
//---------------------------------------------
I have to do this:

//----------------------------------------------------------------------
pInterface1 = new(Interface1DataReader); pLineDataInterface = new(LineDataInterface);
if(pInterface1->GetLineFromField(fieldID, &pLineDataInterface)
{
BaseNumber Measurement;
UnitOfMeasure Units;
UnitOfMeasure *pSourceUnits;
UnitSystemManager UnitSysManager;
Units.SetManager(&UnitSysManager);
Units.Manager.GetUnitType("mm"));
Measurement.GetSourceUnits(pSourceUnits);
pSourceUnits->ConvertTo(&Units, pSourceUnits->GetSourceValue(),Units.GetTargetValue());
Measurement.SetTargetUnit(&Units);
if(pLineDataInterface(GetNorthOffset(&Measurement) == SUCCESS)
{
NorthOffset = Measurement.GetValue();
}
}
delete(pLineDataInterface);
//-------------------------------------------------------------------------

This system has been in design since sometime in late April. It's still not done, or even tested.

So I created a stub class that looks like it to the program, but just provides values, because that's really all the functionality that I need for my testing.

It took me around five hours.

Bear in mind that they wanted to propogate this system through the entire product whenever there was a bit of measurement data.

And they are STILL fighting for it.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 4 comments