Blog Archives

All that exists are trade offs

Dishes

Have you ever done the dishes by hand?

If not, picture this: stack of dirty plates, glasses, utensils, pots and pans; big bowl filled with hot water and dish washing liquid; running tap to rinse foam of; drainer to stack and a dish towel to dry cleaned stuff.

Read more ›




Head scratching with a TargetParameterCountException

Ever introduced an extra parameter on a method, tracked all its usages and made the compiler happy by providing a corresponding extra argument in all the calls of that method?

Sure you have. Either that or removed a parameter from a method.

You just change the signature of the method,

Read more ›




ASP.NET on Linux – Give it another chance

Last year I started a quest to use a “Windows” language to build a “hello world” website running on a Linux machine. After overcoming several hurdles and the quest turning into shaving a whole herd of yaks, I threw the towel into the ring.

Read more ›




C# string surprise

My jaw still aches remembering the pain of dropping to the floor when Visual Studio refused to compile

It complains in no uncertain terms. In fact, it drives the message home by repeating the message, albeit with a different word order.

Operator ‘=’ cannot be applied to operands of type ‘string’

Read more ›




4 surprises with asserts moving from Delphi to C#

QuestionMark_Exclamation-Point

Moving from Delphi to C# is fun most of the time.

Discovering stuff I can do in C# that is impossible, or (very) time consuming, in Delphi is fun. Discovering that stuff I take for granted in Delphi – i.e. metaclasses (officially “class references”),

Read more ›




Why it pays to read more than just the first compiler message

Error messages are frustrating. Especially when you can’t figure out why you are getting them.

Take this bit of code:

It produces a ‘TestProject.ComparingCollections.SimpleDataAccessLayer_Tests.MountainComparer’ does not implement inherited abstract member ‘System.Collections.Generic.Comparer<ActualProject.ComparingCollections.Mountain>.Compare(ActualProject.ComparingCollections.Mountain, ActualProject.ComparingCollections.Mountain)’ error for the MountainComparer class.

Wah?

What do you mean?

Read more ›




Why it pays to invest some time learning the syntax and terminology of a language

Syntax is boring. Absolutely boring. So is theory and terminology. But neither is trivial. And neither is superfluous. Not if you want to get up to speed as quickly as possible.

Syntax differs from language to language. Everybody accepts that. Not everybody is as aware that while the concepts of object orientation are the same across object oriented languages,

Read more ›




Why CollectionAssert.AreEqual fails even when both lists contain the same items

Last time you did this, it worked flawlessly. The test you made verified that an item was added and then returned correctly:

  • Retrieve all items into a “before” list.
  • Add an item.
  • Retrieve all items into an “after” list.
  • Manually add the item to the “before”

Read more ›




TL;DR version of Name Value Pairs in ComboBoxes and Kinfolk

Did you read Name Value Pairs in ComboBoxes and Kinfolk?

Too long?

Yeah. You’re right. I realized that after I published it.

Here’s the TL;DR version of it.

You have been tasked with adding a simple ComboBox to a form and load its list of values from a configuration file containing a list of name value pairs.

Read more ›




Name Value Pairs in ComboBoxes and Kinfolk

A couple of hours after I published this, I realized that it was very long. If you just want the punch line then check out
TL;DR version of Name Value Pairs in ComboBoxes and Kinfolk

You have been tasked with adding a simple ComboBox to a form and load its list of values from a configuration file containing a list of name value pairs.

Read more ›




Show Buttons
Hide Buttons