Skip to content
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.

Coding philosophy

Shrikrishna Holla edited this page Dec 16, 2013 · 1 revision

This is an open project. So input and contribution is always accepted, and encouraged.

Though this project is being developed to build an end product that makes our lives easier, the very geeky nature of the end users gives some freedom to explore crazy ideas. So, for a change, in this project, over-engineering is encouraged! So, dear contributor, feel free to spread your wings and add the most awesome feature you can think of. It will be merged, as long as it doesn't hit performance in the shins

Now that your attention is captured, here are the coding philosophies that we will adhere to:

  • Make everything modular. So that when the next best thing comes in, old one can easily be substituted with the better one.
  • Don't waste time. The main process is single threaded. So any execution cycles wasted will cause a visible effect on everything else. So every blocking operation should strictly be asynchronous and as far as possible, functions should exit as soon as possible. No looping constructs allowed.
  • Computation intensive tasks should be executed in worker processes. If possible, complex CPU intensive tasks must be performed in a distributed manner. This is where Celery comes in
  • Functionalities must be implemented in tools that are best suited for them. For example, to implement Natural Language query processing, NLTK is used because it is known to be best suited for it.
  • If communicating with different technologies, suitable adapters must be written. For example, in case of NLTK, it runs in Python. An adapter needs to be written over an existing library that communicates with python processes. (This is because, even if that library is replaced, the programming interface is not changed)
  • Then there are JavaScript code conventions to follow
Clone this wiki locally