Slashdot Mirror


Effective C#

Jim Holmes writes "I'm new to the .NET environment and have been looking for solid books in the same class as McConnell's Code Complete, 2nd ed., or Kernhigan and Pike's The Practice of Programming. Those books, to me, are must-haves on any serious developer's bookshelf, but while they're terrific books, they're general in nature. Bill Wagner's book Effective C# is a great companion to those books because it's specific to C# and hits hard the implementation details of working in that language. (Disclaimers: 1) I got this book for free from Addison-Wesley as a regular giveaway for our .NET Developers Group. 2) I attempted to get SRT Solutions, the author's consulting company, involved in a software development project several years ago. The project tanked due to customer constraints and other business issues not related in any way to Wagner or his company. End Disclaimers.)" Read on for the rest of Holmes's review. Effective C#: 50 Specific Ways to Improve Your C# author Bill Wagner pages 336 publisher Addison Wesley rating 9 reviewer Jim Holmes ISBN 0321245660 summary Must-have addition to any serious C# developer's bookshelf

If you're interested in, or currently working with, .NET and are tempted to skip past this book as Just Another C# Reference Book, think again. Wagner's book is a great resource because it covers concepts which run across the entire .NET Framework regardless of which language you're working with. While this book focuses on C#, VB.NET developers can benefit from some of the text within as well.

I also think this book speaks to a wide range of readers. Seasoned developers will blow through this content, fine-tuning their coding methods or starting new ones. Wagner specifically points out how practices experienced C++ developers may use aren't good practices in C#, such as avoiding function call overhead by writing longer C# methods with more convoluted loops. More on that later.

New developers also can greatly benefit from this book by using it to properly form development habits early in their careers. Examples of this might include following Wagner's recommendations for safe casting, strong use of interfaces, and knowledgeable resource management.

Wagner's writing style is clear and concise. He occasionally comes across as brusque, or as writing only to experienced developers ("I wouldn't write code like this and neither would you."), but those instances are few and far between. The rest of the book's voice is terrific. More important is the weight of Wagner's knowledge and experience.

One real drawback is a large number of typographical errors, sometimes several per chapter. Some sentences are missing content, and there are a large number of run-together words. These errors don't take away from the material, but it's an annoyance all the same. I would have expected better proofreaders at AW.

The book is well organized into six chapters, each hitting a specific area in C#. Within each chapter, Wagner covers six to ten items, each item focusing on one specific "minitopic," as Wagner calls them. Each item includes code snippets to demonstrate recommended approaches. Few of Wagner's snippets will function as standalone programs, but this is an advantage, as I see it. The book focuses on tight, specific examples, rather than weighing itself down with pages of extraneous fluff.

Often Wagner's recommended approach is contrasted against bad practices, or practices which might be optimal in other languages but work poorly in C#. An example of this would be Chapter 4's Item 31: "Prefer Small, Simple Functions," where Wagner shows how smaller functions are generally more efficient than larger functions with complex loops. This probably confounds experienced C++ developers, but it's a prime example of how valuable this book is. Wagner shows that .NET's Just-In-Time compiler pays less cost when calling functions than it does trying to wade through convoluted loop logic. His recommendation? Write "the clearest code you can create. Let the JIT compiler do the rest."

Chapter 1, "C# Language Elements", hits hard the topics "you must remember every day when you write C# code." This chapter discusses issues central to C#'s syntax, implementation and optimization. Wagner talks about basic Object Oriented concepts such as hiding class data members behind Properties (.NET's common access methods/fields via gets and sets), and why it's important to implement a ToString() method. Basic software engineering topics are also covered, like why it's important to differentiate between value and reference data types -- and the pitfalls of failing to do so. This chapter also thrashes out coverage on deep C# concepts like why developers should use foreach loops and why the GetHashCode() method will "practically always get you in trouble."

Chapter 2, ".NET Resource Management", has a lot of text on general patterns for constructing optimal code. Wagner's in-depth knowledge of the .NET Framework's underpinnings really shows through here. There's a very clear discussion of the performance ramifications of boxing (wrapping value type data into an object for method parameters) and unboxing. Minimizing extra garbage (unnecessary objects) and easing resource clean up via standard dispose patterns are also covered. This chapter's critical to ensuring you understand what's going on with resources in your .NET application.

Chapter 3, "Expressing Designs with C#", looks at object-oriented design in C#. While the discussion's specific to C#, there's a lot of great, practical information which applies to any object oriented development. Wagner gives some great examples with backup discussion regarding preferring the use of interfaces over inheritance and why it's a cleaner solution. (Java programmers who've read Alan Holub's "Why extends is Evil" in JavaWorld would enjoy this section.) There's also great treatment of using delegates for callbacks, and events for outgoing interfaces. Wagner also points out more pitfalls in a reference data type language: returning references to internal class objects via a read-only property (getter for Java folks).

Chapter 4, "Creating Binary Components", shows what critical topics you have to consider when creating even a moderately complex system for deployment. Wagner exposes some terrific details on how smaller is better when developing .NET assemblies for deployment. He also discusses why it's best to limit a class's exposure through public scope since this ends up advertising too much of your class's internals to potential users of that class. Wagner ties this back to interface discussions in earlier portions of the book, and makes a good case in this section for bad scope's impact on deployment.

Chapter 5, "Working with the Framework", delves into the .NET Framework Class Library. The FCL is a huge library and Wagner's insistent that too many developers are writing custom code for functionality which already exists in the FCL. This section helps to avoid having "developers reinvent the wheel." There are very useful discussions on using .NET runtime diagnostics, .NET's validation capabilities, and standard configuration mechanisms. Wagner also shows why .NET's reflection capability (one component dynamically discovering another component's capabilities at runtime) can be overused - but he also shows how to best use it in the appropriate cases.

Chapter 6, "Miscellaneous", is the catch-all section. Security and exceptions are covered here, as is the pain of working with COM interoperability - and why you should avoid it if at all possible. Just as importantly, Wagner points to several tools which should be in any C# developer's belt. He also identifies terrific resources available online.

What makes this book so useful is that Wagner constantly talks about the reasons behind why specific choices in C# should be made. For example, in Item 3, "Prefer the as and is Operator to Casts" Wagner moves through the rationale of why a developer should (when possible) avoid casting in C# and use the as and is operators instead. Casting can lead to headaches with data loss when casting a long data type to an integer one, or more headaches with the extra lines of code to ensure the cast was to a proper type. Sure, casts are sometimes necessary, and it's another value point for this book that Wagner gives clear examples of when his techniques don't apply -- and he also shows recommended alternatives for those cases.

It's just this kind of discussion from an experienced developer that makes this book so valuable. Good developers need to understand the ramifications of choices they make designing and implementing a system. Wagner's book is outstanding for exactly this kind of detailed, clear exposition.

An additional bonus: Wagner has a blog dedicated to discussion of items from his book. Erata are also listed there. See Bill Wagner's Effective C# blog.

The bottom line: this book really is a critical addition to a serious C# or .NET developer's bookshelf. It deserves a place right alongside books from McConnell, Macguire, Kernighan and Pike.

You can purchase Effective C#: 50 Specific Ways to Improve Your C# from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

