Is 20MB For a Framework Too Big?

I was talking to Steve about this the other day and it caused a bit of Geek soul searching within me. Ever since I started writing SharpMT I get about one email a week complaining about the .NET Framework being required. The complaints range from that it’s needed at all to it being too big or that it uses too much memory. My usual reaction is “stop bitching about it and go click Windows Update to get it.” Why so short and snippy a response? That’s a bit longer in telling…

The .NET Framework is the future of Microsoft‘s development plans, at least from what I can see. It is the central hub of all things good and golden that Microsoft is planning for the next ten years or so, which is about the length of a millennium in digital years. It might have other names and it might become a smaller part of a bigger platform – i.e. WinFX – but it’s by far the most visible and thought out class library and framework this side of 1990. Having said that, what makes people think that whining about other developers using it will stop us from using it?

Let’s take a step back. Why do I require it at all? Well, I wrote SharpMT in C#. Why did I do that, if I had been using C++ and C for a decade? Besides wanting to learn the new language, C# let me code the first version of #MT in under a week. When I wanted a web control: *bam* it took four clicks. Wanted a sliding panel? *bam* another four clicks. It’s elegant and it’s easy and that’s that. It was my choice and I made a good one.

So why are people so entrenched against the .NET Framework, if it can accelerate development and make better applications? There’s varied arguments. The first is that because it wasn’t included in Windows 2000 there’s a 20MB file download that is required to get applications like mine to run. Actually, since there’s two versions of the .NET Framework, it might cause a 40MB download. That would be a huge concern except – *gasp* – people have broadband access now! [Even Mike has broadband now – he had to upgrade his Windows 95 Gateway to a brand new Windows XP-based Dell to get it, but if he can get DSL no one else has an excuse – even my parents have broadband and they can’t spell DSL when it comes to PC’s] And if not, go get a CD from Microsoft. Someone has them floating around, I’m sure. A $6 upgrade kit or something… stop bitching about the one time download because my applications would be five times their current size if I didn’t have the support of the .NET Framework in the first place – you’re downloading the same amount of bytes overall.

I’ve also heard people complain that it’s too large to install. This is where my own soul searching came from. Yes, 20MB is a large amount of data. What size hard drive are you running now, by the way? Me, I’ve got a 40GB in my notebook. Hm. Why is 0.05% of your vast storage volume such a huge demand? It’s not. See, old school Geeks are used to pinching every bit and byte of free space that they can. We’re greedy and hording control freaks that feel they have to constantly vigilant to protect our hard drives. We’re like this because in the old days we had to be like this! Remember fine tuning the Windows 3.1 swap file size because you only had a 10MB hard drive? Or only installing certain parts of the MSDN Library and hiding the CD from people because you would need it to search for function calls in VB? Hah. Long gone – modernize yourself and learn to install without fear! Install every piece of Office 2003, too, because if you short yourself the experience of using OneNote to save 50MB on a 80GB drive, you’re missing out. [Shut up Steve! I was wrong in calling it “post-it notes for the Tablet PC,” OK? There’s some neat stuff in that app!]

Then there’s the DigitHeads that think they know what they’re talking about and argue against the Framework because of memory usage. These are the worst people to listen to because they’re either still looking for a QEMM386 TSR module to free up space under 640K or they’re completely lacking in their technology knowledge. The former group is just dated: they’re used to working in DOS and haven’t yet realized that they’re performing tricks that are almost 20 years old. The latter group is the worst of the lot because they’re freakin’ morons. Yes, the .NET Framework gets loaded into memory and yes it will use some of it – all applications do this, so that’s strike one. Strike two comes when they say it uses too much memory; how much is too much? See the above argument about hard drive usage percentages and try again. Strike three is the best: it’s buggy or it mishandles memory. Bad code is buggy and mishandles memory. We’ve had buggy code long before .NET and we’ll have it long after it – will we have memory leaks though?

One of the nice things about C++ is that you control everything. One of the nice things about C# is that you don’t have to control everything. Create an object with C++ and you have to handle the clean up. Create an object with C# and the Framework eventually gets around to cleaning it up. C++ gives you a loaded gun to shoot yourself in the foot; C# points the gun at your marketing department. Can the garbage collection that’s in C#’s CLR be 100% effective in all situations? Articles abound talk about how to optimize your code for garbage collection; if the default doesn’t work for you there are ways to specialize your code! In theory, this could prevent memory leaks from everyone that’s built on the framework – at least the careless or stupid ones that come from bad coding.

I once had a Visual C++ programer work for me (during the version 6.0 days) that declared over three dozen objects with new and didn’t know you have to call delete to free the memory back up. The memory leaks went on for pages on end when you debugged it. No framework can actively prevent this particular problem but it can help to fix it, as the .NET Framework would – in some cases there’s nothing that can help bad programming.

Lastly, if you ever plan to go to Windows Server 2003 or Longhorn, the .NET Framework will be included and impossible to remove… so there’s one less thing to bitch about in the future. Unless of course you’re content to stay on Windows 98 and manage your 6GB hard drive with 64MB of RAM to your heart’s content, spending hours muttering about IRQ’s, the 384KB memory hole, and prophesying the rise or OS/2.

