Forgot your password?
typodupeerror
Programming

Visualizing the .NET Framework 320

Posted by kdawson
from the drowning-in-code dept.
eldavojohn writes "If you're a Web developer, you should check out a quick post about the number of types, methods, & fields in the .NET framework. This was done using NDepend. The numbers are quite large — e.g. 39,509 types. The blogger went on to generate tree maps and a dependency matrix."
This discussion has been archived. No new comments can be posted.

Visualizing the .NET Framework

Comments Filter:
  • by grahamsz (150076) on Tuesday March 18, 2008 @09:33PM (#22790836) Homepage Journal
    There are a number of advantages to a comprehensive type library, it does do a decent job of defining interfaces that external libraries can use.

    One example I came across recently was that I was able to couple one visualization library (that rendered to an on screen canvas) to a pdf library (that implemented the standard Graphics2D interface). With little more than a few lines of code, the full vector-based visualization appeared in a pdf file. Granted, I'm not a C++ programmer, but I doubt you could have glued together two libraries at that level.

    The .Net framework does seem worse than the Java one, if only because it's documentation seems poorer than suns.
  • by wbean (222522) on Tuesday March 18, 2008 @09:45PM (#22790942)
    The comparison to the human genome is interesting. The genome contains about 3 billion base pairs and 30,000 coding genes. As best I can see, .NET is quite a bit bigger: The closest thing to a gene is a method (an object that can be used, or not used, and which does something). The genome has 30,000 and .NET has 384,000. So even if it takes 10 methods to do what one gene does, they are equivalent.

    It takes 3 base pairs to code for a single protein, perhaps the closest we can come to an instruction. Each gene has an average of 3,000 base pairs, equivalent to 1,000 instructions. So we are looking at 30,000 genes x 1,000 instructions/gene or about 30,000,000 instructions in the genome. .NET has 8,000,000 instructions. Given the roughness of the comparison, this is pretty close.

    The point here is that we are creating programs that are roughly equal in complexity to the human genome. If we were better programers, then perhaps we'd have come up with intelligent design.

    Finally, it's worth noting that the functions are unknown for over 50% of discovered genes. It may be about the same for .NET :))
  • Re:This is News? (Score:2, Interesting)

    by marc.andrysco (1173073) on Tuesday March 18, 2008 @10:51PM (#22791354) Homepage
    Working my first programming job, I had to take over a project written in C#.NET without any experience in the language. The goal was to communicate through an RS-232 port for sending and receiving some data, including text and numbers. Looking at the previous code, I saw some really long, confusing method of converting a string to ASCII and sending it through. I really took me by surprise since I had never seen anything like it, and I proceeded by looking through documentation. I was hoping for something real nice with fwrite, but I instead I had to jump through some hoops to figure it out. The problem wasn't so much finding documentation, but figuring out what methods I needed to use. I felt overwhelmed with the number of options that were so similar, some of which appeared like they would work but some contained a small caveat that prevented it from working.

    On another note, I was perplexed when I used a switch structure and attempted to let the code fall through to another label. The compiler complained and forced me to write a goto statement (is there a more elegant want to do that?). A little later, a senior programmer was reviewing my code an criticized me harshly for putting in a goto where it should simply fall through. I literally had to show him that it would not compile otherwise in order for him to believe me.
  • by iluvcapra (782887) on Tuesday March 18, 2008 @10:55PM (#22791390)

    Monorails are efficient and sparkly shiny but are almost universally inappropriate except for certain very limited transportation scenarios (airport people-movers, theme parks, etc). They require alot of service and very expensive infrastructure. The old honda just needs a road, works on your schedule and is comparatively inexpensive to maintain on a per capita basis.

    Just sayin.

  • by AKAImBatman (238306) <akaimbatman @ g m a i l . c om> on Wednesday March 19, 2008 @01:34AM (#22792300) Homepage Journal
    FWIW, he does have something of a point. Microsoft cycles its platforms at an incredible rate that just is not natural for the industry. As soon as one gets used to the existing API, Microsoft deprecates it and creates a new one. What's the advantage of the new one over the old one? In many cases, no one knows.

    Why did Microsoft rearrange the VBA API from Access 97 to Access 2000? Heck if I know. Why did Microsoft make IIS extensions written in .NET 1.x incompatible with 2.0? No idea. All I know is that Microsoft does these things. Evidence suggests that Microsoft does it intentionally to lock out competitors. (source: Barbarians Led by Bill Gates) If that's true, then it certainly doesn't cast Microsoft in a good light.

    That being said, you are also correct in saying that C# is a superior desktop development platform. If you're developing for Windows, I don't see any real reason not to use it. It's a fairly decent platform with tons of modern features. The only time it's really inappropriate is when your program needs to be cross platform. In which case Java might be the best choice despite the inherent difficulty in developing a good GUI in Swing. (Or SWT if you prefer. Don't even think about using Mono. Trust me, it's bad juju. Even the Mono devs will tell you that compatibility with .NET is NOT their primary goal.)
  • by Anonymous Coward on Wednesday March 19, 2008 @02:14AM (#22792516)

    As for "toys to keep you occupied", I'm one heck of a lot more productive using C# in Visual Studio for most of the things that I have to do than I was using C or C++ in xemacs. C and C++ are fine tools for doing things closer to the metal. Most applications don't need that.
    C/C++ isn't in the same niche as C#. You'd want to compare C# with say Java or python. Of course both platforms have an extensive standard library, but they seem less prone to whimsical changes which another poster has mentioned.

    That being said, I agree that bashing tools on an ideological basis is stupid. But there's a reasonable rationale why some people are cautious when adopting stuff from Microsoft, though that's probably not what the GP had in mind....
  • The most common .Net developer mistake now is that people don't bother finding the function they need -- instead they just reinvent it and waste everyone's time when maintaining that code later. The problem with 30,000+ items is that there's no good way to teach people where to look for something that's already in there. If it were organized in such a way that one could easily not reinvent the wheel, then it would be an awesome language. Without that, though, it becomes yet another way for people to create crappy date parsers.
  • by SunTzuWarmaster (930093) on Wednesday March 19, 2008 @09:19AM (#22794422) Homepage
    No, no, you're right. Linux tools and whatnot have lifespans significantly longer than those short-lived .NET things.

    Maybe I'm just bitter because I tried to get mySQL++ working with MSVS only to have it update after a week and work better... (less than a year)

    Or the time that I pulled off an offline installation of Fedora Core 3 with all drivers and library dependencies resolved (hey, this was my first linux attemp!), only to have Fedora Core 4 come out THE NEXT WEEK.

    Microsoft at least has the decency to change in large steps.
  • Re:Answer: No Thanks (Score:2, Interesting)

    by metallic (469828) on Wednesday March 19, 2008 @03:03PM (#22798574)

    To me, it looks more like they are trying to prove that they can compete with, and surpass, all their .Net competition by sheer number of "features"/"capabilities" - which does not make it better. Their .Net framework already scaled horrendously to many types of implementations (like the Service/Customer tracking unit CompUSA used to use - as any of you who worked in Tech or Business Sales can attest to - from fond memories of running a rather simple report, going out for coffee and a quick breakfast, coming back, and still having 10 minutes to wait (of a total 30-40 minutes) - nor were the data sets that big, or the front end complex).
    Did it ever occur to you that the software in question was probably crap? I've done reporting using .NET and SQL Server over a moderate data set (a few gigabytes) and always had the report generate in a few seconds. The .NET framework would be the last thing I would look at for performance problems.

Real Users find the one combination of bizarre input values that shuts down the system for days.

Working...