My boss has tasked me with a re-write of our intranet website. The existing system is very old PHP that doesn't use a framework. My preference is strongly to do the rewrite in Python and Django but my boss does not like Python syntax (he is also a developer). I'm on the opposite end... I don't like developing in PHP and my PHP experience is extremely limited but I've done a lot of work in Python. My boss is aware of my experience but still wants me to sell him on Python.

Some of the things he mentioned he does not like about Python:

  • indentation is the only marking for the begin/end of a code block (he loves his curly braces)
  • documentation issues (I told him python documentation is great)
  • IDE support is limited (mentioned PyCharm and Wing IDE, not sure which is better)
  • he's had compatibility issues moving between older versions of python

He may be the only other pair of eyes on the new code. How can I convince him that Python is a better choice? Is Ruby a potential middle ground?

  • 3
    I think his points are valid. I'd suggest actual semantic differences. – Paul Nathan Feb 20 '12 at 18:55
  • What is "a different framework"? CakePHP? Symfony? CodeIgniter? Flow3? Those would be the 4 high quality PHP frameworks that spring to my mind immediately, all of which are approximately in the same league with Django. If you want your boss to write in a language that he's not comfortable with, you're gonna have to try a little harder. My personal suggestion is haXe, but that's probably going to be quite a learning curve for both of you. – back2dos Feb 20 '12 at 21:39
  • 1) Different framework is probably Yii or CodeIgniter, would be my decision. 2) He's done development in Python before and is at least familiar with the language. 3) He will not be touching it and has said that if it's done in Python then I will "own it." Most of our devs know/use Python as well (including him) so I don't really understand that. – Corey D Feb 20 '12 at 21:45
  • 4
    If your boss doesn't like Python and or know decent IDE for it, then it's rather safe to assume that he doesn't have solid experience with it. Solid experience as in "having used a language on daily basis in large scale projects for several years". My guess is, that he does have that kind of experience with PHP, which means that if you were to leave the project (for whatever reason), then in the PHP scenario he is far more qualified to continue the project or find someone suitable. Letting you do this in Python presents a risk that has to be outweighed by verifiable advantages. – back2dos Feb 20 '12 at 22:10
  • 1
    the same way you would win any other religious argument, because nothing you say he holds up are technical, they are personal beliefs, plain and simple. – user7519 Feb 21 '12 at 21:20

How can I convince him that Python is a better choice?

You can't. All of your boss's complaints are trivial matters of personal preference.

  • He loves his curly braces. Python uses significant whitespace, which not everyone agrees with. However this is personal preference.

    You can show that everyone does indentation correctly. You can find people who will tell you that they can't indent properly. Even though all of their code is indented correctly.

    In PHP you're going to indent correctly anyway.

  • Documentation issues? What can this even mean? If you boss perceives Python documentation as less good than PHP, this, too is a lost cause. It's just perception.

    You can show the entire Python library documentation set. They can then say it's too big. Or the wrong color. Or the wrong font. There are always new "documentation issues".

  • IDE support is limited? Yep. If they've decided it's limited; you'll have a hard time.

    You can show Eclipse or Komodo. Even if you show how Eclipse works, your boss will (eventually) notice that an IDE for a dynamic language doesn't do code completion well and complain.

  • He's had compatibility issues moving between older versions of python. There are issues with Python 3, but 2.7 should be around for more then enough time.

    Even if you get the specific example of incompatibility, you can't go very far down this road. They'll merely say that the Python 3 lack of backward compatibility is a deal-breaker.

    Every language, platform and operating system has compatibility issues from time-to-time. You can find (and document) a dozen PHP compatibility issues (starting with the PHP5 issue) and that won't convince anyone who's in favor of PHP and not in favor of Python.

If your boss doesn't like Python, nothing will change their mind except an epic failure using PHP. And it has to be an epic failure that stems -- directly -- from the use of PHP.

Consider this actual quote from an actual question.

I've already dabbled into Python and bought books, but I found its syntax too abstract (too much like pseudocode) and too strict.

Python is both too flexible and too strict. At the same time.

Is Ruby a potential middle ground?

Middle Ground? The idea doesn't make sense. It's all or nothing for a particular technology. Finding something like Ruby that neither of you like is awful.

