11,248 reputation
34064
bio website
location Waco, TX
age 29
visits member for 4 years, 8 months
seen yesterday
My native language is C++, but I have left my first love and now use python whenever I have the slightest excuse. Actually, I use python even if I don't have an excuse.

Apr
26
comment What is the maximum number of steps to find a bug using bisecting?
Related: cstheory.stackexchange.com/questions/8923/… cs.stackexchange.com/questions/22451/…
Apr
23
comment Why python function programming functions are not collection methods?
@Giorgio, you're missing the point. The point is that I can use map,reduce,filter on anything that defines __iter__ if I can only use them on objects that have also decided to specifically add these methods I've lost a great deal of the power of duck typing.
Apr
23
comment Why python function programming functions are not collection methods?
@Giorgio, no they don't. They all just call __iter__ to iterate over the element and implement there particular operation on top of that. They don't have to reimplement their logic for every possible collection.
Apr
23
comment Why python function programming functions are not collection methods?
@Giorgio, you really want every class that I can iterate on to have seperate implementations of all those methods?
Apr
23
comment Why python function programming functions are not collection methods?
@Doval, who said anything about choosing one construct over another because Guido said so? I'm not actually personally a fan of comprehensions. But, the design of python and the community has gone in the direction of preferring them over the functional language tradition of map/reduce/filter.
Apr
23
comment Why python function programming functions are not collection methods?
@Doval, see artima.com/weblogs/viewpost.jsp?thread=98196 for Guido's thoughts on reduce. He thinks that outside of a few trivial cases reduces are really hard to read and are better done as explicit for loops.
Apr
23
answered Why python function programming functions are not collection methods?
Apr
23
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
@supercat, fair enough, incorporating the exception logic in a loop context would be considerably more awkward.
Apr
22
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
@supercat, why? What is so bad about having to catch an exception that you'd risk silent failures instead of having to catch them? But I'll agree that in many cases the ideal is to have an exception-less alternative.
Apr
21
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
@supercat, I don't think it really matters which ends up being more common. I think the critical question is having a sane default. If I don't explicitly handle the error condition, does my code pretend nothing happened, or do I get a useful error message?
Apr
13
answered Is it OK to use Promises for Caching
Apr
13
comment Is it OK to use Promises for Caching
1) The time intensive function takes a callback, so I'd say its already taking care of the co-operation internally. 2) The code doesn't start the promise twice. 3) The data comes from the callback in the intensive code. No mystery there.
Mar
27
awarded  Good Answer
Mar
26
awarded  Nice Answer
Mar
26
answered Dynamic Code Evaluation in Java - Clever or Sloppy?
Mar
26
comment Dynamic Code Evaluation in Java - Clever or Sloppy?
What is the benefit of trying to push these business rules into a database over putting the logic into the compiled application?
Mar
23
comment How are basic functions implemented in a programming language if they are not built in?
But in general, either its implemented in the language using the same constructs you use as a programmer of the language, or its built-in.
Mar
23
comment How are basic functions implemented in a programming language if they are not built in?
@Melab, asking for the general method is what makes it broad. There is no general method, every language does things a bit differently.
Mar
22
answered How hidden classes allows faster access to properties in google's V8?
Mar
14
comment How do you iterate through an array and delete an element?
For more details see: stackoverflow.com/questions/322715/…, or a do google search for "don't use linked lists". The fact is, there are cases for LinkedList, but they are rare. You certainly shouldn't be suggested that novices default to them.