C Programming/Development News and Views
-
Arrays in C
The array represents the collection of various items that have a similar data type and are stored in the physically adjacent memory addresses. The data type of the items in an array must be similar and it can be any data type as char, integers float and double, or even the structures. In an array, the sequence of the items is stored in the form of indices. The items in the array are stored from left to right. The left-most items are the initial items with zero (0th) index. The right-most items have the index (n-1). The “n” signifies the total number of items in the array. We may access any item or member of the array with its index which is the memory location of the item.
In programming languages, we are required to make the arrays because we have to define more variables with the ordered values like 1-200. So, instead of separately defining and storing the values in 200 variables, we rather just make an array of size (200).
-
Arrow Operator in C
“The use of the arrow operator is very common in all programming languages, e.g., C, C ++, etc. The arrow operator is used to point out the memory address of the different members of either the Union or the Structure. This operator is symbolically made by combining the symbolic representation of the ” greater than (>)” and the “subtraction operator (-)”. So as a whole, this operator looks like an arrow, e.g., ” ->”. We use this operator with the pointer variable so that we can access the element of the structure and modify its values that are already stored in the memory according to our requirements. The arrow operator, along with the pointer variable, is used since it provides fast access to the elements (improved execution) and it takes the lesser memory.”
-
C23 Programming For Everyone
Here’s a history quiz: What architecture did the first C++ compiler target? Of course, it is a trick question. The original C++ — known then as C with classes — compiler wrote out standard C code that you then compiled for whatever your target was. This has a lot of advantages since C compilers are everywhere. Now we are seeing a similar approach to bring C23 to the world with Cake. Cake can translate C23 or other versions to C99 which you can then compile with normal compilers.
-
No Yes/No, yes? | Attracted by virtual constructs
Some time ago I ran into a variant of a self-service checkout system in a supermarket which, when asking for applying the data collection identity card, used a dialog with the button options “Yes” & “No”. Being privacy-positive, my thoughts were, yes, I want to keep my data private, and was about to press the “Yes” button. Only to check once more and find that the question actually was “Do you want to use our card?”. Which made me wonder why in the year 2022 new systems are developed that apply that old pattern of “Yes” & “No” replies. And reminded me that also in newer software made in the KDE community I had seen new appearances of that scheme. Had it not been found to be inferior, from what I had seen by-passing in the HMI field?
[...]
On a quick look I could not find related scientific research reports that could back up the guideline recommendations. But instead I came across research about the related field of designing questionnaires, on the topic of preventing errors in the given answers e.g. due to misunderstandings or lack of concentration. And that seemed to confirm that people gave more correct answers and also felt it simpler to do when the items representing the choice (e.g. a text next to a checkbox) themselves had clear unique references to the choice instead of being abstract items whose meaning only could be known by the assignment to a choice in the question itself. Abstract items being things like colors, shapes, positions, numbers or the very Yes & No.
Not seen discussed or even researched, but my theory would be that things are worse even when there is a memory effect and something could mean the opposite in other similar choices.
[...]
With the upcoming KDE Frameworks 6 API series around the corner, it would be good to have some substitute API done before, so the HIG-conflicting API could be deprecated still for KF5. And KF6 would only hold API trapping developers into more HIG-conforming UIs.
Some, sadly non-exciting proposals to address this should appear in the next days, both as further blog posts as well as MR with actual code.
-
IRC × OAuth 2.0 · emersion
In the past few days I’ve been working on better integrating IRC with OAuth 2.0. In a nutshell, my goal is to make IRC clients obtain a token by interacting with an OAuth 2.0 server, and then use that token to authenticate with the IRC server. This effort has resulted in various patches for meta.sr.ht’s OAuth 2.0 server, for the soju IRC bouncer and for the gamja & goguma IRC clients.