If you really don't like PHP, consider finding another job where you don't have to use it.

  • Most of my work is with C++ development, this is an internal side-project. We actually use Python for some stuff. I'm hoping I can show him something in an IDE today. – Corey D Feb 20 '12 at 18:48
  • @S.Lott: Please take further discussion to chat.stackexchange.com. Thank you for your cooperation. – Josh K Feb 23 '12 at 21:19

How can I convince him that Python is a better choice?

It seems you're having a battle of personal preferences with your boss. You havent provide here a single reason why, from a business & development perspective, you think Python would be better than PHP. So if you want to work in Python, provide those reasons. And I'll give you a hint - that you simply prefer the syntax isnt a valid business reason. He obviously prefers PHP's syntax, and the tie breaker usually goes to the boss...

  • The reasoning is simple: I have a lot more experience with Python development. PHP is riddled with inconsistencies including inconsistent naming conventions between (and sometimes within)libraries, inconsistent case sensitivity, weak typing, lack of namespaces, uninitialized variables working silently... – Corey D Feb 20 '12 at 19:56
  • 1
    And the boss's reasoning is simple, he has a lot more experience with PHP. So its a tie. You're just giving your personal preferences (PHP's 'inconsistant' parameters, which have never slowed me down one bit, are just syntax, and as I said, thats not much of a business reaons). Provide an actual reason that relies on something other than what you like. What can Python do that PHP cant do? If you cant answer that, then your argument is weak, or perhaps you're simply wrong. – GrandmasterB Feb 20 '12 at 20:51
  • "What can X do that Y can't" is not a compelling argument. 10 years of experience with a language is. – Corey D Feb 20 '12 at 21:09
  • If you need to do X, and only Python can do it (or do it significantly better than PHP), its a good argument. If you need to do X, and both python and php can do it just as well, and your boss prefers PHP, you're losing the argument. If you didnt want people's opinions, and only wanted people to co-miserate with you, go post on facebook. – GrandmasterB Feb 20 '12 at 21:37
  • 3
    What about the fact Python is widely used in numerous fields, statistics, desktop applications, system applications... PHP is only widely used as for Web work. – NoBugs Nov 26 '14 at 2:58

I'm a Ruby developer, but I've dabbled in both Python and PHP too. I love S. Lott's answer, but I thought I would add some of my own thoughts.

I find that convincing people who are like your boss is much easier when you go beyond the technical capabilities of what the language/framework provides.

For instance, you could demonstrate that the language (and the community around it) allow for better maintenance of code, better practices (enforced by a framework, usually) and developer happiness (how much does hiring people suck?).

If you put it in terms of also how much money would be saved over the long run by not maintaining a crufty PHP no-framework solution and instead re-writing it in a Python+Django one, I'm sure that could convince him also.

If he's still quite stubborn in his choice, then I hear there's other people looking for developers.

Lastly, I don't think Ruby is a "potential middle ground", but rather more of an alternative to Python+Django. Many of the arguments that would convince somebody of using Python could also be used to convince them of Ruby.

My personal preference is, of course, Ruby. Mainly due to the religious adherence to best practices such as test driven development and constant striving to be better at the language. Oh, and everyone is so damn nice. Like, Canadian-nice.

But that means naught in this context. It's totally up to you what language you will convince your boss to use.

  • If we went with PHP we'd be using a framework. The re-write has already been OK'd. I've never used a PHP framework. Wrote one quick page in PHP a few years ago, my "real" PHP experience is from almost 8 years ago. – Corey D Feb 20 '12 at 21:39

Well, the IDE issue is easy to address. Eclipse with the Aptana 3 plugin is a fine Django IDE. It even has syntax highlighting for Django templates.

Backward and forward compatibility issues are of course not unique to Python or Django. If this is a concern, however, then you might consider Web2Py instead of Django. Web2Py makes it a goal to always maintain backward compatibility, and has since its release in 2007. It still works with Python 2.5 (which was released in 2006) too.

Documentation for Python's standard and third party libraries are indeed usually great. I really can't address your boss's problems with it until I know where the problems are coming from.

  • "can't address your boss's problems with it until I know where the problems are coming from". Good point. – S.Lott Feb 20 '12 at 19:10

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