10,446 reputation
33762
bio website
location Waco, TX
age 28
visits member for 4 years, 2 months
seen 8 hours ago
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.

Nov
22
comment How to prevent others from using non-thread safe variables in a multithreading environment?
It'd be useful to know more about why you are moving to multithreading.
Nov
20
answered Java exception handling design
Nov
5
comment How can I get better than O(N^2) space complexity for a type sequence search?
The version I've seen still uses recursion to build up a list of indexes even if the class itself use inheritance to hold each value.
Nov
4
comment How can I get better than O(N^2) space complexity for a type sequence search?
I think you may actually be hitting o(n^2) due to the implementation of std::tuple.
Nov
4
answered How can I get better than O(N^2) space complexity for a type sequence search?
Nov
4
comment How can I get better than O(N^2) space complexity for a type sequence search?
But, as far as I can tell, the guys at boost aren't searching enough types to make worrying about the compiler's space usage worthwhile.
Nov
4
comment How can I get better than O(N^2) space complexity for a type sequence search?
I'm going to officially register my doubt that this is a good solution, and think about whether there is a way to solve it.
Nov
4
comment How can I get better than O(N^2) space complexity for a type sequence search?
Ah, the list of types in the templates is itself O(N), giving you O(N^2) over all the templates. What in the world are you doing that this has become a concern?
Nov
4
comment How can I get better than O(N^2) space complexity for a type sequence search?
What N types are generated for each element searched? To me it looks like that for each element searched you get one instantion of SearchImpl for a total of N.
Nov
4
comment How can I get better than O(N^2) space complexity for a type sequence search?
Its not clear to me what O(N^2) types this induces.
Oct
26
comment Is it a good practice to run unit tests in version control hooks?
@Brian, I'm in total agreement, you can make this work. But, trying to do by blocking the commit hook server-side isn't going to work.
Oct
24
answered Is it a good practice to run unit tests in version control hooks?
Oct
18
comment How to clean up nested try/except/else?
@EthanFurman, I think we may be thinking of different items under the heading of cleanup. I figure if foo opens files, database connections, allocates memory, etc, then it is foo's responsibility to ensure those are closed/deallocated before returning. That's what I meant by cleanup.
Oct
17
comment How to clean up nested try/except/else?
This may be reasonable if all the methods raise very specific exceptions, but that's generally not true. I'd heavily recommend against this approach.
Oct
17
comment How to clean up nested try/except/else?
@Kevin, right, but that doesn't change my answer. If your handler returned or raised anything, the problem you mention wouldn't arise. The rest of the function would be skipped automatically. In fact, a simple way to resolve your problem would be to return in all the exception blocks. The code is awkward because you aren't doing a customary bail or raise to indicate that you are giving up.
Oct
17
answered How to clean up nested try/except/else?
Oct
17
comment How to clean up nested try/except/else?
What kind of things are you doing in the handle_* functions?
Oct
11
comment What's the best method for ignoring the BBCode between <code> tags in a full-post BBCode parser?
What does your parser look like as it stands?
Oct
10
comment Order of Operations Annoyance
It seems to be that your question is actually about bitwise operators, not logical operators. It seems sensible to put the logical operators after equality, think if(a == 2 && b == 2). The bitwise operators do seem a bit silly.
Oct
10
comment Order of Operations Annoyance
okay, yeah. I never use those because I'm worried about what'll happen if something besides 1 or 0 gets in there.