Tag Info

New answers tagged

0

You indicated that you don't want to do row/column traversal, but that could be a useful method. Calculate an index change value for the array so each new index translates into a row/column position that samples a different area of the matrix. The only requirement is that the index change value must be coprime with the array length. This guarantees that each ...


3

For what its' worth, the article you linked was discussing people who write promise libraries, not people who use them. Your use case seems a bit larger than typical, but as far as I can tell from your description, it's a relatively good fit for promises. Promises are designed to simplify sequencing and composition of asynchronous code. That's certainly ...


5

Unit tests are white-box tests and usually written by the developers of the thing being tested. The first means that you need first-class interaction with the APIs and objects and values of the language the actual product is written in, which rules out almost all combinations of languages. In fact, I think the CLR is the only agglomeration of languages that ...


1

My question is why do these articles and conversations always discuss pass-by-value, pass-by-reference, etc. solely in the context of parameter passing and function calls and not in the context of assignments? As Doval mentions in the comments, the primary reason is that assignment is often modeled as a function call (and can thus be ignored). why ...


3

Computers are not Turing Machines. They are Deterministic Finite State Machines. Turing Machines have infinite memory, computers have finite memory. Turing Machines have arbitrarily many (though finite) states, computers can't have arbitrarily many states, the number of different states that a computer can be in is bounded by its memory (a computer with ...


1

Take your favorite program using some PRNG. Then imagine what would happen if the period of the PRNG becomes very small (e.g. 100). Of course it depends upon the program, but if you use the weak PRNG for encryption, an attacker could easily notice the periodicity, and eventually be able to decrypt secret messages. If you use the weak PRNG for Monte Carlo ...


1

I think Jon Raynor makes a good point about the safety and consistency of your data being better in a database. I think a database could make application management easier in some ways (fewer data files to be concerned with, as well as easier disaster recovery or failover capability) But, I don't think a relational database (such as MySQL) is required for ...


0

By storing the files on the file system there is a possibility of things becoming out of sync. For example, if some process removes the file, or if the data is not saved in the database, there could be mismatches. In this case it is hard(er) to make the transaction atomic because data is in two sources. This is not ideal. If you store all the data ...



Top 50 recent answers are included