Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I've been a .NET developer for about six years. In those six years, I've worked at exactly one .NET shop that followed any kind of actual design pattern or industry best practice. That realization has frustrated me where I'm at the point of considering making a switch to Java and leveraging my C# experience because the Java community seems to have a larger handle on proper software engineering than the .NET community, which seems more focused on RAD techniques and quasi-procedural code and don't want to improve at all.

For example, the average Java shop is probably using an MVC framework like Spring, Seam or venerable old Struts, is using Hibernate, is probably writing unit tests, knows how to use source control properly, and while there's the danger of the architecture astronaut is more than likely applying design patterns and following good practices like the SOLID principles.

In contrast, the average .NET shop uses untyped DataSets, writes all the code to solve a problem in event handlers of WebForms, thinks testing means loading up the built-in web server and playing with the application, if they use source control at all use something like Visual SourceSafe and think it's great, and has no idea what the single responsibility principle even means or why it's a good thing. Attempts at introducing things like ORMs, design patterns, unit testing is usually met with a blank stare or outright rejection due to not even understanding why those things are better than the debugger or writing code in an event handler of a widget - it's like talking to a brick wall.

I am aware of "ALT.NET" (I follow it myself), but I am finding an environment that knows about that, let alone follows it, and it seems to be like finding needle in a haystack, and trying to change an organization to use it has always ended badly for me, to the point where I've actually been shown the door and let go for wanting to do things better than the company had been doing before I joined.

Would there be any benefit at all to my trying to leverage C# skills and make a transition to Java? I'm running out of options trying to find a .NET shop that actually follows real software engineering concepts instead of just throwing out code, and I'm starting to think my chances of finding that kind of place will greatly increase if I'm not using a technology stack that pushes the opposite as the right way.

share|improve this question

closed as not constructive by GlenH7, gnat, Walter, Glenn Nelson, ChrisF Jan 1 '13 at 23:07

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

The grass is always greener my friend. – Steve Evers May 18 '11 at 19:04
"Would there be any benefit at all to my trying to leverage C# skills and make a transition to Java? " Yes. No. Which would make you happier? We can provide justification for either choice you want to make. Or. Do you need help flipping a coin? Heads. – S.Lott May 18 '11 at 19:07
What makes you think that java shops inherently use better software development practices than .NET shops? This is a people problem, not a technology problem. – Ed S. May 18 '11 at 19:15
There is Rails but the OP needs to see if there are jobs for it. As much as I like using Rails there are literally zero jobs in my area so I can't recommend it unless he wants to strike out on his own. – Wayne M May 18 '11 at 19:15
@Wayne M: Want to back that up with, you know, evidence of some sort? Any shop is perfectly capable of writing piss-poor Java/Python/Lisp/whatever. It's not a cultural thing in the .NET community. – Ed S. May 18 '11 at 19:48

7 Answers 7

I'm inclined to say "Yes", but your mileage may vary of course. I do admit rather sadly that .NET tends to foster a lack of knowledge of basic software engineering, mainly because of the influx of Visual Basic 6.0 "programmers" and the like who jumped to .NET. It's the sad reality of being a .NET developer that most of the time you're going to be working with people who haven't heard of those things, because the .NET culture doesn't exactly encourage it and the ALT.NET "movement" is still miniscule and not well known.

IMO, the bigger thing you should be looking at is what the demand is for Java in your locale. Because it's ubiquitous, Java development positions are easier to be offshored or outsourced, so before you take any plunge make sure you aren't switching to a platform that has no jobs in your area. For instance, where I live is almost 100% .NET jobs; there are extremely few Java jobs and the ones that are posted normally want several solid years of Java/Java EE experience for consideration. Even if I wanted to, it wouldn't be prudent for me to switch to Java, because I wouldn't be able to get a Java job if I did.

