September 2007 - Posts
Why does the Microsoft Visual Studio team not follow the best practices internally? When creating a Silverlight 1.1 UserControl under Visual Studio 2008 Beta 2 it generates the following code by default.
System.IO.Stream s = this.GetType().Assembly.GetManifestResourceStream("Project1.UserControl1.xaml");
this.InitializeFromXaml(new System.IO.StreamReader(s).ReadToEnd());
Most developers would realise that this is not good code. Why do I say this, well firstly the code is creating two objects, a System.IO.UnmanagedMemoryStream and a System.IO.StreamReader, that implement IDisposable and are not disposing the objects immediately after use. Yeah sure the finalizer will take care of any unmanaged resources at the end of the day but why not just release the resources in a predictable and up front manner. I have recommended that Microsoft use the following instead.
using (System.IO.Stream s = this.GetType().Assembly.GetManifestResourceStream("Project1.UserControl1.xaml"))
{
using (System.IO.StreamReader sr = new System.IO.StreamReader(s))
{
this.InitializeFromXaml(sr.ReadToEnd());
}
}
If you feel strongly about best practices, please take a moment and vote for this on the feedback site here.
Cross-posted from CraigN.NET.
It looks like Telkom is in a bit of a pickle over its recent "Do Broadband" advertising. A post on MyBroadband details the complaint from a consumer that says its false advertising.
Mr Moorad lodged a consumer complaint against Telkom’s “do” broadband campaign, arguing that the advertisements claims of being suitable for ‘movies, gaming and music’ is misleading.
According to the ASA website, the complainant submitted that the advertising states that one can “do” music, movies and on-line gaming, but only affords the user 1GB. “This is misleading as a DVD-quality movie is at least 4GB and online gaming needs at least 20 GB monthly to play daily.”
While I agree that the "do movies" claim is a little bit of a stretch as I doubt Telkom would promote torrents and illegal movie sharing. They must surely be referring to paid movie downloads, I can't think why a consumer would want to pay for a highly compressed movies that are sub-DVD quality, can you?
I however don't agree that to "do on-line gaming" you need at least 20GB monthly of bandwidth. Is Mr Moorad downloading the games before he plays them or maybe he is playing Battlefield 2. As an Xbox 360 gamer I regularly play on Xbox LIVE and its common to work on about 150MB per hour for serious online gaming including voice chatting. So 20GB equates to about 136 hours of online gaming per month which I believe is more than excessive. So the 1GB is quite capable of at least 6 hours of serious online gaming; or perhaps a whole month of online Sudoku.
In its submissions to ICASA, Telkom clearly stated that "Telkom's ADSL service was never intended for bandwidth-hungry applications, such as gaming or online trading."
This I find highly amusing to read. Telkom has clearly been caught out in its statements. Its time for the left hand to start talking to the right hand, and oh, while they figure that out, can they sort out the service delivery issues etcetera etcetera...
Cross-posted from CraigN.NET.
A little while back I decided I needed my own space to blog about development, gaming, life and everything that goes along with it. Up until now I've been maintaining two blogs, a primary development one and a gaming one. So here it is, my new blog Craig.NET, make sure you add it to your feed reader and update your blogroll.
Oh and if anyone knows a graphic designer that knows how to make magic with WordPress, let me know.
Cross posted from http://xboxbloggers.net/CraigN/.
Just a quick reminder for the free SA Developer .NET event tomorrow, the 8th September 2007, on building .NET data interfaces. The talk will be held in the Microsoft auditorium in Bryanston and presented by André van Rensburg.
There are tons of resources available on how to access data from a .net application. How is it that this is still really difficult to get right? The myriad of options and requirements often makes it difficult to map the two extremes effectively – to choose the right option for a given requirement. I will discuss some practical approaches to accessing data with ADO.net that focus on fast and effective ways to get up and running without sacrificing flexibility and maintainability. I will include discussions on DAL-BLL generators, data object verses data sets, usage scenarios, presentation integration, and if time permits, how to 'Linq' it all together.
If you haven't done so already, please RSVP and let us know you are coming on the forum here.
Cross-posted from http://craign.net/.