Dreamhost 1 year Special

In anticipation of J. Wynia's Twin Cities Code Camp talk on DIY Project Hosting, I went to check out Dreamhost and check prices and features. To my surprise, there is a March Madness sale going on, where you can get 1 year of hosting (domain included) for $9.24. They say it ends today at the end of the day, but I think that's just to create a sense of urgency.

To get the special offer, sign up for the one-year hosting plan (comes with a free trial), and use the promo code "777". For a long time, I've wanted to have version control available via the web, but didn't want to pay a site like assembla a monthly fee. I also wasn't sure that I wanted to host a machine on my crappy cable connection. I figure 1 year for less than $10, I can give it a try. It is general website hosting, so I can (and will) have a blog up there, and host other files, and anything else I want. If it works out, I can rationalize the $9 a month, if it doesn't work out, or a better option comes around, I can cancel at the end of the year.

So, come April 10th, when the next code camp rolls around, I'll have everything I need to play along with the take home version of J. Wynia's talk.

   
Can I Suggest Bit Torrent?

At this point, everyone knows that Microsoft's Mix event happened this week. I know everyone knows, because they had to take the video downloads offline due to their inability to handle the demand:

We are currently experiencing issues with download speeds and buffering. The demand for the sessions videos has been extremely high and has exceeded our ability to serve these videos up with sufficient bandwidth. At this point, we are going to remove the links and the player from the site to allow our engineering team to push the content out to various media caches around the world. When that is completed (current estimate is 8PM PST) the result should be a much better experience and we will re-enable playback and download. Thank for your patience as we deal with this issue.

If they took all the content, and provided a torrent file with all the videos and slideshows, they wouldn't be responsible for all the bandwidth, the consumers could share the burden. After NDC last year, all the videos were provided as a really large torrent file, and getting the content was very easy. Easier than a batch file with a bunch of curl calls.

  
Moq and VB.Net are Frenemies

Mocking is an important aspect of writing unit tests. The current project that I am on does a lot of integration testing, but not much unit testing. I'm trying to increase the amount of true unit tests, but struggle to do so due to the difficulty in mocking subroutines.

The team that I am on had selected Moq as the mocking framework of choice prior to my arrival, however there aren't actually any tests using it. As long as I am mocking functions on an interface, Moq is an acceptable framework, however subroutines are completely unmockable. I have done a fair amount of googling, and there seems to be quite a few questions on Stackoverflow about it, but no real answers.

In this particular case, what I want to do with mocking is ensure that the proper subroutine is called when I pass in an object that matches certain criteria. I am able to get it to work with Rhino Mocks by doing the following:

    <TestMethod()> _
    Public Sub SaveProposal_WhenProposalIsNew_CallCreate()
        Dim proposal = New Proposal("title", "description")
        Dim dataProvider = MockRepository.GenerateMock(Of IProposalDataProvider)()
        dataProvider.Expect(Function(dp) CreateProposal(dp)).IgnoreArguments()
 
        Dim service = New ProposalService(dataProvider, TestAppContext.Current)
        service.SaveProposal(proposal)
 
        dataProvider.VerifyAllExpectations()
    End Sub
 
    Private Function CreateProposal(ByVal dp As IProposalDataProvider)
        dp.CreateProposal(Nothing)
        Return Nothing
    End Function

However, when I try something similar with Moq using the code below:

    <TestMethod()> _
    Public Sub SaveProposal_WhenProposalIsNew_CallCreate()
        Dim proposal = New Proposal("title", "description")
        Dim dataProvider = New Mock(Of IProposalDataProvider)()
        dataProvider.Setup(Function(dp As IProposalDataProvider) CreateProposal(dp))
 
        Dim service = New ProposalService(dataProvider.Object, TestAppContext.Current)
        service.SaveProposal(proposal)
 
        dataProvider.VerifyAll()
    End Sub
 
    Private Function CreateProposal(ByVal dp As IProposalDataProvider)
        dp.CreateProposal(It.IsAny(Of ProposalDto))
        Return Nothing
    End Function

I get the following exception:

System.ArgumentException: Invalid setup on a non-overridable member: dp => value(ProposalManagerApp.Tests.ProposalServiceTests).CreateProposal(dp).

