Hot answers tagged

19

The function "printf" was inherited by C from the B standard library. In B it wasn't the only such function, for example there was also a "printn" for printing numbers. See a reference for the language from an early unix version here: https://www.bell-labs.com/usr/dmr/www/kbman.html


17

Let's go back to the K&R roots: Origin In the tutorial chapter, on page 11 of original K&R, you'll find a hint on the origin of the function: By the way, printf is not part of the C language; there is no input or output defined in C itself. There is nothing magic about printf; it's just a useful function that is part of the standard ...


5

If they were asking for the architecture of some code or files, they might be asking about what classes there are and how they interact. However, in a project, we group classes into larger components, and these components interact. Given that they're asking about the project, they're asking for the big picture of top level components and their ...


4

It's not the most basic printing function. The most basic printing functions would be puts and putchar which print a string and char respectively. f is for formatted. printf (unlike puts or putchar) prints formatted output, hence printf. For example it can print an int in hexadecimal, or a float rounded to three decimal places, or a string left padded. ...


4

It's just an expression, or more specifically, a lambda expression. Because of referential transparency, you can substitute a function's body or its result wherever it is called. If you actually did this for an entire program, you'd see that every functional program is effectively a single large expression like your examples. We just employ a lot of ...


4

The principle you're defending is that of a "Single Source Of Truth". The corresponding antipattern doesn't have such a general name. Violating DRY ("don't repeat yourself") is sometimes called WET ("write everything twice"). In databases, violating normal form is called denormalization (and is sometimes good practice when trading off time versus space). ...


2

Whenever I describe something as being an "Implementation Detail," I am saying that the user doesn't need to know how it gets done, so long as it gets done. For example, in C a pointer actually points to a memory address in the computer, but you can't say the same thing about a reference in Java (even though pointers and references both perform essentially ...


2

Single source of truth In information systems design and theory single source of truth (SSOT), also known as single point of truth (SPOT) refers to the practice of structuring information models and associated schemata such that every data element is stored exactly once (e.g., in no more than a single row of a single table). Any possible linkages ...


2

In layman term's: Those tables are called historical tables, history tables or audit tables. The fact that you have a 12-month retention policy doesn't make them into a different type of table. The deletion (or not) of old historical data is part of the normal life-cycle of data.


2

If nobody thinks it is a problem anymore, then the ticket can be closed. The reason for closure can be any descriptive reason, such as "not a defect", "not reproducible" or "not relevant anymore".


2

It depends of the workflow you use, and essentially the relations between developers and customers. In Extreme Programming, it belongs to the customer representative to decide what to do with the ticket. She may consider that it's high priority and you should work on it, or low priority, or should be removed. Whether the bug is reproducible is a different ...


1

The two usages are actually completely unrelated. The LHS is the declaration of the type of the variable obj. You can put any type there, not just a class. E.g. in both Java and C♯, you could put an interface there, in Java, you could also put a primitive type there, in C♯, you could put a struct there, in Scala, you could put a type alias there. Some ...


1

You are declaring the type of the variable (static type) and then instantiate the object that the variable will hold (runtime type). So, your sentence: In Xamarin, SqlCommand.ExecuteReaderAsync(CancellationToken) throws a runtime error and so in the declaration, SqlCommand command = new SqlCommand(), the static type must be changed to DbCommand.


1

It would be interesting to find out why the reporter is no longer interested. Are there more important bugs or has it just gone away? The bug should of course have a low priority now and if it can't be reproduced, then I'd be inclined to set it to "monitor" (if you have such a status in your system) or leave it open with a status of "unable to reproduce". ...


1

I'm not sure there is a formal name for those sorts of tables. Data is normally cleared down to aid performance although (in the UK at least) you sometimes need to keep N years' worth for auditing purposes. If you have a data store in one database and have a highly performant database with a subset of the that data store for application or reporting ...


1

If you are speaking of a fixed time interval allocated in a repetitive schedule, the appropriate term would be timeslot. For example every Monday from 4pm to 5pm. This term is used for example for broadcasting programming. The definition of your ScheduleComponent matches exactly this term. If you are speaking of a fixed time interval defined in terms of ...


1

As is the case with many terms in computing; the origin of the word relates to more physical properties. The term Scalar is relatively old in computing. Its definition is less strict these days. When you store data in computer memory this data can either fit in one address (1 byte*) or not. When it did, it was called scalar, when it didn't it was called a ...



Only top voted, non community-wiki answers of a minimum length are eligible