Tag Info

New answers tagged

3

The most common terms for this are canonicalisation and normalisation. In mathematics, a normal form is a standard way of representing an object with multiple equivalent representations. For example, these two logical expressions are equal: ¬x ∨ ¬y ∨ ¬z ¬(x ∧ y ∧ z) But the former is in disjunctive normal form while the latter is not. In ...


1

At Microsoft, the term I heard a lot for this was "Legoing" as in "I Legoed that crap spaghetti code down into a nice, maintainable bit of code". I think this is very similar to what you're asking for, I just don't know how portable "to Lego" is outside of MSFT. I'm not a big fan of "verbing a noun", but it seems to fit here.


2

The phrase you are looking for is tokenization, and as you noted, it's a very common process for sanitizing input parameters. From the linked Wikipedia article: Tokenization is the process of breaking a stream of text up into words, phrases, symbols, or other meaningful elements called tokens. The list of tokens becomes input for further processing such ...


2

Yes, make is lazy. It's avoiding doing work that it's determined it doesn't need to do. From Wikipedia's page on lazy evaluation (added emphasis is mine): lazy evaluation, or call-by-need is an evaluation strategy which delays the evaluation of an expression until its value is needed (non-strict evaluation) and which also avoids repeated evaluations ...


3

"Lazy" usually means putting things off until the last possible moment, e.g. initializing a module only when it's actually needed, or computing only as many numbers of an infinite sequence as the user actually reads. Alternative terms are 'just-in-time' or 'on-demand'. The key concept here is that this is only a good idea if you don't know exactly what the ...


3

In addition to Michael's answer which, while correct, is only part of the equation. The other more common part is code that is continually updated, extended and modified. Since those processes are not 100% reliably perfect, code gets more and more bugs introduced to it over time. Worse, it tends to get more and more "correct but ugly/hacky" code. This ...


5

The general idea itself is simple - code that has remained untouched for an extended period of time and now does not compile/run without some effort. The question of "how" is a little more complicated. Given a piece of code and a fixed environment, the system's behavior will not change. This determinism appeals to our general sense of logic. The issue is ...


2

An HTML5 application is an application that uses HTML5/Javascript/CSS3 as its primary means of achieving a User Interface. The term is significant, largely because this is considered a platform-independent way to get an application onto as many different mobile devices as possible. Android and iOS are pretty much completely different, but both platforms ...


0

There are at least 2 encodings applicable to the transfer of text. The character encoding describes how characters (glyphs) are encoded. All languages use a subset of the UCS character set, which are often encoded to an 8 bit value. Standardized character sets have standard character encodings, and the terms are generally used interchangeably. The ...


7

The term “charset” is of course short for “character set”, which in turn is an old term used for a character encoding, which can be interpreted as a) a mapping between sequences of bytes and characters, b) a mapping between integers (code numbers) and characters or c) a mapping between abstract characters and either integers or sequences of bytes. ...


4

Update based on what the question is actually asking As a compiler writer, your diagnosis job is simple (at least conceptually): You need to emit at least one diagnostic message for Code that contains a violation of a diagnosable rule or Code that uses a "conditionally supported" construct that your implementation has opted not to implement. The C++ ...


0

FWIW, IIRC, Back in the Commodore 64 days, a character set was a function from {0,...255} to the set of all uxv black and white images where u and v were maybe 8 and 12. So "changing your character set" meant using the POKE command in the BASIC language to modify the memory locations designated to hold those images. For example the ASCII code 65 meant A and ...


2

There are only two. The first is that the code will be rejected by the compiler. The other is that it has undefined behaviour. Throwing an exception is not an error and failing to terminate is undefined behaviour.


1

RFC2045 introduced "character set" into MIME and by that time it was already clear not all encodings mapped one char to one octet. RFC2130 discusses this history a bit more. Basically, "charset" was a more popular term when those standards were written, it's more succinct than "character encoding" or "text encoding scheme", and less ambiguous than ...


1

A conforming C compiler can says anything. AFAIK, the C standard might not even require many diagnostics; §5.1.1.3 of C11 n1570.pdf says that one diagnostic message should be produced. So I guess that just displaying "wrong code" or "f**k you" is standard conforming. What the standard tries to define is how well written code should behave. However, ...


0

Here is one I did earlier for my employer Q-LEAP based on the ISTQB vocabulary and I also checked the IEEE vocabulary. Enjoy. Bug and Defect? The same even though one can have endless discussion about this. We have really other things to worry about, life is complicated enough already, etc. An example of how the term is used in the wild, from "How ...


0

we should prefer "condition is not satisfied" or "condition is not met" unless we really wish to emphasize that an evaluation produced false. Such phrasing is proper and necessary when we are talking abstractly about the "requirements" or "business rules". It's simply natural to talk like this, especially for domain experts talking amongst themselves ...


1

"The condition is true" and "the condition is false" are colloquialisms--informal, imprecise statements that are nonetheless widely understood and "close enough for government work"--i.e. practical even if not precise. In your example, if (foo - bar), you are not actually dealing with formal bool or Boolean data types. In most languages, you're dealing with ...


7

Expressive Power is defined by Wikipedia as: Let's give that page a re-read. One of the first things to note is that it says "language", not "programming language", and most of its examples are not programming languages, e.g. the first example given is a comparison of OWL2 EL and OWL2 RL, which are both ontology languages. One can apply the concept to ...


0

As referenced by the Wikipedia article, expressive power refers to the set of programs that can be expressed in the language. Everything you think of as a "programming language" (JavaScript, LISP, C#, Perl, etc.) are essentially Turing complete, meaning that they can express anything said to be "computable". However, it should be pretty clear that regular ...


28

The landmark paper on expressiveness is On the Expressive Power of Programming Languages by Matthias Felleisen (1991). It contains a mathematically rigorous definition of language expressiveness. Intuitively, if every program that can be written in language A can also be written in language B with only local transformations, but there are some programs ...


-2

TLDR: If a feature is missing but can be expressed in other ways it is not a lack of expressiveness. If you can envision an algorithm in your mind or even implement it in one language but another language is somehow structured in a way that makes it impossible to implement the algorithm it is an expressiveness problem*. Variable naming restrictions do not ...


4

I don't think that variable naming rules really capture what is meant by "expressiveness". I think that "expressiveness" refers to more fundamental things. Consider C# with Linq versus C# before Linq, for example. After the addition of Linq, it became possible to write SQL-like queries directly in the C#. This is a lot more elegant than the prior ...


1

What the program is most likely doing is taking the input pattern and interpreting each symbol as a "command", which are run in a looping sequence as modifications to a basic drawing pattern. For instance, "-" might be "draw the next line segment normally". "=" might be "draw this line segment thicker than normal", ">" might be "turn left" and "<" would ...


3

My first guess is that you're thinking of L-systems: http://en.m.wikipedia.org/wiki/Lindenmayer_system I found this example at http://en.m.wikipedia.org/wiki/Koch_snowflake , linked from the Sierpinski page: The Koch Curve can be expressed by a rewrite system (Lindenmayer system). Alphabet : F Constants : +, − Axiom : F++F++F Production rules: F → ...


2

The general term is "negative logic." Circuit designers use it frequently as negative logic can lead to simpler circuit design than the comparable positive logic design. But be forewarned that trying to pin down the semantics of negation can be a slippery slope. No agreement exists as to the possibility of defining negation, as to its logical status, ...



Top 50 recent answers are included