Is there any good/fundamental reason that Python classvars, and JavaScript...
In Python, if you have a classvar, it's accessible from an instance, but if you set the variable on the instance it doesn't actually change the classvar, rather it assigns a new name which shadows the...
View ArticleWhy would one bother marking up properly and semantically?
Note that I (try) to mark up as semantically as possible because I like they way it looks and feels, but not because I'm aware of any other stunning advantages. The point of my question is to be able...
View ArticleShould objects be singular since arrays are plural?
Might be a silly question, but what is more logical:object.actions.bark() or object.action.bark()?Simply about plurality. I know arrays are usually pluralized. But if I were to be consistent; ideally,...
View ArticleIs there a difference between iterable and enumerable?
Many languages seem to have structures that are very similar called iterable or enumerable. These are structures that can be iterated or enumerated over, which seem to me extremely similar things. Are...
View ArticleSemantic action in parser combinators
I have a parser that can be defined as int = a:/[0-9]+/ {parseInt(a)}. It is supposed to match an int and convert it into a number. There can also be a parser like sum = a:int b:int {a+b}As you can...
View ArticleIn an ESB type system, what field name should be used as a "correlation ID"?
We're using ASP.NET Web API and Azure Service Bus and adding logging to our disparate services and systems. We need to track a correlation ID to the headers of each set of bus messages as well as logs...
View ArticleIs immutability very worthwhile when there is no concurrency?
It seems that thread-safety is always/often mentioned as the main benefit of using immutable types and especially collections.I have a situation where I would like to make sure that a method will not...
View ArticleWhy do we call it "production"?
A coworker was wondering this today: "Why is it that in our industry 'production' means 'final, deliverable product'? You know, like if a movie is 'in production', it means they're currently filming...
View ArticleDomain Model Representation - Formal ontology vs code
Disclaimer: I have limited experience building domain models, this is purely asked out of interest to those who doI have recently stumbled upon the concept of representing data models with ontologies....
View ArticleWhat's the difference between syntax and semantics?
I've always thought that referring to the syntax of a language was the same as referring to the semantics of a language. But I've been informed that apparently that's not the case. What's the difference?
View ArticleWhere do I store user-defined business rules?
Let's say I have an application that works around departments and employees. Each department has a set of rules that defines which employee is assigned to each department. For instance the system will...
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 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 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 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 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 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 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 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 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 Article
More Pages to Explore .....