Browse by Tags

Useful Moq Extension Method
24 November 09 04:03 PM | MattManela | 0 Comments   
I have been working with ASP .NET MVC and I use the Moq mocking library to help test the code I write.   Often in ASP MVC anonymous objects are passed around as function arguments.  This is especially common in calls to RouteUrl.  Read More...
Filed under: , ,
Converting RTF to HTML
28 September 09 11:28 AM | MattManela | 0 Comments   
Have you ever had the desire to convert some RTF text into HTML? Probably not. But if you do, then you are in luck! I recently had the need to do this conversion and after some searching found out a way to do it by enhancing a sample distributed in the Read More...
Filed under: , , , ,
Attachment(s): MarkupConverter.zip
I finally got fed up with Enum.Parse
24 July 09 09:02 AM | MattManela | 3 Comments   
I don’t know why I didn’t do this long ago, but I am done writing this: var val = (SomeEnum)Enum.Parse( typeof (SomeEnum),”someString”); I have typed this too many times and it annoys me.  I wrote a small extension method on the string type to make Read More...
Filed under: ,
DRY and Unit Tests don’t mix well
12 July 09 08:08 PM | MattManela | 0 Comments   
When reading source code, I sometimes come across unappealing code(sometimes even my own).  However, there is one kind of “bad code” I see quite frequently.  It is a set of unit tests which have had the DRY (Don't Repeat Yourself) principle Read More...
Filed under: ,
How to teach your girlfriend Hexadecimal?
06 May 09 04:49 PM | MattManela | 1 Comments   
It is an age old question: How do you teach your girlfriend hex? I encountered this problem when I was a web developer in college for a late night student activities program aptly named Late Nite Binghamton. My co-worker and girlfriend Mallory was a graduate Read More...
Filed under:
Snippet Designer in April’s MSDN Magazine!
14 April 09 04:33 PM | MattManela | 1 Comments   
I am excited to announce that the Snippet Designer is featured in the April issue of MSDN Magazine.                    It is featured in the Toolbox column where they highlight useful tools and blogs. Read More...
A functional take on console program loop in F#
13 April 09 09:51 PM | MattManela | 1 Comments   
Often when learning a new technology I start with a simple console application in which the program is run in a loop it continues to prompt you for more input until you give some command like quit or exit or whatever you choose: Enter input: someInput Read More...
Filed under: ,
Synchronizing Scrollbars using JQuery
19 March 09 01:29 PM | MattManela | 1 Comments   
I just wrote this simple plugin for JQuery which lets you synchronize the scroll bars of any collection of elements.  This lets you move the scrollbar of one div it have the scrollbars’ of the rest of the divs move the same exact amount. Here is Read More...
Prime Factorization using Unfold in Haskell
17 March 09 06:53 AM | MattManela | 1 Comments   
I randomly yesterday started thinking about the unfoldr function in Haskell while working out at the gym (how nerdy is that, I am lifting iron but thinking of functional programming). Unfoldr take a single and an unfolding function and turns it into a Read More...
Filed under: ,
My xUnit.net Visual Studio Code Snippets
02 March 09 03:58 PM | MattManela | 1 Comments   
The xUnit .Net codeplex page lists one useful Visual Studio code snippet for creating a Fact. As you can tell I am fairly fond of code snippets so I created a few more which I use when writing xUnit.net facts. These are one line snippets that I find very Read More...
Filed under: , ,
Attachment(s): xUnitSnippets.zip
Code Assumptions
01 February 09 08:13 PM | MattManela | 1 Comments   
My co-workers and I recently came across a piece of code which exposed some assumptions we had about the “correct” behavior of two functions; these assumptions turned out to be false.  The code dealt with determining if the IP of a  request Read More...
Filed under: ,
Snippet Designer 1.1 Released
05 January 09 06:11 PM | MattManela | 3 Comments   
I just released Snippet Designer 1.1.  This is not a major release but just some bug fixes and often requested changes to make the snippet designer more useful.   Some of the most notable changes are: Languages Service are turned OFF by default Read More...
Inline Regular Expression Options
01 January 09 12:10 PM | MattManela | 1 Comments   
I was using attributes from the System.ComponentModel.DataAnnotations    namespace for model validation.  This namespace includes a few very useful validation attributes such as Required Attribute – Validates the field has a value Range Read More...
Filed under: ,
Model Binder
15 December 08 10:45 PM | MattManela | 0 Comments   
When working with a multi-tier application I often find myself converting from one of the tiers object models to my own similar (but often different) model.  I often write code that would set one by one each property from a web tier object to my Read More...
Filed under: ,
Updated JQuery ResizeComplete method
02 December 08 06:51 AM | MattManela | 1 Comments   
I made 2 slight changes and I think it works pretty well now. I now detect if the browser is Firefox and use the regular resize event since its resize behaves like a resizeComplete. I also modified the timeout a bit since I think 100 ms might be too small. Read More...
More Posts Next page »
Page view tracker