-
Notifications
You must be signed in to change notification settings - Fork 1
/
introduction.tex
14 lines (8 loc) · 3.77 KB
/
introduction.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
\section{Introduction}
\label{sec:intro}
The Python programming language has seen broad recognition in the last decade among scientists and academics, being one of the most popular languages in astronomy\citep{Robitaille2013} and for educational purposes\citep{guo2014python}. It is highly trusted in corporative environments as well as a tool for scripting, automating tasks and creating high level APIs and wrappers.
However, the current situation of scientific codes is still delicate: most scientists and engineers that write numerical software (which often features a strong algorithmic component and has tight performance requirements) usually do not have any formal training on computer programming, let alone software engineering best practices\citep{Wilson2014}. In fact, in the Aerospace industry there is a sad track record of software failures\citep{albee2000report,lions1996report} that could have been avoided by following better software and systems engineering practices.
When selecting a certain programming language for a specific problem, we as engineers have the obligation to consider as much information as possible and make an informed decision based on technical grounds. For example, if defect density were to be selected as the single figure to rank the contenders, well-established languages for space applications such as FORTRAN or C would perform worse than functional languages such as Haskell or Erlang\citep{Ray2014}. Another common misconception is to assume that each language features certain properties, while languages are abstract specifications and language \textit{implementations} are the concrete systems we can measure. Other metrics that could be taken into account are readability and programmer productivity, specially considering that "programmers write roughly the same number of lines of code per unit time regardless of the language they use"\citep{Wilson2014}.
In this paper we claim that the Python programming language, with the aid of both young projects and solid, well tested libraries, can be an optimal solution for the prototyping stage of the development and a fair complement to traditional alternatives in the production stage, in terms of performance, availability, maturity and maintainability. As a demonstrator we selected basic problems in Astrodynamics and compared the performance of existing FORTRAN or C++ implementations with our new Python implementations, comparing them in terms of code complexity and performance in section~\ref{sec:python}. Our Python code is available as part of the \verb|poliastro| package, an open source Python library for Astrodynamics and Orbital Mechanics focused on interplanetary applications and released under the MIT license\cite{Cano2016}. As a complement, in section~\ref{sec:interface} we present an overview of the techniques that can be used to use code written in Fortran, C/C++, Java and MATLAB from Python, and their advantages and tradeoffs.
%While we promote the advantages of Python as a numerical computing language, we also recognize the tremendous value and expertise already present in mature, battle-tested programs and libraries. In fact the scientific Python community is the best example of how to combine both compiled and interpreted languages.
To conclude, we remark that \verb|poliastro| and many other software packages would not be possible without the vast number of open source projects that lay the foundations for present and future work. Other authors have highlighted the potential of open source in the aerospace industry in terms of software reusability and collaboration between academia and private companies\citep{Ziemer2012}. In section~\ref{sec:development} we comment the practical outcomes of this philosophy, the challenges that need to be solved and its potential ramifications for the Aerospace industry.