Notes Introducing Python as a Programming Language in a Company
5 July 2013 · 4 minute read
My notes from P. Büchelr’s presentation at EuroPython 2013.
Car analogy - people who go to BMW will get different quality than Fiat. Same with software, but not appreciated.
Right mix of people important. Pointless to have lots of all-stars ‘cause they will all have their own idea of how it should be done.
Why Python? Too many languages = uncomfortably hot. Python is platform independent, has big community, good traction/adoption/future plans, good learning curve
- Simple and readable
- Versatile and platform agnostic
- Can be used for web and on client
- Also a philosophy - Zen of Python
How to implement Python? How to manage risks?
- If you take a decision, implement it quickly
- People learn only with real challenges
- Innovation not the same as research. As entrepreneur you must innovate, not research.
- Can’t afford to spend much money on not-financed activities
Choose project and do it with Python
- Project should not be critical
- Not be too small (at least 1 man-year)
- Should not contain complex technical challenges
- Should not contain complex business logic
- Should not be in a risky domain
- Should use easy to use framework (web2py)
- Should be assigned to a specific team, without people who are against the project, with mix of first-movers and conservatives
- Primary goal should still be to finish the project with a profit
Mostly went surprisingly smoothly! Consider the following:
- Python is not Java!!
def my_function() != public int myFunction() Do code reviews! Especially when devs used Java or C# before. Developers coming from VB have less projects.
- Allow refactoring - give your team the time to make their first project perfect
- Enforce refactoring - force your team to make the first project perfect
- Be patient - do not forget that it is new for most devs
- Be strict - you decided to risk implementing the project in a new language, stick to your decision
- Python is agile, use this - with python debug cycle is very quick, use this i.e. in sprint review
- Don’t interfere too much - let your colleagues work on their own, so they learn!
Factors critical for decision about tech to use:
Tech and org factors (reasonable)
- Surrounding systems enforce specific tech
- Base systems used enforce particular tech i.e. Oracle
- IT Departments often proficient on one platform only
- Contracts with vendors or suppliers enforce given tech
- High investments required to change
Human Factors (personal)
- IT Departments often reluctant to change their systems even when outdated or try something new (consider the type of personality who becomes sys admin)
- Management hear saying (we MUST have SharePoint because it will solve all our problems as my friend told me on golf course)
- Internal Politics (we decided that XYZ is the best architecture, we cannot change now)
- Quasi-religious beliefs or important decision makers or influential people (there is no better sport than to provoke a dev by criticizing his language of choice)
The word ‘python’ won’t open doors, but the folowing may:
- Platform independent
- Very fast development cycle - You can even debug and change the code onsite during the sprint review!!
- Completely open source - not owned by Oracle unlike Java, MySQL, etc
- Big community
- Do not force your choice of tech! Remember who is paying!
Fears/questions from customers:
- Fear of Vendor Lockin - most business people know .NET and Java and believe all else a niche
- Fear of Open Source - understandable, many dead open source projects
- Lend helping hand to sysadmin - maybe he used SQL Server and IIS since 199x! Suddenly it’s PostgreSQL and web2py. Help him and he will be a grateful promoter of your technology
- Most problems not technical! remind your customer and your team about this
- Was it worth it?
- Python is well established now
- At moment 4 different projects with Python
- Strategic decision: all individual web projects are done with web2py
- Wherever possible suggest using Python
Q: Tried sales pitch “lets do a prototype in Python first and see if it works”
A: No, but it is a good idea
- Education needs to have a practical purpose, i.e. learn by working on a project
- Good to point out all the great software already available in Python, i.e. 1 line instead of 25 lines - http requests
- If you run into performance issues, do code review, use C and bind to python, etc.