Contrary to what Juan Sánchez Villa-Lobos Ramírez might say, when it comes to programming languages, in the end there cannot be only one.
While large categories of software solutions are possible with C++, Java, Python, and other languages, there are cases where one specific language is far superior – or even required.
Before I continue, I will fully admit that there are ways to pervert most languages to serve beyond their intended purposes. That said, such implementations have drawbacks. The extent and tolerance of the drawbacks is left as an exercise for the solution architects.
I’ve worked on a number of offerings over the past 3 years in the gig economy. Being a multi-lingual programmer has made those projects robust, performant, and maintainable. Here are a few project examples and why the language(s) were chosen.
The primary goals of the project were to handle an unknown volume of asynchronous streaming data into the server, parse and store the relevant content, and serve a rich progressive web experience to mobile devices and modern browsers.
The PHP API layer was chosen for simplicity and ability to scale based on user traffic.
The backend server was written in C/C++ because it needed to be incredibly efficient and small while handling multiple asynchronous tasks. The server was deployed on AWS and the cost of operation would be a direct factor of resource utilization. C/C++ made it easy to implement multi-processing, handle inbound socket traffic, data processing, and database I/O.
Industrial Design Prop
The primary goals of this project were to implement a prop from the storyline and have it perform the actions described for the character.
Since this was a physical prop, it had very specific hardware constraints. The hardware needed to fit within the prop and all all functions needed to execute on a small (postage stamp size) micro controller.
The project was written in C/C++ because it is the standard for the micro controller and because of the significant volume of support libraries, and developer community activity. The fastest way to complete a project is to leverage existing resources.
The physical elements – mechanical and electrical – were also chosen for their level of community support.
FYI – this example is “vaguely named” because the project is still in post production as of this writing.
Hawkeye Pi Camera
The primary goals of this project were to implement a modern camera with a nostalgic feel and a collection of unrelated photographic modes While retaining a familiar experience.
The physical camera was modeled with the visual cues of the 1950’s Kodak Hawkeye Brownie. This allowed for considerable flexibility with the electronics. The need for a digital camera module drove the electronics decisions and a Raspberry Pi was used. This handled the camera, a printer solution, audio sounds, and wireless interface.
The software was fully written in Python with a few supporting Bash scripts to automate startup, shutdown, and networking.
Python was chosen because it was the only single language with well documented, robust libraries and online tutorials for the various individual subsystems – camera control, button interface, printer interface, sound playback, and indicator lights.
Other languages had examples for some of these subsystems but tying them all together was fast, using Python.
Python handled the multithreading requirements easily and initial implementation of all subsystems started and a cut/paste exercise from various online articles, examples, and tutorials. Over the course of the project, nearly all of the code became original source As the concepts behind each example was learned and the integrated implementation was optimized.
Proof of the flexibility of Python was demonstrated repeatedly with the addition of significant different capabilities were added – e.g. a photo booth mode, streaming webcam, mobile web browser administration, and a unique spoken menu system.
In each of the above examples, the solution drove the language choice. The depth and breadth of the developer community drove the level of effort and thus the schedule.
In large organizations, the efficiency of the language and its direct applicability to the target solution often takes a back seat to non-technical requirements. As a member of the gig economy, it’s crucial to remain flexible – both to match the clients requirements as well as to make the client’s schedule.