February 2006 - Posts
I am sure we all know the use of the using statement in C# so I won't go into very much detail about it as that is not the point of this blog entry;
So now that we are all on the same page regarding the use of the statement I would like to address a usability issue regarding this particular gem ...
Consider this example;
using (ObjectX x = new ObjectX)
{
using (ObjectY y = new ObjectY)
{
using (ObjectZ z = new ObjectZ)
{
//TODO: some implementation should go here
}
}
}
I have often needed to nest using statements like this which after a couple of nestings makes your code rather unreadable.
I discovered (purely by accident and was then backed up by a blog entry on Eric Gunnerson's C# Compendium site) that you could do the following instead;
using (ObjectX x = new ObjectX())
using (ObjectY y = new ObjectY())
using (ObjectZ z = new ObjectZ())
{
//TODO: some implementation should go here
}
Which to me is far more readable than the initial code snippet!
What do you guys think?
Does this make the code easier, or (heaven forbid) more difficult to read?
So you ever sat at work and found yourself bored to death with your mp3 selection?
Cannot find a decent radio station to stream at your desk?
Tired of rebuffering interruptions?
well the solution to your problems is here;
http://www.pandora.com/
Pandora is a website that allows you to design your own "radio station" without any annoying djs speaking crap all day. All you do is enter an artist or song that you enjoy and it randomly plays music of a similar genre.
The great thing is that you get to expand your music knowledge by listening to music that you might not have heard before.
Best of all it is free!
So yourself a favor and open up Pandora's box.
You nominated them, now go cast your vote!
SA Blog awards
Jeesh two elections in one week, well let's hope this one is easier and and has better results than the other one ...
So you've ripped all your cds to mp3, imported them all into iTunes and you've copied all your favorite tunes to your niffty new iPod device ...
You hit the play button on that sexy little device and bliss pipes through your headphones into your deprived ears ...
But what's this, where is my album art? looking at the folders in windows you confirm that you have pain stakingly added album art and "folder.jpg" files to EVERY single one of your 200 odd cds. but iTunes does not pick it up! how annoying!
Turns out that this is due to the differences between how MediaPlayer and iTunes store this artwork. MediaPlayer copies .jpg files into the folder and uses those to display the album art, clever! iTunes actually embeds the artwork inside the ID3 tags of the file, painful!
When the song is playing in iTunes you can simply drag any pic into the player and this will be embedded into the file for next time ... BUT you have to do this for each and every file! oh lord, when you have over 30Gig of music this would take forever.
Luckily for me i stumbled across the cleverest tool ... iCoverArt.
This tool will scan your music folder and automatically assign the artwork that MediaPlayer put there into iTunes. And for those that are missing, you simply source the file yourself and drag the image into iCoverArt and presto; it's now in iTunes.
How nice ...
Now my deprived eyes can see what my ears are listening to.
I'm happy again!
Hi,
I'm thinking of seeing if there is enough interest to start a BizTalk User Group in Gauteng. The plan is to meet in the Jhb area initially and depending on interest this can be expanded later. We'll meet after work hours (that's normal work hours for those without a life), maybe 6pm.
You will have to put up with me talking the first time, but I hopeto involve other speakers to talk about the deeper workings of BizTalk.
I do not profess to be any kind of expert on BizTalk but it is a subject I would most certainly like to know more about. The more I read about it the more fascinated I am with this product.
The idea of this group is to get together to share ideas, tips & tricks, ideas and challenges so that we can all learn together (all together now ..... ahhhhhhhh)
Please indicate your level of interest in the comments section. Kindly indicate whether or not you are prepared to bring some topics to the party to get this sucker rolling.
Cheers,
Ryan
Yup that's right! The 2nd edition of what must arguably be the hottest contested title in SA is happening once again ...
<insert drum roll here>
It's time for the SA BlogAwards 2006. Nominations are now open so head off to http://www.sablogawards.com/
ps. do not feel any guilt about nominating me for best tech blog :P