share|improve this answer
Pretty sure Jeff Atwood, the guy that like ya know... wrote this site was a VB guy for a long time. That said, Java is definitely taught at more universities than C# I would imagine, but a CS education does not a good developer make. – Nodey The Node Guy May 19 '11 at 19:11
I would consider Jeff Atwood the exception and not the rule. I have found many bad .Net people who are just completely ignorant of anything remotely resembling good development practices. Usually as the OP indicated they know how to use DataSets and write code in a code-behind event and that's it - trying to explain design patterns or the SOLID principles or interfaces over implementation gets a "deer in headlights" look. – Wayne M May 19 '11 at 19:16
Yeah, I can see that and have definitely experienced it as well just saying it's not good to single out one group of developers as being less skillful than others. I'm sure there are many Java developers that suck too, or PHP script kids, it depends on the person not the stack. – Nodey The Node Guy May 19 '11 at 19:30

I'm inclined (having made the switch in the opposite direction) is that your mileage may vary. Both languages are very similar, but arguably C# has more language features. You won't have access to LINQ, and you'll trade one set of partially consistent APIs for another (both have inconsistencies).

Your complaints are mostly around the software development process. There is no reason why you can't architect a good .NET web application. You can use ASP.NET MVC for a good MVC framework, and NHibernate if that floats your boat. You can use NUnit for unit testing. All of these things (except NHibernate, we're using other ORM tools) are happening at the shop I work in.

Reasons for switching to Java:

  • You want to learn the language and satisfy some curiosity. Nothing but good comes from playing around like this.
  • The number of .NET jobs in your area is rather small, but the number of Java jobs is much larger.

Reasons not to switch:

  • The average Java shop does X, and the average .NET shop doesn't. Quite frankly, there are just as many Java shops that violate good programming practice as .NET shops. Maybe more since the Java market is still bigger (for the moment).
  • Microsoft sucks, and I don't want a platform controlled by one vendor. Well, Java is controlled by one vendor: Oracle (used to be Sun). You can deploy in more environments, but Oracle is as much a dictator as Microsoft.

If your chief complaint is the poor programming practices at your current job, you have a couple options:

  • Try to make incremental changes to improve the situation. With every important Java library, there is a .NET equivalent. JUnit -> NUnit, Log4J -> Log4Net, Hibernate -> NHibernate, Spring -> Spring.NET, etc.
  • Give up at that company and find one that does more of what you expect of good engineering practices.

Honestly, I've found that with the right attitude and some quick wins (like unit testing) that have measurable results--most companies are willing to give a new technique a shot. Especially if it saves them money. The more improvement your changes have, the more they will trust you. Just don't try to overhaul everything in one day or you will be met with serious opposition by your peers.

share|improve this answer
To be fair the OP didn't say he's only worked at one .Net shop, he said he's only worked at one that cared about quality; presumably all the rest did use things like raw DataSets, no unit tests, no design patterns, and the like. – Wayne M May 18 '11 at 19:39
Ok. I misread that. The rest of the observations still apply. They aren't all bad--and the Java side just looks better. When you dig in, you'll find there's a lot of talk and a lot less action. – Berin Loritsch May 18 '11 at 19:40
The more offbeat the technology, the more likely those who use it are good. Java isn't very offbeat, but I'd suspect the barely competent people nowadays tend to move into VB.NET and C#.NET. There's a lot of awful good C#.NET people, but there's still probably a disproportionate number of bad ones. Given a company that doesn't know how to do software well (and most have other proficiencies) and a readily available pool of less competent people, it's easy to wind up with a badly run department. – David Thornley May 18 '11 at 20:00
One thing I noticed is that .NET shops often mandate everything must be done in .NET (very few allow power shell) while many Java shops also use Unix and allow Python/Perl/Shell scripts for getting things done.... – Cervo Aug 3 '11 at 0:01
+1 for pointing out that Java is controlled by Oracle. Most people misses this, and Oracle is in no way a "friendlier" company than Microsoft. – Konamiman Oct 13 '11 at 15:53

