A calculator called Eric

A calculator called Eric

  • Comments 5

Please don't tell any of the guys here at Microsoft, but back in 2005 when I interviewed for my job on the XNA team, I had never actually written anything using .NET!

After the interview but before I accepted the job, I decided I had better learn C#, to make sure it didn't completely suck and that I wasn't going to hate programming in it.

My learning project ended up as a calculator utility called Eric. I think it's pretty neat. It can be used from the commandline to evaluate simple expressions, or you can define your own functions for more complex stuff, and it has a graph window that can display not only the usual y=f(x) type curves, but also parametric curves (x=f(t), y=g(t)), cartesian curves (f(x,y)=0), and sets.

The implementation is way more complicated than I would normally be happy with, because I was deliberately experimenting with advanced features like threading, closures, and reflection, plus trying to apply patterns from the worlds of generic, dynamic, and functional programming. I went overboard using Reflection.Emit to generate IL that evaluates user defined functions as quickly as possible. Gross overkill, but it was a great learning exercise!

The experiment was a success. I fell madly in love with C#.

  • "Please don't tell any of the guys here at Microsoft ..."

    You're doing a terrible job at keeping the secret ;-)

  • LOL :)

  • So just out of curiosity, why name it Eric?  Why not Bob or Ralph, or some other name? :P

  • "So just out of curiosity, why name it Eric?"

    No reason, I just had to call it something and that seemed like as good a name as any!

  • Beginning is hard for beginners?

Page 1 of 1 (5 items)
Leave a Comment
  • Please add 7 and 6 and type the answer here:
  • Post