My current project at work ended up handing me a mess to deal with. In short, I ended up with a few thousand lines of code to get code reviewed and no clean and easy way to break it up. After thrashing around for a while trying to create several change sets in the same directory, I reluctantly concluded that the source control system we use doesn't support what I wanted to do. I was reluctant because the alternative was push individual commits through in series or to have multiple copies of the full set and all the fun with propagation of edits that causes.
Well, I chose the seconds and it's working. OTOH it reminds me of the scene where Tom Hanks does dentistry with an ice skate. Just because something work, or even is the best solution, doesn't make it even remotely pleasant.
Friday, July 16, 2010
Thursday, July 8, 2010
A gratuitously cute name.
I'm reading Effective C++ 3e and in the OO section Mr. Meyers has one point he wasnt people to remember: The battle of Hastings was in 1066... OK, the real bullet point is that public inheritance models "is-a". To illustrate his point he uses the example that a Penguin is-a bird, but then goes on to point out that this can get you in trouble if you assume that all birds can fly. Well, not all can and several ways to deal with this are brought up including one that brings me to my point:
class Penguin: public Bird {
public:
virtual void fly() { error("Attempt to make a penguin fly!"); }
};
This struck me a remarkably funny, particularly if you include exception handling:
virtual void fly() { throw new PenguinError("Attempt to make a penguin fly!"); }
Q: How do you attempt to make a penguin fly?
A: You throw it.
Q: Well how does that work out for ya?
A: The penguin seems to be 'in flight' for a bit and then crashes.
Right now I'm really regretting that I can't use exceptions at work because I can't wait to derive a Penguin class from Exception just for that case!
Labels:
fun,
programming
Monday, July 5, 2010
Another looks at David Weber's world.
First of all: WARING: MASSIVE SPOILER ALLERT! If you haven’t already read ‘Torch of Freedom’ and ‘Mission of Honor’, Stop Now! I’m not even going to attempt to tell the stories so you will spoil all the surprises and get none of the fun.
A while back, I made some predictions about what was going to happen in a pair of forthcoming books. Well the no longer forthcoming; my copies are sitting on the desk in front of me. So time to see how will I did:
-When the Sollies attack the Lynx terminus, Manticore pounds them flat. - Sort of 1/3 outright kills, 2/3 abject surrender.
-Honor and 8th fleet is sent through to Talbott putting a substation portion of the Apollo equipped ships and their auxiliaries in Lynx. - partly right, 8th fleet is out of place, but at Haven. On the other hand, a lot of Apollo munitions are in Talbott
-While they are out of position the Oyster Bay ballistic pods attack. - Yup, but only the yards are the target.
-Most of the Manticore yards and many of home fleet ships that didn't go to Lynx get severely damaged. - All the yards get trashed but the fleet is untouched.
-The yard tech crews get out somehow. - The techs get toasted but ALL the R&D types get lucky.
-Oyster Bay is blunted to some extent but still hurts Manticore a lot. - Spot on.
-Somewhere in all this, the Mesa spider drive ships attack. - Spot Off
-The Mesa manned units, take a royal beating including most of the units getting captured or destroyed. - Ditto
-Non of this shows up in Torch of Freedom. - A little foreshadowing but otherwise nothing.
-Zilwicki and Cachat infiltrate Meas. - Check
-They learn of Oyster Bay, Mesa's other plans and both the spider and streak drives. - Nope, sort of and yes.
-They don't get the full story. - No, but they came sooo close.
-They capture documentation, hardware or complete examples of a spider drive. - They got one of the people who designed the thing.
-They get enough to figure out how to detect the spider drive. - Nope.
-Zilwicki and Cachat capture a functional Mesa streak drive courier ship. - Nope
-They get back about the time Oyster Bay kicks off. - Nope
-Torch of Freedom ends with Zilwicki and Cachat on the way from Mesa to Manticore. - Almost, they are heading back but not directly to Manticore.
-Elizabeth, post Zilwicki & Cachat, will send Honor directly (and uninvited) to Haven to offer not only peace but an alliance. - Directly and uninvited? Check. But pre Zilwicki/Cachat/Oyster Bay.
-Honor arrives with a very small task force as a pointed reminder that Manticore can still hurt them but isn't. - Same effect, Big taskforce
-Honor steamrollers her way into what she wants by, with impeccable manors, assuming that she will get it. - Not as much of a bulldog as I expected.
-She gets immediate talks (as in least time to Haven orbit and "meet me at the shuttle pad" immediate) face to face with Pritchart. - Almost exactly.
-After hearing what Honor (and maybe Cachat) has to say Pritchart jumps in on the spot. - Nope.
On the other hand, much of what I missed in this set of points, happens later and in reverse when Pritchart take a trip to Manticore.
-Haven sends units to help protect Manticore. - Sounds like it will happen in the next book and not that they will actually need it in the short run.
-Manticore sends tech crews displaced from the Manticore yards to Bolthole along with the Zilwicki and Cachat's finds. - Not yet at any rate.
-Hemphill and Foraker start working together. - Ditto
-The Sollies eventually turn into a back drop for the Mantcore/Haven vs. Mesa conflict. - Looks that way
- Mantcore/Haven begin to use Mesa’s operations to turn groups of Sollies away from war. - Maybe
-Some sectors fall to Mesa, others to Manticore/Haven. - It still looks like it will go that way.
-The Sollies fracture along the lines of what Honor outlined in Storm From the Shadows. - Still Looking that way.
Score:
-Yes: 8
-No : 6
-Sort of: 8
-Not yet: 7
Not bad. None of the books went as far as I expected them to, but aside from that I was about half right.
A while back, I made some predictions about what was going to happen in a pair of forthcoming books. Well the no longer forthcoming; my copies are sitting on the desk in front of me. So time to see how will I did:
-When the Sollies attack the Lynx terminus, Manticore pounds them flat. - Sort of 1/3 outright kills, 2/3 abject surrender.
-Honor and 8th fleet is sent through to Talbott putting a substation portion of the Apollo equipped ships and their auxiliaries in Lynx. - partly right, 8th fleet is out of place, but at Haven. On the other hand, a lot of Apollo munitions are in Talbott
-While they are out of position the Oyster Bay ballistic pods attack. - Yup, but only the yards are the target.
-Most of the Manticore yards and many of home fleet ships that didn't go to Lynx get severely damaged. - All the yards get trashed but the fleet is untouched.
-The yard tech crews get out somehow. - The techs get toasted but ALL the R&D types get lucky.
-Oyster Bay is blunted to some extent but still hurts Manticore a lot. - Spot on.
-Somewhere in all this, the Mesa spider drive ships attack. - Spot Off
-The Mesa manned units, take a royal beating including most of the units getting captured or destroyed. - Ditto
-Non of this shows up in Torch of Freedom. - A little foreshadowing but otherwise nothing.
-Zilwicki and Cachat infiltrate Meas. - Check
-They learn of Oyster Bay, Mesa's other plans and both the spider and streak drives. - Nope, sort of and yes.
-They don't get the full story. - No, but they came sooo close.
-They capture documentation, hardware or complete examples of a spider drive. - They got one of the people who designed the thing.
-They get enough to figure out how to detect the spider drive. - Nope.
-Zilwicki and Cachat capture a functional Mesa streak drive courier ship. - Nope
-They get back about the time Oyster Bay kicks off. - Nope
-Torch of Freedom ends with Zilwicki and Cachat on the way from Mesa to Manticore. - Almost, they are heading back but not directly to Manticore.
-Elizabeth, post Zilwicki & Cachat, will send Honor directly (and uninvited) to Haven to offer not only peace but an alliance. - Directly and uninvited? Check. But pre Zilwicki/Cachat/Oyster Bay.
-Honor arrives with a very small task force as a pointed reminder that Manticore can still hurt them but isn't. - Same effect, Big taskforce
-Honor steamrollers her way into what she wants by, with impeccable manors, assuming that she will get it. - Not as much of a bulldog as I expected.
-She gets immediate talks (as in least time to Haven orbit and "meet me at the shuttle pad" immediate) face to face with Pritchart. - Almost exactly.
-After hearing what Honor (and maybe Cachat) has to say Pritchart jumps in on the spot. - Nope.
On the other hand, much of what I missed in this set of points, happens later and in reverse when Pritchart take a trip to Manticore.
-Haven sends units to help protect Manticore. - Sounds like it will happen in the next book and not that they will actually need it in the short run.
-Manticore sends tech crews displaced from the Manticore yards to Bolthole along with the Zilwicki and Cachat's finds. - Not yet at any rate.
-Hemphill and Foraker start working together. - Ditto
-The Sollies eventually turn into a back drop for the Mantcore/Haven vs. Mesa conflict. - Looks that way
- Mantcore/Haven begin to use Mesa’s operations to turn groups of Sollies away from war. - Maybe
-Some sectors fall to Mesa, others to Manticore/Haven. - It still looks like it will go that way.
-The Sollies fracture along the lines of what Honor outlined in Storm From the Shadows. - Still Looking that way.
Score:
-Yes: 8
-No : 6
-Sort of: 8
-Not yet: 7
Not bad. None of the books went as far as I expected them to, but aside from that I was about half right.
Subscribe to:
Posts (Atom)