Sunday, 23 March 2014

Triumph

With things slowly quieting down, I think it'll be a nice time to look back upon my triumphs and struggles with A2 Part 2.
My only real struggle with this assignment was with Is_regex.  To be candid, I found the coding for this function to be by far the toughest of the bunch.  The innumerable cases to consider for possible inputs, and possible program responses took a hefty amount of time.  After I thought I had finished the code, I ran a series of test cases.  And bam!  The invalid regular expression  "(1|2)**(1)" returns True.  Then, back to the drawing board.  This process contuined a few times until it finally passed every single possible test case I could conceive of.  Following this function, the others seemed ridiculously simplistic.  Although, a lot of code that followed would not of been so simple, if not for the extraordinary work that preceded it (and yes I'm referring to Is_regex).

No comments:

Post a Comment