Archive

Posts Tagged ‘C#’

Objective-C and C#: Brothers From Another Mother

05/24/2012 Leave a comment

My colleague Paul Irwin just posted an article called Translating Objective-C to C# – Part 1 of n. I think it’s an excellent synopsis. Having myself spent nearly a year and a half doing Objective-C programming part time before learning to C#, this is a topic that hits home for me. There are a couple of areas that warrant some additional clarification, as they are obscure for most Objective-C and .NET programmers alike.
Read more…

Advertisements

Azure Development on x86 Windows

03/14/2012 Leave a comment

If you are planning on doing any appreciable amount of work developing Azure applications using Visual Studio, and are still running x86, you should consider migrating to x64 Visual Studio sooner rather than later. This is even more the case if your application relies directly, or indirectly, on unmanaged code.
Read more…

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.

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…

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…

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…

Dangerous .NET CLR Quirk Lurks In Unfiltered Generic Methods

03/02/2011 3 comments

Step right up! Step right up! Come inside and watch in horror as our sample C# code compiles, runs, and spectacularly fails right before your unbelieving eyes.

Read more…