Meet blaze: C# without cruft!

01/11/2012 Leave a comment

I’ve officially renamed SharpPad as ‘blaze’. Same scripting core host, but a new icon, new installer URL, and thanks to Brandon Berry, new features!

For a limited time, you can download install directly from http://web.me.com/z.gramana/blaze/.
You can still get the source from https://bitbucket.org/zgramana/sharpscript (although I’ll be moving the repository soon).

NOTE: If you have already installed SharpPad, you’ll need to install blaze from the location above in order to received auto-updates.

Advertisements

In Defense of ‘var’

01/09/2012 Leave a comment

The var keywords has unfairly earned a bad reputation. I see a lot of a hating on var, and don’t hear many people sticking up for it. If you don’t like var, or know someone who does, then this post is for you.
Read more…

Forking Github Repos on Win32

09/07/2011 Leave a comment

I’ll be upfront: I’m a Mercurial guy. But sometimes I have no choice but to use git. That’s often a painful proposition on Win32, especially when using github. Github’s advice on forking a repository flat out does not work for me, so I follow this slightly modified process instead. Read more…

Wrap Any Class in Dynamic Goodness

08/11/2011 1 comment

I use the decorator pattern like it’s going out of style. Not really. I would, though, if it didn’t tend to lead to class explosion. Instead of using it in a broad way, I tend to reach for it in a couple of common scenarios:

  1. when someone else’s object doesn’t do what I want it to, and isn’t open for extension, or
  2. when I want to pass an object to a method that wouldn’t accept the object otherwise.

However, decoration can be tedious, can violate the DRY principle, and can lead to lots of little wrapper classes lying around that just clutter a project up. What if we can prevent that? Read more…

Towards Better Graph Loading Via Conditional Types

07/13/2011 Leave a comment

One of my pet peeves is the cruft we often add to our objects to support graph loading. For example, we might create a special “lazy loading” type wrapper (e.g. Lazy) or we might create two independent fields that represent, in effect, the same thing (e.g. Employee MyManager and Guid MyManager_ID). Neither is clean, and each has its issues. I want something better. Read more…

A Handy MSDN Bookmarklet

04/12/2011 Leave a comment

If you’re like me, you don’t do all of your coding in Visual Studio.  That’s when you start to miss the convenience of just hitting F1 to bring up the MSDN documentation for a specific class.

To bring that simplicity to your browser, just paste the following into the URL field of a manually created bookmark:

javascript:(function(){c=prompt("Enter the fully-qualified name of a class, method, property, etc.:","System.Object");window.location="http://msdn.microsoft.com/en-us/library/"+c+"(v=VS.100).aspx"}());

Defaulting on Orchard CMS

04/04/2011 8 comments

When creating a new Orchard module, I needed to set the default value for an integer. The thing is, you can’t do it in your model class like you would normally do. Property getter/setters are just getting/setting the underlying record, and the constructor runs before the record object has been created. What now?

Read more…