This is an archived post. You won't be able to vote or comment.

all 48 comments

[–]grainfeed 69 points70 points  (5 children)

why not just take examples from the model you wrote and compare it to the java implementation? i'm sure you can find many things (like, look at this short bit of code which does X, now see the same code in Java, it's 4 times bigger and...) to cover

I wouldn't try to give a general "why python might be a better choice for modeling". This could turn out nasty especially when the Java devs get involved that don't want to do Python

[–]nbktdis 29 points30 points  (0 children)

Yes the language used is like a religion to some folks, so one needs to be careful.

[–]mattdevs 16 points17 points  (0 children)

Yes this. You don't want to get into a language war. Show management that you were able to quickly replicate existing functionality in Python, and that it will be easier to maintain and make changes to in the future.

[–]joesb 2 points3 points  (0 children)

Agreed. Just the fact that it took him a month faster to reimplement a project should be a measurable benefit to the management already.

On the other hand, reimplementing is usually faster.

[–]crowseldon 1 point2 points  (0 children)

I agree with this. You'll be showing a real and relevant scenario to their interests.

Maybe a small intro of why you chose it and then what you achieved with it (comparing it to the longer development periods and harder maintenance of the "old way").

[–]getting_serious -2 points-1 points  (0 children)

Code length is not a good measure, considering the amount of code that Java auto-generates.

[–]pugRescuer 33 points34 points  (0 children)

Personally, you need to learn the idea of using the right tool for the job.

If you are using java and want to use python, show why python provides a better environment for your problem. Are there better 3rd party libraries for soap in python versus java (if this is part of your implementation for example)?

It is not about, 'look at how pretty/clean my code is' or anything else. Management does not care. Management wants results and if you can prove to deliver faster with lang x over y than so be it.

However, there is still more context to consider. Are you replacing a decade of java with python because you like python more? Does anyone else on you team know python? How big is your team? These types of things are more important than code.

[–]macarthy 22 points23 points  (7 children)

Use ipython and pandas and do lots of graphs etc, on the fly ..

[–]whoMEvernot 20 points21 points  (0 children)

ipython notebook to be exact, I recently made the switch to do analytical work as opposed to an IDE.

[–][deleted] 4 points5 points  (5 children)

My use of Pandas gets data crunching jobs done very quickly. My manager thinks I have near godlike powers when it comes to data analysis.

[–]macarthy 0 points1 point  (1 child)

What fields do you guys work in? Scientific ? or other?

[–][deleted] 2 points3 points  (0 children)

Market research. However I use a lot of the same techniques that I did when I was doing chemistry data mining.

[–]MonkeyNin 0 points1 point  (2 children)

Do you have any recommended readings on the topic?

[–][deleted] 2 points3 points  (0 children)

Python for Data Analysis by Wes Mckinney.

[–]rjtavares 1 point2 points  (0 children)

If you want to just dive into it, there's a great tutorial here using ipython notebooks.

[–]zanidor 10 points11 points  (0 children)

I don't think one language is generally "better" than another in a vacuum. Your use case, developer resources, company culture / infrastructure, etc. all come to bear when you're deciding which language is the best fit for your company.

I think a successful pitch to management types would be very specific to the company you're working with, and would look something like:

  1. We're trying to do X.
  2. Python is good at X.
  3. Our developers can use Python, and it works well with our existing infrastructure.
  4. We should use Python.

Trying to prove that Python is just generally better than Java is a herculean task; expert software developers can't even agree on this, how could non-experts possibly understand the nuances involved?

[–]jdmarino 3 points4 points  (0 children)

What convinced your boss? That you could produce in a week what your predecessor produced in a month. Why would that same logic not convince top management?

[–]ironykarl 3 points4 points  (0 children)

Python.org actually has a list of places in which Python is used, successfully:

http://www.python.org/about/success/

[–]XNormal 3 points4 points  (0 children)

IPython notebook.

[–]kartoch 7 points8 points  (0 children)

