New Year, New Challenges

Just a short personal post.  Its a new year and I’m facing some new self created challenges.

bathtime

     My first child arrived at the end of November to change my life and steal my heart. And although taking care of her and mom occupies a lot of my time. I still want to make time to get more posts up this year.

     So thanks for stopping by and I hope I have something to share this year that is helpful, entertaining and at least a bit educational.

Monday, January 18th, 2010 Coding No Comments

Thoughts on Messaging and MVC

When I start to learn a new style of programming I like to experiment by creating my own versions of things. This has lead to writing my own ORM framework and Mime parser just to name a few of my coding accomplishments for which I pride my self. Writing each was a valuable learning experience that allowed me a much better understanding of similar software systems. › Continue reading

Saturday, July 25th, 2009 Coding 3 Comments

Dropdown Menus of Simplicity

One of those things that I’m often asked for by clients is “Can we have a drop down menu across the top?” To which I answer “Sure!”. And then once I start trying to work their look and feel into some jquery, javascript and CSS menuing plug-in I suddenly recall that I hate mutating someone else’s mess of html, css and javascript into something that still works across all the browsers and looks like what the client wants. YUCK!

› Continue reading

Thursday, April 30th, 2009 Coding 2 Comments

What’s in your wallet? – Part 2

I felt I should follow up on my post from yesterday. First I want to say that I’m not trying to bash Jeff or otherwise rub his nose in it. Jeff has stated that he learns best from the “Smackdown”. And I’m nothing if not confrontational :-)

As I stated, my first dealings with Ayende were back around 2003 or so when the company I worked for tasked me with developing a new webmail program. The previous version had been written in java and functioned but lacked many features that our customers were asking for. At the time the company had the grand idea of the “standard language”, and following the “no one ever got fired for buying Microsoft” logic mandated that C# was to be that language.

One of the major hurdles I ran into was the lack of a performant pop3/mime library. Many were tried but most relied on regular expressions to parse the messages and this would bring the server to its knees if more than one or two users attempted to open their mailbox at the same time. So off I went to write a mime parser.  › Continue reading

Sunday, March 1st, 2009 Coding 1 Comment

What’s in your wallet?

I’ve refrained from posting on the stir that occurred after Stack Overflow #38. I’m firmly on the side of the apparent “SOLID”-nista’s. The reasons for this is that learning and applying them has made me a better programmer.  I’ve used TDD and SOLID principles on large codebases and found that this has allowed significant changes and evolutions to happen to these libraries and have them rolled out into numerous separate projects with absolutely no issues.  Why? Because there are several hundred tests surrounding each of these projects. And the use of the SOLID principles has allowed me to swap out large sections of code with better implementations and add new functionality with little effort thanks to the reduced dependencies. › Continue reading

Saturday, February 28th, 2009 Coding 3 Comments

Custom LINQ Operator?

K. Scott Allen has a great post up titled Why Would I Create A Custom LINQ Operator? I figured I’d add my minor addition to the discussion.

public static bool Contains<T>(this IEnumerable<T> enumerator, Predicate<T> predicate)
{
    if(enumerator == null)
        throw new ArgumentNullException("enumerator");
 
    if(predicate == null)
        throw new ArgumentNullException("predicate");  
 
    foreach(T item in enumerator)
    {
        if(predicate(item))
            return true;
    }
 
    return false;
}

This allows you to do this:

if(tags.Contains(x => x.Name == "Coolest Blog Ever")) {
    // we found a matching tag
}
else {
    // no tag found :-( 
}

Nothing special I know, but hopefully it helps someone out.

Saturday, February 14th, 2009 Coding 3 Comments

Refactoring the ASP.NET MVC project template – Part 4

I wasn’t planning on continuing this series until I’d had a chance to play with the new RC1 release of the MVC framework, but Phil Haack has a post up that I’d like to touch on. To summarize with the latest release the MVC team has added a ContentPlaceHolder to the head section of the Site.Master file. This is a good thing and has been recommended by others as an excellent way to control the page title, scripts and css files from within your views. The issue is that the head tag has the runat=”server” attribute. So while the page is being rendered by the server the view engine parses this tag and runs some asp.net code to “help” you.  In this case one thing it helps you with is adding a title tag if you didn’t provide one. If you construct your head section improperly you end up getting an error :

› Continue reading

Wednesday, January 28th, 2009 Coding 3 Comments

Mechanical Engineering Vs. Software Engineering

Mike Taulty has an interesting post up titled Why is Deleting Code so Satisfying? where he compares a plumber and a software developer. (Its a very short post, please go read it… I’ll wait).

Now I may have a bit of a unique view on the subject as I’m a developer and my brother is an Mechanical Engineer for Conway & Owen.  So please bear with me. Mike’s post asks if a plumber would rip out his work if they found a better way after they already started. The fact that he mentions a plumber, I would speculate, causes most people to think of plumbing a single family home. This type of plumbing is the  software development equivalent of FizzBuzz. Which is to say that it takes some skill and understanding to do it correctly but overall its not a difficult problem.

› Continue reading

Tags: ,

Wednesday, January 28th, 2009 Coding 2 Comments

Lucene.Net Analyzer Tool update

I’ve recently been working with lucene.net and one of the things I needed was a custom analyzer. Luckily Andrew Smith has written up two articles about doing just that:

In those articles Andrew provides a nice tool to test lucene’s analyzers. The tool loads the analyzers from the lucene dll and allows you to select from the provided analyzers and see how they process entered text. I’ve made a few minor updates to the code so that it can load analyzers from dll’s selected at runtime, so that you can test them and see their output. You can get the updated project source code here:

Tags:

Monday, January 26th, 2009 Coding Comments Off

Refactoring the ASP.NET MVC project template authentication – Part 3

In part 3 I wanted to clean up a few small details. And once again I’ll  be focusing on the server side .net  code and saving the client side javascript for another post.

In this post I’ll be making use of the ASP.NET MVC Futures codebase which you can get here.

One of the complaints that is heard about MVC summed up by the following comment over at Los Techies “…I‘m not ready to start putting clunky C# code in my views, like asp.net MVC is using, feels like legacy asp all over again”. And yes many examples of this coding style exist including the LoginUserControl.ascx in the example MVC project.

› Continue reading

Tags: ,

Monday, January 19th, 2009 Coding Comments Off