I'm planning on writing an open source HTML parsing library in .Net so that I have a project out in the wild when I start looking for developer jobs. Now, in my Masters program I started learning Java and found that I like it as well and was also thinking that I could also write the library in Java at the same time, to improve my Java skills at once. Would that be advisable? Does the fact that Java and C# are similar languages play into the decision to do two libraries at once? My main concern is instead of having one great library, I end up with two mediocre libraries. Being new to development, are there any other pitfalls I should look out for? Also would having the library on the JVM and .Net work to my advantage any more than just one of those platforms when it comes to future employers?

I did see this question, but my motivations aren't the same and I plan on releasing this code as well, so I'm not sure if the answers will differ.

  • 4
    HTML is complex. There are existing solutions for both Java and C#, and presumably quite robust code in the existing open-source HTML rendering engines. How are you going to improve on them? Commented Jun 10, 2011 at 20:47

4 Answers 4


If part of your purpose is to help you find a job, I think the answer is easy. Focus on the language you prefer most (C#, it seems) and make a great library for it. Once you are finished, and perhaps once the library is in active use, then consider porting to Java.

Something to consider: the expectations of Java and .NET devs are different. If you develop both at the same time, you may make your Java library ".NET-ish" or vice versa. That would potentially be a drawback for someone looking to use it.

I'm all for learning. Just tackle one at a time. Play to the strengths of the language chosen.

  • 1
    +1 I would agree. Develop one (c#) then port to the other later. Not at the same time. If you need to redo algorithms in one, you don't want to have to redo both.
    – MrWhite
    Commented Jun 10, 2011 at 23:51
  • +1 Thank you for your input. I definitely didn't consider the different approaches that Java and .Net developers may take.
    – Jetti
    Commented Jun 11, 2011 at 3:50

Nobody should start to undertake a large project. You start with a small trivial project, and you should never expect it to get large. If you do, you'll just overdesign and generally think it is more important than it likely is at that stage. Or worse, you might be scared away by the sheer size of the work you envision. So start small, and think about the details. Don't think about some big picture and fancy design. If it doesn't solve some fairly immediate need, it's almost certainly over-designed. [...]
- Linus Torvalds

You should focus on designing and implementing one good solution and as soon you have something up and running, this will create a feedback loop, that will allow you improving design quality.
Once you have have a good design, porting is actually straight forward.

I've elaborated on this a little more in response to a different question.

As for employment: You should rather consider contributing to a popular open source project in the field you prefer being employed in. From the perspective of an employer it shows two qualities:

  • You master a popular open source project in the field. This is know-how your employer gets when hiring you.
  • You are able to work in a team. You're not just a reinvent-the-wheel kind of guy, you can also work with code of other people. Since about 90% of programming is maintenance programming, this is actually a key quality as opposed to the "let's rewrite all from scratch"-mentality we all tend to.

Writing a library is incredibly difficult - far more difficult than writing an application. A library is something that will be used in thousands of weird situations by thousands of weird people. It will need extensive documentation so those weird people can use it in the first place. And it will need a gigantic test suite so all those situations can be validated.

Now, does doing this twice, at the same time, make sense?


Rather than try to develop in two languages simultaneously, you could write in one language, and write a compiler that can compile/convert it into other languages.

Something like Joel's Wasabi: http://www.joelonsoftware.com/items/2006/09/01b.html

  • So is Wasabi a great idea, or is he just following what he learned at MSFT (and he learned a lot from them)?
    – Job
    Commented Jun 11, 2011 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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