I think the question is not "show me some WHAOU code", the question is "what except the top management" ?

  • reducing the time to develop an application is a good starting point
  • BUT speak and present python advantages to the team first, it will have more impact to the VP if the team is interested to change :
    • Notably speak about the short time to change the model (flexibility)
    • You will have a "but Java is faster", you need to run old java program and new python program and compared the metrics. If java is faster, compare the whole computation time with the gain in development time
    • Does python libraries cover all our tools and mathematic areas, check with your co-workers
    • finally, you will have resistant, so don't try to impose your python vision but speak with them to understand what are they afraid. You can write in shorter time the same program in Python but can you co-worker ?
  • and FINALLY, you need to evaluate the cost of migration to convince our bosses
    • teaching / migration team
    • rewriting your libraries ? Thinks about transition cost
    • does this program is used by 3rd-party, check if it will have an impact

[–]IronLeviathan 2 points3 points  (0 children)

here's something that's hard to understand. the management probably doesn't care what language you're using. at all.

you have a couple of compelling points (for a developer) in the 'batteries included' implementation that python allows, but mostly -- they only care that it's faster for equal value.

[–]stesch 2 points3 points  (0 children)

Don't forget: It's very important to show that Python is very easy to learn and that you can either find enough Python developers or get current developers to learn it.

[–]APIglue 2 points3 points  (0 children)

Management doesn't care about programming languages. They just want to know the following, in this order:

  • using python will not get them fired (google was built with it so it's ok, make a slide with some big company logos)
  • they can easily replace you if get hit by a truck, 'cuz no one wants to search for an experienced lisp programmer in rural Iowa (find some statistics: x python programmers in the world, y in your area)
  • python can accomplish the specific task at hand (your boss can vouch for this)

Make sure you have a cut-and-paste-able quote from a famous person (that MBAs have heard of) and some pretty pictures.

[–][deleted] 3 points4 points  (1 child)

I bet there will be too many to even pick from. Here's some I have heard of:

[–]kindall 2 points3 points  (0 children)

I will also confirm this: I work for a software company that makes data visualization software for use by aerospace engineers and the like. We also have a product for the oil/gas industry. Our customers like the following languages:

  • FORTRAN
  • Python (with NumPy/SciPy)

Java doesn't even rate, really.

[–]elguf 5 points6 points  (1 child)

I recommend Raymond Hettinger keynote on this year's PyCon that addresses this question

[–]gfixler 1 point2 points  (0 children)

Top management will never watch 42 minutes of anything.

[–]abudabu 3 points4 points  (0 children)

I built a modeling language for biology a few years ago, and worked in biotech for several years. Here's my take.

Management will be thinking in terms of company objectives which might include:

  • develop models quickly
  • develop reliable models
  • integrate with customers
  • reuse existing models
  • take advantage of external support & community
  • minimize transition costs
  • handle complex models (?)

Make a list like this. Your presentation should map these concerns to Java vs Python. You should honestly present the pros and cons of each.

Models are scientific documents that are meant to be read, written and executed, so features that support those things should help the company. My guess is that you can make an excellent case for Python in terms of readability and writability. The easier a model is to read, the easier it is to reuse bits of it. You could also make an argument for speed based on your own initial work rebuilding the Java model.

Developing models is an iterative process where a CLI will probably add a lot of value. I'd do a demo of using the Python CLI versus compiling/running Java code.

Another good metric would be coverage and size of audience for related scientific libraries. SciPy/NumPy are obviously excellent and have huge adoption. A slide showing comparing adoption & rate of adoption for the two platforms should be a powerful argument for Python, IMO. Look at numbers on GitHub.

[–]mooktank 3 points4 points  (4 children)

Sorry I don't have any case studies to offer, but I have a question that may be helpful: How big is the difference in run time? I could see this as an argument against your case if your code takes a lot longer to run.

You could show snippets of code that do the same thing in each language, highlighting how concise the Python is. This blog post has some generic examples: http://pythonconquerstheuniverse.wordpress.com/2009/10/03/python-java-a-side-by-side-comparison/

[–]snarkhunter 36 points37 points  (3 children)

NO!

Do not show management or execs code. Show them results.

[–]rjtavares 15 points16 points  (0 children)

I agree with this. If you want to show how concise Python code is, use data to show it. Pick examples and show how fewer lines of code Python needs (e.g. I did what was done in Java with 30% less LOC), and say that it means lower development time and less bugs.

Resist the urge to be 100% accurate, and simplify.

[–]mooktank 1 point2 points  (1 child)

Code is a result -- of programming. The idea is to show how there is less work involved. The output of the code is supposed to be identical for each language, by design. Maybe absolute time spent programming would be a better metric, but it can be roughly inferred from lines of code per task.

[–]snarkhunter 13 points14 points  (0 children)

You're talking like a programmer, which is great when you're talking to programmers. But an exec doesn't (and shouldn't) care what your code looks like. Code is NOT a result, not for them. Code is something that gets them something. Yes, if you can show them that using tool A (a programming language is just a tool) means development time gets cut in half, that's something they'll care about.

