Friday, 6 January 2012

I was asked to do this for a job interview:


--------------------------------------------------------------------------------------------------
C# Development Exercise

Write a simple evaluator which will parse and evaluate expressions like the
following:

    (5 + 5) * (3 + 2) - 1

It only needs to support the operators * + - () and unary minus. The
submission should be in C# .

We will be considering:

1) Is it readable and understandable?
2) Could the implementation be extended?
3) What were the design decisions? What are the trade-offs?
--------------------------------------------------------------------------------------------------

I came up with this:


Which when compiled and ran :


It works fine .. Even has some basic syntax checking before evaluating.


C# MVC3 & JSON

I've been testing out JSON in MVC3 and its good.

Here's a demo of a test app i knocked up.

Here a snapshot of the short source:


I'm going to upload the source and maybe write up a small tutorial very soon.

#C# #MVC3 #JSON