views:

1129

answers:

9

I have been trying to make a case for using Python at my work. We use C# and ASP.NET for basically all of our development. 80% or more of our projects are web applications. It seems natural that we would look at some of the nice dynamic web languages (Ruby, Python, etc), and with things like IronRuby and IronPython, I started seriously investigating.

I love Python. It's a beautiful, expressive language. It's a joy to code in, for sure. The multitude of python modules and frameworks make it very appealing. Problem is, I cannot think of any specific problems, any specific hurdles that would require a language like Python. ASP.NET gives us RAD, it gives us a full-featured framework and all that good stuff. Also, we all already know C# and have lots of projects in C#, learning a new language just because doesn't quite work.

Can you guys help me think of something to finally convince my boss to really learn Python and start using it on projects?

Edit: I know that no problem requires only one language, I just meant, are there any specific problems in which dynamic languages excel over static languages.

Edit again: Let me also mention that my boss prompted ME to investigate this. He has put aside hours to research these languages, find a good one, learn it, and then figure out how we can use it. I'm at the last step here, I do not need a lecture on why I should consider my motivation for changing something my company does because they do it for a reason.

+12  A: 

Almost no problem requires a specific programming language, that's just not how things work.

The easiest way to get a new language into an environment like yours is to start a new work project in your own time in the new language. Make it do something you need doing, and write it on your own time. Use it yourself, and other people will probably notice it. They then say "Can you send me that program?" and boom, they're using your new language.

If you really want to something, I would probably write a site in Django, simply because its admin interface blows everyone away.

The main point to remember is that if you start using python, that's one more thing everyone else has to learn, and it's another bullet point that will need to be on every prospective employee's resume. That can get expensive, and management won't like it.

Harley
+1: "no problem requires a specific programming language". Feel free to drop the "almost".
S.Lott
Are there any specific problems that are addressed better, easier, etc by Python, though? I know that no problem <b>requires</b> a language, that is not what I meant, I just meant what are some common "hurdles" or, whatever, that dynamic languages can do better than static languages.
goldenratio
There's definitely things that are easier to do in python, the question is "Is it easier to learn a completely new language than just implement it in what we know?"
Harley
I should also mention that in my previous position I did implement a Django site and multiple python programs in a .Net environment, and while it was great for me, and the company benefited considerably, once I left they were in a bit of a bind, and had they known what I was doing when I started...
Harley
...they probably wouldn't have gone along with it. By the time they realised half the company depended on python...well, half the company depended on python.
Harley
+27  A: 

"Can you guys help me think of something to finally convince my boss to really learn Python and start using it on projects?"

Nope.

Nothing succeeds like success. Use Python. Be successful. Make people jealous.

When asked why you're successful, you can talk about Python. Not before.

Choose projects wisely: things where a dynamic language has significant advantages. Things where the requirements are not nailed down in detail. Things like data transformations, log-file scraping, and super-sophisticated replacements for BAT files.

Use Python to get started doing something useful while everyone else is standing around trying to get enough business and domain information to launch a project to develop a complicated MVC design.


Edit: Some Python to the Rescue stories.

And that's just me.


Edit: "boss prompted ME to investigate", "figure out how we can use it" changes everything.

The "finally convince my boss to really learn Python" is misleading. You aren't swimming upstream. See How Do I Make the Business Case for Python for the "convince my boss" problem. The edit says you're past this phase.

