Community developer blogs

Jon Skeet's Coding Blog

Website

Recent Posts

  • Evil code of the day

    Posted: 03 Jul 2009 at 22:28 by skeet

    At a glance, this code doesn't look particularly evil. What does it do though? Compile it with the C# 4.0b1 compiler and run it... using System; class Base {     public virtual void Foo(int x, int y)     {         Console.WriteLine("Base: x={0}, y={1}", x, y);     } } class Derived : Base {     public override void Foo(int y, int x)     {         Console.WriteLine("Derived: x={0}, y={1}", x, y);

  • OS Jam at Google London: C# 4 and the DLR

    Posted: 19 Jun 2009 at 16:50 by skeet

    Last night I presented for the first time at the Google Open Source Jam at our offices in London. The room was packed, but only a very few attendees were C# developers. I know that C# isn't the most popular language on the Open Source scene, but I was still surprised there weren't more people using C# for their jobs and hacking on Ruby/Python/etc at night. All the talks at OSJam are just 5 minutes long, with 2 minutes for questions.

  • Dynamic type inference and surprising possibilities

    Posted: 17 Jun 2009 at 20:01 by skeet

    There have been mutterings about the fact that I haven't been blogging much recently. I've been getting down to serious work on the second edition of C# in Depth, and it's taking a lot of my time. However, I thought I'd share a ghastly little example I've just come up with. I've been having an email discussion with Sam Ng, Chris Burrows and Eric Lippert about how dynamic typing works.

  • Reasons for voting on questions and answers

    Posted: 20 May 2009 at 14:21 by skeet

    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 hear your thoughts too. This blog may not be the ideal venue for such a post, but until such time as we have a real "meta" site for Stack Overflow (such as Stack Overflow Overflow) I can't think of anywhere better to write about it.

  • A different approach to inappropriate defaults

    Posted: 14 May 2009 at 17:03 by skeet

    I've had a couple of bug reports about my Protocol Buffers port - both nicely detailed, and one including a patch to fix it. (It's only due to my lack of timeliness in actually submitting the change that the second bug report occurred. Oops.) The bug was in text formatting (although it also affected parsing). I was using the default ToString behaviour for numbers, which meant that floats and doubles were being formatted as "50,15" in Germany instead of "50.15".

  • Language proliferation

    Posted: 12 May 2009 at 16:54 by skeet

    I've always been aware that .NET supports multiple languages (obviously) and that Microsoft has been experimenting with this to some extent. It's only recently struck me just to what extent this is the case though. Here's a list - almost certainly incomplete - of .NET languages from Microsoft alone. C# VB (or VB.NET if you wish) C++/CLI F# IronPython IronRuby Spec# M (with Oslo) Axum Managed JScript PowerShell C?

  • RFC: C# in Depth 2nd edition, proposed changes and additions

    Posted: 16 Apr 2009 at 21:54 by skeet

    As I've mentioned in passing before now, I've started working on the 2nd edition of C# in Depth, to roughly coincide with the release of C# 4 and Visual Studio 2010. So far I've just been thinking about what should be added and what should be changed or removed. That's what I'd like to share today, and I'm really eager for feedback. In particular, I'd like to think of three audiences: Developers (possibly hobbyists) who have read one introductory C# book (Head First

  • RFC: C# in Depth 2nd edition, proposed changes and additions

    Posted: 16 Apr 2009 at 15:54 by skeet

    As I've mentioned in passing before now, I've started working on the 2nd edition of C# in Depth, to roughly coincide with the release of C# 4 and Visual Studio 2010. So far I've just been thinking about what should be added and what should be changed or removed. That's what I'd like to share today, and I'm really eager for feedback.

  • Go on, ask me anything

    Posted: 24 Mar 2009 at 17:22 by skeet

    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. The surprising thing is, it's actually useful - at least for me. A number of times I've wanted to find my old answers to questions, so I can either just refer to them in a new answer or mark the new question as a dupe. You might have thought

  • Buffering vs streaming benchmark: first results

    Posted: 24 Mar 2009 at 07:34 by skeet

    My poor laptop's had a busy weekend. It's run 72 tests, rebooting between each test. Most of these tests have kept both the CPU and disk busy for a lot of the time. I expect to update this blog post with more numbers - and possibly more strategies - as time goes on, but I wanted to get the numbers out as quickly as possible. Graphs should be coming when I've got a decent network to experiment with Google graphing. Source code and setup While I don't really expect anyone else to s

  • Buffering vs streaming benchmark: first results

    Posted: 24 Mar 2009 at 01:34 by skeet

    My poor laptop's had a busy weekend. It's run 72 tests, rebooting between each test. Most of these tests have kept both the CPU and disk busy for a lot of the time. I expect to update this blog post with more numbers - and possibly more strategies - as time goes on, but I wanted to get the numbers out as quickly as possible. Graphs should be coming when I've got a decent network to experiment with Google graphing.

  • Benchmarking IO: buffering vs streaming

    Posted: 20 Mar 2009 at 11:13 by skeet

    I mentioned in my recent book review that I was concerned about a recommendation to load all of the data from an input file before processing all of it. This seems to me to be a bad idea in an age where Windows prefetch will anticipate what data you need next, etc - allowing you to process efficiently in a streaming fashion. However, without any benchmarks I'm just guessing. I'd like to set up a benchmark to test this - it's an interesting problem which I suspect has lots of nuances.

  • Book Review: C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón Hillar

    Posted: 17 Mar 2009 at 17:21 by skeet

    Resources Publisher's page (Packt) - this is the cheapest way to buy the book as far as I can see Sample code (49MB download! Mostly because it contains bin/obj directories for all solutions...) Amazon or Barnes and Noble links if you don't want to buy it directly Disclaimer This book doesn't really compete with C# in Depth, but obviously the very fact that it's another book about C# at all means I'm probably not entirely unbiased. Arguably it also "competes" wi

  • Breaking Liskov

    Posted: 16 Mar 2009 at 17:48 by skeet

    Very recently, Barbara Liskov won the Turing award, which makes it a highly appropriate time to ponder when it's reasonable to ignore her most famous piece of work, the Liskov Substitution (or Substitutability) Principle. This is not idle speculation: I've had a feature request for MiscUtil. The request makes sense, simplifies the code, and is good all round - but it breaks substitutability and documented APIs. The substitutability principle is in some ways just common sense. It says (in

  • Book Review: C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón Hillar

    Posted: 16 Mar 2009 at 17:21 by skeet

    Update (19th March 2009) Debate around this review is getting heated. I stand by all the points I make about the text, but I'd like to clarify a few things: If there are any ad hominem comments in the review against the author, please ignore them. I'm going to try to weed out any that I find, but if you spot one, please let me know and then ignore it. I feel very strongly that a review should be about the text of a book, not about its author. The text is what will inform the reader, not

  • Current book project: Real World Functional Programming

    Posted: 27 Feb 2009 at 17:44 by skeet

    Now that it's all official, I can reveal that since the tail end of last year I've been helping out with Real World Functional Programming by Tomáš Petrícek (and me, ish). I'm doing the same kinds of things I did with Groovy in Action, coming to the text with fresh eyes: I'm technically competent but don't have any expertise in the subject matter. This means I can see it as a "real" reader would, challenge the assumptions, point out places which need more explanatio

  • What's in a name?

    Posted: 27 Feb 2009 at 17:29 by skeet

    T.S. Eliot had the right idea when he wrote "The naming of cats": The Naming of Cats is a difficult matter,It isn't just one of your holiday games...When you notice a cat in profound meditation,The reason, I tell you, is always the same:His mind is engaged in a rapt contemplationOf the thought, of the thought, of the thought of his name:His ineffable effableEffanineffableDeep and inscrutable singular Name. Okay, so developers may not contemplate their own names much, but I know I&

  • What's in a name?

    Posted: 27 Feb 2009 at 11:29 by skeet

    T.S. Eliot had the right idea when he wrote "The naming of cats": The Naming of Cats is a difficult matter, It isn't just one of your holiday games ... When you notice a cat in profound meditation, The reason, I tell you, is always the same: His mind is engaged in a rapt contemplation Of the thought, of the thought, of the thought of his name: His ineffable effable Effanineffable Deep and inscrutable singular Name.

  • Answering technical questions helpfully

    Posted: 17 Feb 2009 at 17:50 by skeet

    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 question about Stack Overflow answers) I figured it was time to write something in a medium I had more control over. This is not a guide to getting huge amounts of reputation on Stack Overflow. As it happens, following the guidelines here is likely t

  • Benchmarking: designing an API with unusual goals

    Posted: 02 Feb 2009 at 20:10 by skeet

    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, while it's good at testing multiple algorithms against a single input, it's not good at trying several different inputs to demonstrate the complexity vs input size. I wanted to rethink the design at three levels - what the framework would

