Browse by Tags

All Tags » Stack Overflow (RSS)

Stack Overflow question checklist

My earlier post on how to write a good question is pretty long, and I suspect that even when I refer people to it, often they don't bother reading it. So here's a short list of questions to check after you've written a question (and to think...
Posted by skeet | 17 comment(s)
Filed under:

Stack Overflow and personal emails

This post is partly meant to be a general announcement, and partly meant to be something I can point people at in the future (rather than writing a short version of this on each email). These days, I get at least a few emails practically every day along...
Posted by skeet | 33 comment(s)
Filed under: ,

Diagnosing weird problems - a Stack Overflow case study

Earlier, I came across this Stack Overflow question . I solved it, tweeted it, but then thought it would serve as a useful case study into the mental processes I go through when trying to solve a problem - whether that's on Stack Overflow, at work...
Posted by skeet | 14 comment(s)
Filed under: ,

Upcoming speaking engagements

It's just occurred to me that I've forgotten to mention a few of the things I'll be up to in the near-ish future. (I've talked about next week's Progressive .NET session before .) This is just a quick rundown - follow the links for...

Writing the perfect question

Update: now that I've actually posted this, I've added a tinyurl to it for easy reference: http://tinyurl.com/so-hints . Nice and easy to remember for comments :) A while ago, I wrote a blog entry on how to answer questions helpfully on sites...
Posted by skeet | 26 comment(s)
Filed under: ,

"Magic" null argument testing

Warning: here be dragons. I don't think this is the right way to check for null arguments, but it was an intriguing idea. Today on Stack Overflow, I answered a question about checking null arguments . The questioner was already using an extension...

Just how spiky is your traffic?

No, this isn't the post about dynamic languages I promise. That will come soon. This is just a quick interlude. This afternoon, while answering a question on Stack Overflow 1 about the difference between using an array and a Dictionary<string,...
Posted by skeet | 14 comment(s)
Filed under: , ,

Revisiting randomness

Almost every Stack Overflow question which includes the words "random" and "repeated" has the same basic answer. It's one of the most common "gotchas" in .NET, Java, and no doubt other platforms: creating a new random...

OMG Ponies!!! (Aka Humanity: Epic Fail)

(Meta note: I tried to fix the layout for this, I really did. But my CSS skills are even worse than Tony's. If anyone wants to send me a complete sample of how I should have laid this out, I'll fix it up. Otherwise, this is as good as you're...

Iterating atomically

The IEnumerable<T> and IEnumerator<T> interfaces in .NET are interesting. They crop up an awful lot, but hardly anyone ever calls them directly - you almost always use a foreach loop to iterate over the collection. That hides all the calls...

API design: choosing between non-ideal options

So, UnconstrainedMelody is coming on quite nicely. It now has quite a few useful options for flags enums, "normal enums" and delegates. However, there are two conflicting limitations which leave a couple of options. (Other related answers on...
Posted by skeet | 10 comment(s)
Filed under: , ,

Generic constraints for enums and delegates

As most readers probably know, C# prohibits generic type constraints from referring to System.Object, System.Enum, System.Array, System.Delegate and System.ValueType. In other words, this method declaration is illegal: public   static T[] GetValues<T>...
Posted by skeet | 56 comment(s)

Recent activities

It's been a little while since I've blogged, and quite a lot has been going on. In fact, there are a few things I'd have blogged about already if it weren't for "things" getting in the way. Rather than writing a whole series...

Faking COM to fool the C# compiler

C# 4 has some great features to make programming against COM components bearable fun and exciting. In particular: PIA linking allows you to embed just the relevant bits of the Primary Interop Assembly into your own assembly, so the PIA isn't actually...
Posted by skeet | 1 comment(s)

Reasons for voting on questions and answers

I've recently been involved in a few discussions around voting on Stack Overflow , and I think my own "policy" around it may be different to that of others. I thought it would be worth sharing why I personally vote items up or down, and...
Posted by skeet | 23 comment(s)
Filed under:

Go on, ask me anything

This afternoon, I found a comment which had been trapped in the spam bin for this blog. It was from Andrew Rimmer, in reply to my "micro-celebrity" post , pointing me at http://askjonskeet.com The world has officially become extremely silly...
Posted by skeet | 29 comment(s)

Answering technical questions helpfully

I'm unsure of whether this should be a blog post or an article , so I'll probably make it both. I've probably written most of it before in Stack Overflow answers, but as I couldn't find anything when I was looking earlier (to answer a...
Posted by skeet | 19 comment(s)
Filed under: ,

Benchmarking: designing an API with unusual goals

In a couple of recent posts I've written about a benchmarking framework and the results it produced for using for vs foreach in loops . I'm pleased with what I've done so far, but I don't think I've gone far enough yet. In particular...
Posted by skeet | 8 comment(s)

Programming is hard

One of the answers to my "controversial opinions" question on Stack Overflow claims that " programming is so easy a five year old can do it. " I'm sure there are some aspects of programming which a five year old can do. Other parts...
Posted by skeet | 22 comment(s)
Filed under: ,

Quick rant: why isn't there an Exception(string, params object[]) constructor?

This Stack Overflow question has reminded me of something I often wish existed in common exception constructors - an overload taking a format string and values. For instance, it would be really nice to be able to write: throw new IOException( "Expected...
Posted by skeet | 26 comment(s)
More Posts Next page »