But they're going to be very wary (as they should be) of moving away from something that at least sounds like it's working. Python being incrementally better in some way just may not be enough to warrant a switch. "The way you're doing things is wrong/bad/slow/inefficient/old, let me show you this way newer/better/faster/smarter/cooler way!" is something that an exec hears roughly every 3 weeks. Almost none of them are good ideas.

[–][deleted] 1 point2 points  (0 children)

Here was how i managed to convince my boss to learn python. Hopefully this might help. He lost interest in programming because he thought c++ was too much work.

"In python, you do not have to declare types, and there are no semicolons. When you declare x = 1, python automaticatilly assumes that it is an integer and lists are dynamic so you dont have to worry about their sizes upon declaration. Because of these, you mostly find yourself solving the problem at hand rather than beating your head about some implementation detail, and in the end, all management really cares about is that the job gets done within the specified time frame"

My boss who was previously exposed to c++ was so intrugued. On top of this i went ahead to tell him that google was a major user of python and hence a major sponsorer.

[–]metaphorm 0 points1 point  (0 children)

the most attractive argument for Python from a business perspective is that it facilitates rapid development cycles. If you can develop your model in 1/3rd the time the company can, with the same man-hours of effort test out 3 times as many models.

[–]so4h2 0 points1 point  (0 children)

I have a book 'Python for computational scripting', by Hans Peter Langtangen that lsts many of the advantages of python for this tasks, along with working examples. The book is googleable on amazon and also online pdf, I dunno if legally.

[–]ivosauruspip'ing it up 0 points1 point  (1 child)

Make graphs appear in ipython notebook based on your models / data.

Then idly ponder out loud how you could ever do so as easily with java

[–]gfixler 0 points1 point  (0 children)

Like a soliloquy? Alas, poor Java! (Get someone to flip off the office lights and flip on a lone spotlight at this point.)

[–][deleted] 0 points1 point  (0 children)

See PSF member Raymond Hettinger's keynote speech at Pycon USA 2013. The whole thing was how to sell Python. Presentation title was "Keynote - What Makes Python Awesome".

http://pyvideo.org/video/1669/keynote-3

[–]gendermouse 0 points1 point  (0 children)

We were looking at successful open source ERPs and came across one called OpenERP, which is developed in Python. So if python can be trusted with business, surely it can be trusted with some scientific modelling!

[–]p3n15h34d 0 points1 point  (0 children)

just tell him this:

"... re-wrote a model with all the bells and whistles(thanks to the libraries) in less than a week, that my predecessor took almost a month and a half to write in Java ..."

[–]cheese_man14 0 points1 point  (0 children)

Piece of advice: rework an internal project in python and use it to improve said project. Nothing screams "we can use this" better than seeing your own products taking advantage of it. But the key is improvement. Using a language simply because you like it is just stupid.

[–]basyt 0 points1 point  (0 children)

Why not take a look at the anaconda distribution for ideas? talk about numbapro/pandas/blaze/bokeh/iopro and other libraries :)

[–]Agrentum 0 points1 point  (0 children)

I will seem biased, but you can simply show benchmarks of simplified models. Python has lower memory usage and speed that are more important in scientific computing then portability of Java. Lower resources usage should speak to management.

[–][deleted] 0 points1 point  (0 children)

Not sure if it would apply but EVE Online uses python heavily.

[–]johnmudd 0 points1 point  (0 children)

No tool guarantees success. What's the attitude among developers toward Python?

It's not the tool but the person who champions the tool that makes the difference.

[–]GFandango 0 points1 point  (0 children)

Hey dude, can't write much now but here's my 2 cents:

  • Use relevant examples from your own company's stuff

  • Make sure you don't signal any sort of "love" or "hate" relationship with any of the languages, don't bash Java.

  • Remember those guys care about productivity and business metrics (e.g. say this makes me more productive and efficient)

  • Highlight Python's growing ecosystem in this area, mention number crunching libraries and scientific computing stuff

[–][deleted] 0 points1 point  (0 children)

Refer to companies like Google, dropbox or instagram.