My FYP Role
Posted by Jonathan Ng | Filed under Personal
Beyond any reasonable doubt, many would consider my FYP role to be super boring! Really, take a look at my module’s user interface - all it has is 2 buttons, 3 text boxes (2 would suffice actually) and 2 labels. But, take a peek behind the interface, and you’ll see more than 2000 lines of code cranking away.
Eu Hua’s already blogged about Stephy, and as you could see in this screenshot, my module is the little text input area at the bottom. It parses user input in the form of programming codes and basically executes the commands the user specified. Sadly due to me involvement with Imagine Day, I was unable to complete it in time for proper integration.
One mistake during the development phase was spending too much time worrying about performance. Architect-ing the parser took a lot of time - and perhaps 1/3 of it worrying unnecessarily on performance related issues. I started development after doing some brief studies into language theories, and believe me, it’s a damn complicated field of study.
Parsing/compiling is basically composed of 3 phases: lexical analysis, syntax analysis and finally semantic parsing. Building the required classes for lexical analysis was the easiest part of the development process. For weeks and weeks, I was stuck with the second phase. Thankfully, I managed to find a complete grammar definition for the C language. The language grammar actually defines and describes the correct syntax of a particular language. After matching the user’s input codes with the correct syntax, the last phase is to actually do what the user wants - dealing with calculations, variables, conditions and iterations (loops).
I have to admit, halfway through developing the parser, I started to have second thoughts. Why write something from the ground up when there are parser generators like Antlr? What commercial value would a parser have? While almost all my friend’s Final Year Projects involve databases like SQL Server, mine doesn’t! I’m graduating with little experience in databases (stored procedures, indexes, optimization, replication?). While I don’t have good answers for these questions, I know I had to slug it out and complete what I started.
Do I regret developing a parser as my FYP? Shrug.. I really don’t know. Some like Eu Hua are proud of doing something different unlike the usual database systems. On the other hand, I know that if I were to do a business kinda information system, there would definitely be some sorta twist to make it enterprise class. Hey, my project supervisor’s Stephen Tang after all :P
Tags: college-assignments, fyp
2 Responses to “My FYP Role”
-
Richie86 Says:
January 2nd, 2008 at 12:36 amfinally you show it here.. cool! that day asked you to show me the program but you refused =.=
-
Jonathan Ng Says:
January 2nd, 2008 at 9:40 amCannot show unfinished work mar..