views:

285

answers:

12

I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python?

+1  A: 

I would not convert unless you are converting as part of an enterprise-wide switch from one language to another. Even then I would avoid converting until absolutely necessary. If it works, why change it?

Randolpho
+13  A: 

Quote: "If it doesn't break, don't fix it."

Unless your company is moving towards .NET and/or there are no more qualified Python developer available anymore, then don't.

Adrian Godong
Since Python is so easy to learn, the bar for "qualified" is pretty low. You should be able to teach almost any programmer Python in a few weeks.
S.Lott
+6  A: 

Leave them as Python unless you hear a very good business reason to convert.

Matthew Flaschen
+8  A: 

There's IronPython , a python implementation for .NET. You could port it to that if you really need to get away from the "standard" python vm and onto the .NET platform

nos
+3  A: 

If you're the only Python developer in a C# shop, then it makes plenty of sense to convert. If you quit tomorrow, no one will be able to maintain these systems.

Triptych
although keeping them in Python would aid in job security.
Jason Miesionczek
It would also aid in keeping you at your current job-level. You can't be promoted if they still need you as a low-level code-monkey.
+4  A: 

Changing languages just for the sake of changing languages is rarely a good idea. If the app is doing its obj then let it do its job. If you've got a corporate mandate to only use C#, that may be a different story (estimate the work involved, give the estimate to management, let them decide to pursue it or write up an exception). Even if there isn't a strong (or any) knowledge of Python across the organization, developers are rather proficient at picking up new languages {it's a survival thing}, so that tends to be less of a concern.

Moral of the story, if an app is to be rewritten, there should really be more of a justification to do the rewrite than just to change languages. If you were to add features that would be significantly easier to implement and maintain using another languages library/framework ... good justification. If maintaining the environment/framework for one language is causing a significant operational expense that could be saved by a re-write, cool. "Because our other code is in c#" ... not cool.

James Conigliaro
A: 

i will convert it from language a to language b for 1 million dollars. <--- this would be the only business reason I would consider legit.

Tom Willis
+1: When the boss says "too much", then you're just haggling over price, which leads to the business question of "how much is it worth to convert?" This response leads to the proper analysis more quickly than some others.
S.Lott
thanks, i was hoping someone would get that. remember kids, the same six sigma crap they shove down your throat you can use against them. :)
Tom Willis
+1  A: 

As long as the application is running fine there is no reason to switch to C#.

Andrew Marsh
A: 

The only thing I can think of is the performance boost C# will give you.

Geo
Premature optimization is the root of all evil. If performance is really an issue here, he could first look at Psyco or possibly C extension modules.
Matthew Flaschen
I was just giving telling him what C# could give him. Python can be optimized without having to resort to C#.
Geo
A: 

Some reasons that come to mind:

  • Performance
  • Easier to find developers
  • Huge huge huge developer and tools ecosystem

But I second what the others have stated: if it ain't broke, don't fix it. Unless your boss is saying, "hey, we're moving all our crap to .NET", or you're presented with some other business reason for migrating, just stick with what you've got.

Judah Himango
+1  A: 

IF you are looking for reasons to convert them, I can think of a few. These don't necessarily mean you should, these are just possible reasons in the "recode" corner.

  • Maintainability

If you have a dev-shop that is primarily C# focused, then have python applications around may not be useful for maintainability reasons. It would mean that they need to keep python staffers around (assuming it's a complicated app) in order to maintain it. This probably isn't a restriction they want, especially if they don't intend to write anything in python from here on out.

  • Consistency

This sort of falls under maintainability, but it is of a different flavour. If they wanted to integrate part of this (python) application into a C# application, but not the whole thing, it's possible to write some boilerplate code, but again, that's messy to maintain. Ultimately, you would want to code of P_App to be able to be seamlessly integrated into C#_App, and not have to run them separately.


On the other side of the coin, it is fair to point out that you are throwing time and money at converting something which already works.

+1  A: 

Short and to the point answer: No, there is no reason.

Lennart Regebro