3 Applications
3.1 Embedded Devices
Across industries more and more robotic devices are in use for automation of manual tasks. Most of this is done using assembly languages and C/C++ by embedding the final machine code in the robotic device itself.
3.2 Operating Systems
Major commercial operating systems like Microsoft Windows, Apple Mac, Linux based distributions are built with C/C++.
There a lot of Linux and GNU/Linux based operating systems, built by various communities of developers and commercial organizations, available for free.
An operating systems can be understood as 2 main parts, a kernel and applications. Kernel manages and provides means for applications to interact with the hardware. Applications provide the user interface, e.g. file manager, terminal, shell, media player etc.
Unix was a commercial operating system. Linus Torvalds developed a kernel based on Unix and provided it for free. Independently, Richard Stallman established GNU, which developed most of the applications needed for an operating system. There are several other foundations which create free software like KDE. Mixing these allowed creation of free operating systems commonly referred to as Linux or GNU/Linux operating systems. Linux in general refers to any operating system using Linux kernel as its base, applications can or cannot be from GNU’s collection.
Mobile devices have their own operating systems like Google’s Android and Apple’s IOS. These are written in multiple languages but use C heavily.
OS provides a default set of operations to interact with the hardware. There are several smaller applications to interact with components of hardware
- input devices: keyboard, mouse, camera, microphone
- output devices: display, speakers
- network devices
- hard disk: file system
All the smaller applications are glued by the kernel and a graphical user interface is provided to interact with the hardware. This is done through desktop applications like file manager, text editor, photo viewer etc.
3.3 CLI = Terminal + Shell
Terminal is the first layer of interaction provided by the os. Terminal is a text based user interface (tui) application which hosts a shell program. Shell program is an interpreter running the commands written in shell language. Terminal and shell programs are mostly written in C/C++ too. Terminal and shell together provide the command line interface or CLI. CLI is covered in detail in Tools part of the book in Chapter 5.
3.4 Desktop applications
Examples of desktop applications are the file manager, media viewer etc. A desktop application is simply a program that can run on the os and provide means to perform certain tasks.
Some are provided by the os as default applications while others like Adobe’s Acrobat, Photoshop etc. are provided by companies. In addition individual developers and group of developers can provide desktop applications through Windows app store or Apple store. Linux distributions have their own app stores.
Microsoft Office applications (word, excel, powerpoint, access database) are written in C/C++.
LibreOffice is the free version of Microsoft Office which is developed using multiple languages like C++, Java, XML, Bash, SQL, etc.
3.5 Databases
Databases are applications which specialize in storage, maintenance and operations on data. Most of them are built using C or C++.
Name | Type | Free | Language |
---|---|---|---|
MySQL | SQL | Yes | C, C++ |
PostgreSQL | SQL | Yes | Multiple |
Redis | NoSQL, Key-value | Yes | C, ANSI C |
SQLite | SQL, Embedded | Yes | C |
Cassandra | NOSQL, Wide-column | Yes | Java |
Oracle database | Multiple | No | C, C++, Assembly |
SQL Server | SQL | Mixed | C, C++, C# |
Microsoft Access | SQL | Mixed | C++ |
MongoDB | NoSQL, Document | Mixed | Multiple |
3.6 Websites
Web technologies have become popular with the creation and development of browsers and web networks.
- Front end (GUI) is based on HTML, CSS and JavaScript
- Backend functionalities: like databases, analytics can be developed in language of choice
In practice there are many frameworks available for development which provide standard templates of pre built code for different functionalities.
Name |
Description |
---|---|
HTML |
Markup language to structure user interface structure and text |
CSS |
Responsible for the user interface styling |
JavaScript |
Responsible for the functionality behind web pages, e.g. click button actions, form submissions, … |
TypeScript |
Stricter version of Javascript which is static typed |
How do browsers run code?
Browsers are primarily running JavaScript using their own set of mapping engines.
Earlier the browser JavaScript engines were using interpreter approach but now have shifted to JIT approach like Java.
- Google Chrome: V8 engine
- Mozilla Firefox: SpiderMonkey
- Apple Safari: JavaScriptCore
- Microsoft Edge: Chakra
3.7 Mobile Applications
Mobile applications for Android and IOS are like desktop applications but designed to use limited resources of mobile. These are primarily oriented to use touch input.
Google play and Apple store host applications developed by companies, individuals and group of developers.
3.8 Data Analysis
With the continuous increase in volume of data collected, data analysis & visualization, artificial intelligence, machine learning are getting developed and used heavily for analysis and decision making.
Python and R are the languages used in this field as there is a lot of dependence on scientific computing, statistics and math.
Basic data analysis is helpful for everyone using technology across all domains.
Chapter 25 introduces data analysis in more detail.
3.9 Automation
3.9.1 Documentation
There are tools like Quarto available to automate documentation in multiple output formats. Quarto is based on Pandoc which is an application written in Haskell programming language for conversions between different markup languages. Quarto uses Pandoc’s markdown syntax which makes writing documents as easy as writing text in a word processor or notepad. Content once written can be exported to different formats, html based website, pdf, word etc. This book has been written using Quarto.
3.9.2 System tasks
Shell and Python scripts are used to automate a large number of system tasks both for personal and official work.
Task can be as simple as creating a backup of your important files to more complex tasks to create templates of a project or task which you can create with automatic time and date stamps and other content pre-filled.
This book therefore introduces system task automation later as an application of programming.