Python Programming - Rules / Tips for Enterprise Software Development in Python?

I am a somewhat advanced C ++ / Java developer who recently became interested in Python, and I really like its dynamic typing and efficient coding style. I am currently using it for my small programming needs, such as programming riddles and scripts, but am I curious if anyone out there has successfully used Python in an enterprise-quality project? (It is preferable to use modern programming concepts such as OOP and some type of design pattern)

If so, please explain why you chose Python (in particular) and gave us some of the lessons you learned from this project? (Feel free to compare the use of Python in a project against Java, etc.)

+7
java python programming-languages design-patterns dynamic-typing
source share
2 answers

I use Python to develop a complex underwriting application.

Our application software essentially repackages our actuarial model in a form that companies can subscribe to. This business is based on our actuaries and their deep thinking. We do not pack a smart algorithm that is relatively fixed. We rent our actuarial brains to customers through a web service.

  • Actuaries should be free to make changes as they gain a deeper understanding of the various factors that lead to claims.

    • Static languages ​​(Java, C ++, C #) lead to early blocking in the data model.

    • Python allows us to have a very flexible data model. They are free to add, modify or delete factors or sources of information without the high cost and complexity of development. Duck print allows us to introduce new fragments without a lot of rework.

  • Our software is a service (not a package), so we have an endless integration problem.

    • Static languages ​​need complex display components. Often such a customizable, XML-oriented mapping from client messages to our ever-changing internal structures.

    • Python allows us to display mappings as a simple Python class definition that we simply customize, test, and put into production. There are no restrictions on this module - this is first-class Python code.

  • We must make extensive, long-term proof of concept. They include numerous “what-if” scenarios with various data channels and customizable features.

    • Static languages ​​require a lot of careful planning and thinking in order to create another demo, another mapping from another client-supplied file to the current version of our actuarial models.

    • Python requires a lot less planning. Duck stuffing (and Django) allows us to knock out a demo without any problems. Data mapping are simple python class definitions; our actuarial models are in a fairly constant flow state.

  • Our business model is subject to certain coordination. We have rather complicated contracts with information providers; they do not change as often as the actuarial model, but changes here require adjustment.

    • Static languages ​​are associated in assumptions about contracts and require rather complex projects (or workarounds) to process the brain bundles of business people who are negotiating deals.

    • In Python, we use an extensive set of tests and do a lot of refactoring, as various contract terms and conditions flock to us.

    Every week we have a question: "Can we handle a position like X?" Our standard answer is "Absolutely." An hour of refactoring followed to make sure that we could handle it if the deal was hit in this form.

  • We are basically a RESTful web service. Django does a lot of this. We had to write some extensions because our security model is a bit more rigorous than the one that Django provides.

    • Static languages ​​should not send source code. Don't like the security model? Pay the provider $$$.

    • Dynamic languages ​​should be supplied as a source. In our case, we spend time carefully studying the source of Django to make sure that our security model is suitable for all other Django. We do not need to comply with HIPAA, but we build it anyway.

  • We use web services from information providers. urllib2 does it beautifully for us. We can prototype the interface quickly.

    • With a static language, you have an API, you write, you run, and you hope this works. Development cycle - "Edit", "Compile", "Build", "Run", "Failure", "View Logs"; and that’s just to sizzle the interface and make sure that we have the protocol, credentials and configuration.

    • We implement the interface in interactive Python. Since we execute it interactively, we can immediately examine the answers. The development cycle boils down to Run, Edit. We can pop up the web services API in the afternoon.

+16
source share

I use Python as a distributed computing environment in one of the largest banks in the world. It was chosen because:

  • It had to be extremely fast for developing and deploying new features;
  • It should be easily integrated with C and C ++;
  • Some parts of the code had to be written by people whose specialization was mathematical modeling, and not software development.
+3
source share

All Articles