7,297 reputation
22146
bio website
location Waco, TX
age 27
visits member for 2 years, 8 months
seen 4 hours ago
stats profile views 218
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.

Feb
17
comment Making things just work and then improve them, or attempt to make them “perfect” from the beginning?
How do you make something "perfect" from the very beginning? Please tell us your secret!
Feb
14
comment How do you unit test an encoder?
@Justin984, can you give us an example of a change in the encoding "standard?"
Feb
13
comment Why do code generators always use fully-qualified identifiers?
@MainMa, true. Although I suspect the logic of avoiding name collisions might be a bigger deal.
Feb
13
comment Why do code generators always use fully-qualified identifiers?
It seems to me that a keeping track of inserted using statements would actually be pretty straightforward.
Feb
8
comment Why does File.Open in .Net throw exceptions and not follow exception handling best practices?
As far as I'm concerned, using File.Exists to avoid opening non-existent files is just broken.
Feb
8
comment What is the point of using lists over vectors, in C++?
The large object case doesn't work at all. Using a std::vector of pointers will be more efficient then all those linked list node objects.
Feb
2
comment Is the average number of bugs per loc the same for different programming languages?
Re compiler reducing bugs: Both Python and PHP technically have compilers, they just don't do the same checking that statically typed languages do. I also don't agree that such checking has a significant effect on the ending bug count because virtually all errors that can be caught by a compiler are caught with minimal testing.
Jan
31
comment What is the purpose of NaN boxing?
@cpcloud, true, but that detail didn't seem pertinent.
Jan
31
comment What is the purpose of NaN boxing?
@ratchetfreak, what makes you think that?
Jan
31
comment Why do I need unit tests for testing repository methods?
@Marcel, I've run into that to. I solved it by sometimes running all my tests against a real database.
Jan
30
comment About clean code
@resting, I don't know CakePHP, but I wonder if there isn't a way to hook into an api that would let you override the process.
Jan
29
comment Programming interview question on Trees
@Slartibartfast, re comments: is there a particular point you aren't understanding?
Jan
28
comment How should I setup a UI for editing a binary tree?
@JonW, I don't see that the OP is asking for technical advice on how to do something. He's asking for advice on the UX.
Jan
28
comment Programming interview question on Trees
since its modeling liquid filling up and flowing out of glasses I'd have to maintain that time is implicitly part of the simulation. At 5 litres, 4 & 6 will be half full, and 5 will be all full. When the sixth litre is added, it will start pouring into 8 & 9, but 7 & 10 will receive no water because 4 & 6 have not yet hit capacity. Thus, the binomial function won't predict the correct values.
Jan
27
comment Programming interview question on Trees
I don't think it is the binomial function. It reaches the third level in proportions of 1,2,1 as the binomial function would suggest, but the middle glass fills up first and the pattern is broken after that.
Jan
24
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
@Pinetree, certainly, it probably make sense to validate input in your app before submitting to something like a database. But that really doesn't tell me anything about whether or not I should throw an exception when the validation fails. I'd use a consistent technique between failures reported by the external technique and my own validation so that I only need to handle errors one way.
Jan
24
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
As far as I can see, pretty much all possible failures are better handled as recovering from the failure rather then trying to check for success before hand. Whether or not you use exceptions or something else indicate failure is a separate issue. I prefer exceptions because I can't accidentally ignore them.
Jan
24
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
@Pinetree, checking for file existence before opening a file is bad idea. The file could cease to exist between the check and the open, the file could not have permission that let you open it, and checking for existence and then opening the file will require two expensive system calls. You are better off trying to open the file and then dealing with the failure to do so.
Jan
24
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
@gnat, I know. My point was that you should follow the conventions of the language (in this case Java) even if they aren't your favorite.
Jan
24
comment I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
But why? Why are exceptions less useful in handling problems that are more expected?