I've been exposed to (worked at, interviewed for, or was acquainted with developers from) 5 development shops since I started developing in .Net. Of those 5, one was bad, one was good, two were great, and the 5th awesome. If the shops you've worked at are really as bad as you say they are, then I'd imagine that one of the following applies:

  • You're not very good at finding good shops
  • development in general is bad in your area

How are you looking? (and how many shops in 6 years have you seen?) You will probably find the best opportunities through networking. Do you attend local .net meetups, or otherwise attempt to network locally? No local .net meetup? then start one. You sound like you've got the skills and attitude, maybe there is a hole you can fill if .Net talent really is that bad in your area.

I would also suggest looking for a small shop that you can change... that can't possibly be bad for your career.

Edit: Oh yeah, and put your location in your profile... you just may be contacted by an mildly offended .net developer who is part of a professional .net development shop.

share|improve this answer

I completely agree with @jlnorsworthy, I've worked with good and very bad java developers over the years. I've seen the same trend in .NET. I've worked in shops which were split between java and C#. One thing holds true a good developer is a good developer programming language aside. Perhaps in your locale, the training for developers is perhaps very poor hence the poor quality. The distinction between java and C# isn't such that either developer would be greatly superior to the other. The only language which this could be true is C/C++ developer, they have deal with aspects us runtime framework developer e.g. java and .net would even realise exist, such as real memory management. We runtime developers don't realise how hard it used to be writing a simple app. I've done java and C# commercially, there mostly the same simple holding your hand modern 3GL.

"Struts, is using Hibernate, is probably writing unit tests, knows how to use source control properly" wow. I'm working for a big .NET shop with about 500+ developers across numerous business units. We definitely follow patterns, using TFS and I've seen approaches I never thought possible with .NET. I'll give ideal how structured the environment I work in. Everything runs autmotically through build servers, we don't deploy anything manually, to dev, test and production. Even a shared framework in pulled to our local machines via powershell scripts. All projects are MVP or MVC with unit tests, and shared database framework project. Actually we can't even checkin if a unit test fails, policy of TFS applied.

share|improve this answer

You can almost think of Java-the-language as a subset of C#. There's not really much to learn there (aside from a few semantic differences). However, you would do well to learn about the JVM as a platform. There's a lot of good stuff going on there that has resulted in a very solid and dependable place to build software. There's no such thing as "DLL hell" on the JVM, because you really have a tremendous amount of control over the environment.

