Writing a convenient and decent-looking wrapper for working with transactions is a favorite pastime for many developers. Transactions must be able to start, finish and rollback properly, and they can also be nested. Python is a multifaceted language (or, as speechwriters say, “Multi-paradigm”), giving us innumerable ways of doing it.

As a foundation, I usually use Python DB API (namely, psycopg2 module). The API itself is rather low-level and is crying for improvement. What can be done?

Initially, let’s just make an ordinary decorator for opening and closing a transaction:
Read more »

We have customers and partners in different countries, and not all of them can comfortably communicate in English. We use trac for bug tracking and documentation. So we wrote and maintain a plugin for trac, that uses Google Translate to translate ticket descriptions and user comments to the language specified in the user preferences.

Translate
Translation

The plugin home page.

Please try it out!

In continuing our tradition of “in simple words about complex”, and considering we do a lot of work on projects related to video content on the Internet, I want to address some questions about codecs and containers we get from our clients.

We’ll start with the fact that media information (video and audio) must be saved in a digital format, and it would be good if it were saved in a compressed format. Codecs do this (codec, coder-decoder). They convert media information into digital streams and back.

codecs

It shall be said that formally, codecs are the implementation of a coding/decoding standard, or in other words, a program or algorithm. Still, codecs are sometimes referred to as the coding standard.
Read more »

A couple of months ago we started experimenting with Balsamiq Mockups. It’s a compact and very simple program with which to build wire-frame models of user interfaces. By way of example, below is one of the screens that we have drawn using it in Russian.

Sample Balsamiq mock-up

When we started to experiment with Balsamiq I could not have imagined how much this program would affect our development process and how many radical changes it would bring.
Read more »

In life, it’s always more complicated to display and process digital video than digital photo:

  • Video content takes up much more space.
  • Manipulating videos (compression, scaling, recoding) requires far more resources than converting photos.
  • Due to its size, video traffic far surpasses that of all other resources and still requires good bandwidth.

Typical video hosting (like YouTube) allows for:

  • Video uploading
  • Videos to be shown in different sizes/formats

However, making video uploads fast and efficient, like photos on Flickr, just doesn’t work. Hosts never save original videos, and to properly display them, it’s necessary to convert (transcode) the video to different formats: for Flash-players, mobile phones, iPhone/Android, etc. This transcoding requires a lot of processing time. This is why all video hosts have a queue, where uploaded videos await processing.
Read more »