Dynamic languages offer flexibility. Exploit that. My two sets of examples above are two areas where flexibility matters.

  • Requirements aren't totally nailed down. With a dynamic language, you can get started. Rework won't be a deal-breaker. With Java (and C++ and C#) you are reluctant to tackle devastating design changes because it's hard to break everything and get it to compile and work again. In Python, devastating changes aren't as expensive.

  • Design is in flux because you can't pick components. You can write Wrappers and Facades very easily in Python. It's a scripting language. And, Python modules compose into larger aggregates very simply.

  • Coding is in flux because requirements and design keep changing. It's scripted -- not compiled. You just make a change to the code and you're off and running. Testing is easier because the work cycle is shorter. It isn't code-compile-build-test it's code-test.

  • Testing is in flux because the requirements keep changing. Same as above. The work cycle is shorter and faster.

S.Lott
Thank you this was a great post. For some reason I could never find any information on what things dynamic languages did better, if you know of any blogs or articles that talk about the many things dynamic languages do better I'd love to have them!
goldenratio
+3  A: 

Can you guys help me think of something to finally convince my boss to really learn Python and start using it on projects?

Unfortunately, the answer is no. As Harley said, no problem is going to require a specific language. The approach Harley suggested is also a good one. Learn on your time, build an useful app on your time, and maybe, just maybe, someone at your work will want to use it, like it, love it, then want to learn more about it.

Another approach you could take is to get a better understanding of why your company uses .Net (therefore, Windows Server, and probably SQL server) for nearly all development. Once you have a good understanding of why they aren't open to other languages, then you have some fire power to build a business case for the "why not?".

Why pay licensing costs when you have tools that can accomplish the same things? There are free alternatives out there, like Python, that run on free servers.

Why not give your team the chance to grow their professional tool-belt? This is my opinion, but a good developer is a developer that isn't afraid to learn new ways of doing the same thing they've done before.

But, in the end, I wouldn't get your hopes up. Bottom line, it costs money to introduce a new language/environment into an IT shop. Whether it's software, training, or employee rollover, there is a business reason behind utilizing a single language for a company, and sticking to it.

I'm in the exact scenario you're in. I work in a .Net shop, and that's not going to change any time soon. I get by, by working on my own projects in my "free" time. I enjoy it, and it makes for a good balance.

Hope this helps.

levi rosol
+2  A: 

Take a step back, and look at your approach. "I know what I want the answer to be, but I can't find any evidence to support it."

Despite the fact that Python is my current first choice language, I am afraid I find myself on the side of your boss! Sorry.

I think you should open your mind and consider all the options from the stance of your organisation's best interest, and see if you don't come to a different conclusion about the best language.

There are many factors in the choice of language, and how pretty it is is a fairly minor one. The availability of staff is a key one. The cost of retraining, availability of the libraries and meta-tools, performance, etc. etc.

Once you have taken into consideration all the different factors (and not just "Oooh! It'd be fun!") and made a balanced assessment (rather than a predetermined answer), you may find that your boss is more willing to listen.

p.s. The suggestion to secretly use Python for work code, and leaving the company with a terrible code debt in a language they are not prepared for seems very unprofessional to me.

Oddthinking
Oh, well I should mention that my boss prompted ME to investigate this, but I am on his side, and I need a reason to use it first. I'm not trying desperately hard you know, I just really like python and it would be neat to use it at work. But yeah he asked me about it, and has had me learning it...
goldenratio
...for a few weeks, I'm just looking for you know, the things I don't know yet about the language.
goldenratio
+6  A: 

Sneaking a language in is often done by automating tedious manual tasks (especially dynamic/scripting languages like Python/Ruby etc). Set it up so something like deploying builds, or shuffling backups, or whatever is done with Python.

Then casually slip in how easy it was to do, and try to spread some of the enthusiasm around.

Acceptance and awareness should slowly grow from that, and before you know it, management is seriously considering Python for a new project.

madlep
+2  A: 

The best leverage you're likely going to have is tools and libraries; as others have pointed out, no language is required to solve any particular program. So let's look at Things You Can Leverage Using Python:

  • Google App Engine
  • SciPy
  • pywinauto
  • django

Those are off the top of my head; finding what's applicable to your team and your company is left as an exercise for the questioner :)

pjz
+1  A: 

Well, here's a view of why Python programmers make better Java programmers; the concepts are much the same as for your situation.

Essentially, people who learn a language because they want to show that they enjoy programming, like to learn new things, and are more likely to think outside the box.

...if a company chooses to write its software in a comparatively esoteric language, they'll be able to hire better programmers, because they'll attract only those who cared enough to learn it. And for programmers the paradox is even more pronounced: the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job.

Not only that, but Python enforces "good looking" code and you don't have to do the whole code/compile routine. With IronPython, you can simply code in Python and use it as is; just another .NET tool.

crystalattice
+1  A: 

The language is almost never the key to success. Good programmers can be successful in a variety of languages, and you'll find successful projects in almost any language. You won't find the failures that much because those projects just go away never to be heard of again. If you're looking for a new language because you don't have good programmers, even the best language in the world isn't going to help.

And, you haven't said anything about the sort of work you're doing. Python might be a good choice because it has well-supported and widely-used libraries that are critical for you. On the other hand, C# might have better support for the stuff that you want to do. A tool outside of context has no intrinsic merit. You might love screwdrivers, but that doesn't help you row a boat.

If you want to use Python, or any other language, just because you like it, be honest with yourself and those around you. It looks like you've made a decision to switch, don't know why you are switching, and now need to rationalize it with reasons that had nothing to do with your desire to switch. If you had a good reason, you wouldn't be asking here :)

That's not entirely a bad thing, though. Programming is a human enterprise. If the programmers (at whatever level) insanely love a particular language, no matter how stupid the reason, they are probably going to produce more. It's just not a technological solution though.

Good luck, :)

brian d foy
+1  A: 

Python got a good start in the Java world as Jython for unit testing. In fact many Java people started using it first that way. Its dynamic scripting nature makes it a great fit for unit tests. Just yesterday I was wishing I could use it or something like it for the unit tests I was writing for a VB.Net project. I'd have to say that it isn't so much about the individual language IronRuby or IronPython as it is about the style of development that they enable. You can write static language like code in either but you don't fully reap the benefits until you can start to think dynamically. Once you grasp those concepts you'll start to slowly change the way you code and your projects will require less classes and less code to implement. Testing, particularly unit tests will become a must since you give up the warm blanket known as a compiler with type safety checks for other efficiencies.

Sam Corder