Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development

  • 6 Universal Readable Code Tricks To Improve Your Coding Skills • Python Land Blog

    Chances are your code looks like crap, is hard to read, and hard to understand. There… I’ve said it. Sorry if that sounded harsh, but it’s the painful truth. Writing readable code is difficult.

    I’ve seen too much code in my career that was written so badly that I had to throw it away and redo the entire project. And the most painful fact is that this code was not written by beginners either!

    Writing nice, readable code takes time and effort, sure. But it’s also a matter of learning the right habits. With a few simple tweaks to your coding style, you can improve your code quality ten-fold without much effort.

  • gem-compare goes 1.0

    What is gem-compare, you ask? gem-compare is a RubyGems plugin that can compare gem versions. I originally created it to vet new gem versions I packaged for Fedora, but it’s useful for all kinds of tasks.

  • Inject DB connections in Golang gRPC API

    One of the first issues that I had to solve when I started to use gRPC was how to inject a DB connection pool to the function handling the request. The DB connection injection is needed because creating a new SQL connection every time there is a new gRPC request (and tearing it down at the end) is a massive waste of resources. Also, this approach could limit the scalability of the API since the database probably has a limited number of connections it will accept.

    There are different possible ways of doing this, and some people would deem this solution as “dirty” since you will leverage Go’s context to pass the SQL connection pool to the function. Despite this, I (and many others) do not see any potential practical issue with this practice. If you see practical issues, let me know!

  • What’s New In Deno 1.19? – CloudSavvy IT

    Deno 1.19 was released in February 2022 as the latest incremental update for the secure-by-design JavaScript runtime. Among the changes are a streamlined permissions management experience, first-class support for vendored dependencies, and new native web streams for files, network sockets, and standard input and output.

  • What Is Composable Code and How Can You Create It? – CloudSavvy IT

    Composable code describes classes and functions that can be readily combined to create more powerful higher-level constructs. Composability compares favorably to alternative forms of code reuse such as object-oriented inheritance. It advocates the creation of small self-contained units that are treated as building blocks for bigger systems.

  • Capacitive Soil Moisture Sensor with Raspberry PI Pico: wiring, code and calibrating with MicroPython

    If you are both a maker or a professional farmer, your smart watering project will always start from measuring the ground moisture. With the Capacitive Soil Moisture sensor and Raspberry PI Pico you can get great results with an affordable cost

  • Rakudo Weekly News: 2022.12 Releasomatic

    Justin DeVuyst has done it again: the Rakudo Compiler Release 2022.03 is now available, binary releases have been made available by Patrick Böker, and the Linux packages by Claudio Ramirez should also be available soon. No exciting new features, mostly maintenance and some nice-to-haves this time.

  • Rust's Unsafe Pointer Types Need An Overhaul

    I literally wrote the book on unsafe Rust. And the book on pointers in Rust. And redesigned the Rust’s pointer APIs. And designed the standard library’s abstraction for unsafe heap-allocated buffers. And maintain the alternative Vec layout.

  • Beingessner: Rust's Unsafe Pointer Types Need An Overhaul [LWN.net]

    Aria Beingessner points out a set of problems with Rust's conception of unsafe pointers and proposes some fixes in this highly detailed post.

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.