Any mock-magicians out there know the answer? The problem stems from the inability of VB to create an Expression(Of Action(Of Something)) because lambdas must return a value. The universe plans on correcting itself with the release of VB10, by allowing Sub() lambdas, but I can't wait that long.

  
Google Buzz - Impressions

I have started to explore Google's new Buzz social enhancement to GMail. I don't consider this a twitter killer, but each system has pros and cons. I wanted to briefly put down some of my thoughts, and maybe get some feedback as well.

I Suck at 140 Characters

One of the things I struggle with on twitter is the 140 character limit. Over time I have developed a wordy style of writing that doesn't fit into a single tweet. I often spend more time trying to choose words that allow me to present my full thought than actually formulating my thought, and this frustrates me. With Buzz, I don't have that limitation. I still consider it a microblog like twitter, but one without the distraction of character limitations.

The Conversation is in your Face

One of my frustrations with twitter is following conversations. There is no simple way to do it. If you catch a response, it is fairly trivial to trace it back to the originating tweet. However, if someone asks a question, and you want to know how other people respond, the only way to do so is use twitter search. With Buzz, one person starts a thread with their "buzz", and responses are inline in the comments area. This makes it easy to see the conversation, even when it involves people you don't follow. In my opinion, this will also make buzz entries more useful in google search results.

Privacy

Currently I use twitter for my professional life, and facebook for my personal life. Sometimes one leaks into the other, but for the most part, I have made that distinction. Buzz is tied to my gmail contacts which come from mail, reader, or my android phone. This encompasses multiple facets of my life. This makes for a fuzzy line that I don't really have with the other two social services. However, buzz does have a nice security feature that makes it easy to have a post only be visible to one or more contact groups. This to me means that it can be both, and I don't have to worry about the fuzzy line. I have often wanted this ability with facebook, and am happy to see it here. The downside is now I'm going to waste hours organizing my contacts into appropriate groups.

Summary

In summary, I'm looking forward to following more people using Buzz, and seeing how discussions unfold. I could see tweets that point to buzz discussions, as I think the environment is more appropriate for that. The downside is, it doesn't have the discoverability that twitter has. If you follow someone that is involved in a conversation, you can butt in. With buzz, if you don't follow the person that started the conversation, you'll miss the whole thing. I decided not to have my tweets replicated on my buzz feed because I found the delay in google fetching the tweets makes the feature less valueabl. Also, the same post in two places would cause any discussion to be fractured.

Anyone else have any thoughts on Buzz? I think Google needs to put out an API sooner rather than later, as I can see tools like TweetDeck and Digsby integrating with Buzz, and adding value. The rollout is still in progress, but I'm curious to see what happens after the curiousity subsides.

   
O Rly? Editing Project File XML in Visual Studio

File this under things I probably should have known by now.

Whenever I have needed to edit a visual studio project file's XML, I have used an external XML/text editor. All my attempts to edit with Visual Studio resulted in the entire project being loaded, not the xml contents. So, here's the trick. First right-click on the project file in the solution explorer and select 'Unload Project'. This option will only show up if your project is a part of a solution. Once the project has been unloaded, right-click again and select the 'Edit [your project file name]' command and this will bring up the XML editor with the contents of your project file. Once the changes have been made, right-click on the project again and select 'Reload Project' to bring the project back into the solution.

  
< Newer Older >
Recent Posts
Clearing the ClickOnce App Cache
VB.NET Gotchas for C# Devs
Dreamhost 1 year Special
Can I Suggest Bit Torrent?
Moq and VB.Net are Frenemies
Google Buzz - Impressions
O Rly? Intellisense requires XML + DLL
Self Documenting Code - FAIL
The 'F' in TFS is for 'Friction'
NDC 2009 Videos
Skills Test - FAIL!
Tag Cloud
.net   apple   asp.net   beta   borked   buzz   c#   clickonce   clio   code   code camp   console   deals   deployment   documentation   dreamhost   fail   friction   general   git   gotchas   hosting   linq   mix   mocking   ndc09   note-to-self   opinion   orly?   patterns   practices   r#   rant   refactoring   resharper   screencasts   sell-out   session state   skills test   sql server   stack overflow   strategy   tccc   testing   tfs   tips   troubleshooting   twitter   typemock   vb   vb.net   video   visual studio   web 2.0