Programming Leftovers
-
Using bash options to change the behavior of scripts | Network World
Bash provides a large number of options that can be used to control the behavior of bash scripts. This post examines some of the more useful ones and explains how to display which options are in use and which are not.
-
Bash 09 – Conclusion | Linux.org
Over the last eight articles, we have covered all the information for making Bash scripts. The rest is up to you.
In this article, I hope to go over some concepts again and help you set up a helpful script.
-
Stupid RCU Tricks: CPP Summit Presentation: paulmck — LiveJournal
I had the privilege of presenting Unraveling Fence & RCU Mysteries (C++ Concurrency Fundamentals) to the CPP Summit. As the title suggests, this covered RCU from a C++ viewpoint.
-
Posix Mutex in C
“The usage of Mutex is the method for preventing race situations that is most frequently used. Mutex, which refers to mutual exclusion, essentially gives us a deadbolt lock that stops several users from simultaneously accessing and modifying the crucial data. Whenever multiple or more processes employ the same process as their medium for finishing their processing, deadlock must be avoided. The main subject of today’s discussion will be using the Posix Mutex function to avoid deadlock with different methods with C language in Ubuntu 20.04 system. Before doing anything with your code snippets, we should install the “gcc” compiler.”
-
Fsync System Call in C
“You may have heard a lot about the C language’s basic structure and its simplicity because most developers tend to learn it first before learning any other language. It has a Fsync() system call or function that flushes (passes) all the updates to the disk to reflect the changes made to a file. Also, the fsync function stops the process of flush until all the updates taking place by several processes on a single file got done, and then the flush would happen using the fsync() function call. This article will demonstrate the working of the fsync() function in the C language.
Any system in which you have been working or installed your coding environment must be upgraded and updated so that the new errors can be encountered well, and we can avoid any inconvenience. Therefore, it’s recommended to update your system, especially the Linux system, before and after any installations and configurations. Thus, the “apt” utility is the best to use for updating with “sudo” rights on the console. If it asks for your permission by requesting a password, you have to provide it. In a moment of seconds, your system will be updated.”
-
Fish shell now has underscore as a number separator (my feature request)
In November 2021 I filed a feature request for the fish shell to add underscore as a thousand separator in numbers. My feature request has been implemented and is available in fish 3.5.0, released 16 June 2022.
-
The deep, the shallow and the ugly (classes) | lichtkind [blogs.perl.org]
Previously I showed a bit of the API of my new module Graphics::Toolkit::Color. This time I want to mention some bits about the code base, which it to what i tried to say before (sorry for the long delay i hope I can complete the series).
From technical point I was willingly cutting some corners - but what I want to talk about is the software engineering angle of good code.
[...]
Graphics::Toolkit::Color are in reality 3 modules. One is handling the low level operations, value like range checking, value conversion, averaging and so on. This is about single or few numbers and it does not have to be object oriented. Another module is handling the color names. I mean even the list of constants is so long it should not be intermingled with too much other code of the file gets hard to navigate. That is why the class sitting on top both packages can be rather concise and yet is handling a lot of complexity.
I know to some of you this all is like explaining how to use the bathroom. But i think its worth to explicitly thinking about to write code we enjoy to work with even next year. And it's also about to get the theory straight behind what we are doing and not get fooled by by buzz words.
-
OpenGL fixed in containers
I figured out how to get openGL working in containers; achieved by mount-binding /dev/dri on /dev/dri inside the container. This is now a checkbox "3D graphics"...
-
Dirk Eddelbuettel: Rblpapi 0.3.14: Updates and Extensions
Version 0.3.14 of the Rblpapi package arrived on CRAN earlier today. Rblpapi provides a direct interface between R and the Bloomberg Terminal via the C++ API provided by Bloomberg (but note that a valid Bloomberg license and installation is required).
This is the fourteenth release since the package first appeared on CRAN in 2016. It comprises a nice PR from Robert Harlow extending support to B-PIPE authentication (for those who have it) along with a few fixes made since the last release in January. The last one provided from a kind assist by Tomas Kalibera who pointed out how to overcome an absolute ‘rpath’ dynamic linker instruction (and as I noticed noticed something I already did in another package – ah well) so that we no longer require StagedInstall: yes.
-
Learn programming at Open Jam 2022 | Opensource.com
Open Jam game jam is happening from October 28 to November 9 this year. Every year for the past several years, programmers from around the globe build open source video games, and then play and rate one another's games. Just for fun.
Open Jam is a "game jam," which is a casual way to inspire programmers of all skill levels to focus on a just-for-fun project for a concentrated period of time. It promotes open source games as well as open source game creation tools. While participants aren't required to use open source tools to create their game, the games themselves must bear an open license, and you literally get extra points during the scoring round for using open source tools.
Another important aspect of the jam, for me, is that it promotes alternate win conditions, but not in the way you might think.
-
Atom vs Sublime: Most Significant Differences You Should Know [Ed: Atom is dead, bloated, and controlled by Microsoft, which formally abandoned it; what's the point giving it such promotion?]
Source code editors are crucial when it comes to real-time programming jobs. They allow users to code with their desired features and build the editor as they go on working. Atom and Sublime Text are two such editors we know of, so if you are looking to compare Atom vs Sublime Text, you’re in just the right place.
-
Qt for Android Automotive 6.2.6
We are happy to announce that the latest patch release on Qt for Android Automotive is available for commercial Qt users, based on the latest LTS Qt 6.2.6.
-
8 Tips for Improving UX with Qt's Digital Advertising Platform [Ed: Offline spam: Qt to help put ads inside software]
Doesn’t everyone just hate ads? You know the feeling when you’re watching a video or using an application and the irritating advert interrupts you? It’s also completely irrelevant and has nothing to do with your interests!
-
Qt Safe Renderer Monitor: Debugging the Safety Application
The Qt Safe Renderer (QSR) is our solution for creating user interfaces (UI) for safety-critical systems. Since 2017 the Qt Safe Renderer has been used by multiple customers and certified for different functional safety standards. With the upcoming version 2.0, we are introducing a new approach for validating the correct rendering of safety-critical information – the Monitor.
-
GrapesJS is A Developer-friendly Open Source Rrich Web Page Builder
GrapesJS is an open-source, multipurpose, Web Builder Framework which combines different tools and features with the goal to help you (or users of your application) to build HTML templates without any knowledge of coding.
It comes with dozens of handy feature that can be used to build a rich web pages, newsletter, landing pages, marketing and informative reports.
It supports page layouts, blocks, and offers developers with a rich API set to add their own component.
-
[Old] First make the change easy, then make the easy change
This quote is from Kent Beck, a software developer and the creator of the extreme programming methodology.
Refactoring code can be a challenge. Software projects tend to grow with time. If left unchecked they can become unruly and hard to reason about. Spaghetti code is a term that’s never too far from such a mess.
In a way, this quote is saying “first do what you should have always been doing; being organized” and “then do what you came here to do in the first place (add a feature, fix a bug).”