Browse by Tags

Not so Hidden Gems in VS 2010
I’m just going to assume that all readers of my blog know that Visual Studio 2010 Beta one has been released . I’ve been running it almost exclusively since I downloaded and installed it. There’s a lot to like. For this first post, I’m going to limit...
Query Language or Method calls: A matter of taste
My last post (which was too long ago), generated question on whether I prefer the query language or the method notation for LINQ queries. The answer is ‘yes’.  Jon Skeet mentioned this as well last January, but anything you can do with query syntax...
Explain from the Questioner’s perspective, not your own
I was involved in an interesting discussion about how the C# language has evolved, and how it’s getting harder and harder to teach developers to be proficient in the language with each passing version. I think that’s our fault. As leaders and experienced...
Learning new languages with VSM
This month’s VSM has a pair of articles by me and Kathleen Dollard that were great fun to write, and I believe they’ll be useful to a wide audience. My regular C# corner column discusses what every VB Developer should know about C#. Kathleen’s column...
Duck Typing in C# 4.0
I’ve been having fun learning the new upcoming C# 4.0 features Anders described at PDC (see video here ). One of the the more interesting areas is dynamic, and the ways you can use dynamic to support duck typing . In C# 4.0, you can create methods that...
Extension Methods and Null Arguments
A little while ago, I did a DNR TV on C# 3.0 . During that, I talked about preserving null semantics when  you write extension methods.  I made the point that you should never test if the first parameter of an extension method is null. That...
Euler Problem 10
Patrick posted his solution earlier this week. I figure it was time to add mine. Also, Octavio Hernandez pointed out in the comments to problem 8 that he had discussed similar code constructs in his blog a while back. Problem 10 asks for the sum of all...
Code from Lightning Talk: Compiler Tricks
My last Lightning Talk should how you can mix constructor calls and object initializers. It's a useful technique that can keep you from writing too much code you don't need. To see what I mean, start with this simple person class: 1: class Person...
Euler Problem 7
Yes, it's true that I've been very lax in working on these problems. It's been a combination of the day job, finishing all the editing tasks on "More Effective C#", and actually trying to keep the personal life intact. The 7th problem...
Overload Resolution on Extension Methods
I had a question from a colleague the other day about extension methods. I'm simplifying a little, but he was looking for a way to ensure that every source file used the same set of extension methods. There is one way to enforce this, but it does...
A Functional Programming Q & A
I received this question in email from one of my readers, and I thought it would be of general interest: I find myself with two arrays of the same size and I want to create a third that combines each element. What I want is something similar to var S3...
Notes on Euler Problem 3
Here are my notes on the third Project Euler problem. The problem is "What is the largest prime factor of the number 600,851,475,143?" Once again, this is a problem that is best solved creating some simple LINQ queries. From the outside, this...
Discussion on Project Euler Problem 2
The second Euler problem asks you to find the sum of all even valued terms in the Fibonacci sequence which do not exceed 4,000,000. Let's look at the solution from the outside in. Here's the query that finds the answer: var EvenFibNumbers = (from...
Project Euler: Problem 1
I am starting a new series. A friend recently pointed me at the Project Euler problems. You can see the project here: http://projecteuler.net/ As I finish them, I'll post an explanation of the problem and the code here. I've also posted the code...
Do I write software at home like I write at work?
Dave Donaldson asks " Do you write software at homer like you do at work? " Dave wonders if we use the same discipline writing software at home (for our own use) that we do at work. I think the question is great, but I'm concerned about...
More Posts Next page »

Search

Go

Blog Group Links

Nascar style badges