Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Operator pattern: REST API for Kubernetes and Red Hat OpenShift

    In this article, we will see a similar pattern when writing the REST API in any known framework vs. writing an Operator using Kubernetes’ client libraries. The idea behind this article is not to explain how to write a REST API, but instead to explain the internals of Kubernetes by working with an analogy.

  • Rust framework dev says ‘I’m done with Open Source’…has second thoughts

    The main developer behind a Rust actor framework pulled the code behind the project in apparent protest against an “unsafe sh*tstorm” against him last week.

    And while the coder in question now appears to have nominated new leadership to continue the project, the apparent “ragequit” has prompted questions about the dynamics within the open source community.

    [...]

    “You could notice after each unsafe shitstorm, I started to spend less and less time with the community,” he continued. “You felt betrayed after you put so much effort and then to hear all this sh*t comments, even if you understand that that is usual internet behavior. Anyway, removing issue was a stupid idea. But I was pissed off with last two personal comments, especially while sitting and thinking how to solve the problem. I am sorry for doing that.” [SIC]

  • How to Write and Run a C Program in Linux

    Linux is becoming programming heaven for developers, being an open-source and free operating system. Turbo C compiler is already an old approach to compile programs so let us programmers move to Linux for a new programming environment. In this article,

  • TechWiser’s giant Raspberry Pi AirPod speaker (and more)

    YouTube is a haven for awesome Raspberry Pi projects, and we often spend time scanning through the platform’s wares for hidden gems. One such hidden gem is this video from TechWiser, in which they showcase some of their favourite Raspberry Pi projects:

  • A quick-and-dirty guide on how to install packages for Python

    When people start learning Python, they often will come across a package they want to try and it will usually start with "just pip install it!" The problem with that advice is it's a very simplistic view of how to manage packages and can actually lead to problems down the road. And while there is a tutorial on installing packages at packaging.python.org, it might be a bit intimidating for some if they are just looking to quickly get up and going.

    If you just want to start poking at Python and want to avoid the pitfalls to installing packages globally, it only takes 3 steps to do the right thing.

More in Tux Machines

Distro Flashback: What happened to Cub Linux?

The operating system wasn’t always known as Cub Linux. In actuality, when it first got announced back in 2014, Chromixium OS was what it was called. After a year of its announcement, its first stable version hit the open-source world as a 32-bit live ISO. With that being said, this release didn’t go as smoothly as planned. There were several bugs reported by its users, which included slow menu generation and screen tearing. On the bright side, the developers soon got to solving these issues and released a service pack in addition to various updates. However, what really took Chromixium OS to the next level was the release of its 64-bit version in November 2015. All of this development hit a roadblock when the owner of Chromium and Chrome OS, Google, sent a request to the operating system’s developers to give up the name ‘Chromixium’ and other related social media presences websites. However, that couldn’t stop the head of this project, RichJack, as they soon addressed this issue and renamed their OS as Cub Linux. These events took place in late 2015 and ended on a positive note, but the project didn’t know what was approaching its way in 2016. When 2016 was nearing its end, Cub Linux users started noticing one big thing: the official website had been missing. This turned out to indicate the demise of a project that could have done wonders in the future. Even though their GitHub page is open to this very day, the development had stopped, and there was no point in keeping up with Cub Linux anymore. According to a developer, this project’s sudden end could be attributed to “private life restrictions,” which is as vague as a statement could get. With that being said, as far as the future of Cub Linux is concerned, many other developers got interested in this project and wanted to pick it up. Accordingly, the Feren OS developer announced in 2017 that he would give Cub Linux a major overhaul and “bring back Cub” with the name of Phoenix Linux. This might seem like good news to some, but honestly, the future of Phoenix Linux doesn’t seem too bright since the project hasn’t received another update since March 2018. If we’re really hopeful, we’ll get something as soon as 2021, but waiting any longer wouldn’t make much sense. Read more

Python Programming

  • Only Python: Friendly-traceback: work in progress

    It's been almost two months since my last blog post and I feel guilty of not haven't taken the time to write more regularly.  I should really tell you about how fantastic Will McGugan's Rich is, and how I have customized it for my projects. I should also tell you how Sylvain Desodt's DidYouMeanPython has been influencing Friendly-traceback latest developments. Also worthy of note is how Alex Hall's FutureCoder project is incorporating so many neat tools that it feels like a real honour that he has incorporated Friendly-traceback in it. Alas, while I have been busy making many changes and addition to the code, the documentation is hopelessly behind and no longer gives a correct picture of what Future-traceback is now capable of. So much to do, so little time. So, I will just end with a picture, and go back to coding, with a promise of writing more ... soon I hope.

  • Python range() Function – Linux Hint

    Python is a modern, general-purpose, and high-level programming language that comes with powerful features. Python has many built-in modules to support diverse operations. The range() function is a built-in function used to perform specific tasks or actions for a definite number of times. In other words, the range() function is used to perform a task iteratively. This function is used in conjunction with the for loop and the while loop.

  • Python Dictionaries – Linux Hint

    Python is an efficient and versatile programming language. It is one of the most frequently used high-level programming languages to perform data-related tasks due to its many supportive built-in modules and functions. To mention some of its many built-in data structures, it has arrays, lists, tuples, etc. Dictionaries are one of the built-in data structures in Python. It holds the data in the form of a key-value pair. The keys are the unique value that acts as a representative of data. The key is also called as “an index value”. Data structures are a very important aspect of any programming language. They are used to store and manipulate the data in a well-organized and efficient way. Therefore, Python dictionaries are more useful when we need to store the data in a form of key-value pair and to access the data faster. The Python dictionaries return the data faster because the key value for every data is unique, therefore the searching time for data is reduced, and we get the result faster. This article explicates the Python dictionaries in detail.

  • Python Classes – Linux Hint

    Python is one of the multiuse high-level programming languages. It is an object-oriented programming language. The main difference between the procedural and object-oriented programming languages is that we cannot create the classes in procedural programming languages. The main focus of procedural languages is on creating functions, and variables for performing the task whereas, in object-oriented programming languages, our main concern is to create objects and use them for performing our tasks. A class is simply a blueprint that contains functions and variables. A class is like a real-life classroom of any institute. It contains some chairs, tables, desks, a projector, walls, etc. base on all these components; we build a classroom. All these components are the variables and functions in a class, and a classroom is an object. The Python classes and objects are explained in this article.

  • FreeBSD process environ and resource limits

    New psutil 5.7.3 is out. This release adds support for 2 functionalities which were not available on BSD platforms: the ability to get the process environment (all BSD) and to get or set process resource limits (FreeBSD only), similarly to what can be done on Linux.  

Kernel: KVM, Btrfs and nosymfollow

Japanese IME on PCLinuxOS 64 KDE5 Magnum 2020 1015

I recently saw that my install of PCLinuxOS was behaving funny after and update: the effects ceased working and web pages were loading slowly. Last time this happened to me, I had to install a new iso because I had been working with a very old one. This time, however, I had kept up with all the updates thanks to the convenient Simple Update Notifier, but something was not good. Anyway, I decided to install the new PCLinuxOS 64 KDE5 Magnum 2020 1015. The installation went well, but I was worried because I normally install the PCLinuxOS GRUB2 on the distro partition, not on the MBR, but it was not possible for me to do it this time, so I was predicting a mess trying to boot OpenMandriva, Mageia, MX Linux, and Elive. Read more