Tuesday, 26 November 2013

Assignment 2 and the wider world (Part 1)

    Everything in computer science ties together in some way, shape or form. Personally I learn best by being able to make connections between things, amd Assignment 2 is no exception.

    There are various concepts that come up in assignment 2 - Regexes, Binary Trees, recursion, string manipulation - but that isn't the most interesting part for me. The most interesting part is how it relates to the wider world.

    Assignment 2 introduces the concept of taking a set of rules - in this case a regex - that we can't directly work with, and turning them into something we can work with, in this case a tree.

    This concept comes back later on when you look at the broader characteristics of programming languages and compilers. What we are essentially doing in assignment 2 is taking a grammar, and generating a parse tree, or a concrete syntax tree from it. This allows us then to check if a sentence or string matches the specified grammar.

     It really is interesting how everything comes together at some point, and assignment 2 is yet another example of the importance of first year, introducing concepts that are the foundations of others.

No comments:

Post a Comment