If you’re that guy, neither I nor the .NET Framework can help you anyway.


6 thoughts on “Is 20MB For a Framework Too Big?”

  1. The author did not mention the number one negative to Visual Studio .Net. Microsoft does an amazing job of putting just enough Windows specific crap in most projects as to not make the application platform neutral. The developer usually has go through and worry about making the code, platform neutral, after the fact. .Net itself is a very good concept. Microsoft was smart enough to hire one of the best language designers in the world for C# (the dude that made turbo pascal among others) and it shows. And in fact, the open source Mono implementation looks much more promising for .Net. Nothing would be cooler than .Net taking off on non-windows platforms and biting M$ in the butt. In the end, Microsoft’s true pigopolist intention come through loud and clear in their implementation of .Net.

    Microsoft is not an evil empire, they just make really crappy software. – Linus Tovald

  2. OK. Well then. First off, there’s only one author here: me. So by all means direct all commentary to me :)

    Beyond that, what in the hell are ya talking about “platform neutral”? Do you mean “write once, run anywhere”? That was never a consideration for .NET… it was never mentioned in any of the docs I’ve seen for .NET over the last 4 years – the whole point of managed code and the CLR was to offer a language independent runtime for Windows. Not OS-X or Linux or n-nux – it was designed for Windows. The fact that other people has brought the runtime to other platforms (i.e. Mono) is their business, not Microsoft’s, or else you would see downloads for the Framework for other OS’s, like Mac OS – you think Microsoft writes one version of Office for both platforms? Jeesh.

    Further more, if you want a “write once, run anywhere” platform, use Java. Wait, you can’t use Java like that, can you? AWT? Swing? JavaBeans? Darwin got a VM? IBM’s VM acting differently from Sun’s VM? Sun maintaining total control of Java and shunning the ISO panel? Nevermind that NOTHING written for J2SE can ever be run on J2ME or vice versa. Hell, if you write a J2ME application for Nokia it won’t run on a Motorola. There’s even different KVM’s in Motorola itself, across PRODUCT lines. The only thing you can write once and use anywhere IS the word Java and it’s got nothing to do with programming. Write it on the side of my car and suddenly that’s Java-Compliant.

    And Java isn’t the first language that attempted that either. I remember Visix. That ran on multiple flavors of Unix and Windows when pre-Java and SGI was still a real player in the market – what you ended up with was an ugly application that sorta ran everywhere and looked out of place on every platform. Multi-platform just isn’t smart programming, most of the time.

  3. If Java is so bad, why is Microsoft trying so hard to rip it off? btw, I’ve seen a ton of Java apps and applets that work great on MS Windows, Linux, Mac OSX and Solaris. Who cares how the stupid cell phone crap works, it sounds like cell phone manufacturers are to blame. Java would be doing a lot better if Microsoft hadn’t been trying so hard to screw it up. I guess I shouldn’t mention that now since they bought their way out of trouble by paying Sun $900 million though.

  4. In the J2ME world, it is a combination of Sun and cell phone manufacturers: Sun for not taking the control it should have taken and OEM’s for writing shitty code/KVM’s. For the desktop, that’s open for conjecture. Java was not the first platform to us a virtual machine or VM notion – it was just the first to get so much press for it. So I don’t know that MS is ripping off anyone by having their own framework. I also think Java Apps work on Windows, etc… I don’t know that they work great or look worthwhile, but that’s just me.

  5. Just to point out something I read somewhere (i.e. covering my back because it may not be true, though it’s highly likely it is. And it also explains my lack of technical terms surrounding the subject) regarding the amount of memory .NET apps take up. Most people base the amount of memory it takes up on the traditional methods, assign memory for what I need. .NET works differently, it takes as much as it can, then gives some up when it’s needed by other applications. Alot of popular applications do this.

    “Java would be doing a lot better if Microsoft hadn’t been trying so hard to screw it up.”

    When have they tried to screw it up?

  6. On it’s own, the .NET Framework doesn’t take up anything but HD space, which was the original notion of the post: people seem to bitch about download times (see Broadband) or hard drive foot print (see 200GB HD for $100). How it manages RAM is another conversation, and it’s one that I’m lightweight on… I’ve never taken much of an interest in the GC, since it’s always “just worked” for me.

    As to Java, that’s definitely a Media sounding quote… and does it apply to Java the VM, “Write Once Run Anywhere” concept or the Java “I’m a Programming Language” concept? Regardless, the short answer is “I dunno”. I mean, from my point of view, anyone that has worked to forward Java has helped to screw it up somewhat. Sun has spent more time in building an image and designing logos than it spent trying to make Java windows look good… at the height of Java app popularity, it had the style and grace of Windows cerca 1992. Java Micro-Edition (J2ME) is a complete debacle, since every handset maker has their own KVM… shoots down the write once-run everywhere ideal… So, aside from MS offering another platform to code on – being .NET – I don’t even know how they’d be involved…


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.