Geeks With Blogs
Liam McLennan May 2008 Entries
JAOO Brisbane - Day 3
I began the third and final day of JAOO Brisbane by arriving late. I had left my name tag at home so I had to go back for it. I was in time for Robert Martin's keynote Clean Code. Uncle Bob is well known for his enthusiastic, entertaining presentation style. I greatly enjoyed his talk, even though it was really just a back-to-basics on writing code. He did a tutorial on advanced design that I missed, but I'm sure it would have been excellent. Next was Jim Webber speaking about distributed programming ......

Posted On Saturday, May 31, 2008 6:15 PM

JAOO Brisbane 2008 - Day 2
The conference proper began with a faux improvised discussion about the conference. There were some attempts at humour, which I appreciate, but they struggled. Eric Meijer from Microsoft had the first keynote. His central theme was that imperative OO programming is fatally flawed and we should all embrace functional programming. His presentation was entertaining and thought provoking. The next talk I chose to attend was by Dave Thomas (not the Pragmattic Dave Thomas) on the topic of next generation ......

Posted On Thursday, May 29, 2008 4:56 PM

JAOO Brisbane 2008
Yesterday was the first day of JAOO Brisbane 2008. Choosing tutorials was hard. Should I learn from Rebecca Wirfs-Brock about telling design stories, or Robert Martin about agile O-O design? I chose to attend the Martin Fowler and Erik Dornenburg tutorial on test driven development. It was a full day tutorial so it meant I missed out on the other tutorials. As someone who is familiar with test-driven development I was hoping for some expert insight beyond just an explanation of the basic red-green-refactor ......

Posted On Wednesday, May 28, 2008 4:52 PM

Restricting HTTP methods with an MVC ActionFilter
HTTP methods are not often thought about when coding webforms applications. Links are GETs, buttons are POSTs and it all happens automatically. With Asp.NET MVC, and other MVC frameworks like Rails, the HTTP method used is more obvious and developers are begining to care about which they use. The problem is that GET requests tell visitors to your site, including search engines, client-side web optimizers and other automatic tools, that it is safe to make the request. Which is a problem if ......

Posted On Wednesday, May 21, 2008 9:59 PM

How to Generate URLs with ASP.NET MVC
I have been working with ASP.NET MVC for some time and yet I still had trouble trying to generate a URL in a view. URL generation is particularly important for ASP.NET MVC because it uses a routing engine to map URLs to code. If we hard code a URL then we lose the ability to later vary our routing scheme. I have found two ways that currently (ASP.NET MVC preview 2) work to generate URLs in a view. The first uses the GetVirtualPath method and seems overly complicated - so I wrapped it in a global ......

Posted On Wednesday, May 21, 2008 8:21 PM

Cashbacks are a scam
Lately I have noticed a trend in electronics retailing. Shops have started selling a large number of items with cashbacks. Here is an example of what I mean. Cashbacks are provided by the wholesaler to the consumer as a means of passing on discounts in a way that cannot be absorbed by the retailer. For example, if the wholesaler discounts the cost of an item by $250 what is to stop the retailer absorbing the $250 as additional profit? But if the wholesaler offers a $250 cashback then the consumer ......

Posted On Wednesday, May 21, 2008 7:56 PM

Building a Vista Media Center Home Theatre PC
For a while I have been thinking about building a media center PC but I could not bring myself to purchase a new machine just for home theatre. Then it occurred to me that I already have a server that runs constantly - why not use it for media center as well? I began with a fresh install of Vista Ultimate since it includes media center. The first problem I encountered was that Vista does not support my old AGP graphics card. When building a home theatre PC (HTPC) two important considerations are ......

Posted On Monday, May 12, 2008 3:22 AM

Sender Policy Framework (SPF)
Last friday morning I began to receive hundreds of delivery failure email messages. This is a common problem that can be difficult to solve. It happened because a spammer began using my email address as the FROM address for their spam messages. Because the spam gets sent to a huge number of non-existant email addresses I received a corresponding number of delivery failure messages. According to Wikipedia, "SPF allows software to identify and reject forged addresses in the SMTP MAIL FROM (Return-Path), ......

Posted On Sunday, May 11, 2008 3:45 PM

How to use the Moq mocking library
Moq is yet another .NET mocking library, similar to Rhino mocks, NMock, TypeMock etc. It is a nice library but the documentation is lacking. The purpose of this post is to demonstrate a simple way of using moq. I am trying to test a service called ProductService. ProductService has two external dependencies, IProductRepository and IImageResizer, that are injected in the constructor. I wish to mock the two dependencies. A moq mock object is created like so: Mock<IProductRepository> productRepo ......

Posted On Friday, May 9, 2008 12:55 AM

Copyright © Liam McLennan | Powered by: