A Confused Programmer's Blog

This blog is dedicated to C# and Java programming that I happen to do for living – with accent on curious cases and with sincere intent to make the world of coding a slightly better place as a result

Archive for December, 2011

No super class for numeric values in C#? Not cool, dudes

Today I discovered a surprising C# limitation: apparently (as of .Net 3.5) numeric types in C# do not share common super class. I believe that this feature would come quite handy in cases like mine. My goal was to write a function that calculates average value of some numeric collection without taking into account top 10% and bottom 10%. So the code I came up with was: public static double AverageWithoutExtremeValues(List<double> values) {   values.Sort();   return values.Skip((int)Math.Round(values.Count * 0.1))     .Take((int)Math.Round(values.Count *  [ Read More ]

Continue

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

REST Assured and une

If you stumbled onto this article, it is safe to ...

Getting rid of Error

Since I upgraded my Windows 8 to Windows 10, I ...

Bypassing EULA step

We are working on automated testing of virtual appliance. This appliance ...

How I got rid of "Ac

OVF is a VMware virtual appliance format which allows you ...

My use-case of Perfo

In my blog I am set on a mission to ...

Twitter updates

RSS not configured