AddThis

Events coming up

  • Nov 18

    15 Minutes of Fame

    Dresher, United States

    This is a yearly tradition. We select 10 of the favorite speakers from monthly meetings, code camps, and hands on labs. Each one does a 15 minute talk on their favorite .NET technology. This is our 10th anniversary so we plan a gala event with special prizes and refreshments.

Related blogs

  • good code

    It's time to start being less reactive and more proactive

  • عفیف احمد جنجوعہ

    Post related to my personal experience with the various frameworks, development tools and technologies, programming languages and libraries at hand. Development tools inlcude visual studio/ netbeans/ eclipse. Frameworks include .net/ Java. Languages c/ cpp/ php/ java/ c#/ asp.net. And various libraries and software factories

  • Thushan Fernando Uncut

    Not Even Remotely Dorky thoughts from a Windows/Linux, .NET, C/C++ & Java software developer. From computer software, programming and hardware to motorshows and travel to various countries.

Related podcasts

  • Interview Ted Neward

    Podcast (MP3): Download Hosts: Markus Guests: Ted Neward Recording venue: In this Episode we talk to Ted Neward. Since Ted is active in the .NET and Java universes, we started out by discussing some of the differences between the two platforms. The main discussion...

We'd love to hear what you think! Submit ideas or give us feedback