Sadly to say, I have only now come across this wonderful book, Code Complete: A Practical Handbook of Software Construction. But as they say, better now than never. The above book is highly recommended to those who are interested in improving the way that they write code and to reduce the headaches associated with code maintenance.
The key points mentioned by this book are
Software construct...
[More]
Usually, the exceptions thrown while debugging Windows Azure Table Storage is quite helpful. The message that I normally get is in the following form
"<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">\r\n <code></code>\r\n <message xml:lang=\"en-NZ\">SOME ERROR...
[More]
I hope the following will save some people time. The above exception occurs while developing using the July 2009 CTP of Windows Azure. The following query throws the above exception when the oauthConsumers table has no entry. I have not checked if it will occur if there is already an entry in the table or whether it occurs when published to the cloud.
var result = db.oauthConsumers.Where(x => ...
[More]
It's been going on for years but it's never too late to step up awareness on IPv6.
The following is on Google's IPv6 deployment.
One of the first few questions that someone starting to write unit tests for ASP .NET MVC would be "How do you mock HttpContext?". The following is done using Moq and creates a fake HttpContext to be passed to the MVC Controller.
public static HttpContextBase FakeHttpContext()
{
var httpContext = new Mock<HttpContextBase>();
var request = new Mock&...
[More]
Recently, I've realised that I have not implemented the deserialization methods for the OpenSocial API for pesta. I found out while trying to deserialize Google Friend Connect data. Oops. I guess my memory is not as good as it used to be.
I found out that the DataContractSerializer is not effective when some fields are missing in the JSON string. So I finally implemented the Deserialize method fo...
[More]
Finally managed to get pesta running under Windows Azure. It wasn't too difficult actually. The July CTP of Windows Azure SDK supported MVC projects as a web role out of the box. No hacking necessary.
However, when I first got it running, pesta did not seem to inject the javascript libraries and gadgets were not rendered properly. It turns out that when deploying the MVC project, the CloudService...
[More]
While trying out the Windows Azure SDK (July 2009 CTP), some hurdles were encountered with running the Development Storage under Windows 7. Initially, I thought it was a mistake on my part. However, even running the samples (Thumbnail Sample) included in the Windows Azure SDK, the same problem was encountered.
The server encountered an unknown failure: The server committed a protocol violati...
[More]
Previously, I have implemented an iGoogle-like interface for a seperate project as proof of concept. This project allows a site to
allow gadgets to be added and removed in a nice AJAX way
add and remove tabs in a nice AJAX way
allow users to rename tabs
allow users to specify the number of columns (1,2 or 3)
change the colour of the background, gadget title, gadget text
The above pro...
[More]
I have just managed to do a server-side integration of Google Friend Connect on raya. It took awhile to do this mainly because I realised that the deserialization mechanism has not been implemented properly. So in the end I did a quick custom javascript deserializer for JSON objects in pesta.
Information on how to support Google Friend Connect can be found here. Basically, there are three ways yo...
[More]