Mehfuz's WebLog

Live crazy, think different!

  • Replace SortedDictionary with LINQ query - Part 2 (with comparison)

    In my previous post, I have said that using LINQ query instead of SortedDictionary not only could be useful , elegant but also less processor intensive. In this post, I will show you a real comparison between the same the method but one with SortedDictionary and other with LINQ orderby query. I wrote a simple console application that mimics the action of GetSignature in LINQ.Flickr. Here, I will focus only on the sorting part that's why I removed the hashing and initialization of the method.

  • Replace SortedDictionary with LINQ query

    With LINQ.Flickr it is quite necessary to get signature on parameters in order to do authenticated flickr photo get. As with the signature, it has to be sorted by parameter then to be hashed by MD5. Previously, I used to use SortedDictionary dictionary to do so, but thinking a little bit I learned that we actually don't need SortedDictionary anymore after we have LINQ. May be that's why the product team at Microsoft removed SortedDictionary from stripped down version of .net that comes with SilverLight.

  • Flickr Xplorer - An Asp.net MVC photo app for Flickr

    I have flushed out a little project at Codeplex called "Flickr Xplorer". Its a Flickr mesh up that lets you search(user, tag, text), jump into user photos, see popular and latest stream and moreover lets you browse the whole Flickr in hacked url way (url routing easy and rocking). The application is made on Asp.net MVC preview 3  and I have used my LINQ.Flickr to communicate with Flickr. The project is an early stage, I will update with new features when possible and how you ask. You can use it as you like , host it to your server to make it a personal dashboard for your taken photos or use it for fast hand on for Asp.net MVC , mocking and of course how to use LINQ.Flickr API :-)

  • Mock HTTP layer to do complex tasks like uploading photo to Flickr

    In this post, I will show how you can use Typemock to fake out complex HTTP POST like uploading photo in Flickr server. The example which will be shown here, gives a pretty much generic idea of faking out HTTP calls and gain access to the response stream for comparing result with original content.I have used, N-Unit along with Typemock which run thorough TMockRunner.exe to perform the mock test.

  • LINQ.Flickr 1.3

    Just released another version of LINQ.Flickr. The release is out with several bug fixes, code optimization, new feature and overall mocking support. I have used Typemock for the unit test of the product. In coming posts, I will show how powerful mock can be in faking routine like upload photo. But, you can dig it right away, if you go by the release page and download a copy of the product. Truly speaking, testing was never fun for serviced API till mock engine is at my hand.

  • Code Snippet - A new way to share your codes.

    Recently , we have added a new section at dotnetslackers by which you can share your code to public.  Now, code snippets are tiny piece of code that can work as a unit, can come handy and be a real time-saver when building up complex solution or can be some interesting piece of lines which in turn can make out someone's day.

  • Mocking static methods with Typemock

    There are mocking tools like Rhino Mock, Moq, NMock, Typemock and many more. Recently, I was kinda evaluating mocking tools to mock out REST calls in Linq.Flickr. Almost all of the mock tools requires some sort of interface reference to work on. While, to mock out methods like XElement.Load or File.Open is impossible with most of the tools, Typemock is one step ahead of others as it supports mocking of static methods.