.net

performance

For Best Results, Don't Initialize Variables

I noticed on a few projects I'm currently working on that the developers are maniacal about initializing variables. That is, either they initialize them when they're declared: private string s = null; private int n = 0; private DataSet ds = null; Or they initialize them in the constructor:

By Jeff Atwood ·
Comments

.net

Where Are The .NET Blogging Solutions?

Owen Winkler put together an overview of all self-installable blogging software, circa mid-2004. After surveying his options, he notes one clear trend: Even more disheartening: .Text is the only blogware that anyone suggested for the Windows platform. I asked and asked about it because I wanted to give Windows a

By Jeff Atwood ·
Comments

apis

Flickr Hacks

There’s so much buzz around Flickr right now it’s practically deafening. Or maybe I should say blinding, because Flickr is a collaborative photo sharing service. I was perplexed why Yet Another Photo Sharing Website was so hot until I started browsing the myriad hacks and tools available for

By Jeff Atwood ·
Comments

.net

Troubleshooting .NET performance using Peanut Butter

Here’s some excellent, concise advice on troubleshooting performance in managed code. It all starts with peanut butter, naturally: My last entry was some generic advice about how to do a good performance investigation. I think actually it’s too generic to be really useful – in fact I think it

By Jeff Atwood ·
Comments

.net

Obfuscating Code

Robert Cringeley, in a post early last year, raised some concerns about reverse engineering .NET code: .NET is almost exclusively Just-In-Time compiled. JIT’ing means, “I was just about to interpret this, but I’ll compile it at the very last minute instead.” In effect, the .NET code remains in

By Jeff Atwood ·
Comments

.net

New Job at Vertigo Software

I accepted a position at Vertigo Software today. You may know Vertigo from one or more of the following: * Quake II .NET (Managed C++) * IBuySpy (ASP.NET) * .NET Pet Shop (J2EE performance comparison) * Fitch & Mather (Windows DNA) * FotoVision, IssueVision (.NET Smart Client) I’m tremendously excited to join such

By Jeff Atwood ·
Comments

c++

Respecting Abstraction

In a recent post, Scott Koon proposes that to be a really good .NET programmer, you also need to be a really good C++ programmer: If you’ve spent all your life working in a GC’ed language, why would you ever need to know how memory management works, let

By Jeff Atwood ·
Comments

.net

The bloated world of Managed Code

Mark Russinovich recently posted a blog entry bemoaning the bloated footprint of managed .NET apps compared to their unmanaged equivalents. He starts by comparing a trivial managed implementation of Notepad to the one that ships with Windows: First notice the total CPU time consumed by each process. Remember, all I’

By Jeff Atwood ·
Comments

security

Encryption for Dummies

I just posted a new article on CodeProject, .NET Encryption Simplified. In my spare time over the last 6 months, I’ve delved deeper and deeper into the System.Security.Cryptography classes. And you know what I learned? Cryptography is hard. Anyway, I now have a heavily documented wrapper class

By Jeff Atwood ·
Comments

.net

Determining Build Date the hard way

One of the key diagnostic data points for any .NET assembly is “when was it built?” Until recently, I thought there were only two ways to suss this out: 1. Check the filesystem date and time 2. Derive the build date from the assembly version The filesystem method has obvious

By Jeff Atwood ·
Comments

.net

Building Mht Files from URLs revisited

I finally finished updating my CodeProject article, Convert any URL to a MHTML archive using native .NET code. It’s based on RFC standard 2557, aka Multipart MIME Message (MHTML web archive). You may also know it as that crazy File, Save As, “Web Archive, Single File” menu option in

By Jeff Atwood ·
Comments

regex

If You Like Regular Expressions So Much, Why Don’t You Marry Them?

All right... I will! I’m continually amazed how useful regular expressions are in my daily coding. I’m still working on the MhtBuilder refactoring, and I needed a function to convert all URLs in a page of HTML from relative to absolute: <summary> converts all relative url

By Jeff Atwood ·
Comments