Finished now (didn't get a chance to do more than a few minutes during the last 3 days).
Wasted a bit of time with a misreading of the 24th but got it in 10 minutes this morning and part 2 followed on simply. Not a big fan of big wordy plods like this, but they're quite representative of real world coding with slightly imprecise specs and long slogs of boring programming!
Not sure where you work - but can I have a job there?!
Whilst I think it's nice that AoC has presented a dimension of difficulty in terms of having a verbose, complicated spec - I would disagree that they're representative - I would say that AoC specs are far, far
better written and more concise than real world specs.
e.g. AoC
Spec: "During the target selection phase, each group attempts to choose one target. In decreasing order of effective power, groups choose their targets; in a tie, the group with the higher initiative chooses first. The attacking group chooses to target the group in the enemy army to which it would deal the most damage (after accounting for weaknesses and immunities, but not accounting for whether the defending group has enough units to actually receive all of that damage)."
Real world would be:
Spec: "The strongest [sic] attack first."
Dev: " 'Strongest' meaning? The one with the most
power, or the most
units?"
Sponsor: "Oh, er... the one with the most power."
Dev: "Ok."
Later:
Sponsor: "This is a BUG! Unit C has attacked before unit D!"
Dev: "Yes, well, they've both got the same power. As designed."
Sponsor: "Yes but D has got higher initiative!"
Dev: "You didn't say anything about higher initiative attacking first in the event of a tie."
Sponsor: "Well, that should have been obvious!"
Recent AoC problems like Day 24 test the skill of data modelling, as well as just procedural logic.
I don't think any of the specs have been ambiguous. Some have been confusing, particularly Day 17, which required reading every single bit of it very very carefully, with crucial detail being in the letter rather than the spirit of the rules, but I don't think any have actually required a leap of faith or reading between the lines, or been noticeably ambiguous.
Clarifications like 'not accounting for whether the defending group has enough units to actually receive all of that damage' are the exact sort of things that are missing from real world specs as it is the sort of thing only a developer would think about.
In reality, if you were programming a real army, some devs might decide that the sponsor wouldn't want to see a powerful unit "waste" an attack on one that is already nearly dead, and insert that into the logic, even though the sponsor didn't specify that - but other devs might not. Here, he's thought about it from the programmer's point of view and clarified it.