Why are semantics and type systems are so important?
I heard that semantics and type systems are very important for all programmers! But I why are they so important? I don't understand. Maybe they are imortant only for theoreticians and compiler...
View ArticleWhat is a helper? Is it a design pattern? Is it an algorithm?
Maybe a little tongue-in-cheek, but as I can't find this answer anywhere through Google, so to ensure Software Engineering has the answer:What is a helper?I have seen the name being used everywhere...
View ArticleHow to categorize configuration changes in semantic commit messages
I am trying to switch to semantic commit messages for project. While the idea is good, sometimes I find it is difficult to properly categorize changes like a configuration value change.If I commit a...
View ArticleWhat is the term used to describe the number of times a pointer can be...
For example, which term completes the sentence "p has 5 ____" in order to describe a situation like int *****p?
View ArticleSemantics of simulating a 64bit integer with two 32bit integers (hi, lo)
I am working in a system which only supports 32bit integers, in order to have a 64bit (unsigned) integer I decided to simply use two 32bit integers with one being the upper 32 bits (hi), and the other...
View ArticleIs putting general-use functions in a "helpers" file an anti-pattern or code...
Is it an anti-pattern or code smell to put "general use" functions (examples below) into a catch-all file named "helpers" or "utils"?It's a pattern I've seen quite a lot in the JavaScript world, which...
View ArticleWhich programming languages don't use operator precedence besides Lisp-like...
And what do you think about operator precedence? Would be harder programming in a language where the operations are executed in sequential order?Ex.:2 + 3 * 4 == 202 + (3 * 4) == 14OK, the Lisp family...
View ArticleHow can I tell if a library's execution model is the same as or different...
https://en.wikipedia.org/wiki/Execution_model saysA programming language consists of a grammar/syntax plus an executionmodel. The execution model specifies the behavior of elements of thelanguage. By...
View ArticleWhat's should I call a Location (Longitude and Latitude) associated with a...
In the Xamarin.Essentials library there is a Location class that comes with a DateTimeOffsetTimeStamp.I know I'm being pedantic and I should just move on - I know it's to indicate a location of the...
View ArticleWhere's the interpolation in "string interpolation"?
In most contexts, the concept of "interpolation" seems to be related to estimating unknown states from known ones, like video frames or data points.From the Wikipedia entry on interpolation:In the...
View ArticleWhat's the difference between an API and an SDK?
I was looking through various APIs and SDKs, when I realized that I couldn't really tell the difference between something called an API and something called an SDK.Both of them are, conceptually, a way...
View ArticleA size-type vs index-type conundrum
Suppose I'm writing C or C++ code which deals with... ok, let's make it citizens in a state. In this state, citizens have numeric id's (not strings - numbers); and for reasons of performance, or...
View ArticleWhat log level use for deprecated features?
There is a feature that is now deprecated and going to be removed. Adding a logging statement, observed by some alerting mechanism, can help finding out whether the feature is still being actively used...
View ArticleLexicon for syntax patterns? [closed]
I am having trouble finding a lexicon which provides terminology for the explicit patterns that are employed when parsing syntax. I am trying to write about the niggling differences between the 10+...
View ArticleWhy create CSS classes named to match one specific style? (non-semantic class...
There are a number of CSS frameworks that have a one-to-one correspondence between many of the classes and a single style. For example, in basscss".inline-block" is defined as "display:...
View ArticleIs a literal out of range a syntax error or a semantic error?
I am reading more about the differences between syntax and semantics, but I am still wondering about this one.Let's assume that we have a language that only allows integers to be in the range of 0-255,...
View ArticleWhat is the difference between a migration pattern and a refactoring?
I have recently come across the terms migration pattern and refactoring on the topic of migrating monoliths to microservices. Is there any real difference between the two terms, or can they be used...
View Articlefilesystem::path vs. optional as argument to function
Sometime ago in a code-review (C++) I suggested to change the input argument from Path type to Optional<Path>, where the function has specific logic for unset path. It looks for me intuitively...
View ArticleWhere to position logging statements
I have the following classes :class Task{ public void DoSomething() { var s = new Service(); s.First(); s.Second(); s.Third(); }}class Service{ public void First() {}; public void Second() {}; public...
View ArticleDeclaring a function without named parameters that accepts at least 1 argument
Say I have a function whose first parameter is used differently depending on how many arguments are passed. In this case, it is easier to just process the arguments object as a whole within the...
View Article