Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Create a patch for LibreOffice directly in gerrit

    Possibly, you are a great C++ developer or conversely you write your first strings in C++ and you want make LibreOffice better with pair (or more!) string of code.
    We'll suppose you already know what strings and in which file(s) of the LibreOffice source code you age going to change.
    I'll talk here about using gerrit for that change making.

  • Multiple screens support in Qt for Android

    It has been a while since I last wrote about Qt on Android, mostly because the things were quite, a few bug fixes here and there but no features that it worth to mention. Today I have a pleasure to tell you about multiple screen support in Qt for Android.

    This feature is very useful for apps that can use a second screen (e.g. your big screen TV, the rear sit screen of your car, etc.) to present their content. These apps can be anything from a photo viewer, or an Impress(PowerPoint) presentation to a game*. The phone usually turns into a remote control for the application on the second screen.

    Before we proceed I want to highlight the fact that this is work in progress and hopefully it will be part of Qt 5.12 release (at least as a private API).

    Traditionally Android had only one screen (your phone) but starting with API 17, they added support for multiple screens.

  • A better Toolforge: upgrading the Kubernetes cluster

    One of the most successful and important products provided by the Wikimedia Cloud Services team at the Wikimedia Foundation is Toolforge. Toolforge is a platform that allows users and developers to run and use a variety of applications that help the Wikimedia movement and mission from the technical point of view in general. Toolforge is a hosting service commonly known in the industry as a Platform as a Service (PaaS). Toolforge is powered by two different backend engines, Kubernetes and GridEngine.

    This article focuses on how we made a better Toolforge by integrating a newer version of Kubernetes and, along with it, some more modern workflows.

    The starting point in this story is 2018. Yes, two years ago! We identified that we could do better with our Kubernetes deployment in Toolforge. We were using a very old version, v1.4. Using an old version of any software has more or less the same consequences everywhere: you lack security improvements and some modern key features.

    Once it was clear that we wanted to upgrade our Kubernetes cluster, both the engineering work and the endless chain of challenges started.

    It turns out that Kubernetes is a complex and modern technology, which adds some extra abstraction layers to add flexibility and some intelligence to a very old systems engineering need: hosting and running a variety of applications.

  • 8 CI/CD best practices to set you up for success

    Continuous integration (CI) and continuous delivery (CD) are usually associated with DevOps, DevSecOps, artificial intelligence for IT operations (AIOps), GitOps, and more. It's not enough to just say you're doing CI and CD; there are certain best practices that, if used well and consistently, will make your CI/CD pipelines more successful.

    The phrase "best practices" suggests the steps, processes, ways, iterations, etc. that should be implemented or executed to get the best results out of something like software or product delivery. In CI/CD, it also includes the way monitoring is configured to support design and deployment.

    [...]

    Incorporating telemetry, a "highly automated communications process by which measurements are made and other data collected at remote or inaccessible points and transmitted to receiving equipment for monitoring, display, and recording," is one option to build continuous metrics, monitoring, and alerting into your CI/CD pipelines.

    [...]

    Best practices around responding to failure should be built into a build, test, deploy, analysis, and design system. This is not only about considering which failure-response systems should be designed, built, and deployed; the ways organizations or teams will respond should also be well thought out and executed.

    The ideal culture considers failures to be features and an opportunity to learn, rather than a way to place blame. Blameless retrospectives or postmortems are a best practice that allows teams to focus on facts, consider many perspectives, assign action items, and learn.

    Creating a culture of learning and innovation around continuous integration and delivery is another best practice that will result in continuous experimentation and improvement in the short term and sustainability, reliability, and stability in the long run.

  • Roll Your Own Frameworks

    When I build an application, I build frameworks along the way. I recently realized that not everybody thinks this is normal, so I thought I'd give a description of what I do and why I think it's a good idea.

    But let's stop for a moment and briefly discuss what I understand to be a software development framework. Examples of frameworks are frontend web frameworks like React, backend web frameworks like Django, UI component frameworks like Ant Design, an ORM like SQLAlchemy, or a form library like mstform (which I helped create), and so on.

    A framework can be large or small, but in the end it's code that fulfills some task that you can control by plugging in your own code and declarations. Frameworks are declarative in nature, and declarations tend to be easier to understand and maintain than code that has a lot of moving imperative parts. This way frameworks also help you structure your application. My article Framework Patterns discusses a bunch of ways frameworks let you do that.

  • Python vs JavaScript for Pythonistas

    If you’re serious about web development, then you’ll need to learn about JavaScript at some point. Year after year, numerous surveys have shown that JavaScript is one of the most popular programming languages in the world, with a large and growing community of developers. Just like Python, modern JavaScript can be used almost anywhere, including the front end, back end, desktop, mobile, and the Internet of Things (IoT). Sometimes it might not be an obvious choice between Python vs JavaScript.

  • Assertions About Exceptions With pytest.raises()

    I got some feedback related to Bite 243 recently. Since that's a testing bite, it means working with pytest and specifically checking for exceptions with pytest.raises(). The comment got me to look at this handy feature of pytest with fresh eyes, and it seemed like a trip worth sharing!

  • PyDev of the Week: Qiusheng Wu

    This week we welcome Qiusheng Wu (@giswqs) as our PyDev of the Week! Qiusheng has developed several Python packages that you can check out on Github. Specifically they are geemap, lidar, whitebox and they are used for advanced geospatial analysis. Qiusheng also has a website where you can learn more about his research and interests.

    [...]

    My name is Qiusheng Wu. I obtained my Ph.D. degree in Geography from the University of Cincinnati in 2015. Currently, I am a tenure-track Assistant Professor of Geographic Information Science (GIS) in the Department of Geography at the University of Tennessee, Knoxville (UTK). Prior to joining UTK, I was a tenure-track Assistant Professor in the Department of Geography at Binghamton University, State University of New York (2015-2019).

    My research interests include Geographic Information Science (GIS), remote sensing, and environmental modeling. More specifically, I am interested in applying geospatial big data, machine learning, and cloud computing (e.g., Google Earth Engine) to study environmental change, especially surface water and wetland inundation dynamics. I am a strong advocate of open science and reproducible research. I have developed and published various open-source packages for advanced geospatial analysis (e.g., geemap, lidar, whitebox), which are available on GitHub. I recently created a YouTube channel to share video tutorials for using the Earth Engine Python API and geemap Python package. My goal is to make geospatial technologies and GIS programming easier and more accessible. More information about my research and teaching can be found at https://wetlands.io.

  • Michael Catanzaro: Patching Vendored Rust Dependencies

    Recently I had a difficult time trying to patch a CVE in librsvg. The issue itself was simple to patch because Federico kindly backported the series of commits required to fix it to the branch we are using downstream. Problem was, one of the vendored deps in the old librsvg tarball did not build with our modern rustc, because the code contained a borrow error that was not caught by older versions of rustc. After finding the appropriate upstream fix, I tried naively patching the vendored dep, but that failed because cargo tries very hard to prevent you from patching its dependencies, and complains if the dependency does not match its checksum in Cargo.lock. I tried modifying the checksum in Cargo.lock, but then it complains that you modified the Cargo.lock. It seems cargo is designed to make patching dependencies as difficult as possible, and that not much thought was put into how cargo would be used from rpmbuild with no network access.

  • Gradle 6.4 arrives with support for building and testing Java modules

    The open source build automation system Gradle has been released in version 6.4. Among other new features, breaking changes and bug fixes, it now supports building and testing Java modules. Read on to find out how to use the new feature and what else is new.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.