Hello Satellite! (or Lost at C)

Jun 22, 2007 23:16

I'm writing code to create instructions for things flying round in space. I wish this was a more positive post...

Read on for what is basically a whinge about work. Or don't... )

Leave a comment

Comments 4

bateleur June 23 2007, 10:01:08 UTC
XML is basically just used as parameter-value pairs with angle brackets and a tick against the customer requirement "we'll use XML".

Head -> desk.

I shall radiate sympathy at you from afar.

mostly what they need is C++

And if their C++ is anything like their XML, what they really need is some code monkey to write the sort of stuff that would make waistcoatmark foam at the mouth !

Reply


onebyone June 23 2007, 20:00:31 UTC
solved with the removal of the word const from the legacy code

May I point out that this sounds very much like the C++ equivalent of "the data might change and we wouldn't want the validation to fail"?

Unless, of course, the person who wrote the code in the first place just left random "const" modifiers lying around for no reason whatsoever. In which case obviously taking them out would indeed be the fix.

Also note that for bonus points, sometimes you can leave the "const" in, but add one or two tactical uses of "mutable". If you're lucky, the resulting code will be utterly incomprehensible and unmaintainable.

double pointers

If in doubt, refactor these to be references to pointers.

iterators

Iterators rock, especially if someone cleverly invalidates them by modifying the underlying collection while you're trying to iterate. Remember: for full marks you must use the overloaded difference_type operator-(Iterator &) of random access iterators at every opportunity, preferably more than once in a single expression, in contexts ( ... )

Reply


a_llusive June 24 2007, 11:46:52 UTC
You have my sympathies; the early part of the problem (inappropriate use of Word as a base for everything) is entrenched in the procedure for the Central Admin site. I work around it every chance I can get but the new CMS is supposedly going to handle the conversions flawlessly in future so may not provide for manual tweaking. Aargh.
For the rest, while it's nice to feel valued it seems worth making sure your concerns are recorded in a (or several) emails to the code leader so it is clear he is ignoring you without an excuse if you have to take it higher. In the absence of a review or feedback system it's hard to see another option if the situation persists.

Reply


undyingking June 25 2007, 07:38:08 UTC
"we don't want a restrictive schema - the data might change and we wouldn't want the validation to fail"

Ha ha ha... oh, they're being serious. I suppose you're not really in a position to be able to say that this is kinda missing the point. It does sound intensely frustrating, sympathy.

Reply


Leave a comment

Up