Entries categorized 'Code'

Singing With Sinatra

I attended a couple Ruby sessions at CodeMash this year which really piqued my interest level in Ruby.

For many people (especially web developers) when you hear about Ruby they think Ruby on Rails. While Rails is an impressive framework, there are some other interesting options available. One of them that recently caught my attention (and admiration) is called Sinatra.

Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort.

Continue reading "Singing With Sinatra"

NHProf vs. SQL Profiler

NHProf is a profiling tool for NHibernate.

NHibernate Profiler is a real-time visual debugger allowing a development team to gain valuable insight and perspective into their usage of NHibernate.

What really jumped out at me after using it for just a couple of minutes is how much more useful it is for developers than SQL Profiler (assuming you are using NHibernate).

Continue reading "NHProf vs. SQL Profiler"

MongoDB and C# Dynamics

I am a big fan of MongoDB.

There is a good C# driver called, MongoDB-CSharp. Unfortunately, because of the strongly typed nature of C#, the default implementation requires you to work with your data as a dictionary. This has an unfortunate side effect of some ugly code and a quite a bit of casting.

Given a choice of working with a dictionary vs SQL I would choice a dictionary everyday. However, with C# 4.0’s dynamics, we can make this much easier to work with.

Continue reading "MongoDB and C# Dynamics"

CodeMash 2010

I had the opportunity this year to attend CodeMash 2010.

codemash logo

For those of you unfamiliar with CodeMash:

"CodeMash is all about jumping into new domains. Getting out of your comfort zone. Learning new things from new people."

CodeMash 2010 was without a doubt the best developer event I have ever attended.

Continue reading "CodeMash 2010"

Pragmatic Beer – Thanksgiving Edition

logo[1] Don and I are going to host a Pragmatic Beer night tomorrow November 24 at 6:30 PM. If you are in the area, please stop by and have a drink/dinner/etc.

Continue reading "Pragmatic Beer – Thanksgiving Edition"

Sparking Azure

You know what they say, it only takes a spark. :)

As I mentioned before, I have fallen in love with the Spark ViewEngine. It is a very nice mix of power and simplicity. I also been spending a lot more time on cloud related initiatives, so I was bummed to learn Spark could not be used on Azure (compute) since it requires full trust (and Azure initially had a no concept of trust levels, it only had one limited trust level).

Fortunately for me (and hopefully you) one of the many Azure Mix announcements was support for Full Trust. What this means is that you can now easily use Spark on Azure. All you need to do complete the following two steps.

Continue reading "Sparking Azure"

RSS Feeds For Graffiti Tags

Or put another way, when a feature does not really exist.

I always thought Graffiti had support for RSS feeds per tag. But it turns out that while we have RSS autodiscovery for these feeds, they are never generated by Graffiti.

A couple users pinged us this week about this feature. Unfortunately, it is not on the current feature roadmap, so I figured I would put together a simple example and publish it here.

Continue reading "RSS Feeds For Graffiti Tags"

jQuery Live Events

If you have been coding/using jQuery for a long time, you can skip this post (and just about anything else I ever write on jQuery).

Last week I posted a little example about using jQuery’s starts-with selector and then quickly (and easily) binding an event to all of the items found by the selector.  However, shortly after posting it I ran into a little snag.

Continue reading "jQuery Live Events"

Azure Url Rewriting

Just noticed the this on a Steve Marx blog post about PHP and Azure:

One thing we’ve enabled in the new CTP that’s somewhat buried in the rest of the announcements is support for the IIS URL Rewrite module.  Using that, I got nice URLs like http://tweval.com/mix09-smarx.php to map to the uglier http://tweval.com/index.php?tag=mix09-smarx.

Continue reading "Azure Url Rewriting"

jQuery Makes Me Smile

Quick disclaimer: I am not the kind of person you should be taking JavaScript advice from. However, I did want to share something started out messy and as I applied some jQuery goodness just kept getting simpler.

The setup:

I have been hacking away on a small application/prototype. In the standard view, the first N characters of a piece of content are displayed. If I the user wants more content, I link/button is included which toggles to the full view. If the content is relatively small, the full content is displayed. Here is my spark partial view:

Continue reading "jQuery Makes Me Smile"