.comment-link {margin-left:.6em;}
My Photo
Location: Unspecified, Mauritius

I too, am a bug within Māyā.

My Other Blog(s) and Site(s)
Friend sites and blogs
My Recent Posts
Best Articles
My C-Sharp Ideas
Blog Directories

Saturday, July 23, 2005


A few typeof(System.Random) thoughts

I thought up of the advantages of coding vs. going out with someone:

Why is coding better than going out with someone?

1. Your programs use only your processing time.
2. Your programs use only your pc's resources.
3. Problems with a program can be solved by debugging.
4. Programs can be terminated any time you wish.
5. Programs don't mind when they execute with other programs.
6. Programs carry out all the commands you give them. Without bitching you.
7. Programs don't lie.
8. Big programming mistakes at worse end up with a system reboot or re-install.

I just went through shit to fix my blog's template. I added a few meta tags, and suddenly decided that maybe I should try viewing it in Internet Explorer. Yeah, well, hehe, I use Firefox.

The template was totally fucked up, with my menu below the main posts... Jesus Christ... spent about half an hour trying to find a balance between "good looking", "IE Compatible" and "Firefox Compatible". Well, template's fixed, and it all looks fine. I even managed to stretch the orange seperator...

I got a few ideas for new tutorials. I wonder when I'll have time to write them down though. I'll write about chaining constructors, implicit and explicit typecasts, some beginner's stuff about Interfaces, and maybe Datasets.

Ah, yeah. Datasets. Would that be beginner or intermediate? Hmm... Maybe I can cook up several tutorials on datasets - one for beginners and one for intermediates.

Also, I wanted to write something about NUnit, and good programming practises. Hmm... I'll do that soon enough.

Anyway, I've been reading (or trying to read) the CSharp 2.0 Specs document from Microsoft. I know, that's kinda old - I heard that CSharp 3.0 specs are coming out soon. I think that the new features of C# have been throughly detailed in many places throughout the web, but there's something I'd love to comment on, especially about the Generic types, and the Nullable types. I believe that C# code's really understandable, and pretty neat as well. However, with the introduction of the "<", ">", "?" and also "::" signs, the face of C# as we all know it is going to change. What I mean by "the face of C#" is how general C# code looks like. C# code with Generics and nullable types look pretty weird. Okay, maybe that's because I'm not used to see that kind of C# code... but there's something telling me that C# code might look very nasty in Whidbey.

On the whole, the CSharp 2.0 specs come round with loads of good news. Here's a quick summary of a few of the interesting things I saw:

1. Generics
I think that's one of the most publicized things about Whidbey. An example of the use of Generics could be an Arraylist, that's forced to accept only one kind of object, through the use of Generics. I.e. You can create an arraylist that accepts only strings, or integers. Writing generic classes, however, might get a little bit confusing.

2. Nullable types
Well, simply put, a nullable type is a data type which has, apart from its value, a boolean value indicating whether the value on it has been set or not. So you can perform checks on variables, to see whether they've been initialized or not, through the HasValue property.

3. Easier implementation of IEnumerable
Those of you who think that it's troublesome to implement IEnumerable (like me, for example), will be overjoyed to hear that there's now a much easier method to do it, thanks to the yield newly-introduced yeild break and yeild return keywords.

Hmm... well... there's more to Whidbey than what I've described here, namely anonymous methods and so on, but seriously, it's getting kinda late here. I think I'll go to sleep for a change.

Have a nice day, and may the code be with you.