167 of 233 comments (clear)

  1. So Call Me Old And Cranky by DanielMarkham · · Score: 3, Interesting

    "..in the same class as Code Complete"
    But do we really need a "programming good C#" book? Isn't good programming all about, well, good programming? If I remember Code Complete correctly, it used pascal and C, I think. It definitely was one of the best books I've read, but how many times can you say the same thing over and over again?
    Languages come and go. But good coding techniques don't dependent on a certain vendor or technology.
    Maybe this is a good book if you don't know much of any programming language and want to pick up C#. Speaking as a C# developer who does Java, C, C++, and VB, I just read some of the rags and jumped in. Then when I wanted to do something else, like create a custom web control, I got a book in C#. Presto/Bingo, I'm coding in C#. OOP as a concept is going to have similar constructs, no matter what the language, right?
    Sorry for the rant. It's probably a great book. I just don't understand how good coding practice is dependent on the flavor-of-the-week. Perhaps in his comparisons the reviewer does a disservice to the intent of the work.

    1. Re:So Call Me Old And Cranky by cheide · · Score: 5, Insightful

      The principles may be the same, but the details can differ greatly when it comes down to the specific syntax and behaviour of operations.

      Someone may be an expert at high-level OO design, but when it comes to programming in C++ specifically, he might not know about things like the utility of auto_ptr, that it's a bad idea to throw an exception from a destructor, why destructors should often be virtual, dangerous cases where an unexpected temporary object might get created and changed instead of the intended one, etc... That was where the value of the Effective C++ books was for me.

    2. Re:So Call Me Old And Cranky by DanielMarkham · · Score: 1

      I completely agree.
      C++ is a high-wire act without a net, no doubt. But more "polished" lanugages, like Java and C# keep the sharp objects away from the developers. Some of those issues you mention are truly gnarly -- and you can get in a world of trouble with C++ code. You can still cut your foot off with Java, but you have to saw at it a little more. My two cents only.

      Can chickesn swim? Find out now!

    3. Re:So Call Me Old And Cranky by snorklewacker · · Score: 2, Insightful

      > But do we really need a "programming good C#" book? Isn't good programming all about, well, good programming?

      And knowing the language. Sometimes there's idioms in a language that just aren't obvious. Like the use of "explicit" to prevent C++ from surprise autocasts, or what const correctness really means and how to avoid breaking it. Or when to explicitly null references in Java to get them gc'd, and when it hurts performance (this idiom changed when Java's gc algorithm changed).

      C# no doubt has all sorts of odd wrinkles with respect to generics and delegates and whatnot, and likely it takes a book to list them all. There's knowing a language's syntax, and there's being really effective with it and working within its limitations. Scott Meyer's Effective C++ is one of the best books on C++ you can get, and it's certainly no introductory text. I've no idea whether this book is on that same plane, but all language books are most certainly not created equal, and if you think you're an expert because you happen to know the syntax, you're only as valuable as the next codemonkey with a training certificate.

      --
      I am no longer wasting my time with slashdot
    4. Re:So Call Me Old And Cranky by owlstead · · Score: 1
      There are always some very specific language features, and more important, pitfalls. For instance, as a Java developer I was astounded that you still need to explicitely mark a method "virtual" for it to be virtual (this is probably because it makes porting from c++ easier).


      On the good side of things you have things like assemblies, the checked and override keyword, meta-data and things like that. These are pretty language specific, and you would need to learn them before becoming a moderate or expert programmer in the language. If you just start programming, your code may work, but it may have hidden bugs and might be difficult to maintain.


      Unfortunately good programming techniques are not always applicable to the language, sometimes you *need* language specific features and/or workarounds. Having a good book about them is always a good thing. And revisiting some coding techniques never hurt. In emergencies, you can always skip those parts.

    5. Re:So Call Me Old And Cranky by zhiwenchong · · Score: 2, Interesting

      Now, I'm not saying the above book is good (haven't read it, probably won't), but I do see the value of a book telling you about the best practices in the particular language you're interested in.

      You know, I would venture to say not all programming concepts are necessarily always universal. That's because programming languages are abstractions, and abstractions can vary vastly.

      Take an elementary operation: You might say a for loop is a for loop, but in languages like LISP we tend to use recursion.

      In MATLAB, we tend to avoid for loops whenever we can; instead we vectorize and operate on the vector instead.

      Most of the common constructs that we know have been shaped by ALGOL, but when you need to write something sophisticated in say, a declarative language, you pretty much have to think in a different way.

      The difference in paradigms between C# and languages like C++ may be much smaller, but I can tell you, you'll find it easier to wrote good code in C# as long as you stop thinking in C++ and start thinking in C#. (I've tinkered with C# and I like a lot of ideas that are in it)

      Recently I switched from perl to python for my text-processing needs, and I found that I had to switch my mindset completely, even though both languages weren't too different on the surface. I found that Python were optimized for different things than Perl.

      Many people dismiss programming languages as merely different syntaxes for expressing the same ideas, but let's consider this quotation from A.N. Whitehead (co-author of Principia Mathematica, written with Bertrand Russell):

      """By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental power of the race. Before the introduction of the Arabic notation, multiplication was difficult, and the division even of integers called into play the highest mathematical faculties. Probably nothing in the modern world would have more astonished a Greek mathematician than to learn that ... a large proportion of the population of Western Europe could perform the operation of division for the largest numbers. This fact would have seemed to him a sheer impossibility ... Our modern power of easy reckoning with decimal fractions is the almost miraculous result of the gradual discovery of a perfect notation."""

      -- A.N. Whitehead, An Introduction to Mathematics, 1911

      I got this quote from Code Complete, btw. ;-)

    6. Re:So Call Me Old And Cranky by Surt · · Score: 1

      On the other hand, if you're new enough to programming to need to read this book, perhaps you're only middling competent in 2 languages which are likely to be java and c# and trying to read and understand the techniques being presented in a language you don't know is just heaping on unnecessary difficulty.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    7. Re:So Call Me Old And Cranky by Tim+Browse · · Score: 1
      For instance, as a Java developer I was astounded that you still need to explicitely mark a method "virtual" for it to be virtual

      Well, if you found that astounding, you probably need to get out more :).

      Seriously, it's more of a mundane language decision than something to be astounded about. Coming from C++, when I read that Java methods were all virtual, I thought, "Ok, I see what they're doing there." But by no stretch of the imagination did it astound me.

      (this is probably because it makes porting from c++ easier).

      I'd say it's more to do with C++'s policy of "You don't pay for something unless you ask for it."

      This (virtual being optional) means you can use C++/classes on architectures with small caches (e.g. Sony PS2) that would otherwise always get hammered by vtable loads.

    8. Re:So Call Me Old And Cranky by SeventyBang · · Score: 1

      I thought the quote looked familiar!

      Alas, no matter how smart programmers think themselves today, it's incredible to see how many people can't compute longhand with a great deal of speed and accuracy. Spelling, grammar, and punctuation are considerably worse, but without their hardware, most are pretty weak all of the way around.

    9. Re:So Call Me Old And Cranky by Tim+Browse · · Score: 1

      Hmm...replying to myself...after a few minutes of background brain actitivy, my mind has just piped up and decided that I misinterpreted your post completely, owlstead. So ignore the second half of my post as it makes no sense :-).

      Well, it makes sense on some level, but it's not relevant to the topic...for some reason my mind had decided that the thread had got onto Java/C++ differences. Must sleep.

    10. Re:So Call Me Old And Cranky by Taladar · · Score: 1

      I teach some undergraduate students at my University at the moment and they even have problems remembering how to calculate things like 2 to the power of 3 in their head.

  2. Here's the blog... by mcho · · Score: 3, Informative

    Click on this link for the blog.

  3. Get a design patterns book by Anonymous Coward · · Score: 2, Insightful

    Thats what I've found. Another .net language syntax is book is hardly useful. You find yourself wondering what the fuck you would do with all these new wonders and you can think of a 100 better ways you might design code compared to your procedural past but your head is left spinning with options. That is where the design patterns come. OOP ways to do different things which can have a huge impact in the future of your coding. Also MS Press has been doing a bang-up job in documenting the net framework APIs. I would start with a design patterns book and a book on the net framework.

    1. Re:Get a design patterns book by MightyMartian · · Score: 1
      Well, my thoughts are a little different. MS has made some pretty decent languages, old QuickBASIC wasn't so bad. My big problem is that I simply don't trust MS to stick even by its own standards (look at the odd incompatibilities introduced into VB6). As to Mono, well maybe I'm wrong, but it feels a lot like Wine in that the open source community is trying to shoehorn an MS app platform into something usable on other OS platforms. Not that Sun is that much better, and Java has had its growing pains as well.

      I say code in what you or your employer or customer wants. If you want to go with .Net, well cool, and I hope Mono keeps pace. If you want to go with Java, then so be it, and I hope that either Sun or the open source community gets a version going that isn't as slow as molassis. As to Python and the like, very awesome languages, but so far as I can see, they have a ways to go on the GUI end of things.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:Get a design patterns book by Forbman · · Score: 1

      This actually *IS* probably a good book in general for C#. Most of the other C# books really are Visual Studio .Net expositions, and are really not so helpful for using SharpDevelop, the C# plugin for Eclipse, etc.

      It's disappointing that the C# Programmer's Reference, by O'Reilly, still doesn't pay any homage at all to other coding environments. If I wanted a VS.Net reference, I'd buy one. I just want a C# reference, to which it is, for about 3/4 of the book.

  4. review left out important point by jeff67 · · Score: 5, Informative

    The review is missing something important. Effective C# is of the same mold as the Scott Meyers' Effective C++ franchise - known by many C++ programmers as a great resource of best practices. Bill has Meyer's approval to publish an "Effective" book, and even announced its publication on his mailing list.

    1. Re:review left out important point by AuMatar · · Score: 1

      Meyer's book was great, but this one worries me- if there's that many problems in just the proofreading, it leaves me dubious as to the correctness of the content.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    2. Re:review left out important point by Foolomon · · Score: 1
      Having the approval of another does not make it a good book.

      I also get scared when I start to see typographical errors in the text. Worse is when I find them in the code because then I know that the code wasn't taken from a working project.

  5. from the oxymoron dept... by Swamii · · Score: 2, Insightful

    Effective Java!

    [mod me +5 funny like the parent. What's that? You don't like underhanded my-langauge-is-better-than-yours jokes, meant to enflame rage between already volatile communities? Oh, sorry, mod me down then.]

    --
    Tech, life, family, faith: Give me a visit
  6. Re:But does it... by Omega1045 · · Score: 2, Insightful

    Yes and Yes

    --

    Great ideas often receive violent opposition from mediocre minds. - Albert Einstein

  7. In the same class as code complete? by DJProtoss · · Score: 4, Informative

    tbh, I'm not sure that that is a recommendation. We have been going over cc in a reading group at work for the better part of a year now (chapter a week takes a while!), and overall, while he does have a lot of worthwhile stuff to say, the book is mostly dross, coupled with misleading stats, poor editing (and occasionally worse writing) lack of direction and bad analogies.
    On the other hand, it has proved useful as a talking point in our reading group (a mix of professional programmers ranging from fresh grads to seasoned vets). As for the C# book, well we could do with a good reference for the language (although a decent c++ book and a little java and .net knowledge will pretty much provide that anyway)

    --
    "Success is based on knowing how far to go in going too far"
    1. Re:In the same class as code complete? by Anonymous Coward · · Score: 1, Insightful

      Thank you.

      I was beginning to think I had slipped into bizarro world. Don't get me wrong. Code Complete is probably a useful read for a beginner, but I hardly think of it as professional level.

      It seemed to be just another book-by-the-pound that made someone lots of money for stating the obvious (at great length), mixed indifferently with tons of editorializing.

      Now I only read the first edition. (I don't remember if I got all the way through, it was a few years ago) but there was nothing there that would make me want to look at a second edition.

      orkstkk

    2. Re:In the same class as code complete? by BRSQUIRRL · · Score: 1

      Code Complete is probably a useful read for a beginner, but I hardly think of it as professional level

      I think I know what you are saying, but I want to add my own 2 cents...I've had the opportunity to work with code written by three types of software developers:

      Group A: rank novices. The ink on their comp. sci. B.S. from Somewhere State University is barely dry. They can code an abstract linked list class, but are clueless as to how to intelligently design and construct a non-trivial application with maintainable code.

      Group B: the 'leet hackers. They have a few years of "real world" experience under their belt, and think that they can write anything. They usually can, provided that no one else ever has to extend the application or maintain the code again.

      Group C: professionals. Their code is a pleasure to work with. They approach the task of building software with humility, their designs are simple and elegant, and their code almost reads like english.

      What single trait most often separates (in my experience) the B's from the C's? The C's have studied Code Complete at some point in their career.

  8. Re:Hah by Pantero+Blanco · · Score: 3, Insightful

    I rarely use Microsoft's suites, but the fact that I knew what the first reply (and probably the second, third, and fourth) to this article would be annoys me.

    You don't like .NET and C#? Fine, don't use it. I use Dev-Cpp for all my C/C++ work on Windows. But that doesn't mean I have to be an ass (or reply in such a partisan manner that I look like one)to people who do.

  9. Re:But does it... by eclectro · · Score: 2, Informative

    But does it work on Linux?

    Joke aside, that's the question I was asking myself. Why learn a platform specific language when you can use a platform independent language like C++, Java or Ruby?

    Windows is wonderful (well, not really), but there are other platforms out there as well.

    --
    Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
  10. Re:Hah by MyLongNickName · · Score: 1

    But that doesn't mean I have to be an ass (or reply in such a partisan manner that I look like one)to people who do.

    What? Didn't you read the EULA when you registered with Slashdot?

    In all seriousness, the .NET framework is really a productivity godsend for the business app developer. Can't say its all that for every type of application, but Microsoft got it right for its core constituency.

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  11. large functions in c++ by ufnoise · · Score: 5, Insightful


    Often Wagner's recommended approach is contrasted against bad practices, or practices which might be optimal in other languages but work poorly in C#. An example of this would be Chapter 4's Item 31: "Prefer Small, Simple Functions," where Wagner shows how smaller functions are generally more efficient than larger functions with complex loops. This probably confounds experienced C++ developers, but it's a prime example of how valuable this book is. Wagner shows that .NET's Just-In-Time compiler pays less cost when calling functions than it does trying to wade through convoluted loop logic. His recommendation? Write "the clearest code you can create. Let the JIT compiler do the rest."

    I don't know how he got the impression that experienced C++ developers would be confounded by short functions. By using short inlined functions, C++ developers don't pay any cost by breaking up large routines.

    1. Re:large functions in c++ by Rakshasa+Taisab · · Score: 2, Interesting

      Not only do we avoid paying anything when using inlined functions, but also get really aggressive optimization when using template algorithms. Using std::for_each, std::find_if and friends on containers has become the norm for me, rather than the exception.

      It's funny how they hype the features of new programming languages, while they seem to miss what is already in C++. Personally, i can't really take seriously a language without proper template support.

      --
      - These characters were randomly selected.
    2. Re:large functions in c++ by LarryWest42 · · Score: 1

      Agreed. All the long, convoluted code I've seen in C++ (several companies over two decades) has been from the worst programmers. I have no idea where the author (apparently) got that idea, assuming it's not a misstatement from the reviewer.

    3. Re:large functions in c++ by fitten · · Score: 1

      Personally, i can't really take seriously a language without proper template support.

      You'll be happy to know that C# supports templates, then.

    4. Re:large functions in c++ by Johnno74 · · Score: 1

      Nope. .net 2.0 supports generics, which are similar, but not the same.

    5. Re:large functions in c++ by PixelSlut · · Score: 1

      No, C# 2.0 supports generics. Generics are not the same as templates. Templates in C++ are used at compile time, while generics in C# are used at runtime. They each seem to have pretty clear strengths and weaknesses when compared to one another, if you want to compare them.

    6. Re:large functions in c++ by top_down · · Score: 1

      It is probably a C thing from the time it didn't support 'inline'. It never made sense for C++.

      --
      Anyone who generalizes about slashdotters is a typical slashdotter.
  12. Re:But does it... by eclectro · · Score: 1


    That will only go as far as Microsoft will let it. Meaning that if MS wants to, they can close it down with their patents on C#/.NET. I would hate to code under that condition.

    --
    Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
  13. Re:Meanwhile... by AuMatar · · Score: 2, Interesting

    Except for the vast majority who aren't even considering it. I don't know anyone who has even been asked to look at C#, I know plenty of people doing C++ and Java. But keep reading the MS press releases and believing that, its amusing to people who actually follow industry.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  14. Re:But does it... by CaymanIslandCarpedie · · Score: 1

    Can you list those C#/.NET patents which worry you? I wasn't aware of this.

    --
    "reality has a well-known liberal bias" - Steven Colbert
  15. Design Patterns are the symptom of a problem by team99parody · · Score: 1, Interesting
    The usefullness of Patterns is really just a symptom that you're not solving the right problem or using the wrong tools.

    Paul Graham said it best:

    For example, in the OO world you hear a good deal about "patterns". I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I'm using abstractions that aren't powerful enough-- often that I'm generating by hand the expansions of some macro that I need to write.
    He goes on to reference Norvig's paper Design Patterns in Dynamic Programming that points out that in more productive environments, many if not most of the classic "design patterns" are totally invisible in better platforms today.

    If you are spending a lot of code writing stuff that fits nicely into design patterns, you'd be far better off switching to a platform (any lisp platform; any python platform; ruby/rails) that frees you from this redundancy automatically.

    1. Re:Design Patterns are the symptom of a problem by geekoid · · Score: 1

      Patterns are just ways to solve known problems.

      Use patterns to solve well researched problems, but never code to a pattern.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    2. Re:Design Patterns are the symptom of a problem by kraut · · Score: 2, Informative

      No, it just goes to show that Paul Graham is a very smart guy with lots of blind spots. A good design pattern does not mean that there's unecessary redundancy in the code; it means that you've applied a proven solution to a known problem (better yet, a proven, matching series of solutions, with known side effects, to a problem). One of those solutions may well be to use Lisp - that solves a certain set of problems, and creates others.

      If you want to really understand design patterns, there's really no way around reading Alexander himself. Or Richard Gabriel's "Patterns of Software". Or, ideally, all of them ;)

      --
      no taxation without representation!
    3. Re:Design Patterns are the symptom of a problem by Forbman · · Score: 2, Insightful

      Well, in that case, a "for loop" or "if...then...else" are 'patterns' as well.

      The idea behind good patterns is to reduce common coding occurances into a generic pattern. Sort of a meta code reuse scheme.

      Rather than focusing on rewriting a stack or queue from scratch, you just use something called a stack or queue (more generically, a "list") that functionally does the operations, i.e., push, pop, swap, count associated with what you want to use. You don't care if it's implemented as an array, a linked list of arrays, a hash table, etc. (and if you did, it could be the way you might want to implement it is not as good of a way to implement it in that particular instance).

      SQL is in some sense a design pattern. Instead of everybody writing the same CRUD database code (like Foxpro programmers, and finding a zillion different implementations of the same thing), because always having to write loops over recordsets is a whole lot cooler than just "select * from blah, and anyone who relies on that SQL abomination crutch is weak-minded!", well, I think has seriously missed the boat. Same with patterns.

      At the end of the day, all I really care is that I can store and retrieve data in an organized and flexible fashion without much effort, that is in and of itself very tolerant of design changes, and I don't have to worry about whether it's implented as a balanced B-Tree, a sorted binary tree, a red-black tree, a flat file, etc.

      I can implment, say, an Observer pattern (i.e., grab some code off of a website) for a certain chunk of my code, and then I have a lot less to implement if I need to provide it for other classes of objects.

      Patterns seem to allow the programmer to think conceptually about more abstract things. They are not supposed to be the end, but just a means to an end. No one *has* to use patterns.

      But, like lists, some coding concepts just seem to happen more often than not, and, like writing a function library, on a more generic level we have 'patterns', and having a basic conceptual/pseudo-code 'pattern' to think about helps one think of other things faster, rather than fleshing out the details right now before I can go on, and having to massively redo it if the plan changes.

      Object-oriented programming is a bit of a pattern in and of itself as well compared to procedural programming, which is a pattern for assembly programming, etc.

  16. Re:But does it... by AuMatar · · Score: 2, Informative

    Did you know you can't see patents pending? There is no databse for them, its secret until its rejected/accepted. In addition, they can send in a correction or addition to one, and it remains hidden longer, but still becomes effective as of the original submission date. So if they exist, we won't know for another 3 years if MS doesn't want us to.

    And before you say its an ECMA standard- ECMA does not require standards to be unencumbered, or even to be licensed on a RAND basis.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  17. Re:from the oxymoron dept... by BAILOPAN · · Score: 4, Interesting

    I know you were trying to be funny, but from a C# programmer's perspective, you're just being ignorant.

    C# is an advanced, well thought-out OOP language. When coupled with the .NET platform, it's easy, flexible, and powerful. Academia was pretty quick to gobble up Java but I've seen more and more schools replacing VB/Java courses with C# lately.

    It's an open standard, despite what people may think, and as Windows.Forms becomes implemented on other operating systems, adoption will spread. Microsoft even released the source code to a FreeBSD CLR implementation called "Rotor".

    Remember, just because it's from Microsoft doesn't automatically negate it ;)

    --
    If you say "here goes my karma" I will bite you!!!
  18. Re:Hah by Neopoleon · · Score: 1, Offtopic

    "Effective C#? How about don't use it."

    How did this get modded to "Funny"?

    Granted, I work for Microsoft and take some personal offense to the comment, but I'd still think it were stupid had it been about Python, Java, C++, or [insert language here].

    If you're going to be anti-MS, you could go the extra mile and at least be a tad bit witty. Comments like the one in question just make the whole /. scene look bad without adding anything useful.

    --
    - Rory [Microsoft Employee] | Free dirt: neopoleon.com
  19. Re:But does it... by Swamii · · Score: 1

    So, under your rules, you'd better not code in Java either since anyone, anywhere could have a pending patent.

    Give me a break... at least with C#, it's an ISO and ECMA standard. Further, Microsoft has explicitly permitted 3rd party implementations of the .NET framework and C# language.

    But I'm not going to get into a petty langauge war. Use the right tool for the job, if it's C# or Java, frankly it matters little. Only zealots think otherwise.

    --
    Tech, life, family, faith: Give me a visit
  20. Re:But does it... by Swamii · · Score: 1

    Why learn a platform specific language

    C# is not platform specific. However, the .NET framework (i.e. the common code library shared by all .NET languages including C#) is partially platform specific (in particular, System.Windows.Forms namespace).

    That said, the Mono Project allows you to write code in any .NET language (be that C#, VB.NET, JScript.NET, J#, C++, and about 30 others) that runs on everything from Solaris to Mac to BSD to RedHat. I suggest you check it out for more info.

    --
    Tech, life, family, faith: Give me a visit
  21. Re:from the oxymoron dept... by compass46 · · Score: 3, Interesting

    Hmmmm, I barely knew the name of the FreeBSD specific CLR implamentation. I don't think anyone seriously uses Rotor or has developed it in the past 2.5 years.

    (This brought to you by one of FreeBSD's Mono port maintainers. ;)

  22. Re:from the oxymoron dept... by Anonymous Coward · · Score: 1, Insightful
    C# is an advanced, well thought-out OOP language. When coupled with the .NET platform, it's easy, flexible, and powerful.

    When performance is not critical important and you make decision to target a VM, you may as well use a dynamic typed language. Enjoy Ironpython.

    You want funny? Microsoft should have called it !C or J#

  23. Re:Hah by ToasterofDOOM · · Score: 1

    You must be new here =D

    --
    I am Spartacus
  24. alright ! by ilikeitraw · · Score: 1, Funny

    C# is revolutionary !!
    Windows r0X !
    Keep creating high quality software Bill !!
    Gooooo Longhorn !

    *ducks*

    But seriously... choose a platform independent language... and anything that isn't bound to Winblows.

    1. Re:alright ! by stanthegoomba · · Score: 1

      Ok. Then choose C#, Mono and GTK#. That's reall being bound to Windows... hell, as far as I'm concerned that combination is about as 'plaftorm independent' as Java, meaning you just need to get someone to hack up a VM for it on every platform you want to use it on!

    2. Re:alright ! by fitten · · Score: 1

      While you are at it, make sure you use a language that is platform dependent and an open standard. I guess that rules out Java...

    3. Re:alright ! by 0kComputer · · Score: 1

      How the hell did this get modded funny? The only non-blatenly-sarcastic statement the parent made is wrong. C# has been implemented on several platforms.

      --
      Top 10 Reasons To Procrastinate
      10.
    4. Re:alright ! by WaterBreath · · Score: 1

      choose a platform independent language

      What if you really don't need to run on multiple platforms?

    5. Re:alright ! by emandres · · Score: 1
      C# has been implemented on several platforms.
      Correction: C# syntax has been ripped off by an open source project that tries to come as close as possible as the original cs compiler. As far as I can see, the only advantage Mono has over the original compiler is that it's Open Source and runs on *nixes.
      --
      The only way to tell the difference between a hamster and a gerbil is that the hamster has more white meat.
  25. Rails? by Karma+Sucks · · Score: 1

    That's funny because the Rails people go on and on about how it does MVC and all which is... you guessed it... a design pattern.

    --
    (Please browse at -1 to read this comment.)
    1. Re:Rails? by Forbman · · Score: 1

      Yes, it does MVC to the point where you don't have to think about it. It helps to understand MVC conceptually to grok the way Rails does things by convention, but other than that...

      ActiveRecord in Rails is based on...Fowler's ActiveRecord pattern, and it is implemented using SingleTableInheritance pattern for the data persistence side of things, too (but it would be nice if one could get it to do multiple table inheritance as well just as easily).

  26. Re:from the oxymoron dept... by owlstead · · Score: 1

    It's a shame if more and more schools are picking up C# to learn students how to program. Java is the cleaner one of the languages - take for instance the virtual keyword in C# - not very OO.

    But the thing that worries me most is the IDE. For C# I know two moderately usefull IDE's: Microsoft and Borlands. Both are commercial (ok, maybe not for students, but you know about indoctrination). So we either have to pay these companies for their environments, or we should use the rather outdated text editors for these purposes.

    And then there is the matter of documentation. Excuse me for being blunt, but the .NET documentation is not that great. It consists of examples in several languages and things can be pretty difficult to find.

    All this said, C# is a pretty good language, with many more (usefull) options over Java. But for teaching I would still go for the latter. To get an idea of the difference in overal complexity simply count the keywords of both languages.

  27. Re:But does it... by AuMatar · · Score: 1

    Not that I'm a fan of Java, but Java has no angle in blocking other OSes from using it. In fact, that was its big selling point. Microsoft does have a big angle in doing so, and an even bigger one in hurting open source. Mass adoption of C# by OSS followed by a patent attack could put OSS back by years. Java is an acceptable gamble, C# isn't.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  28. Rotor license terms? by argent · · Score: 1

    Microsoft even released the source code to a FreeBSD CLR implementation called "Rotor".

    Under what terms?

    1. Re:Rotor license terms? by chochos · · Score: 2, Informative

      take a guess... shared source of course. Look for a post above this one in this same thread, that I wrote explaining the consequences of the Rotor release by MS. It's just so that they can have a valid argument about code theft when Mono gets really popular...

    2. Re:Rotor license terms? by argent · · Score: 1

      take a guess... shared source of course.

      Ah. "Non-commercial-use". And they have the gall to complain about the GPL (me, I'm a BSDL fan, but I can live with the GPL... but I'm not touching no-commercial-use source with a 10 foot non-conductive thermally-stable shock-dampened safety-breakaway pole.

    3. Re:Rotor license terms? by I'm+Don+Giovanni · · Score: 1

      What's it matter? It's useful for seeing how .NET apis are implemented (if the documentation isn't clear enough). It's not meant to be incorporated directly into your code.

      --
      -- "I never gave these stories much credence." - HAL 9000
    4. Re:Rotor license terms? by argent · · Score: 1

      It's not meant to be incorporated directly into your code.

      Then it's worse than worthless.

      It's useful for seeing how .NET apis are implemented (if the documentation isn't clear enough).

      If it doesn't give me a way to actually USE the .NET APIs, it doesn't matter how the .NET APIs are implemented. If I'm going to use someone else's implementation of the .NET APIs, I'll see how THEY implemented it... that way I don't have to worry about Microsoft sending a front man like SCO after me claiming I stole their bleeding code.

  29. Wow, look at all the MS haters ... by Chitlenz · · Score: 4, Interesting

    C# is a GREAT language, this is coming from a long history in Oracle/Unix/Linux. I don't understand where people got the idea that it won't work on Linux either. We're coding 3-monitor full screen 3d MRI analysis applications in it, and I can assure you that it has accelerated our developement time over the last iteration created with Borland C++ Builder. Ironically, it took 8 years to write the last version of our software in Builder, and 6 months to completely rewrite it with enhancements in c#. That, consequently, was with both the lead developers having no experience with the language (I was a C++ folk, and he'd been using Delphi, so we settled on C# since it was essentially the next evolution of Delphi).

    It's no joke, and I'll be buying this book just to have it. I've also picked up most of the Deitel series of books on c#, and of course the O'reilly books. The c# cookbook is another GREAT reference. Anyone interested in starting with C# should check www.codeproject.com for examples. Also, along with a rude admonishment to the MS haters for not having researched the topic (MS dependant indeed), check www.omnicore.com for a native crossplatform compiler for c#. It's cheap too, but doesn't do forms support just yet (when it does, I'll probably move from VS just to get free cross-platform compatability).

    -chitlenz

    --
    Imagination is the silver lining of Intelligence.
    1. Re:Wow, look at all the MS haters ... by Rakshasa+Taisab · · Score: 2, Funny

      So it took 8 years to develop the application from the ground up, and just 6 months to rewrite it for C#.

      Say... If you were to rewrite it in C++, would you have spendt 8 years or closer to 6 months?

      --
      - These characters were randomly selected.
    2. Re:Wow, look at all the MS haters ... by geekoid · · Score: 1

      dude, it makes the platformn MS dependant.

      Sure, you write nice app, that run in Linux, them MS pull the licesing for non windows, and then all the nice linux stuff will only be allow to work on the MS boxes.

      And yes, I have worked in the .net envoronment for about 4 years.
      VS sucks, but that is a different issue. Of course have a project that compile a dll larger then 100K can cause reference issues. the VS and C# camps point at each other for this one. I think it's a c# issue becasue it doesn't happen in VB.net. OTOH, the VS works much better with VB project, which I find...odd.

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    3. Re:Wow, look at all the MS haters ... by Chitlenz · · Score: 3, Interesting

      There were several poorly implemented replication features that more seamlessly worked within .NET for whatever reason. Things have gotten much simpler overall to get the actual applciation to more easily do what what you want it to do. The c++ rewrite had a much longer lead time, we actually knew this since we did start into a rewrite of 2 of our 8 applcaitions (at the time). It's not a question of incompetence, its a question of shortcuts, and .NET has LOTS of them, with 3rd parties adding lots more.

      -chitlenz

      --
      Imagination is the silver lining of Intelligence.
    4. Re:Wow, look at all the MS haters ... by Chitlenz · · Score: 1

      1)C# is ANSI standard, if MS decides to close THEIR part of the standard off and make it proprietary (read j#) I'd have to make that decision then, but I'm confident that with Novell's backing, mono is going to keep ANSI c# with at least the 1.1 runtime ports working fine for the forseeable future. Out of all this take away, my application works today on 2 platforms, if MS wants to change something in the future, I can choose to go forward with them or choose to stay where I am.

      2) Mono is NOT smoke and mirrors, it works. And the good third party compilers check windows builds for mono compliance if you install it (mono for windows).

      3) I dunno what you're talking about size limits. We have no issues to date with builds of 350k per dll. I haven't messed with VB for 10 years or so, so no comment on its performance.

      --chitlenz

      --
      Imagination is the silver lining of Intelligence.
    5. Re:Wow, look at all the MS haters ... by OverCode@work · · Score: 1

      GNU Mono is also a great place to start if you want a free C#/.NET environment. I'm using it to develop in C# on my Powerbook, and it's been smooth sailing so far. I've been impressed with how quickly some of my apps have come together.

      C# is a nice language. A very refreshing change of pace from C++. .NET is a pretty neat platform, to the extent that it is open and portable. I don't care much for the Windows-specific aspects of it of course.

      -John

    6. Re:Wow, look at all the MS haters ... by Johnno74 · · Score: 1

      "Of course have a project that compile a dll larger then 100K can cause reference issues."

      Err WHAT are you talking about?? I to have been doing .Net development for 3-4 years, and I've never heard of this.

      The project I'm working on currently (windows client) has an EXE and 22 DLLS, totalling over 8mb. there are a 3 DLLs over 1mb, and one over 2mb.

      Never seen or heard of the problem you're describing. VS can be a bit flakey at times, but I've got nothing but praise for the .net framework itself. It Just Works (tm). No unreproduceable weirdness like with COM.

    7. Re:Wow, look at all the MS haters ... by Chitlenz · · Score: 1

      I agree with you on the database nullref problem, but I mean the hack works, and all languages have problems as they grow. The big problem I have with Java is performance, at least from our perspective. That and we need control of the 3D hardware to render reconstructions (as in, your heart), and working through the Java OpenGL interface really wasn't an option.

      I admit to having fairly ignored Java, after dealing with Sun for several years, and being fed up with having it rammed down my throat by both them and Oracle. I mean, I understand what you are saying in that there are better tools for Java, etc, at the moment, but we are a small enough company that we are having to plan years out to make sure we can support our framework with a minimum amount of people, and that means choosing as close to a single platform as we can (which is why we compromised on C# from c++).
      As it is, I rebuilt one of our apps, a fairly compilcated DICOM port server, into VS2005 from VS2003 and it worked right off, even with several older components included. That's the kind of ease of translation small companies need to suceed (and prosper).

      -chitlenz

      --
      Imagination is the silver lining of Intelligence.
    8. Re:Wow, look at all the MS haters ... by Forbman · · Score: 1

      Have you tried loading your VS projects into SharpDevelop?

      The MS dependency is not on C#, but on VisualStudio.

    9. Re:Wow, look at all the MS haters ... by IntergalacticWalrus · · Score: 1

      About your argument #1: Yes, C# is an ANSI standard programming language. However, a programming language is worthless without APIs. Nowadays whenever someone does C# work, they use some of Microsoft's proprietary APIs. If/when Microsoft decides to kill off unauthorized reproductions of their APIs (ie. Mono), most C# apps will be rendered Microsoft-only.

    10. Re:Wow, look at all the MS haters ... by Rick+and+Roll · · Score: 2, Funny
      I thought I was going to have to join the "I hate Microsoft but I like C# club", but then I discovered Python. Now I can keep my anti-MS viewpoint.

      Thank you, Guido!!!

    11. Re:Wow, look at all the MS haters ... by Tanaka · · Score: 1

      So what if it's a "rip-off". Darwin would be most pleased with the result.

      Check out Mono... then tell me its a cheap fake.

    12. Re:Wow, look at all the MS haters ... by aztracker1 · · Score: 1

      Umn, most of those APIs are obscured under the covers of the MS.Net environment... beyond this, the apis aren't being used on other platforms.. the early mono winforms implimentation was relying on wine, but has since changed, and now has no ms api dependancies.

      There may be other issues with the SWF namespace, but you can get around this with QT#, GTK#, wx.Net or any other gui api structure that is portable, and not ms locked.

      --
      Michael J. Ryan - tracker1.info
    13. Re:Wow, look at all the MS haters ... by aztracker1 · · Score: 1

      You obviously have no idea what you are talking about... yes, some of the ideas come from Java, as most of java's origins are in C++ and so on.. there are also concepts burrowed from Delphi, which has origins in Pascal, etc... languages build on prior concepts, get over it.

      Beyond this the *LANGUAGE* is *NOT* dependant on windows (using "windowz" as a negative connotation, does nothing but make you look ignorant, it doesn't support your point), C# is both an ECMA and ANSI standard, and that won't change.

      Yes, MS uses api's underneath their framework implimentation... you can't build a wx application without using underlying frameworks.. that doesn't mean that the namespace & runtime implimentation are tied inextricably to windows, mono and portable.net both prove that much.

      --
      Michael J. Ryan - tracker1.info
  30. Re:from the oxymoron dept... by MagicMike · · Score: 2, Insightful

    I've heard .NET is a great platform too, and as a Java programmer I am frankly jealous that .NET has properties and I don't get to use them.

    But its not an open platform if you've got a submarine patents laying around. I feel a bit superstitious about saying this - but I just don't trust Microsoft enough to be in control of the tools I use for my livelihood (programming for cash).

    My attitude may change, but in the past my experience has shown me its not worth it.

    Given that, I'd rather learn Ruby on Rails if I'm going to do sometehing new, really.

  31. Re:from the oxymoron dept... by Tanaka · · Score: 1

    I got paid to write a socket server app in C# recently.

    Being from a Java backround, I didn't really want learn yet another language. Got to say - I love c#. I got to grips with it in no time at all. One major stubaling block I found, was that my app refused to allow more than 64 socket connections. Out of curiocity, I ran the same .exe under Linux-Mono (without recompiling), and it easily handled 1000 active connections. I am definatly going to work more with Mono in the future.

  32. Sapir Whorf hypothesis by zhiwenchong · · Score: 3, Informative
    1. Re:Sapir Whorf hypothesis by DanielMarkham · · Score: 1

      Thanks. Excellent article. I would prefer to disagree, however. There is a natural affination, once one begins "thinking" in a certain language to solve problems certain ways. But all computers are Von Neumann machines, and the trick is just to line up the 1s an 0s so the solution appears.
      Academically, perhaps this is an area worth further study. Pragmatically, however, it's the equivalent of saying fat people prefer bigger belts. True, but uninformative, imo. Plus. I never liked Whorf that much anyway. He was always trying to shoot something with his phaser.

      Do Dinosaurs Taste Good?

  33. C# Book by Rac3r5 · · Score: 2, Funny

    I personally use Herbert Schildts: "C# a complete reference" for reference.
    It teaches u how to program in the first half and in the second half it has references to all the libraries.

    I find C# pretty straight forward if u know Java.

    I love programming in languages that have their own memory management. Worrying about pointers and what not takes away so much time from productivity. For ppl who wanna get hardcore and want control. Yes u can embed Assembly in ur C# code.

    Now if only someone makes microcontrollers/dsp's that do their own memory management. That's make my life so much more easier.

    1. Re:C# Book by Jooly+Rodney · · Score: 1

      Wow. Just... wow.

    2. Re:C# Book by Quill_28 · · Score: 1

      "spit it"

      What does that mean?

      If you and going to troll and be a jerk. Then learn to write a sentence.

  34. Re:Hah by Ithika · · Score: 1

    It's almost like you've never seen a Slashdot "discussion" before... Mention .NET and you'll get scathing remarks; mention BASIC and you'll get laughed at; mention Java and put up with taunts about how slow it is; mention C and watch as another buffer-overflow thread instantly materialises; mention perl and there's an immediate response about clarity of code; mention Python and someone suggests you try Ruby; mention PHP and someone wants you to switch to Ruby on Rails.

    You just gotta go with it. It's not gonna change --- and why should it? They all do the same, but there's always another one somewhere else which does it *slightly easier*...

    It would appear the only languages worth knowing around here are the ones so obscure or esoteric that no-one says anything about them. I do all my application development in brainfuck! ;)

  35. Re:Hah by AstroDrabb · · Score: 2, Interesting
    .NET is _not_ a "godsend". The Java framework has had all of the .Net framework functionality for a while now, and Java still manages to be cross-platform. The only people that think .Net is a "godsend" are peopel who only know VB and VBScript/ASP.

    I am not a .Net hater, I am just an MS hater. Why? Because of the intentional things MS does to stop other products from working. For example, ASP.Net (in C# or whatever) should put out standards compliant HTML, regardless of browser. However, that is not the case. A fellow programming friend of mine who, sadly, grew up in the "MS only camp" made this page. Go to this URL in IE, then under the "Quick. Cheap. Easy." flash, click on Info. Notice that everything looks fine? Now do the _same_ steps, but do them in Firefox/Mozilla. Once you click the "Info" link the page looks like crap. After talking to my friend, it turns out that he used _nothing_ but MS supplied .Net controls. Now, I want you to do a few more experiments (I have already done them and know the outcome). Download and install the User Agent Switcher extension for Firefox. Make Firefox "pretend" to be IE 6 and go back to the link above.!!!!! Wow, the MS ASP.Net framework sends down different HTML depending on whether you are using IE or not! Making Firefox "pretend" to be IE, causes the MS ASP.Net framework to send down IE-Only Code that actually happens to make the site look correct in Firefox.

    Now, there is one other experiment for us. Go back to the link as Firefox. Then go under File -> Save Page As and pick Web Page Complete. This option will save all the images, scripts and HTML of the page that was sent to Firefox. Now, open up IE and drag-n-drop the complete HTML or HTM page that you saved from Firefox to IE. Do you notice ANYTHING STRANGE? IE renders the Firefox delivered page just as poorly as Firefox does!

    So to sum up my thoughts on MS .Net. I love C#. It is a very nice language. I think the MS .Net framework is very nice. However, I also hate the MS .Net framework because it is designed for crap MS only. For all of the ASP.Net/C# Web apps I have made, I have had to actually _fight_ against the MS Visual Studio IDE to force it to make standard compliant web apps. It seems that the latest versions of MS Visual Studio IDE just want to produce IE/MS only web apps. To me that is not acceptable. I personally would rather stick to Java/Servlets/JSP or PHP and have total control myself, than put up with MS intentionally trying to break non-IE browser.

    For all the MS-apologist, please save your excuses. MS could have made there ASP.Net framework deliver the _same_ HTML across all browsers. All MS had to do was make ASP.Net standards compliant, which it is _not_!

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  36. Re:from the oxymoron dept... by chochos · · Score: 3, Interesting

    Actually the Mono team encourages you to stay away from Rotor as if it was the plague, because it's the infamous shared source license. It's all MS code, not open source at all. So if you have looked at the source for Rotor, you shouldn't (or can't? I don't really know) contribute to the Mono framework (or Portable.NET or any other one if there are more implementations) because in the future it might bring patent or copyright issues from MS against those projects. It also supposedly runs on Mac OS X. But you need 1GB free disk space to build the thing. Why? I don't know. Mono doesn't use as much space, and it includes the CLR and the class libraries.

  37. Re:from the oxymoron dept... by tolkienfan · · Score: 1
    Remember, just because it's from Microsoft doesn't automatically negate it ;)
    But is does make you think at least thirteen times before considering it.
  38. Re:from the oxymoron dept... by chochos · · Score: 1

    You could use Monodevelop, it's free (speech and beer wise). It's still very rough as far as aspx and winforms are concerned, but for a programming class where you're going to write a hello world or other basic CLI stuff, it's more than enough.

  39. Re:from the oxymoron dept... by AstroDrabb · · Score: 3, Informative
    I use C#/.Net and Java and agree with you that C# _is_ a nice language. However, Windows.Forms is _NOT_ open and MS could shut down implementations of it if they wanted to. Just because MS realeased C# as a spec doesnt' mean they did the same for their _whole_ .Net framework. It is _very_ important for the _whole_ framework to be open so applications can be implemented once and ran on multiple OSes. Sun's Java hasn't tried to limit where you can run Java applications, only MS has tried that with their .Net framework.

    There are also tons of other problems I have run into with the .Net framework over the last few years. Here is a _major_ problem for me that I just posted about.

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  40. Wrong by WindBourne · · Score: 1

    Lets set aside that C# is nothing but a rip off of Java.

    So far, other than low-end schools or schools with millions being thrown at them from MS, few in academia are adapting it. ACM and the major 4 universites backs Java as the primary language for CS.

    Likewise, set aside the fact that nothing inovative has come from C#. I will grant that one day something might, but after 5 years nothing yet.

    the real problem is the Gnome world was foolish enough to adapt it. Now, MS is finally throwing the patent stuff at them on a number of issues. My guess is that C# AND the api will be dead on all but MS. Even on the BSD platform.

    --
    I prefer the "u" in honour as it seems to be missing these days.
    1. Re:Wrong by Forbman · · Score: 1

      C# is directly from Java

      C# rips off from Delphi/Object Pascal as much as it does from Java...

      Gee, I wonder...didn't Microsoft seriously poach hard on Anders Heilsberg (sp) and a couple of other key Delphi developers, to the point that Borland sued MS for unfair competition?

  41. Re:from the oxymoron dept... by SparafucileMan · · Score: 1

    by little longer you mean exponentially longer?

  42. OOP languages tend to be pretty poor. by jd · · Score: 1
    First, they compile to run on a procedural processor, so you've massive overheads on translating between two entirely different and incompatiable architectures. I'm trying to figure out a way you could build a pure OO processor, but it's not easy.


    Secondly, OO programming is inherently parallel, as you access everything by implied reference, all data is stored on the objects, and all communication is by very controlled, specific paths. But multi-threaded OO code tends to be horrible to write, whether in C#, Java or any other OO language. Most OO languages assume a serial flow, even though the architecture implies a parallel flow.


    Third, C# is a hybrid - it is more an object-based language than a pure OO one. (The difference is that a pure OO language has no atomic types visible to the programmer, as atomic types mean procedural code. There should be no procedural code in an OO program.) Unfortunately, the only language that is even close to pure OO is Smalltalk, and I dare you to name any serious applications written in that.


    Fourth, Microsoft has explicitly said that the new C# extensions supported in Longhorn must be licensed under a non-free license, so there's no chance that Mono will support the newer stuff.


    Lastly, I would agree that Java and VB are a mess - Java is inefficient and slow (not to mention horribly designed), VB is way too proprietary and non-portable, but that doesn't make C# good, it merely makes it better than most of the competition. D is a better language than Java! The biggest difference between C# and D is that D isn't as well known and doesn't have a trillionaire backing it.


    Academia's judgement on languages has yet to impress me. Whilst I am from an academic background, I do not regard languages such as Cobol or Ada to be noteworthy uses of software engineering, and both Modula-2 and Modula-3 are useless for anything beyond classwork, and Pascal is perfectly good for that. (IMHO, it is also better.) Occam, perhaps, but only a handful of Universities - and all in Europe - still teach it.


    Just because it's from Microsoft does NOT negate it, you are quite right. Microsoft is quite capable of producing good ideas and good software. Sometimes, it even does. However, C# does not seem to me to be worthy as a contender for "ideal language of the year".


    Ok, so what WOULD be an ideal language? Something with the inherent parallelization of SISAL, with transparent networking (if the resource is specified, and the resource is reachable by IPv4, X.25 and Appletalk, why should I need to know which is used, if the communication still takes place within the desired constraints?), with a consistant architecture (no hybrids, please, the compiler should take care of optimization and consistancy is readable).


    There should also be a rigid distinction between UI (and UI constrants) and the backend (with all the constraints there). One thing I hate about programming for X is that there is a blurring between quite distinct components. (I also don't like the container management, the parameter lists, and the layout management, but it is the violation of an essential SE design principle of keeping interface details completely independent of engine details that really bugs me.)

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:OOP languages tend to be pretty poor. by SeventyBang · · Score: 1


      Unfortunately, the only language that is even close to pure OO is Smalltalk

      And the last time you looked at Actor or Eiffel was?

    2. Re:OOP languages tend to be pretty poor. by aled · · Score: 1

      Academia's judgement on languages has yet to impress me. Whilst I am from an academic background, I do not regard languages such as Cobol

      What academia had anything to do with COBOL, a language created for the United States Department of Defense?

      --

      "I think this line is mostly filler"
    3. Re:OOP languages tend to be pretty poor. by dedazo · · Score: 1
      extensions supported in Longhorn

      Please don't be so fucking ignorant. What you're referring to is called Indigo, and it's a messaging stack that will also be available for Windows XP and 2003. It is not an "extension to C#". It's not even part of .NET, although it's mostly written with it and designed to be used by applications written with the framework.

      Further, Novell has said they were not interested in implementing Indigo, and will not. Ever. That Indigo is encumbered by patents does not change the fact that C# and the CLI/CLR itself are fucking ECMA standards, whether you choose to ignore that small point or not.

      The next time you go off into your "OMFG M$ IS TEH SUXX" educated-sounding rant and tick off the various points about why C# is evil, at least fucking educate yourself beforehand, mmmkay?

      --
      Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
  43. Re:Hah by MyLongNickName · · Score: 1

    Excuse my ignorance... not trying to start any fights... if I wanted to play with a purely java implementation of a web page as opposed to ASP/ASP.NET how could I quickly get started? And good IDE's that I could play around with to get my feet wet?

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  44. Re:But does it... by shutdown+-p+now · · Score: 1

    Because C# is quite popular on the job market?

  45. Been using it since it was released and Love It by m11533 · · Score: 1

    I started working on a hardcore C# project around the end of last fall. Effective C# has been my guide and while there are a few recommendations that I'm still experimenting with, I must say I have been very pleased with the results of following its recommendations. While I do concur that the number of typos was surprising, most are simply a missing space between two words and thus little is lost other than the finish of the book. In general, the entire "Effective" series of books has been equally useful, though this one misses the fine sense of humor Scott Meyers has contributed to his own books.

  46. Re:from the oxymoron dept... by pdbaby · · Score: 1

    SharpDevelop is a pretty nice (free) IDE for C#.

    I'm actually very fond of the documentation. It's rather complete, well laid out... and the APIs aren't as buggy as Java's

    --
    Global symbol "$deity" requires explicit package name at line 2. - If only $scripture started "use strict;"
  47. Re:But does it... by Swamii · · Score: 1

    Java is an acceptable gamble, C# isn't.

    Frankly, most companies (including the one I work for) choose to support the most widely used OS; supporting multiple OSes means more testing, more development costs. And for Windows, C# blows away Java.

    But again, I won't get sucked into a langauge debate. If I were to write cross-platform software, I might choose Java over C#. It's all about getting the right tool for the job.

    --
    Tech, life, family, faith: Give me a visit
  48. Re:from the oxymoron dept... by NeuralClone · · Score: 1

    I agree! SharpDevelop is one of the best free IDEs I've seen and it has many of the same features as Visual Studio .NET 2003.

    Although the latest build has a really nasty crash bug that has to do with the new integrated help. Aside from that, it's a great program.

    --
    find . -name "noobs" -print | xargs rm -rf && echo "pwnd."
  49. Ethics by InfoTechnologist80 · · Score: 2

    Simply put, notice the ethics of the post. Good ethics are not often seen.

  50. Re:from the oxymoron dept... by fitten · · Score: 2, Interesting

    It's a shame if more and more schools are picking up C# to learn students how to program. Java is the cleaner one of the languages - take for instance the virtual keyword in C# - not very OO.

    Actually, I've heard far more people knowledgable in both languages say the exact opposite as this. Considering C# was developed supposedly to "fix" specific deficiencies in Java and I've seen good rebuttal on both sides with Java coming up on the short end of the stick almost all the time (exception cases are where someone seems to have some devotion to some fringe case that is considered by many to be "bad") and the final recourse of the Java side is to say that it's "open", to which the rebuttal is that it isn't as open as C#.

    But the thing that worries me most is the IDE. For C# I know two moderately usefull IDE's: Microsoft and Borlands. Both are commercial (ok, maybe not for students, but you know about indoctrination). So we either have to pay these companies for their environments, or we should use the rather outdated text editors for these purposes.

    Others have already replied with free (beer) ones listed.

    And then there is the matter of documentation. Excuse me for being blunt, but the .NET documentation is not that great. It consists of examples in several languages and things can be pretty difficult to find.

    There must be two kinds of people in the world. Those that can use Microsoft documentation very effectively and those who can't. I see a few people claiming that Microsoft documentation isn't that good, but I've been using Unix/Linux since 1986 (computers in general since 1980)and Microsoft products since 1993 and I've always been more than adequately served by Microsoft documentation.

  51. Re:from the oxymoron dept... by Synbiosis · · Score: 1

    "But its not an open platform if you've got a submarine patents laying around."

    Well, if you're a Java programmer, shouldn't you be accustomed to that by now? =P

  52. Re:But does it... by Valdimir · · Score: 1

    Beacuse C++, Java or Ruby may not be the best language for the job. Currently C# is a great language for developing Windows applications.

    There are plenty of reasons to learn and use a wide variety of languages and platforms. The right tool for the right job.

  53. Re:from the oxymoron dept... by Stankatz · · Score: 2, Insightful

    C# is an advanced, well thought-out OOP language.

    So is C++. Why eliminate the standard programming language in favor of another? You know Microsoft didn't just develop it out of the goodness of their hearts. It was a business decision that will be good for Microsoft and bad for programmers. That is, unless you like learning yet another redundant programming language.

  54. Re:from the oxymoron dept... by MagicMike · · Score: 1


    You do have a point - I obviously can't prove that Sun hasn't patented anything in Java.

    However, if they have (and I'm not aware of it?) isn't it a bit late for them to be doing anything with it?

    Further, Sun has no monopoly to leverage, so it can't be without suffering quickly - that seems to keep them in check quite well behaviorally.

    One other thing I think is interesting is that Fedora actually ships natively compiled Java apps. Little things like...Eclipse. That's amazing, and all libre.

    Where are the mono apps? Am I missing them?

  55. When did java become platform independant? by Some+Random+Username · · Score: 1

    Java runs only on OS and architecture combinations where Sun wants it to. Due to the hard work of some people, I can at least get java on BSDs for i386, but not amd64. And even for i386, Sun's license says I can only use it for testing, because I haven't paid them to certify the port as java compliant.

  56. Re:from the oxymoron dept... by Jose-S · · Score: 1
    C# is an advanced, well thought-out OOP language.

    I'd have to agree Sun thought it out pretty well.

  57. Re:Hah by AstroDrabb · · Score: 1

    There are plenty. A good Free/Open one is called Eclipse. It is plug-in based and supports Java/Servlet/JSP/C++ and others. You can just download Eclipse and Tomcat and have a complete JSP/Servelt web application framework that works on MS Windows or Linux. Now just buy a JSP/Servlet book or search Google for a JSP/Servlet tutorial and your all set ; )

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  58. Re:Hah by code+shady · · Score: 3, Interesting

    With regards to the HTML problem, have you considered that it might be because of an outdated segment in your web or machine.config files?

    I myself am a C# developer (win forms and web forms), and I initiall had a huge problem trying to test and use any sort of aspx web application in firefox. After poking around for a bit, it turns out that the .NET framework will generate two different kinds of html one for "uplevel" browsers (by default i think this is only MSIE 5+ and posibly netscape 6 but don't quote me on that last part).

    Anyway, there is a section that you can place in you web.config or machine.config files (i assume you know the difference between the two) that details the browser capabilities of various browsers hence the name browsercaps. By default this section of the file is pretty useless, it will detect IE, some netscape and that more or less it. Maybe some mobile browsers for PocketPC as well. This can be updated, and i find that the information at This Link is extremley helpful. I have used the browsercap information from this site on a few production servers to get rid of some ugly issues with AbleCommerce and Firefox, and i have it on my development machine as well; the difference in rendering will suprise you. In short, I highly reccomend that every ASP.NET developer check this information out, and keep your browsercaps section up to date. It may not be a 100% effective solution but it does do an excellent job of getting rid of most of the problems you will have when using a non MS browser.

    --
    Look out honey cause I'm usin' technology
    Ain't got time to make no apologies
  59. Re:Meanwhile... by CPgrower · · Score: 1

    Heard of Mono?

    Yeah. That's the kissing disease.

  60. Re:from the oxymoron dept... by llamaluvr · · Score: 2, Interesting

    then there is the matter of documentation. Excuse me for being blunt, but the .NET documentation is not that great. It consists of examples in several languages and things can be pretty difficult to find.

    The only difficult thing I've found with the .NET documentation is that it doesn't always come up first thing on a google search, unlike javadoc when you're looking up java classes. Other than that, it's great. It provides examples for each class in VB, C#, and C++, clearly marking which one is which. Javadoc generally doesn't provide examples. On difficult-to-use classes, .NET docs have often been my last stop before continuing programming. That has not often been the case w/ javadocs.

    Also, a lot of basic descriptions for classes and methods are built right in to the IDE with intellisense, not to mention that the intellisense in VS is simply more "intelligent" than Eclipse's.

    --
    Insightful: 76, Off-Topic: 379, Flamebait: 24, Funny: 152, Interesting: 201, Underrated: 55, Troll: 9, Total: 896
  61. Re:from the oxymoron dept... by llamaluvr · · Score: 1

    Correct me if I'm wrong, but have they really actually *tried* to limit it? Not helping and actually trying to limit .NET to windows are two different things.

    Basically, because MS's windowing system is not in other OSes, everything behind the interfaces needs to be reimplemented. Only if MS changes the interface do they break compatibility, and, by doing that, they'd break compatibility for all Windows programmers, too.

    --
    Insightful: 76, Off-Topic: 379, Flamebait: 24, Funny: 152, Interesting: 201, Underrated: 55, Troll: 9, Total: 896
  62. Re:Hah by AstroDrabb · · Score: 1
    I have been playing around with "browsercaps" crap under IIS for a while. IMO, there is really no need for it. ASP/ASP.Net _should_ just send down standards compliant HTML/Javascript. If a browser cannot handle it, then it is the browsers fault and not the fault of MS, ASP or ASP.Net.

    I will try to play around with the browsercap stuff some more. As I pointed out in my post, if you set Firefox to pretend to be IE, the HTML usually displays _much_ better, however the Javascript gets all crappy and non-standards compliant and breaks things. If you have Firefox just be Firefox, then none of the validation controls work. They will require a round-trip to the server. However, in IE they will do basic Javascript and _not_ require a server round trip just to make sure a text control is not empty. I seriously do not see why MS could not use _standards_ compliant Javascript to check a text input. I mean it is as simple as something like:

    if (document.Form1.txtUserName.value == "") {alert("Enter a value!"); return false;}

    I hope .Net 2.x really comes through and "just works" (tm) in a standards compliant mode. Though with MS I will not count on it.

    Thanks for the link ; )

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  63. I present to you... !C by bleaknik · · Score: 1
    --
    Deja Vu
    n. 1. The sensation that you've read this very article before.
  64. Re:Hah by Unnngh! · · Score: 1
    My experience with web development is that it has, more or less, always been this way. Just because MS's tools favor IE by default is no reason to get in an huff. In the olden days tools used to favor Netscape and getting pages to work in IE was a pain.

    Yes, IE is more at fault than FF/whatever, but lots of people use it and if you are writing web apps you should know to test with different browsers. As other posters have mentioned, you can specify to a great extent how to render pages in differenct browsers in ASP.NET - uplevel and downlevel, and you can customize beyond that for each browser specifically.

    VS.NET is great as a WYSIWYG dynamic content web page designer. Your friend just needs to clean up his page for Firefox. It is not hard.

  65. Re:from the oxymoron dept... by abradsn · · Score: 1

    So for the rest of us that still have a 1ghz machine with 256 mb of ram, that would chew up about 10 to 20% of the cpu just for a few downloads. That sucks (cpu)!

  66. Re:from the oxymoron dept... by corngrower · · Score: 1
    Well, never having programmed in C#, but knowing the difficulties that are encountered with C++ by both myself and others, I'd say C# is a better language. It's not my 'perfect' language but it moves in the correct direction from C++. There's a lot to be said for it - the distinction between reference types and value types, delegates, and attributes.

    One of the problems I have with C++ is the calling of functions with reference arguments. If you're unfamiliar with the function being called, you can't tell, without looking at a header file, whether or not the argument is being passed by value or by reference. This can make it difficult when tracing through unfamiliar source code to figure out what's happening. C# addresses this problem by making you put the ref modifier in the arguments to the function

    I very much disagree with your statement that it is bad for programmers. It very well may become the next de-facto programming language. This is coming from someone with largely a UNIX background so don't dismiss this as just another Microsoft Fanboy comment.

  67. I completely agree by bhav2007 · · Score: 1

    I am in the same situation, and I feel exactly the same way. Often people fail to understand why I dislike Microsoft so much. It is because of Microsofts Policy of Proprietary Design (you can quote me on that:). Every piece of software they have written seems to be tweaked (from orders from high up, no doubt) to work best only with MS. The resemblance that Bill Gates's behavior in the marketplace bears to the Robber Barons of the 19th century is disgusting. I have all the respect in the world for the (honest) MS developers, they need to make a living like everyone. The problems clearly stem from those who are becoming filthy, filthy rich from forcefully beating out competition in the software market.

  68. Re:Hah by Pman1 · · Score: 1

    Well I for one have been coding professionally in C# for a solid year now and let me tell you I've enjoyed every day of it. I've also taken on the monumental task of re-creating our company namespace with some of the items from this book (which is great by the way if you overlook some english semantics). I would recommend this book, as it has helped me fine-tune my game if I can call it like that.

  69. Visual Studio & .NET are getting better! by StuckInAFridge · · Score: 2, Insightful

    Disclaimer for .NET haters: Mono --open source dev tool for .NET. It's nice i've got it on my gentoo partition :-)

    end-disclaimer.

    The MS bashing is quite disturbing. Well i know that /. is pretty much a open-source favoring crowd, but MS Visual Studio 2005 is a nice improvement upon the previous edition. The gripes most had about the old version have been fixed, and there are quite a few great improvements, including my favorite improved intellisense! :-)

    While i may have made myself flamebait, i think that if you are honestly interested in VS, you wont be disappointed by the new improvements they've made to Visual Studio.

    1. Re:Visual Studio & .NET are getting better! by Jussi+K.+Kojootti · · Score: 1

      And all this is related to the subject (the book) how?

  70. Re:from the oxymoron dept... by bleaknik · · Score: 1

    I've programmed in both C# and C++.

    While I like C#, it does have some flagrant problems. Primarily, it is not nearly as lean in computations as a C++ program... thanks to the .NET implementation on Windows. Mono seems to work relatively well (in my limited experience with it) to improve upon any performance hitches on alternative OSes (Linux, Mac).

    C++ on the other hand, as you point out, is THE standard programming language (in some places, but not all). However, programming a GUI in C++ usually takes substantial more time than in C#. C++ has disadvantages, of course (i.e. you're limited to System.Windows.Forms look and feel (although, you can customize many properties).

    In all honesty, when C# first came around, I was reluctant to leave my favorite language, C++. But I grew to accept C# as an extension of C, rather than a new language entirely. They behave quite similarly (probably gonna get modded down for that comment, but I'm speaking syntactically), and they both have a common lineage. /shrug.

    You'll make your own opinion, but at least we can agree on one thing: C++ is better than Java (-1, Flamebait), and C# still isn't Java (-5, Flamebait).

    Heh.

    --
    Deja Vu
    n. 1. The sensation that you've read this very article before.
  71. Re:from the oxymoron dept... by e40 · · Score: 1
    It's an open standard... I'd like some of what you are smoking. C# is not an open standard. It's a "closed standard" (which means it is no standard). Microsoft and only Microsoft control it. They did not give control to a standards body, nor did they submit the spec to a standards body to "approve" it.

    Microsoft can change anything they want in C#, and bet they will.

  72. Re:Hah by AstroDrabb · · Score: 1
    VS.NET is great as a WYSIWYG dynamic content web page designer. Your friend just needs to clean up his page for Firefox. It is not hard.
    I agree with you and this is the approach I take. However, my friend (who is a really nice guy) grew up with MS only tools under MS only OSes. So to me he is typical of all the "MS Developers" that I have met. They have never been exposed to non-MS stuff and are not familiar with it. I have found that it is hard to teach these type of programmers about standards and non-MS products. The concept seems so foreign to them. The majority of the fortune 500 (I have worked for 3 of them) seem to be flooded with these type of MS-Only guys/girls and the general momentum seems to want to continue down the path-of-least-resistance and keep to the "well it works in IE or it works in MS-blah" approach. To me this is frustrating since it doesn't take too much effort to creat usable standards compliant web apps even in ASP.Net.
    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  73. Re:from the oxymoron dept... by xbrownx · · Score: 1

    Except that what these interfaces are doing is not documented. .NET developers know how to code against System.Windows.Forms, but no one knows (well, reliabliy) how System.Windows.Forms codes against an OS.

  74. Re:Hah by VirtualAdept · · Score: 1

    Your friend should try removing the third party control from his page, and see if it was caused by them and not ASP.NET Look at the source of the page and you see all sorts of references to a 'componentart' set of controls, which happens to be a third party set of controls.

  75. Re:from the oxymoron dept... by aled · · Score: 1

    Mod parent +1 informative. It's seems a lot of people confuses C# with .Net.

    --

    "I think this line is mostly filler"
  76. Re:Hah by errxn · · Score: 1

    What?!? Brainfuck? Dude, that language sucks! You should try MentalMidget sometime! It does it so much [easier|faster|better]!

    OK, you must *know* you had that one coming...

    --
    In Soviet Russia, Chuck Norris will still kick your ass.
  77. Re:Hah by MyLongNickName · · Score: 1

    Any valid links to download? All three U.S. Mirrors informed me that the file couldn't be located...

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  78. You Are Old And Cranky by tshak · · Score: 1

    OOP as a concept is going to have similar constructs, no matter what the language, right?

    The basic concepts, yes. How the platform or language treats things, not necessarily. Here's a specific OOP example between the latest so called "fad" languages. In Java methods are implicitly virtual. In C# you have to explicitly declare a method as virtual. Prescriptive guidance as to how one should go about determining which methods to mark as virtual is only relevant to one of these languages. So while you are correct that general coding practices are independent of the flavor-of-the-decade language, there are topics which warrant books targeted at specific languages or platforms.

    --

    There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
  79. Re:Hah by exp(pi*sqrt(163)) · · Score: 1, Funny
    I'd still think it were stupid had it been about Python, Java, C++, or [insert language here]
    You're right about that. It only seems funny if you insert C#.
    --
    Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
  80. Re:from the oxymoron dept... by llamaluvr · · Score: 1

    You mean against a window manager, right? I don't see why not knowing the internals matters. Even if it is a black box, the documentation still tells what the code behind the interfaces is supposed to be doing, and, by-and-large, .NET developers can attest that they are at least doing just that. If there's a bug and it doesn't work as advertised it, in the port, fix it. If there's some sort of hidden side effect, in the port, eliminate it. With that, we would have an even better .NET on another platform than we do on Windows.

    --
    Insightful: 76, Off-Topic: 379, Flamebait: 24, Funny: 152, Interesting: 201, Underrated: 55, Troll: 9, Total: 896
  81. Suggest Read - .Net Components by juval lowy by LiquidNitrogen · · Score: 1

    .Net Components by juval lowy

  82. Re:Hah by Neopoleon · · Score: 1

    "well, you have benen a MS flag waver for years, so your opinion on this matter is really biased and should really even be considered"

    Before I was an "MS flag waver," I spent a lot of time with *nix/Java/et al. I was rather anti-Microsoft, actually.

    One of the things that got me into Microsoft was C#. That's part of the reason I defend it.

    My opinion *is* biased, though. I'll give you that. After years of watching people mindlessly trash MS, I've lost a lot of the love I had for open source - at least where /. is concerned.

    --
    - Rory [Microsoft Employee] | Free dirt: neopoleon.com
  83. Re:Hah by Neopoleon · · Score: 1

    "People who take jobs with Microsoft are mostly unscrupulous slimeballs"

    Most, eh?

    Then I suppose you can name a majority of the 55,000 who are "unscrupulous slimeballs."

    I await the list.

    "however taking personal offense at comments about your employer moves you to a far higher level of detestability"

    Aside from the fact that this is obviously flamebait, I'm curious: Why should that "move [me] to a far higher level of detestability?"

    I chose to work for Microsoft because I love the company and the tech. Why shouldn't I defend it?

    Are you wasting away your life doing something you don't believe in?

    --
    - Rory [Microsoft Employee] | Free dirt: neopoleon.com
  84. Re:Hah by Neopoleon · · Score: 1

    "This is "Slashdot"... Get used to it."

    That's a great attitude. Some moderators of one of the world's most influential tech sites mod an idiotic comment as "Funny," and you're content to sit and watch.

    I'd be embarrassed if it were my place, but it isn't.

    However, I *can* say something about it.

    "Oh yeah, and... quit your job and stop f#@$%ing up peoples computers... you and others will feel better about yourself :)"

    Of course. That way my grandmother can boot up to Linux and get started sending those emails... ...as soon as she figures out how to compile her email app.

    Brilliant.

    --
    - Rory [Microsoft Employee] | Free dirt: neopoleon.com
  85. Re:music notation by namekuseijin · · Score: 1

    C# is actually another clever way of saying C++: it comes from music notation. C# is the same black key on a piano keyboard as Db. It mean C one half-tone higher...

    i liked the name, at least.

    But for a real modern OO language, you should try no other than OCaml.

    C# is, just like Java, a simplified C++ with half the performance and flexibility. C++ for the brainless, easily replaceable masses if you will...

    --
    I don't feel like it...
  86. Re:Hah by Anonymous Coward · · Score: 1, Informative

    If MS came through with a standards compliant mode you will see a true nightmare. Since neither IE, opera, netscape or firefox come anywhere near to being standards compliant. So basically your solution is to break it for everyone instead of just a few.

  87. Re:Hah by errxn · · Score: 1

    Are you wasting away your life doing something you don't believe in?

    No, but I'm afraid you are wasting your time feeding the trolls. What you fail to understand is that these idiots have no interest in listening to your point of view or any other argument that is not part of the officially approved Microsoft Bashing Curriculum ®.

    These are the same people who find it horribly offensive that a company should *dare* seek to profit from its work. Of course, they can't make a logical argument as to why, but hey, why bother going to all that trouble when they can get a cheap laugh out of ad hominem attacks?

    It's like dealing with a roomful of third graders who just love to listen to themselves call you a "doo-doo head" over and over again, and the more you protest, the louder the catcalls and giggling gets.

    You obviously have better things to do with your life than argue with these people.

    --
    In Soviet Russia, Chuck Norris will still kick your ass.
  88. Re:from the oxymoron dept... by AcornWeb · · Score: 1

    but I've seen more and more schools replacing VB/Java courses with C# lately

    Well, at least at my school (state school in Colorado) the reason the Java courses are starting to be replaced is because M$ is "suggesting" that the business school teach C# instead of Java. And Microsoft is giving the school money as well as "free" software for the students.

    --
    Your Windows PC is my other computer.
  89. How wide spread is .Net? by geekgeekmarketing · · Score: 1

    I work on consumer applications and would love for our team to be able to develop on .Net, but I have no idea from anyone how widespread it is? I don't think we can get people to download a 20mb framework for a 500k app? .Net has faster dev than C++ or C# due to the available tools, but that's no good if the users won't use it. Any ideas?

    1. Re:How wide spread is .Net? by exKingZog · · Score: 1

      The .Net framework is part of MS' regular patch releases; having checked my dad's XP Home box, the 1.1 framework is installed on it.

      Or if you distribute the app on a CD you could simply include the framework on that, and check if it needs to be installed?

      --
      "If he were a plant, people would roll him up and smoke him."
    2. Re:How wide spread is .Net? by Nick+of+NSTime · · Score: 1

      When you create a setup and deployment project for your .NET application (i.e., an .msi installer) using the Visual Studio .NET tools, the project wizard automatically includes a check for the .NET Framework. At installation, the installer checks for the .NET Framework and if it is not present, the installation wizard installs it. The key is that you have to deploy the .NET Framework merge module with your installer.

  90. Re:Hah by ceeam · · Score: 1

    But there are dangers in going dotnet way and it is certainly not _the_solution_ (or even not _a_solution_) to many programming problems, enterprise programming or not. And certainly that's not the most effective way to get the job done. But there is a very high ad pressure from Microsoft pushing its stuff into every hole and someone should counteract it to maintain some little sense left in current IT "scene". Who else but us? So - just "don't use" is the wrong answer.

  91. Re:Hah by sheldon · · Score: 1

    I got my 'Senior Programmer' title out of a box of cracker jacks.

  92. Re:from the oxymoron dept... by MagicMike · · Score: 1

    Nothing personal, but I don't believe you.

    I was not able to find evidence of any patented work in the Java core libraries.

    Do you have any evidence of this? I would honestly love to see it, as this is one of the things I consider a feature of Java.

    I discount your ECMA standard point because Java doesn't have a standardization problem. It has problems, but that's not one of them.

    The licensing point is granted though. In practice, something like kaffe or gcj has as much clout and respect as mono though - they both require convincing to deploy I'm sure. So its not ideal, but I'm not sure .NET is better.

    So if you want to have a measuring contest, I think it really comes down to patents. Can either vendor stop you from simply reimplimenting the environment even if you aren't attempting to get it certified? If Sun can do that, I'd be surprised, and I'd require proof.

  93. Re:from the oxymoron dept... by Forbman · · Score: 1

    The .Net Framework documentation sucks to use, about like Oracle documentation.

    The information is there, but because the .Net Framework is so ambitious, it really has gone past the ability of the tech writers (or developers) to really get the whole thing, and provide code examples in a meaningful fashion.

    MS' documentation has arguably gone downhill over the last 10 years or so. They have focused more on the tool (new help engine vs Winhelp4) and the file format, and not the quality of what is in the CHM files.

  94. Re:But does it... by aztracker1 · · Score: 1

    Look into using AJAX.Net for providing changes without a full page refresh, ie when I change the dropdown selection for car mfg, it does a postback.. considering the first page is pretty big, this isn't a good thing..

    --
    Michael J. Ryan - tracker1.info
  95. Re:TFAD by aztracker1 · · Score: 1

    On a secondary thought, Portable.Net would probably be more likely to work on your given platform.. probably no porting even necessary.. ;)

    --
    Michael J. Ryan - tracker1.info
  96. Re:Meanwhile... by aztracker1 · · Score: 1

    That's why Novell is putting a lot of time and money into the mono port of C# to *nix?

    --
    Michael J. Ryan - tracker1.info
  97. Re:from the oxymoron dept... by aztracker1 · · Score: 1

    Just to point out, there are other gui interfaces that are cross platform... (gtk#, and wx.Net)

    --
    Michael J. Ryan - tracker1.info
  98. Re:from the oxymoron dept... by aztracker1 · · Score: 1

    Yeah, app/net server apps and services in C# is really nice to work with, especially if you have to do any database or xml work with it...

    --
    Michael J. Ryan - tracker1.info
  99. Re:Hah by Mant · · Score: 1

    To use the old cliche it isn't a bug it is a feature :)

    ASP.NET is supposed to detect the browser, figure out what it supports and then send HTML/CSS/Javascript it can handle. Its all very well saying it should just send standard compliant code, but no browser is completely standard compliant. So your ASP.NET page may not work properly on anything. I think most developers are pragmatic, and want code that works.

    If you can't stand the web controls having a layer of abstraction then you can still hand craft every single bit of HTML that comes out like you could with ASP (and PHP and other dynamic web pages). Like any abstraction layer you trade some control for productivity.

    Now the validation JavaScript in 1.1 is pretty poor. No reason not to send something standards compliant in that case. If you look around on the net there are updated validation controls you can download (some free some not) that will send out better code. Change your machine.config file to treat FireFox as uplevel and away you go.

    It isn't a .net problem, just the implimentation of the standard validation controls. The 2.0 controls are indeed supposed to fix the problem.

  100. Re:from the oxymoron dept... by si618 · · Score: 1

    Maybe it's a Windows limitation?

    Perhaps try running with Mono on windows and see how you go? Just a thought, worth what you paid for it :)

    --
    Sometimes I doubt your commitment to Sparkle Motion
  101. Re:Hah by orderb13 · · Score: 1

    Thank you for pointing that out. NOT A SINGLE DAMN BROWSER WORKS THE SAME! So MS is not the only one to blame here.

  102. Re:Hah by code+shady · · Score: 1

    You're welcome. I actually totally agree with you. The Web Controls SHOULD render 100% compliant html and java script, but unfortuantley they don't hence the browsercaps stuff.

    I have actually toyed with the idea of either writing a new web controls library, that provides the same functionality, but with standards compliant html and css and all that kind of stuff. You could either sublcass each individual contorl (really ugly) or do your own from scratch using the System.Web base classes. In fact, you could probably even look into mono for the source, or at least hack on it there to know you got all the code right.

    It seems like a lot of work, though, and like everyone else I always seem to be short of free time ;) Maybe someone more knowledgeable in the state of the mono web controls could chip in with some more information.

    --
    Look out honey cause I'm usin' technology
    Ain't got time to make no apologies
  103. Re:Hah by LittLe3Lue · · Score: 1

    If you read the other slashdot articles lately, A new greatly improved (from an already great IDE) has been released.

    So it may take a while for Eclipse to be available to download since you, the entire slashdot java crowd, and half the java developement world, are downloading it right now (..trying to..).

  104. Re:Hah by AstroDrabb · · Score: 1

    Good for you fan-boy.

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  105. Re:Hah by AstroDrabb · · Score: 1

    I believe he is/was using their menu control. However, the poor page layout is due to .Net. If you spoof Firefox as IE, the page layout works fine. The page layout is not controlled by the menu control. However, the control is not that great itself. As Firefox, the menu control works but it does not change the cursor to a hand properly as it does for IE. If you change Firefix to spoof IE, the menu looks the same but you get a bunch of JavaScript errors.

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  106. Re:from the oxymoron dept... by MagicMike · · Score: 1

    Fascinating! Thanks for the link.

    These appear as though they may affect any implementation of a JVM as well, so they actually affect a CLR implementation as well, or would if you implemented the techniques.

    Now I'm definitely splitting hairs, but it was my impression that the actual implementation of the .NET classes may run afoul of patents, whereas an implementation of the JDK core classes would not.

    I have nothing to substantiate that though, and I figured while I've got someone who has info on this stuff hanging around, I'd ask if this impression is correct, or whether its just more FUD in a language holy war.

  107. Re:Hah by MyLongNickName · · Score: 1

    Finally managed to download. Looks like they added two US mirrors. Wish they gave you the size of the download before you started though...

    Also, wonder with their 1 million download challenge... I probably show up as seven of them due to failures mid way through.

    Any idea how many developers are using Eclipse?

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  108. Re:Hah by yerfatma · · Score: 1

    Good one. We've been writing standards-compliant HTML, JS and CSS for years and we manage to make it work in IE5+, Mozilla, Safari, etc. And sometimes we even manage it with C#. I appreciate that no browser perfectly supports specs, but most of the divergence is in fairly obscure stuff, which is why it hasn't been fixed (because almost no one is using it, so there aren't a lot of test cases). Saying "No browser supports standards" is FUD.

  109. Re:Hah by Kosgrove · · Score: 1

    It only sends down different HTML if you configure your application to do so. Try using updated settings in your web.config file...

    http://slingfive.com/pages/code/browserCaps/