Slashdot Mirror


Portable .NET Reaches A Quarter Million Lines

Pnet Guy writes: "Portable .NET is a component of the dotGNU meta project to provide a CLI (ECMA standard) platform for free software. The project true to its name runs on a variety of platform including Linux,Hurd and Cygwin GNU systems. To avoid any legal problems Pnet has decided to go the hard way and bootstrap our compiler off gcc. Unlike Mono which uses microsoft's runtime to run their compiler. Our premier developer Rhys Weatherly has contributed 254,423 lines written since Jan 1, 2001. Which amounts to about 5000 lines per week which is phenomenal for any programmer. He is dotGNU's one-man army. So join him in celebrating his quarter billion lines of his code." Update: 12/27 02:41 GMT by T : Note that as many readers have pointed out, that's just like the headline says -- a quarter million lines, rather than billion. Some related links to check out include the dotGNU home page, the Southern Storm Software (Rhys Weatherley's shop, with Portable .NET information), Mono's page and Pnet's CVS repository.

26 of 303 comments (clear)

  1. Bah! by Andre060 · · Score: 3, Informative
    I stopped reading when, in the first screen of the dotGNU page, i read:

    At the core of Microsoft's .NET is Hailstorm (recently renamed ".NET My Services")

    This is simply not true! Hailstorm is only a service that happens to use the .NET framework to do it's stuff. It is a different thing entirely from .NET itself!!!



    Andre060

  2. Hmmm by cnkeller · · Score: 3, Interesting
    Which amounts to about 5000 lines per week which is phenomenal for any programmer. He is dotGNU's one-man army.

    I didn't read the article, so maybe there are more specifics. But um, so what? Are these quality lines of code? Comments? Have they been peer reviewed? Regression tested (you did write test cases before hand, right)? I mean almost any programmer can crank out 5000 lines of crap a week, big deal. If he's producing quality, reasonably bug free code, in this amount, good for him. Otherwise, I'm not so sure I'd be touting this is a big achievement. With one person writing the code, you're only getting one persons views, etc. They're aren't any sanity checks during design decisions or even better, another way of looking at the problem. That's a bad thing in my opinion.

    --

    there are no stupid questions, but there are a lot of inquisitive idiots

    1. Re:Hmmm by medcalf · · Score: 5, Insightful

      I am not convinced that a lot of mediocre programmers acting with software engineering tools and methods are any better than one gifted programmer acting alone. In fact, in my experience, the reverse is true. One person can bring a visionary piece of code forward, which can be refined over time. A group can spread the risk and potentially produce a less-buggy first cut, but cannot truly innovate, because any group automatically dumbs down. Unless everyone in the group is fantastic - a long shot bet if I've ever seen one - the result will be mediocre code.

      -jeff

      --
      -- Two men say they're Jesus. One of them must be wrong. - Dire Straits
    2. Re:Hmmm by JediTrainer · · Score: 5, Interesting

      This is a question that I face at work all the time.

      The reality is that you CAN make use of mediocre programmers too, but you need to be careful.

      The gifted programmer can take the lead of any coding that goes on and write the core components. That gifted programmer should also design the layout of the code and properly set up the abstraction of appropriate components. The mediocre programmers can then be assigned some of the easier programming tasks, while the gifted programmer resumes efforts on the more difficult ones.

      You'll never get away from having programmers of different skill levels working together. But - every project should have at least one gifted programmer to lead the way. The rest of the programmers can still be useful, and can catch each other's mistakes. They might even catch a mistake in the gifted programmer's code the odd time. When you're coding in a rush, mistakes happen.

      The same person looking at the same code over and over again will get used to seeing that code and sometimes silly mistakes might take a while to uncover, because after time it starts to 'look right'. No matter how gifted a programmer is, mistakes happen. It's how efficiently you can find and correct them that counts.

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
  3. .NET by cavemanf16 · · Score: 4, Funny
    While .NET and this project are good explorations in new computer coding and interoperability, I still won't use either one. Hell, it's easy enough to get your own computer broken into, but it's only one computer with one set of a person's info in most cases. Why should I entrust info to one giant database of a whole bunch of users, be it free or not? That's about the most inviting target for anyone to crack into. Not only is it supposed to be difficult to get into, but once in, their is ALL KINDS of info to grab!

    .NET and all alternatives to it is like putting a naked supermodel alone in a gym full of 16-18 year old boys and telling them not to touch! >:)

  4. half a million lines of code... by sfraggle · · Score: 5, Funny

    After half a million lines of code in one year, they can now celebrate half a million hits in one minute!

    --
    were you expecting to see a sig here? perhaps you'd rather see the inside of an ambulance!
  5. Depends on point of view by rhost89 · · Score: 5, Funny

    This reminds me of the old days and IBM's K-Line projects, More lines = more funding but it normaly went like this...

    int
    main
    (
    argv
    ,
    *
    argc
    [
    ]
    )
    {
    printf
    (
    "
    test
    "
    )
    ;
    return
    (
    0
    )
    }

    what you get there is 3 lines of code, but you get paid or in this case credited for 23. Now if you got paid (or for that mater recieved recognition) by the line, which would you right??

    --
    I will bend your mind with my spoon
    1. Re:Depends on point of view by regen · · Score: 3, Informative

      When I was at IBM, we had KLOC counting macros for the editors which eliminated this problem. For example a C language KLOC macro would count semicolons (with some logic to handle special case like a for statement). It almost never counted newlines to determine source lines of code.

  6. Commendations by Snowbeam · · Score: 3, Insightful

    Though I comment the feat, there are times where I just get tired of seeing the same things over and over again. When did open source become about copying what MS ( an do not I am saying MS not any other organizations) creates. I agree that a lot of technologies out there are things that MS re-packaged and called innovations, but over the last few years, we are increasingly seeing products by MS that are being copied by open source advocates. Examples are .NET (dotGNU) and MS Passport (SUN has a new initiative with AOL and various other companies to counter it). These are just to name a few. I have no issue with this tactic of repackaging MS's work, but I would love to go back to the days and stories of "Hey here is a cool new software/technology that could change things as we know it". Open source should return to leading and not following. It's one of the things that makes Open source great.

    - Snowbeam

    --
    I am Lord Snowbeam. Heed my call!
  7. NIST to rename "millions" unit to "mebibillions" by Bowie+J.+Poag · · Score: 5, Funny



    In a press release issued earlier today, the National Institute of Standards and Technology has announced that they will be renaming the term "million" to "mebibillions". When asked what prompted the move, an NIST spokesman said, "Initially, it was due to the problem of accurately naming the number of lines of sourcecode some guy wrote for the benefit of RMS' ego. Its just plain silly how much this guy wrote." , later adding, "So, we came to a consensus within the organization that a revision to the basic units of measurement should be made, so it looks like we're busy so we don't lose our funding. In addition, we feel that marketing people should always determine standards, not the engineers and scientists who actually know what they're doing. Its just good sense." Beginning January 1st, the new "mebibillions" unit will take affect.

    Mebibillions of people are expected to shake their heads in disbelief at the NIST's continuined stupidity.

    :)
    Cheers,

    --
    Bowie J. Poag

  8. Great by mESSDan · · Score: 4, Funny

    While he has indeed been writing large amounts of code, and fine code it is, his little joke is that all of his comments are written in Engrish

    --

    -- Dan
  9. Ok, maybe you won't like this but.. by Fuzuli · · Score: 3, Interesting

    This is no way a defence for MS, and even if it was, i do not think that that would make me an evil developer.
    Ok, so did you take a look at the .NET framework ? When compared to Win32 API it'a very big step forward for the developers who make money from Windows programming. I'd really like to hear comments of some programmers who has worked with J2EE and Java. Implementing something like MS passport may be a security problem, and i agree about it.But why most of the guys like to flame about what MS is doing with .NET technology, and totally ignore the technical framework these ideas are built on ? .NET framework, and C# are clearly superior to former MS software, and apart from being created by a monopoly they seem pretty good to me. If someone with o strong technical background and experience, would comment on why C# and/or .NET framework is evil, i'd read it with, and learn from it. Having C# and .NET Framework on Linux would be fine. Please try to explain why you don't need a good programming language and a proggramming api on linux ? or why it is bad. Do you think that MS is after money and Sun and Oracle are after something else ?

  10. Difference/Cooperatio between DotGNU/PNet and Mono by Carl · · Score: 4, Interesting

    Does anybody know how the two projects compare/cooperate? Both projects seem fairly active and doing very good work. I had assumed that Mono would be that part of DotGNU that provided the C# Compiler, Runtime and standard Libraries. But it seems that DotGNU also makes these parts with their portable net (PNet) together with their "Hailsorm" replacement.

    The Mono project seems to be only interested in the C# language/compiler and runtime environment.

    It is also interesting that the DotGNU project seems to have put a little more thought into the licensing issue. And in particular what it means to be a derived work (check their FAQ) in the new dynamic code environment that .NET brings us.

    Even though they are a GNU project they do not not use the ordinary GPL or the LGPL for their work but a GPL plus exception as also is used with GCC. This makes it possible to create derived works (in embedded devices for example where everything is linked together because you don't have a shared library loader) that with "normal" LGPL would be considered derived works.

    Which is strange if you think about it. Ximian which sponsors Mono makes use of a more agressive copyleft then the 'regular' GNU project. Which means that if Mono "wins" then we will have more (forced/copylefted) free software then when the GNU project "wins". Never thought that a commercial company would be more agressive about copyleft then the GNU project.

    Does anybody have more information about the why/how of the two (competing?) projects?
    The DotGNU website and the Mono website don't seem to talk about the other project even though it is obvious that they are doing the same sort of thing.

  11. Benefit of the doubt? by p3d0 · · Score: 5, Insightful

    Of course, everyone and their dog had the typical knee-jerk "lines of code mean nothing" reaction. Well, duh, that goes without saying. I can't believe how many mod points have been wasted on that sentiment.

    How about we give this guy the benefit of the doubt and assume he knows what he's doing. Then what we have is a tremendous contribution to the free software community. I, for one, say thanks and keep up the good work.

    And, if it gets released and is full of bugs, then let's beat the old lines-mean-nothing horse to death.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  12. Wait and See by f00zbll · · Score: 5, Insightful
    I've been following the development of .NET a little and the only thing I don't like about .NET is the architecture is flawed. According to the official .NET passport white paper http://www.microsoft.com/myservices/passport/Secur ity.doc, the E-commerce server redirects the user's browser to Microsoft's .NET server. Now that may seem fine on the surface, there are several flaws to this way of thinking.

    1. using a browser redirect is inherently limits the level of security
    2. any transfer of sensitive information between companies should rely on encryption stronger than 128 SSL
    3. using browser redirects means using GET, instead of POST
    4. storing user information in plain text as others have mentioned is simply wrong
    5. the trust relationship should be two way, not one as stated in microsoft's whitepaper.

    Anyone can make RPC fast by limiting security and encryption, which is exactly what .NET does in the current form. Any business foolish enough to implement .NET as microsoft prescribes can say good bye to my business. .NET could really be useful and ground breaking, but it is far from enterprise level in terms of reliability, scalability and security. Microsoft's white paper is devoid of specific details about how .NET servers should be clustered for fail-over, state replication/management, load-balancing, using server-to-server authentication and profile retrieval, and security monitoring.

    All these little details are needed for real enterprise applications. Without it, it is just begging for trouble. It's great that dotGNU has made so much progress, but perhaps they should have gone a step further than they have http://www.dotgnu.org/web-services.html. dotGNU makes some great points about weaknesses/flaws in .NET, but they still don't go further to really provide a complete solution. The solutions proposed by the dotGNU web services page still fails to address alot of important issues.

    IMNHO

  13. Re:But how many are comments? by Zero__Kelvin · · Score: 5, Insightful



    " Well commented code can end up with quite a high percentage of the code base as commments.

    I once wrote a 'small' 150k line util. Before I left the company, I was asked to comment it, after decent amounts (ie, more than '// perform the calculation') of comments, the line count was around 230k.

    So how many of the quarter million are comments then ?"


    You seem to be implying that in order to determine if the code is good, and represents a lot of work, you need to know the comment to statement ratio, which is true. However, you also seem to be implying that if there are lots of comments then there is less 'actual code'... and that it therefore represents less 'actual work' ... which is very far off base, as your former employer seems to have recognized, though perhaps almost too late. (apologies if I inferred incorrectly.)

    If there is a high degree of commenting this is both good, and represents lots of work on the part of the programmer, assuming of course that the comments are good, accurate, and add value to the product in terms of maintainability.

    One of the main reason why the Linux kernel is robust code, but remains an example of extremely bad Software Engineering is that it is poorly commented, when at all.

    Remember this fundamental maxim of good Software Engineering practice:

    Good source code is compileable documentation" - Zero__Kelvin

    It can compile, run robustly, and be very 'un-buggy', but that doesn't make it good source code. Until programmers really grasp this they will never become competant Software Engineers! Those who question this wisdom may want to start educating themselves with a thorough and open-minded reading of Fredrick Brooks' "The Mythical Man Month" .

    --
    Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  14. code looks good by jon_c · · Score: 5, Insightful

    The second i read about the x lines of code i also wondered if the code way any good, so instead of mouthing off about how x lines of code doesn't matter, it's the quality, I decided to download some of it and check it out for myself.

    While I did not go through it extremely carefully, I did read through a few functions, and got an idea of how the programmer thought about things. It seems that the code is pretty tight. It's defiantly not compressed, but it is well modularized and well commented and that's more then I can say about a lot of code that I've seen.

    My guess is that this man is a seasoned coder who is very driven, and I applauded his work.

    -Jon

    --
    this is my sig.
  15. Give him the benefit of the doubt by dgb2n · · Score: 4, Insightful

    Assuming an 8 hour workday, 5 days a week (yes, I know he works more than that), that translates to:

    125 lines of code per hour
    more than 2 lines of code per minute

    That's not including coffee breaks, restroom time, foosball, or anything else I need to remain coherent to write code.

    5000 lines of code per week over an extended period is a stunning achievement. Give the guy a break.

  16. The actual count: 149,367 by PureFiction · · Score: 5, Interesting

    Which is still a fuckload of code. I used sloccount, which is not perfect, but is a pretty informative tool none the less.

    ./sloccount /tmp/pnet/pnet-0.2.6

    Totals grouped by language (dominant language first)
    ansic: 121564 (81.39%)
    sh: 17160 (11.49%)
    yacc: 5634 (3.77%)
    lex: 2091 (1.40%)
    asm: 1937 (1.30%)
    cpp: 961 (0.64%)
    exp: 20 (0.01%)

    Total Physical Source Lines of Code (SLOC) = 149,367
    Development Effort Estimate, Person-Years = 38.37
    Schedule Estimate, Years = 2.14
    Estimated Average Number of Developers = 17.92
    Total Estimated Cost to Develop = $ 5,183,332

    It appears that the damn lameness filter is preventing me from posting this, so i have trimmed the output a bit.

    1. Re:The actual count: 149,367 by PureFiction · · Score: 5, Informative

      I should have posted a link to the tool which can be found at: http://www.dwheeler.com/sloccount/.

      This tool basically counts phsysical lines of code (non comments or whitespace) and produces cost and schedule estimates on this count using the standard COCOMO model.

    2. Re:The actual count: 149,367 by rhysweatherley · · Score: 3, Informative

      The actual count is indeed 250,000+. You forgot treecc and pnetlib, which are part of pnet, but distributed separately. You also forgot the *.tc input files for treecc, and the *.html and *.texi documentation files.

      I was very careful with the count. I did a complete "make distclean" to remove automatically generated files. I removed imported packages like libffi and libgc which I didn't write. And then I counted up all the lines in all three packages.

      I'm an obsessive commentor, but any good programmer should be. Comments help explain the code to yourself six months from now, when you've completely forgotten why you did something a particular way. For a multi-year project like this, obsessive comments are vital.

      250,000 lines is a conservative estimate. I've probably thrown away 50,000+ lines of code in the process of building this. Some experiments just didn't work and had to be redone.

    3. Re:The actual count: 149,367 by PureFiction · · Score: 3, Informative

      Your confusing the results.
      It would take one average developer 38.37 years to write that much code.

      OR it would take a group of 17.92 average developers 2.4 years to write that much software.

      This is by no means incredible, it makes sense. There is a huge difference in productivity between average programmers and extremely capable programmers. This is a well known phenomenon.

      There is also a lot less than 'average' amount of documentation, testing, and design going on in his work, which makes the SLOC count rise as well.

      Remember, this is all averages and assumptions. Its not 'the law'.

  17. Here are the main differences by Anonymous Coward · · Score: 4, Interesting

    Mono is more full-featured than DotGNU in a number of important ways:

    - Mono has a nearly fully functional VM with Jit.
    - DotGNU has no VM at all
    - Mono nearly has a c# compiler written in c#.
    - DotGNU intends to use gcc and a C compiled C# compiler.
    - Mono has more than 60% of the class libraries written
    - DotGNU has only a fraction of classes written.
    - Mono is much better coordinated and has better public relations thanks to Miguel
    - Mono has regression analysis scripts
    - As far as I can tell Mono has better i18n support

    Problems with Mono:

    - no garbage collection
    - initially hosted via Microsoft's .NET system until it is able to be self-hosted

    Mono unknowns:

    - will it depend on Gtk/GNOME?

    1. Re:Here are the main differences by rhysweatherley · · Score: 3, Interesting

      DotGNU Portable.NET has a functional VM right now too. I haven't bothered with a JIT yet, because the primary goals are portability, stability, and completeness. I try to do things in order. A JIT would take a few weeks once the rest of the infrastructure is in place. No point doing it until the basics are there.

      DotGNU Portable.NET has a fraction of classes written, but only because we have 1 very busy developer working full time on this, and my time is split across the entire project. Contributions are always welcome.

      DotGNU Portable.NET has garbage collection now, using the Hans-Boehm collector that is used by gcc.

      DotGNU has less public relations only because the media have bought into the Mono hype and haven't bothered to talk to DotGNU to get the other side of the story. Even when we seek them out to correct blatant mistakes in their articles.

  18. Re:I'll tell you why Open Source dislikes Java by markj02 · · Score: 3, Insightful
    Initially Java had a lot of grassroots support by Open Source developers until Sun renegged on the verbal promise to submit the Java language to ISO as well as EMCA. This basically showed that they have nothing but contempt for open source development.

    Sun's decision had nothing to do with open source. Sun apparently felt that it was necessary to standardize the entire Java platform in order to be useful, and they felt they couldn't do that under ISO's or ECMA's conditions yet.

    Microsoft got EMCA approval for C# and its libraries

    Microsoft submitted a tiny fraction of the C# libraries for standardization. That isn't comparable to what Sun was doing. What Microsoft did cost them nothing in terms of control or intellectual property, but it was a great publicity stunt.

    Sun where you only have a voice if you are a large computer firm that pays $250,000 per year to be heard/ignored in the poorly named "Java Community Process".

    Who cares? You don't have to hack Sun's Java. You can hack an open source Java compiler and an open source Java runtime. To go off and start from scratch doing a partial clone of an incompletely specified Microsoft platform instead is throwing out the baby with the bathwater. Mono could be producing a fully backwards compatible, open source system based on Java with any enhancements they like, instead of whining about the JCP.

    The CLR VM is also far more advanced than the Java VM from a technical point of view

    You have fallen prey to Microsoft propaganda. I have seen no substantial technical enhancements in the CLR over the JVM (although there are a bunch of nice convenience features). And while Microsoft's CLR implementation also has some good parts, it is not as good as Sun's JVM.

    and can more efficiently host non garbage collecting languages.

    You can only efficiently support manual storage management if you are willing to sacrifice runtime safety. This has been beaten to death in the literature and in practical experiments, and the tradeoff isn't worth it. Just look at the recent experience with garbage collection in gcc to see that manual storage management is both less efficient and more error prone. (Incidentally, C and C++ semantics permit garbage collection, they just don't require it.)

    CLR supports delegates which the Java VM has no equivalent.

    That's a red herring. You can implement delegates efficiently without changes to the JVM. In fact, Sun considered doing this, but decided to go with nested classes instead. (As an aside, Microsoft's "delegates" have nothing to do with what is commonly understood by "delegates" in the OO literature.)

    C# is simply more elegant than Java in a number of ways (such as automatically boxing builtin types for collections,

    Automatic boxing/unboxing is an engineering tradeoff, not a question of elegance. Providing it makes it much easier to create performance bottlenecks accidentally. Neither Sun's nor Microsoft's choice is obviously better--it's more a question of psychology than technology.

    The most important point is that Microsoft knows how to develop a polished piece of software.

    Even if that were true (and I find the claim pretty ridiculous), what possible relevance does it have for Mono, since Mono isn't being developed by Microsoft?

    Microsoft has not released a free CLR implementaion for other platforms, and what they have promised (if it ever arrives) is going to be a low-end implementation. Sun has released a high-performance implementation for Windows, Solaris, and Linux, with other platforms based on Sun's code.

    Remember until the Sun/Microsoft Java lawsuit that it was Microsoft that had the fastest Java Virtual Machine - not Sun.

    That's a myth. The Microsoft Java VM cut lots of corners, sacrificing compliance and safety, and a prerelease version was at some point faster than a delayed update of the JDK. Microsoft lost that temporary lead independent of the Sun lawsuit.

    First to market does not necessarily win the race. Sorry, Sun, better luck next time.

    Java has already has won the race; it's not going away (and Java wasn't first to market either--both Java and C#/CLR are based on about two decades of experience with other languages). The question is why Mono is getting in bed with Microsoft and picking the runner-up. Sun's support for open source may not be perfect but it has been quite good. Microsoft, however, has declared its fundamental hostility and opposition to open source efforts, and Microsoft, so far, has provided essentially nothing to anybody.

  19. Baloney... by Da+VinMan · · Score: 3, Informative

    First of all, C# *is* (IMO anyway) elegant. I like it. Elegance is a matter of opinion anyway. I don't like LISP, I never did, and yes, I have used it. Is its syntax more elegant than Java or C#? Yes; sort of. But do I care about LISP? Not really. I may take an interest in it one day, but not today.

    Now that aside... you used one language feature as an example to promote Java's superiority. ONE feature! Look at http://www.25hoursaday.com/CsharpVsJava.html for a more complete comparison. There's about 20 features in C# that Java doesn't have, so is C# immediately superior because of that? Maybe so, maybe not but I won't be making that decision based on ONE language feature.

    Now all *that* aside: Use the right tool for the job. I assert that C# and Java will be used for essentially different types of jobs for the immediate future. Sun/IBM did indeed get a jump on Microsoft with Java, but that won't mean much over the long haul.

    Last point: Have the proverbial balls to post as something other than AC when you decide to flame. If you'd thought your opinion was worth sh*t, you might have taken the effort to express yourself more effectively; as it was you did it half-assed, and it shows.

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!