The other JVM languages, like Clojure and Scala, are also really great, and (as good as F# is) blow away the CLR competition when taken as a whole. I really think that the JVM is still a better platform than the CLR.

All that being said, a better career move might be to look at something like Python or Ruby (not the J- or Iron-varieties!) in order to get a taste of some popular dynamic languages and non-managed/VM development.

share|improve this answer
Except for enum and anonymous & non-static inner classes. – SLaks May 19 '11 at 18:13
I think you're making a great point here. The language is Java vs C#, but these two are very much alike, Java being a subset mostly. On the other hand, the platform is way more important. How does the CLR perform, where can it run, what features does it have over JVM, or lacks. I'd add to platform .NET/WinForms/WPF verus Java EE/Swing/SWT, etc. What core libraries are availaible in one versus the other, and what core frameworks. Here's a good comparison of the platform on wikipedia: – Didier A. Oct 29 '14 at 19:44

I made this switch when I moved from MS to Amazon. Actual practices aside, Eclipse doesn't hold a candle to the VS experience when it comes to development/support/debugging/out of the box magic. I default to vi most of the time because of this. You should be ready to get used to this.

But what is indeed cool about Java is the maturity / open nature in the industry around it. Java is mature enough that most of your problems usually have an alternative. If you get into trouble with GC in C# for example, you are pretty much screwed, but in the Java world you get options to manage memory off the heap (BigMemory). And the community is your typical Linux vs. MS dev community.

Finally, most of the stuff you use will be open source when you switch over to Java stack. The other day when I got stuck in hibernate with some weird issues around UserVersionType, all I had to do is to dig through hibernate code to see how they handle it. This is a MAJOR advantage compared to the closed source setups like LINQ. Make the switch, I don't think you will feel the loss of C#'s great language capabilities in light of the other advantages of Java.

But again, the more I use managed languages, the more I see myself migrate downward towards plain old C due to the amount of esoteric magic you run into in the advanced stacks. I can summarize like this: For Business development in a collaborative setup, the advanced stacks - especially Java really stands up. For quick development when you know your problem domain is limited and all you need is rapid devleopment, stay with C#. For systems development, go back to C/C++.

Caveat: I moved out of .NET world about 2 years back when all the "Foundation" code were still in development and LINQ had just been introduced. So things might have changed now.

share|improve this answer
The source code of some of the .NET framework is publicly available (I don't know inf LINQ is included): – Konamiman Oct 13 '11 at 15:57
By "out of the box" you obviously mean once R# or CodeRush has been installed and your machine upgraded to quad core, 32GB RAM. The range of refactorings and debugging aids in Eclipse such as Hot Code Replace simply have no equivalent in VS. BTW I've used VS for 15 years and have recently started with Eclipse again, got no agenda in favor of Java/Eclipse. – Ash Sep 8 '13 at 7:39

In New York it certainly seems like it is much easier to find Java shops with source control, unit testing, and some process than it is to find .NET shops. There are some .NET shops which are like this, but many more which reading the ad (and even inquiring) are the just get it done yesterday no matter what, without much thought given to keeping the code maintainable.

Also many of the startups seem to use Java as opposed to .NET (probably licensing costs) although there is one notable exception I have seen where they use .NET and are proud of it. And based on their ads/what people say, it looks like a great place to work. The problem is what to do for your next job....

Additionally many of the PHP/Ruby/Python/Perl shops are willing to accept Java experience (per the job ads). Since in New York recruiters/HR are often between you and the job (unless you have a great network) lack of Java/PHP/Ruby/Python/perl experience gets your resume tossed... On the West coast this would seem not to matter as much since many jobs are phrased x years object oriented programming experience.

share|improve this answer
I am pretty sure that 'licensing costs' will not be a main concern for anyone reasonable. – Boris Yankov Oct 13 '11 at 15:51
In FL where I am, there's almost no Java at all (at least not advertised). It's all .NET and most of it is really horrible .NET, I'm talking like .NET 1.0 or 1.1 style code. No idea of design patterns, no clue at all what SOLID means, no understanding of anything other than double-clicking a widget and calling a stored procedure that returns a raw dataset and reads it with the old ds.Tables[0].Rows[0]["COLUMN"].ToString() syntax. – Wayne M Oct 13 '11 at 20:03
@WayneM that is exactly the problem I have with most .NET companies. Java seems to have many more people committed to MVC via Struts/Spring MVC or some other library. As well as a lot more using JUnit for unit testing, Spring for Dependency Injection, Hibernate (or EJB Persistence) whereas .NET seems to have a lot of mix everything together and get it done reading datasets directly. With .NET it doesn't help that data binding encourages tightly coupling datasets to the front end controls directly.... Plus many .NET apps have a lot of business logic in stored procedures... – Cervo Oct 14 '11 at 1:43
@Boris you'd think that, but I work (until Friday) at a giant financial company and licensing costs their are the reason there is no DEV/Test environment for some tools. And for a while we had to remote desktop to a slow machine to use visual studio/sql management studio prior to them properly licensing the software. Meanwhile their Java team has test servers/dev servers out the wazoo running Linux/Java/JBoss/etc.. go figure. – Cervo Oct 14 '11 at 1:47
@Cervo I think it has to do with the fact Java is/was strongly grounded on open source technologies like Spring/Struts (some kind of framework) and Hibernate, and is well grounded in the use of design patterns. .NET evolved primarily from VB6 which eschewed all those things to push "RAD" techniques and quick and dirty development. It makes me wish there was Java jobs because I'd probably be happier writing Java, simply because I wouldn't be the only person in a company to understand basic software engineering principles. – Wayne M Oct 14 '11 at 12:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.