5,537 reputation
1234
bio website
location Los Angeles, CA
age
visits member for 3 years, 7 months
seen 7 mins ago

I love strange shrimp.

eh, string stream.


Apr
10
comment Search for the (slowly moving) number with penalty for too high test value
Binary search from the small end. Somewhat related to en.wikipedia.org/wiki/Exponential_backoff Try 1, 2, 4, 8, 16, 32 ... until hit first "too high". Then switch to binary search between the last-known good value.
Mar
7
answered Design pattern for bidirectional signals/events
Feb
28
comment Programs that claim they are not “multi-core” friendly
@Jules: This paradigm is called task parallelism (shared task-queue, concurrent workers). This paradigm is suitable for many small tasks with different (even unpredictable) run times, tasks which cannot be created (partitioned or knowing their existence) up-front, and have complex data dependencies in between. There are many paradigms for parallelism, and Theodore's plan is to explore what paradigms would be suitable for an algorithm like QuickSort.
Feb
28
comment Programs that claim they are not “multi-core” friendly
And also some games thrive on new content (graphics and gameplay), without having to update the game engine (code implementation). Thus, the game engine could be years behind in technology.
Feb
28
comment Programs that claim they are not “multi-core” friendly
How many array elements did you test with? Perhaps mergesort would be more suitable since multi-core programming would have necessitated the copying of data to avoid cache-line conflicts?
Feb
24
comment Microeconomical simulation: coordination/planning between self-interested trading agents
The presentation above by Prof. Barmish points out that common-sense knee-jerk action (or, feedback control curve with parts for saturation, cutting losses and taking the money and run) based on near-term price movements (gains) could be one way of simulating a trading agent.
Feb
24
comment Microeconomical simulation: coordination/planning between self-interested trading agents
The buyer has to choose a bid price, and the seller has to choose an ask price.
Feb
24
comment Microeconomical simulation: coordination/planning between self-interested trading agents
Some bit of control theory would help. news.wisc.edu/22389 and pancap-web01.uncc.edu/Panopto/Pages/Viewer/…
Feb
22
comment How can I determine the level of talent a prospective programmer has?
Is there a single-assignment version of this quiz? That might be able to identify an additional pool of candidates (a.k.a. the functional ones) for the CS major. en.wikipedia.org/wiki/Static_single_assignment_form
Feb
19
comment How to teach pointers to beginners in C?
Pointer in C is not just about the mechanics of memory access: it is also about the type system. It is doable: I first learned pointers from Turbo Pascal. A simulation of Linked List using an array is the starting point. It is then re-implemented using pointers.
Feb
14
comment Algorithm for searching images within images
Image "feature detection" would be a good search phrase to begin with. Searching would be difficult if the "source image" is texture-less (thus feature-less) unless the RGB values stay the same.
Jan
20
comment How to optimize calls to multiple APIs at once and return as one set?
The handling strategy for slow response would depend on whether the results are cacheable.
Jan
11
comment What intermediate representations can be used to reason about concurrency?
One of the theoretical tool is called "Dynamic Single Assignment (DSA)", built on top of SSA.
Jan
11
comment What intermediate representations can be used to reason about concurrency?
The paper that serves as the backdrop for Intel Concurrent Collections (CnC) lists eight fundamental concurrent patterns, such as Producer-Consumer. These concurrent patterns in turn depend on a number of properties, such as immutability and side-effect-free. (I would appreciate if anyone can summarize that paper and post as an answer here.)
Jan
10
comment How to trace logical errors in algorithms
The issue arises in an artificial environment (code competitions) with artificial constraints (no access to execution result or input data other than a pass/fail), so a solution may not exist. Regarding the data type issue, it may be helpful to write code so that swapping out the data type on the entire source code can be done quickly. That way, you can try 32-bit int, 64-bit int, double-precision, and BigDecimal quickly to identify if the test failure is precision-dependent.
Jan
10
comment Is there any specific reason to use “else if” clause?
It is used to denote multiple branching targets when all of the conditions are mutually exclusive (disjoint). In some languages, switch case have been extended to handle mutually exclusive branching thus making else if optional. In C and C++, this is not the case because of historical reasons.
Jan
8
comment Fast fourier transform based multiplication algorithm
@RobertHarvey FFT-based multiplication algorithm is a different topic than implementation of FFT.
Jan
8
comment Help with inheritance hierarchy design
Perhaps Proc() could be made protected?
Jan
6
comment Fully Stable, In-Place Unique Algorithm in O(n)
Other than array of indices, a bit array can be used to indicate the position of unique items. (Though I must remind that P.SE is in general not suitable for questions requiring CS Theory proofs. There is a CS Theory site on Stack Exchange suitable for this type of questions.)
Jan
3
reviewed Approve suggested edit on How do I deal with a difficult programmmer joining an open source project?