Reputation
9,451
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
1 20 50
Impact
~438k people reached

Jan
10
comment Emulation of MMU accessing the contents of the registers
@Cabe6403 It looks like you are having confusions between object-oriented programming and hardware design. I'm afraid these two don't have much in common.
Jan
9
comment Efficient algorithm to count number of substrings divisible by 3
For example, let's say divisibility by 7. We want to calculate the concatenation of two strings "1234" and "5678" (giving "12345678") when we already have "1234 mod 7 == 2" and "5678 mod 7 == 1". The result is "2 * (10000 mod 7) + 1", where "(10000 mod 7)" is further calculated from ((((1 * 3 + 0) * 3 + 0) * 3 + 0) * 3 + 0) mod 7 == 4. so, "12345678 mod 7" == (2 * 4 + 1) mod 7 == 2.
Jan
9
comment Efficient algorithm to count number of substrings divisible by 3
For the related question that looks for divisibility by M (not fixed, to be provided as input), it uses the formula (A * B + C) mod M == ((A mod M) * (B mod M) + (C mod M)) mod M. Also, residual system can be used, for example if B == 10 (decimal) and M == 11 (thus looking for divisibility by 11), B mod M can be taken as either 10 (the traditional way) or -1 (for the purpose of cranking out the solution). For large M, higher powers of B can also be used.
Jan
8
comment How are financial organizations planning for the degradation of old programming languages such as COBOL?
As for the mainframe itself, IBM is now selling COBOL VM's so that you can run the old environment on other, newer generation IBM mainframes, many of them running Linux OS inside.
Jan
8
comment How are financial organizations planning for the degradation of old programming languages such as COBOL?
When I see this answer I smell of a COBOL course on MOOC ... complete with video lectures, programming exercises, grading and forums
Jan
8
comment How are financial organizations planning for the degradation of old programming languages such as COBOL?
There are companies which provide support, consulting and staffing for COBOL financial systems, which these financial organizations will contract with. These supporting companies will hire people and train them to perform the COBOL maintenance, even if these hires do not initially have these relevant experience. (Posting as comment since it is just my speculation.)
Jan
8
revised Controlling concurrency by Thread Pool in scenario of CPU-intensive and I/O intensive requests?
added 1479 characters in body
Jan
8
answered Controlling concurrency by Thread Pool in scenario of CPU-intensive and I/O intensive requests?
Jan
7
comment Controlling concurrency by Thread Pool in scenario of CPU-intensive and I/O intensive requests?
@ahmadraza "How I would figure out" ... ask the job submitter? If the job submitter doesn't tell then what else can I do?
Jan
7
comment Controlling concurrency by Thread Pool in scenario of CPU-intensive and I/O intensive requests?
Have a read on Lambda Architecture. It is relatively new so it may be the chance that not every university will teach it in a CS degree program. However it is very popular and taking over older paradigms in terms of being able to solve actual industry data processing requirements.
Jan
6
comment Efficient algorithm to count number of substrings divisible by 3
Based on an informant's comment this question is a rephrase or a sub-component of a programming contest currently taking place. The content is expected to end on Jan 15, 2015. (That said, the algorithmic specification of this question has been published for more than a half year, therefore it would have been contestant's personal responsibility to not violate the rules.) Link to contest page
Jan
5
comment Are noncontiguous arrays performant?
@FrankHileman: the .NET Core team gets the ire no matter what they do - compacting, people complain it's wasting GC time, not compacting, people complain about fragmentation. I guess the current verdict is not compacting (i.e. always pinning) ? BTW I love 64-bit, I think people who try to use more than 1GB RAM on 32-bit application is just ... (redacted).
Jan
5
comment Efficient algorithm to count number of substrings divisible by 3
Good exercise ... took me 4 hours to code a (seemingly) correct solution with dynamic programming with O(N). Seems not quite a "beginner level" question.
Jan
4
comment Efficient algorithm to count number of substrings divisible by 3
I will point out one clue, and this should be enough for some clever audience to figure out the right way to apply dynamic programming (DP) to this question. In the above example "301524", if one breaks down into substrings { "3", "0", "15", "24" }, does it make it slightly more obvious how these candidates could be summarized? Note that alignment is not unique; for example, in a string "111111111111", every substring of "111" is a fragment candidate. This non-uniqueness is what makes dynamic programming outperform the brute-force. That said I'm not advocating against brute-force.
Jan
4
comment Unsure about the decorator design pattern
@StarWeaver Yes, so my code isn't a 100% example of decorator. In fact, that incoherence (a decorator must implement the full contract of the object it is wrapping) was pointed out in the discussion link I mentioned above, and in that link others have provided alternatives to decorator pattern as well. Contrast this to Java and C#'s stream classes - there, decorator classes do implement the full contract of the abstract stream; there is no cognitive dissonance in that use case.
Jan
4
comment Understanding memory update propagation in x86/x86-64 CPU L1/L2/L3 caches and RAM
In the Wikipedia article for Cache coherency (which is what this question is about, and which is typically way beyond the typical CS/CE/ECE undergraduate education), a number of protocols (MSI, MESI, MOESI...) are listed. OP's question requires one to state explicitly which protocol the answer is applicable for. Also, different vendors implementing the same architecture could choose different protocol. Sometimes desktop, mainframe and mobile devices could choose different protocols as well.
Jan
3
answered Unsure about the decorator design pattern
Jan
3
revised Are noncontiguous arrays performant?
added 1083 characters in body
Jan
3
comment Are noncontiguous arrays performant?
@DeadMG: The true concern with GC compaction (with this 4MB scheme) is that it might be spending useless time shoveling around these 4MB beefcakes. As a result it could result in large GC pauses. For this reason, when using this 4MB scheme, it is important to monitor vital GC statistics to see what it is doing, and to take corrective actions.
Jan
3
answered Are noncontiguous arrays performant?