Posts Tagged ‘C_sharp’

October 31st, 2007

C# annoyance of the day (0)

Tags: , ,

Those annoyances just keep coming, right? Consider this Ruby code:
class Parent
def foo
puts @var
end
end
 
class Child1 < Parent
def initialize
@var = ‘bar’
end
end
 
class Child2 < Parent
def initialize
@var = ‘baz’
end
end
 
Child1.new.foo
Child2.new.foo
This works fine. Note that […]

October 29th, 2007

Redemption, sadly. (2)

Today I rammed smack up against a brick wall in my C# endeavors. The problem at hand was something that seems pretty simple: Randomly shuffle an array. Anyone who knows Ruby knows that this is super easy. Here’s one way:
arr.sort_by { rand }
How do you do this in C#? Search google for […]

October 26th, 2007

C#… kind of doesn’t suck? (6)

At work recently (as in, yesterday) I was faced with the problem of re-writing a scientific app written in the mid-nineties. This thing was a full-screen DOS sort of app and today what with laptops and their widescreen huge-resolution displays, the program wasn’t readable for the average human being. All it does is […]