Regular Expressions From Scratch, Part Three: Concatenation

You probably intuitively understood concatenation already, but let me define it anyway. Definition 5: The concatenation of two strings w and u (over the same alphabet) makes a string consisting of the sequence of every element in w followed by every element in u. We write concatenations the same way as before: all run together….

Regular Expressions From Scratch, Part One: Defining Terms

Over the years that I’ve been writing this blog some of the most positive feedback I’ve received has been for those entries where I’ve explored fundamental concepts in computer science. I thought that I might take that to its logical extreme, and do a series on what exactly a “regular expression” is. Most script developers…

Why are base class calls from anonymous delegates nonverifiable?

I’m still learning my way around the C# codebase – heck, I’m still learning my way around the Jscript codebase and I’ve been working on it for nine years, not nine weeks. Here’s something I stumbled across while refactoring the anonymous method binding code last week that I thought might be interesting to you folks….

Why Can’t I Access A Protected Member From A Derived Class?

A question I got recently was about access to protected methods from a derived class. Clearly that’s what “protected” means – that you can access it from a derived class. In that case, why doesn’t this work? class Ungulate {  protected void Eat() { /* whatever */ }} class Giraffe : Ungulate {  public static…

How to make little girls scream like… well, like little girls

[No technology today, so if you’re only here for the witty banter about programming languages, skip this one.] Leah and I spent the week before Halloween volunteering at Nightmare At Beaver Lake, a haunted-house-style attraction that runs along the trails in Beaver Lake Park, just on the other side of Lake Sammamish from Microsoft’s main…