8,021 reputation
1845
bio website
location Los Angeles, CA
age
visits member for 4 years, 8 months
seen 4 hours ago

The traditional notion of object ownership via function call (i.e. where it is unconditionally and unquestionably assumed that the caller must own the object throughout the call, and the callee merely "borrows" from it) is detrimental to memory usage if the object passed via the call needs to be released early, in the middle of the call.

In the past, I may have blamed it on other things, but now I see it this way. And this faulty dogma is pandemic; I can't think of any language that escapes from it.


14h
comment How much should I concern myself with hiding the IDs of my database in URLs?
For the randomly generated IDs to be resistant toward brute-force robotic harvesting, it must have sufficient "entropy", or a high "ID space to real data" ratio, so that out of N random ID guesses, only N/k real piece of data would be harvested. Also consider augmenting anti-harvest with per-connection rate limiting (implemented on both session and IP address level).
21h
comment Should points of tech debt be counted in a team's velocity?
Or put it differently, the estimated consequences of leaving a technical debt unsolved has a larger uncertainty, whereas the estimated cost of resolving a technical debt (in a given time frame, i.e. scheduled away from crunch time) has a relatively smaller uncertainty.
21h
comment Should points of tech debt be counted in a team's velocity?
The detrimental effect of tech debt is difficult to estimate. It depends on the future path of the project - how much time a task was impeded due to unsolved tech debt. It could be measured after the impediment had occurred. The time needed for reviewing a specific kind of technical debt, and the time needed to resolve it, are probably possible to estimate.
22h
comment Deferred execution of Dispose for IDisposable objects
Be sure to read everything Eric Lippert says about finalizers in 2015.
1d
comment How to store data that is recorded with different frequency?
Is the rate high enough to require in-memory database?
1d
comment What happens if some server side GPLv2 code is leaked?
Before looking further, you must first determine that your entire company is in full compliance (except the accidental distribution or theft part). That is, that your entire company does not otherwise distribute any GPLv2-licensed material without also making their source code available in GPLv2-license. Then, be rest assured that "theft" is not distribution. However, it is not sure whether "accidental release" could be used for "discovery" or not. Discovery is what FSF can use to catch that your company is violating GPLv2, so that's why you should first make sure compliance. IANAL.
1d
comment Persist and sync custom sorting information
@Sathya Is the sorting order based on the natural order of some "keys", where the keys are part of the data? Or are they sorted interactively (with a human specifying the ultimate order)?
1d
comment Persist and sync custom sorting information
@gnat I think this question is salvageable and is worth asking (on distributed sorting) but it needs a lot more details than it currently is (even after the edit).
1d
revised Blocking function call with asynchronous content
added 153 characters in body
1d
comment What sorts of web technologies does Disney use?
It uses "outsourcing".
1d
comment Blocking function call with asynchronous content
@Mawg: You need to clarify the "do something asynchronously" part in your diagram. What kind of coordination requirements exist between requests made by different applications? If no coordination is needed, then the simplest design of one-thread-per-application (not per-request) is sufficient.
1d
revised Blocking function call with asynchronous content
added 603 characters in body
1d
answered Blocking function call with asynchronous content
1d
comment What is the functional programming answer to type-based invariants?
@BenAaronson (Since I don't know functional programming, I can't provide an answer, but I can still provide some language-agnostic ideas.) My point is that whenever a new value (instance) is produced, the responsible party is also responsible for: asserting (i.e. taken as truth) whether the invariant is universally upheld or broken; if not asserting, it must request a runtime check on that invariant. Some responsible party must declare this somehow (say, the multiplication operator on ReducedFraction).
1d
comment What is the functional programming answer to type-based invariants?
@BenAaronson Notice a difference between "enforcing" and "propagating" an invariant.
1d
comment What is the functional programming answer to type-based invariants?
A seemingly unrelated question, but ... Are asserts or unit tests more important?
1d
comment What is the functional programming answer to type-based invariants?
For cases where precondition can't be checked at compile-time, it is idiomatic to check in the constructor. Consider a PrimeNumber class. It would be too expensive to perform multiple redundant checks for primality for each operation, but it is not a kind of test that can be performed at compile-time. (A lot of operations you would like to perform on prime numbers, say multiplication, do not form a closure, i.e. results are probably not guaranteed prime. (Posting as comments since I don't know functional programming myself.)
2d
comment Does this data processing pipeline design need to be so complex?
(continued) and in particular do not consider reusability or configurability of stages, and write "single-use code".
2d
comment Does this data processing pipeline design need to be so complex?
@kdbanman A short answer is that there are essential complexity as discussed in "No Silver Bullets", which means because the "requirements" are complicated, you can'y simplify it beyond a certain point. When designed properly, the data processing pipeline can be highly reusable and will have long term value. To determine whether it is worth, you have to ask: does the project, and the "stages", create sufficient intellectual property value that will pay off? If not, you can use Perl, Python, MATLAB, and other similar data-processing languages
May
20
comment Short circuit evaluation, is it bad practice?
The first part becomes a "precondition". Precondition and postcondition are rigorous ways to reason about the behavior of code. The short-circuit evaluation allows "chaining" of such, i.e. allowing them to be placed on a single line, which makes the code slightly less cluttered. But even without this syntax, one can still write nested if-statements to achieve the same.