C#, .NET, Java, software development etc
Displaying 1 to 25 of 149 archived entries.-
Published on 23 Dec 2005 by skeet
Okay, so I'm having another look at the alternative threading ideas which are part of my threading article. (They're not that big an alternative really - not compared with CSP etc - they'd just make things more pleasant.) I want to add deadlock prevention to my locks, making it impossible to lock t
-
Published on 22 Dec 2005 by skeet
I often see people in newsgroups saying how wonderful Visual Studio is, and they often claim it's the "best IDE in the world". Strangely enough, most go silent when I ask how many other IDEs they've used for a significant amount of time. I'm not going to make any claims as to which IDE is "the best
-
Published on 21 Dec 2005 by skeet
A friend suggested on Sunday that I create an RSS feed for my articles, so that interested parties would know when I've created a new one - so I've done it. It's hand-crafted, so there may be a few wrinkles to iron out, but hopefully it will prove useful. It would be nice if there was a way of spec
-
Published on 08 Dec 2005 by skeet
In the last couple of days, I've been reading up on CSPs (Communicating Sequential Processes) and the Microsoft Research project CCR (Concurrency and Coordination Runtime). I suspect that the latter is really a new look at the former, but I don't have enough experience with either of them to tell.
-
Published on 02 Dec 2005 by skeet
This is as much a "before you forget about it" post as anything else. Both Java and .NET have Random classes, which allow you to get random numbers within a certain range etc. Unless you specify otherwise, both are seeded with the current time. Neither class claims to be thread-safe. This presents
-
Published on 02 Dec 2005 by skeet
I had an email today which suggested I should start advertising on my C# article pages. I've considered this in the past without coming to any conclusions. I would certainly plump for Google AdSense on the grounds that it's fairly non-invasive. I just can't decide whether or not it's a good idea. P
-
Published on 16 Nov 2005 by skeet
I've finally got round to doing it... the code I use for posting code for articles etc has now been transformed into a small ASP.NET app. It's based on a VB.NET article. I converted it from VB.NET to C# using Instant C# (which worked very well - just a few gotchas, far fewer than last time I tried
-
Published on 10 Nov 2005 by skeet
When looking over someone's test code the other day, I happened to notice he was unboxing a boxed enum to an int. I was mildly surprised that he was able to do so - I thought you could only ever unbox to the exact value type that was "in the box". Naturally, I consulted the spec. The C# spec is rel
-
Published on 09 Nov 2005 by skeet
I've finally worked out how to get CSS working in the blog. I now need to apply all my usual styles to the code snippets I've already posted - this will be a somewhat gradual change. Please be patient!
-
Published on 27 Oct 2005 by skeet
Having just glanced at the clock, now is the ideal time to post about an idea I had a little while ago - a book (or blog, or something) about C# (or maybe C# and Java) which I'd only write between midnight and one in the morning. It would contain only those things which seemed like really good idea
-
Published on 27 Oct 2005 by skeet
For a long time I've disliked "designer-generated" code. My preference when writing a Windows Forms (or Swing) app is to work out what it should look like on paper, possibly prototype just the UI in a designer (for the look of it, not the code) and then start with an empty file for real code. That
-
Published on 03 Oct 2005 by skeet
Every language has a few interesting corner cases - bits of surprising behaviour which can catch you out if you're unlucky. I'm not talking about the kind of thing that all developers should really be aware of - the inefficiencies of repeatedly concatenating strings, etc. I'm talking about things w
-
Published on 03 Oct 2005 by skeet
I've been thinking a bit about how I'd use LINQ in real life (leaving DLinq and XLinq alone for the moment). One of the examples I came up with is a fairly common one - trying to find the element in a collection which has the maximum value for a certain property. Note that quite often I don't just
-
Published on 01 Oct 2005 by skeet
Some of you may have been frustrated by how hard it is to post comments to this blog - the human verification step seems to be a bit off. I'm trying to find out what's going wrong, but until it's fixed, please just mail me with the comment, including your name and the optional URL you want on the co
-
Published on 29 Sep 2005 by skeet
So, I caved and finally downloaded the LINQ preview. Obviously it's fairly heavily genericised (if that's even a word) and I decided to push it a little. Nothing particularly heavy - just an interesting bit of functional programming. It's easy to do a query which returns a string property from an o
-
Published on 30 Dec 2005 by skeet
I'm a pedant, there's no doubt about it. I'm particularly pedantic when it comes to terminology in computing discussions - at least where I see value in being precise about what is meant. So, when discussing static constructors in a mailing list thread recently, I've been very carefully distinguish
-
Published on 31 Dec 2005 by skeet
I'd hoped to be able to make this post a week ago, but adding extra unit tests, performance tests and documentation took longer than expected. (Doesn't it always?) I've now refactored the previous incarnation of SyncLock in my Miscellaneous Utility Library (snappy title, huh?) and added a new type
-
Published on 06 Jan 2006 by skeet
This will be an evolving post, hopefully. (If no-one comments on it, it probably won't change unless I come up with better ideas myself.) Since working on a Java project last year, I've been increasingly fed up with C#'s enums. They're really not very object oriented: they're not type-safe (you can
-
Published on 10 Jan 2006 by skeet
I've just been reading the transcript of a whiteboard session with Anders Hejlsberg and one of the questions is really, really good: Question: My problem is I’ve got these XML doc comments that are duplicated. I just strip off one. I guess it would be a neat language feature to be able to somehow in
-
Published on 14 Jan 2006 by skeet
I don't usually post personal news on my blog, but this is fairly major. Some of you may know that my wife, Holly, is pregnant. What you won't know - and what we didn't know until today - was that we're having twins. Eek! A lovely surprise, if somewhat scary. For those of you who like piccies, the
-
Published on 20 Jan 2006 by skeet
A thread came up yesterday on the C# newsgroup about when to use the "normal" foreach and when to use List<T>.ForEach (assuming, of course, that one is dealing with a List<T> in the first place). Obviously there are readability issues, but we ended up focusing on performance. (Isn't tha
-
Published on 20 Jan 2006 by skeet
For a long time, when people have asked about having inheritance and singletons, I've stated flatly that a singleton can't be derived from. It stops being a singleton at that point. Even if the class is internal and you can prove that no other classes in the assembly do derive from the singleton an
-
Published on 15 Feb 2006 by skeet
I've recently started working with Subversion (a version control system) and FitNesse (the Fit acceptance testing framework based in a wiki). FitNesse has a primitive version control system built into it, where it builds zip files of previous versions of pages. It's all a bit messy though, and it's
-
Published on 15 Feb 2006 by skeet
A while ago, I decided that EasyMock.NET wasn't quite up to scratch, and I was going to try to write a replacement. I'm not doing much .NET development at the moment, so it's not an issue any more (and when I go back to .NET I'll look at Rhino Mocks which sounds promising). However, I did get as fa
-
Published on 04 Mar 2006 by skeet
Introduction There aren't many technical issues that my technical lead (Stuart) and I disagree on. However, one of them is inheritance and making things virtual. Stuart tends to favour making things virtual on the grounds that you never know when you might need to inherit from a class and override
Next > >