Notepad++ Tip: Syntax Highlighting for ASP.NET Files

Notepad++ has a spot in my toolbox mostly because I like it as a lightweight viewer/editor for one-off situations where I really don't feel like loading up Visual Studio just to take a quick peek at a file.

When I first started using Notepad++, one of my common usage patterns was to take a quick look at a file that was part of some solution that I did not currently have open in a Visual Studio instance.  I'd just find the file in Windows Explorer, right-click on it, and select "Edit with Notepad++" (which is a context menu addition the Notepad++ installer makes that you'll actually find handy rather than annoying).  No long load time, no fuss.

But one of the things I quickly missed that I would have gotten in Visual Studio was syntax highlighting.  For example, if I opened a Web.config file in Notepad++, I wouldn't get any syntax highlighting, because Notepad++ didn't know that *.config files are really XML.

The solution to my problem lied in a very obscure Notepad++ setting that took me a lot of digging to find.

Here's what you do:

- On the Notepad++ menu bar, click "Settings" -> "Styler Configurator..."

screen1
- Under "Language", select "XML"
- Under "User ext", type in "config".  While we're at it, let's also type in (space delimited) "aspx", "ascx", and "master".
- Click "Save & Close"

That's it!  Now when you view config files, ASP.NET pages, user controls, or master pages in Notepad++, you'll get syntax highlighting.

Gently Chirping Crickets

"Given the level of fierce competition out there now, Microsoft must have some really killer features up their sleeves for Internet Explorer 8, right?

Pretend that I've inserted the sound of gently chirping crickets here."

- Jeff Atwood

Vetting New Technologies

"No, demo applications are not good enough. You need a real project or two to get things rolling. You need to bang your head against a technology. You need to code in anger and swear eternal vengeance against the authors' ancestors nine generations back and three forward."

- Ayende

Brain Food 11-9-2007

I've started reading Head First Object-Oriented Analysis & Design recently, so I've rounded up a few good high-level OO related links today.

The Future and Viability of IronRuby

I'm trying to decide if IronRuby will be important.  More specifically, will it ever be important to my career?

Will IronRuby allow me to sneak Ruby into my day job?

For various reasons that I won't go into, I've given up on trying to work for a company in Grand Rapids that uses Ruby on Rails, at least in the short term.  So I'm firmly seated in .NET Land for the foreseeable future.

Don't get me wrong, C# is a pretty nice language, and is getting more interesting all the time (see the stuff coming out with 3.5).  But, given what I know of Ruby (which, honestly, is not much, but I'm planning to change that), my gut feeling is that Ruby is still a more advanced language than C#.

So just what the hell is Microsoft planning to do with IronRuby?  Will it be "first-class"?  By that I mean: will IronRuby ever ship with Visual Studio?  Will it ever approach the popularity of C# or VB?

What would it take for me to be able to use IronRuby in my day job?  I'm still trying to get a feel for how progressive my employer is, so I really have no idea how likely they'd be to adopt a "new" language.

<TANGENT> I've already gone down this thought-path with some other things, like Test-Driven Development. What would it take to get TDD accepted at my employer?  Or, more to the point, is there any real chance of TDD ever being adopted at my employer?  If TDD is (almost) universally accepted as being a Good Thing, why aren't we doing it?  Scott Hanselman does itPhil Haack does itJeremy Miller does it.  (All .NET guys, BTW)  Why am I not doing it? </TANGENT>

As a pragmatist, I have a really hard time getting excited about things that aren't clearly useful and applicable to my everyday life.  With so many other cool things out there fighting for my limited attention, should IronRuby make the grade?  Is it likely that in the near future, I'll be able to write an MVC web app with IronRuby for a client at my day job?

If any of my readers out there (all three of you), have any thoughts on the viability or future of IronRuby, please chime in.

The Obliterator Pattern

"The Obliterator pattern is a combination of the Iterator pattern, which is useful for walking through a list of objects, and deletion functionality. When applied to any list of objects, it automatically walks the list and deletes all members, then removes the list, the calling function, and the application itself. Variations of the pattern have been known to also destroy the operating system, the computers running the system, the networks on which the pattern is deployed, and the universe in which the pattern exists. Use with care, or at least ask your users to test it for you before declaring the product final."

- Chet Haase

The Ultimate Reference for .NET Regular Expressions

If you're looking for a definitive reference on the regular expression syntax in .NET, here it is:

Regular Expression Language Elements

This is one of my most treasured bookmarks, and I wouldn't feel right about keeping it to myself.

I constantly refer to this link, and it's saved me hours of time that I used to spend cobbling together information from other sources.

Technical Debt

"[Technical] debt accumulates from taking hundreds or thousands of small shortcuts--generic variable names, sparse comments, creating one class in a case where you should create two, not following coding conventions, and so on. This kind of debt is like credit card debt. It's easy to incur unintentionally, it adds up faster than you think, and it's harder to track and manage after it has been incurred."

- Steve McConnell

Greatness

"I've found that people who are great at something are not so much convinced of their own greatness as mystified at why everyone else seems so incompetent."

- Paul Graham