Archive

Archive for the ‘Interesting’ Category

C# vs Java: casting objects and calling members

February 11th, 2011

Given these two functionally identical code samples in c# and java, what is the output?

C#:

public class A
{
  public String Method()
  {
    return "this is A";
  }
}

public class B : A
{
  public String Method()
  {
    return "this is B";
  }
}

A thisA = new B();

thisA.Method();

Java:

public class A
{
  public String Method()
  {
    return "this is A";
  }
}

public class B extends A
{
  public String Method()
  {
    return "this is B";
  }
}

A thisA = new B();

thisA.Method();

What does thisA.Method() return?

It turns out that there are two different answers to this. In .NET/C# it returns from A (“this is A”). In Java, it returns from B (“this is B”).

So far it appears that this is a type issue; new B() must be getting cast back to A in C#. Looking for some documentation on this specifically. Links anyone?

.NET, Interesting, Technology , ,

Our latest project: Live Election Results for 2010!

November 1st, 2010

That’s right, our latest project turned into a pretty big effort; live election results for the entire US! We’re allowing you to customize which races you want to watch in real-time.

The idea for this project started back in August of 2010 as a simple site to show some local live election results for one county. It was a quick and simple application that worked really well.

In October, we started working on some improvements and decided to expand the scope of the results to cover all U.S. Senate, U.S. House races, and as many states as we could before November 2nd. Oh, and we redesigned the Silverlight UI and added a ton of functionality.

On top of that, the project now includes a mobile web version for the iPhone, Android, and Blackberry devices. And a custom Windows Phone 7 client application with some really advanced features. Not to mention a ton of new really smart high-availability back-end data services.

So, yeah, lots of work and not much sleep. But it’s really awesome and we’re very happy with it. Check it out: Live Election Results for November 2nd 2010.

.NET, Agile, Announcement, Interesting, Politics, Silverlight, Technology ,

Rondeau – We Wear the Mask

March 15th, 2007

Here is a very good example of rondeau poetry.

We Wear the Mask by Paul Laurence Dunbar

We wear the mask that grins and lies,
It hides our cheeks and shades our eyes,
This debt we pay to human guile;
With torn and bleeding hearts we smile,
And mouth with myriad subtleties.

Why should the world be over-wise,
In counting all our tears and sighs?
Nay, let them only see us, while
We wear the mask.

We smile, but, O great Christ, our cries
To thee from tortured souls arise.
We sing, but oh the clay is vile
Beneath our feet, and long the mile;
But let the world dream otherwise,
We wear the mask!

Interesting