April 2005 - Posts
Wired magazine has an awesome little flash chart that shows some of the amazing
ways that the original Star Wars movies have influenced the world.
Fantastic!! I posted a while back about how I was quite upset that vb.net would not be getting refactoring support in v2.0, while c# was going to. Well, it seems MS heard our cries, and found a solution. It's not quite vs.net refactoring, but they have decided to provide Refactor from Developer Express as a free addin, which I think is even better - these guys focus on refactoring!
(Btw, thanks to Jackie Goldstein for that one)
Ummm, lots of
shredding videos - Car bumpers, DVDs, all kinds of wierd stuff.
Wow, I just saw the performance on a stored proc go from just over a minute to just under 1 second just by recompiling it. I never realised the stats / execution plan made that much difference.
I was playing around with how this might work, and got the following to give me what I want. If you have some other forms in an app and want to load one by the name of its class (e.g. for some kind of dynamic menu) you can use:
Dim oForm2 As Object = Activator.CreateInstance(Type.GetType("TestLoadingFormByString.Form2"))
DirectCast(oForm2, Form2).Show()
There are probably better ways to do this though. Anyone got a suggestion?
The
DataHand - check it out!
Having worked with web interfaces for 8 years, I've seen what I think are most of the methods that exists to achieve an interesting and effective (or all-to-often an off-putting and repulsive) web UI. Some of the techniques that are still very common today should have their users flogged with mouse cables. HTML is a simple language and I suppose that is why people misuse it so often, but it is great to see sites that explain very simply but very powerfully how one should use the right tools to achieve affective and effective site designs.
One such example is http://www.csszengarden.com. It displays exactly the same content in a multitude of different ways simply through different images and css themes. If you're a web guy, definitely check it out.
If you are going to explicitly implement IXmlSerializable and control the serialized output of your objects, the following 3 tips will help:
1) Booleans in XML are in lower case! <someElement>True</someElement> is NOT valid, whereas <someElement>true</someElement> is valid. So, you will need to ToLower() the boolean's ToString(), e.g.:
writer.WriteElementString("someElement", myNameSpace, [someBooleanValue].ToString().ToLower());
2) Dates must be in a specific format such as the following:
"yyyy-MM-ddTHH:mm:ss.fffffffzzz". So, use something like:
writer.WriteElementString("someOtherElement", myNameSpace, [someDateValue].ToString(myDefaultDateTimeStringFormat));
3) Don't forget to serialize your entire object hierarchy (or “graph”). E.g. if foo contains a bar collection you need to explicity serialize each bar object.
I've been needing to have a look at the xml my objects are being serialized to, so if anyone wants it here is a quick function to get the xml-serialized representation of an object:
Public Function GetXMLSerializedObjectAsString(ByVal objectToSerialize As Object) As String
Dim ms As New System.IO.MemoryStream
Dim ser As New Xml.Serialization.XmlSerializer(objectToSerialize.GetType)
ser.Serialize(ms, objectToSerialize)
Dim serializedObject As String = System.Text.Encoding.ASCII.GetString(ms.ToArray())
ms.Close()
Return serializedObject
End Function
Microsoft has a nice article on the basics of
starting your own blog. If you're reading this, you've hopefully got a reasonably good idea of what a blog is ( ;-> ) but it's still great to see MS putting this kind of content out. I notice they don't list dotnet.org.za as one of the great places to start - I'm sure we'll have to correct that typo ;-)
A colleague was having some trouble getting a project to run on a new machine. Debugging revealed that the connection was in fact opening correctly but that the DAAB instrumentation was throwing an exception on the DataConnectionOpenedEvent.Fire command and it relates to the common classes not being registered with WMI. A fix can be found on this post on Nikolai Blackie's blog, and it involves running the following series of commands in a batch file:
cd C:\Windows\Microsoft.NET\Framework\v1.1.4322
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Common.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Caching.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Configuration.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Data.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Logging.dll"
installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Security.dll"
PAUSE
For those not sure what a “batch file” is - just copy the code above into a new text file, rename it to a .bat extension and double-click the file. Also note that "C:\Windows" may need to change to reflect your actual windows directory (e.g. Winnt on Windows 2000).
[Update: Lol - got a link in my mail just after posting this on PCStats.com - Beginners Guides: Understanding and Creating Batch Files]
Wow, I have been really madly swamped lately. Hardly had time for a sideways glance, let alone a decent blog post. For those who are interested, I've been putting together my first message-based SOA. I've been making use of
WSContractFirst 0.4 from
Christian Weyer of
thinktecture (he works with
Ingo Rammer). Its an interesting journey and I've learned a couple of lessons - look forward to some more info in one form or another. One thing I've definitely noticed - we are NOT talking [WebMethod] and right-click-->Add Web Reference -kind of stuff with the whole message-based approach!
Haven't seen to many 0401's this year. I tried to get
one going on SADev, just to get us going on a relaxing Friday. Anybody got any good links?
Everyone is talking about it, but no one's posted a link thus far, so if you haven't signed up yet, head over to the
microsoft events search page and find your local one.
I'm still willing to give iBurst another try - everyone else I speak to seems to get good speeds. For those who're interested, check out the page because they have launched some great new pricing and bandwidth (1, 3, 6, and 9 gig) options.