?

Log in

No account? Create an account

December 14th, 2004

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.
1. Grab the nearest book.
2. Open the book to page 123.
3. Find the fifth sentence.
4. Post the text of the sentence in your journal along with these instructions.
5. Don't search around and look for the "coolest" book you can find. Do what's actually next to you.

For example:

vector <string> svec;

void init_and_assign()
{
    // initializing one vector with another
    vector <string> user_names(svec);
    //...
    //
    // copying one vector into another
    svec = user_names;
}



This is what you get when I'm at work.
Yah, so I finally figured out how to format code in LJ. Cripes, what a pain.

Bah. Humbug.



Your Christmas is Most Like: How the Grinch Stole Christmas





You can't really get into the Christmas spirit...
But it usually gets to you by the end of the holiday.


Latest Month

April 2012
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Tags

Powered by LiveJournal.com
Designed by Tiffany Chow