This is the second part of a tutorial and case study that details how to develop an image processing application with Python. The first article focused on setting up a virtual environment with Pipenv and installing our application’s package dependencies. Subsequent sections also discussed our tool’s command line arguments in addition to some example invocations to demonstrate its usage.
Refer to the content presented in part one to get up to speed on the project. It is comprised of three sections that discuss the following topics:
Python allows development projects to be approached in a goal-orientated way. Programs written in Python are interpreted rather than compiled, which enables features such as dynamic typing and automatic memory management behind the scenes. This means more time can be invested in things like adding functionality and improving an application’s behavior, instead of tedious tasks like hardening code infrastructure and making sure memory is handled efficiently. With this in mind, Python is a great tool for productivity.
This tutorial and case study will detail how to use Python to create an image manipulation tool. …
The Simple and Fast Multimedia Library (SFML) is a cross-platform development library that provides simple APIs for creating games and multimedia applications. SFML can compile and run on Linux, Mac OS and Windows. The project is also working towards being able to compile Android and iOS applications out of the box. On top of this, SFML is written in C++ and provides an easy-to-use C++ interface. Several language bindings also exist for many popular programming languages.
SFML can facilitate the development of large-scale commercial game projects. …
The CMake program makes it possible to write simple configuration files to control a project’s compilation process and generate native build files across platforms. It is also possible to configure the compilation process based on the host system’s environment in a granular way.
This tutorial details how to inspect, configure and output a project’s compiler settings using CMake. We will progress in incremental steps as described below:
This guide details how to turn Vim into a powerful C and C++ development environment. After working through each incremental step you will finish with a Vim configuration and boilerplate C++ project that you can use as a starting point for future applications. The steps presented in this guide will also work with Neovim.
CMake will be used to manage our application build process in a platform-independent way. …
The AWK utility is known for running programs that perform text processing and data extraction, and is often pre-installed on Linux and UNIX based operating systems. This article adopts a hands-on approach to introduce the AWK programming language. Many sample programs are provided as new AWK concepts are discussed throughout. After completing this article, you will have a good understanding of how to write AWK programs to process, extract and report data on your system.
The first version of the AWK language was created at Bell Labs in 1977. The “AWK” acronym is derived from the surnames of its creators — Alfred Aho, Peter Weinberger, and Brian Kernighan — and shares the same pronunciation as the auk bird. The lowercase version, “awk”, refers to the program that runs scripts written in the AWK programming language. …
Productivity tools on Linux often include both a status line and a prompt. The function of a status line is to display important information relevant to the program’s current context; and a prompt identifies where a program is expecting some input from the user. Some good application examples that utilize these features include the Bash shell, i3 window manager and Vim.
Powerline is a program that renders status lines and prompts in a consistent way across multiple applications. The powerline configuration files are modified with JSON to set colors, symbols, and even control the type of content that is rendered on an application’s status line or prompt. For example, we might want the shell prompt to output the absolute path of the current working directory, or have the window manager’s status bar display system information such as CPU loads and consumed memory. …
The Vim text editor is often used as a tool for editing configuration files on a Linux system. For this purpose, Vim does the job exceptionally well by providing unique features such as buffers, macros and bookmarking to name a few.
As well as a text editor, Vim also ships with a built-in scripting language called Vim script. This powerful feature allows developers to extend the functionality of Vim by writing plug-ins that accomplish specific tasks, such as code completion and interacting with the file system. …
Archiving is the process of combining multiple files into a single package called an archive. This archive can then be easily distributed to another machine, backed up in a repository somewhere, or simply kept on your own machine as a way to organize and cleanup your file system. Archives are also an essential component of the Linux ecosystem, because all the software you install via your distribution’s package manager will initially be downloaded as a compressed archive from a remote repository. Therefore, working with archives is an important aspect of using a Linux based operating system effectively.
This article will introduce the standard archiving tool used on Linux — which is the tar software utility — and demonstrate its usage on the command line to create and work with archives, or tarballs. The tar utility is also able to compress an archive via a compression tool. This usage pattern of firstly creating an archive and then compressing it using a compression tool is often adopted for distributing packages remotely. …
Codeblocks is a fantastic IDE and one of the best for C/C++ development on Linux. However, as of version 20.03, codeblocks is still using the GTK2 library to draw its graphical user interface on Linux. As a result, codeblocks may appear to not draw correctly upon installation as most Linux systems now use GTK3 — the newer version of GTK that works slightly differently to its older versions.
To add to the confusion, if you inspect the dependencies of your codeblocks installation, it will appear that codeblocks is indeed calling the GTK3 library, when it is in fact still using GTK2 as its back-end. …
About