Reputation
12,378
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
2 28 61
Newest
 Nice Answer
Impact
~445k people reached

Dec
1
comment How does “repeat x = x:repeat x” return a list in Haskell?
One can see xs in x:xs as an instruction how to compute the rest of the elements. The [] just says that there's no way to compute more elements, but it's just one way to compute more elements! Since we don't necessarily perform the instruction to compute more elements, we can represent "infinite lists" (or "streams", or "generators") that just won't end.
Dec
1
revised How does “repeat x = x:repeat x” return a list in Haskell?
added 7 characters in body
Dec
1
answered How does “repeat x = x:repeat x” return a list in Haskell?
Dec
1
comment Putting a password in a REST API call
This insightful article explaining many pitfalls of password reset mechanisms could possibly help understand the case better.
Nov
19
comment Refactoring three very similar classes using inheritance?
I don't know enough C# to speak precisely; either C# allows to call new List<T> and then the problem is solved, or you can make an abstract method specifically for that and override it in every class returning the specific type of list. With C# having reified generics, new List<T> or a variation on the theme should be possible without losing type safety.
Nov
19
answered Refactoring three very similar classes using inheritance?
Nov
18
comment How to mitigate complexity of fallbacks introduced to automatically retry upon failure?
While @LawrenceAiello's comment holds, I'd say that limiting the responsibility and limiting the amount of state of each class should help somehow. It's often easier to understand a bunch of small orthogonal pieces, as opposed to fewer pieces with complex, interlocked behavior.
Nov
18
comment Resistance to abstraction
On topic: I suppose that abstracting bits of HTML template can be entirely reasonable. I also suppose that the ability to see the raw HTML that comes to the browser is important, too, because any layout glitches, DOM performance problems, etc have to be troubleshooted against the raw HTML. A way to make it visible is important to have; usually developer tools in a browser allow for that, though.
Nov
17
comment Features to generate time expiring
See also programmers.stackexchange.com/questions/214158 In short: think about the business model, not the locking technique.
Nov
17
comment What are functional programmers using in place of UML?
Since FP puts more emphasis on data, a data flow diagram can probably elucidate an FP program, the way a flowchart or sequence diagram elucidates imperative code.
Nov
12
awarded  Guru
Nov
6
comment Aggregate root with many fields
In other words, there are different "levels of detail" for contracts. Possibly the huge monolithic notion of "contract" can be split to parts: essential data and various pieces of optional data. Optional data per se don't make so much sense, but it's OK. This solves the problem of huge DB records and huge constructors.
Oct
30
comment Fundamental issues of programming
(1) Is this code path hot enough to trade maintainability for speed? Usually performance of ~99% of code does not matter much, only ~1% is worth optimizing after you have profiled the code and found the hot functions. (2) Maybe there's a way to split this function in two and reap the both the maintainability and performance gains?
Oct
29
comment How are comments usually parsed?
In most languages in-line comments (/* like this */) are considered equal to a single whitespace, and a EOL-terminated comments (// like this) to a blank line.
Oct
29
comment Ever-running timed tasks
Do you need more than one triggering node to run simultaneously? If not, you're back to a localhost-based solution on top of fail-over + master-election logic. I suppose a database replicated between the triggering hosts would suffice to keep the state; anything from etcd to Cassandra could work. Mesos guys reuse the Mesos services to achieve that.
Oct
29
comment Ever-running timed tasks
How big your application needs to be? E.g. does it need to be distributed (since you don't seem to be satisfied by running it on 'localhost')?
Oct
29
comment Ever-running timed tasks
Why would you not use a time-proven solution like cron or its variants? BTW see how anacron handles the problem of resurrecting after a few tasks are late due to downtime.
Oct
29
comment Cache Json on disk with fast read back in java/android
Have you tried profiling the code? BTW I suspect that using a StringBuilder(len).append(strBuff) might be be faster than new String(strBuff).
Oct
12
reviewed No Action Needed Array vs Object for View in Laravel
Oct
12
reviewed No Action Needed Does algorithm design belong to software engineering?