blog / source / en_posts / 2012-07-12-regular-python-engineer.rst

Full commit
 Regular Python Engineer Skills

.. warning::

   This post is still in-progress. Please be patient and don't read it
   if you are lazy to re-read it when it's ready. When I'm finished, I
   will publish it on hacker news, reddits and so on, and if you are
   interested -- you will probably won't miss it.

.. note::

   In my company HR's saw a problem that there's very often case when
   some person is hired to a position of regular developer (that
   should be able to handle most of future project work by himself)
   with comment "he's cool, but has serious gaps in XXX". I was asked
   to write a document that would cover some most often basic
   knowledge areas for people who want to become regular python
   engineer. So, based on that comments, I'll try to write that doc. I
   believe it's best to show it to community, otherwise it would be
   just a wase of time.

.. note::

   You can improve this document by either writing a comment, or
   creating a pull-request to `this post's source

This document aims to cover different gaps that regular engineer might
have, and ways to improve them in most common aspects. This document
is incomplete and should be updated with missing common needs for
regular python engineer.

Most of topics should cover lots of practical impact of typical python
engineer's tasks (also some topics assume web and can be skipped if
it’s not). Of course, list of literature is incomplete and should be
considered as a hint or starting point.


Literature, libraries and software

- `Testing topic on Django docs
- `Mock library <>`_
- `Testinc topic in Flask docs
- `Selenium Simple Test <>`_


- What is functional/integrational/unit-testing? Describe the
  difference, needs and common problems.
- What are mocks? What’s they’re purpose? How do you use them?


Imagine you have function create_consumer from module
```` that looks like this:

.. code-block:: python

    # module proj/consumer/

    from proj.consumer.model import Consumer
    from import send_welcome_email
    from import add_company_employee

    def create_consumer(email, password, company=None):
        consumer = Consumer(email, password)
        if company is not None:
            add_company_employee(company, consumer)


Write such unit-tests for this function that make sure:

- consumer gets created
- ``add_company_employee`` gets called when company is not ``None``
- ``send_welcome_email`` gets called with consumer as parameter

Clean Hypermedia API Design

Literature, libraries and software

- `Nobody Understands REST or HTTP
- `Some People Understand REST and HTTP
- `Classification of HTTP-based APIs
- `http-headers-status.png


- Describe main REST principles and restrictions.
- How would you implement flight ticket-ordering API?
- Why would it be bad to implement API via ``POST


You need to design API for your bookmarks list. Each of your bookmarks
has these fields:

* id
* title
* url
* tags
* date_created
* date_modified

Show how to list bookmarks. Add pagination, filtering by tags and

Environment, Deploy & Automation

Literature, libraries and software

- `virtualenv <>`_
- `PEP 3333 -- Python Web Server Gateway Interface v1.0.1
- `Fabric <>`_
- `Deploying with Fabric
- `Gunicorn <>`_


- What is virtualenv? Why would you need it? How do you use one?
- What is WSGI? Why was it invented?


Create a small hello-world project, serve it, write a deploy-cmd for

Algorithms, complexity

Literature, libraries and software

- `Hash table <>`_
- `B+ tree <>`_
- `B+-Tree Indexes
- `Python dictionary implementation

Databases, indexes, query profiling