24,066 reputation
239101
bio website
location Dallas, TX
age
visits member for 3 years, 9 months
seen yesterday

I've been programming since I was 15. I started with APL at the Hampshire College Summer Studies in Mathematics in 1974. At Carnegie-Mellon I learned FORTRAN, and ALGOL/W, and Pascal, did a lot of TOPS-20 assembly programming hacking the MM mail reader, a fair bit of TECO programming customizing the first versions of Emacs, and a bit of INTERLISP and SAIL. After graduating, I have worked in BLISS-36, a tiny bit of Cobol, a decade of C, lots of Perl and EMACS-LISP, C++, Ada, Tcl, C#, Java, Python, Ruby, JavaScript, and lately some Groovy.


Oct
17
comment Is there any evidence that Intellisense reduces productivity?
@Panzercrisis: the fact that these files say nothing interesting, allowing them to be generated, but are still necessary in the source tree is a process smell.
Oct
17
comment How to make Doxygen documentation that helps in understanding the code?
Documentation generators suck because they add no value. Documentation should explain things. For that you need someone who understands them.
Oct
17
comment Is this function violating Single Resp Principle?
The function has a single responsibility -- to parse a particular data format.
Oct
17
answered Algorithm for tiling a surface with no adjacent tiles
Oct
17
answered Should I put the name of the method I'm testing in the Unit Test method's name/assert message?
Oct
16
comment Algorithm for tiling a surface with no adjacent tiles
What do you mean by "best results?" How large are these grids?
Oct
14
comment AOP concepts explained for the dummy
@PaulNathan: AOP is pretty simple in dynamic languages. A simple AOP framework can be created in an afternoon. In compiled languages like Java life is not so sweet.
Oct
14
comment Check word density within a document
@nafas: your first attempts where inefficient because of the unnecessary ".*" in the regular expressions. What timings did you get between "indexOf" and anubhava's suggestion? Also you didn't compare alternate solutions to the OP's problem, which is to locate and count all occurrences of several words.
Oct
13
comment Why were Java collections implemented with “optional methods” in the interface?
sorry, incomplete comment. I was about to say that " 'ways of asking about a collection' ..." moves what should be a compile-time check to run-time.
Oct
13
comment Why were Java collections implemented with “optional methods” in the interface?
@m3th0dman It's much larger in Java because Java doesn't have anything equivalent in power to C++ templates.
Oct
13
comment Check word density within a document
@nafas: how have you measured this? If searching a short string the time to compile the regular expression will dominate the search time. Here we are concerned with the speed over a very long string, so that the time to compile the regular expression is negligible. I am skeptical that indexOf will be much faster than the equivalent regular expression match when searching a long string. They will do essentially the same work in the same way.
Oct
10
comment Check word density within a document
@FrustratedWithFormsDesigner it will work fine for hundreds of words, possibly thousands. You need to think about how you want to handle whitespace in phrases.
Oct
10
answered Check word density within a document
Oct
9
comment Would this be a proper use of threading?
-1: When a thread blocks on I/O (like the reading the network socket connected to the database) the processor is reassigned to a runable thread. Nor does the main thread 'eat up processor time' while it is idle. Non-runable threads consume only memory.
Oct
9
comment Why implement a lexer as a 2d array and a giant switch?
@greenoldman Classes need not overlap. If you start with overlapping classes, you can take their closure over intersection and arrive at a set of non-overlapping classes.
Oct
8
comment Why does dependency injection encourage collaboration to be exposed via constructors?
If you wanted answers specific to c++ you should have added the c++ tag to the question.
Oct
8
comment Why does dependency injection encourage collaboration to be exposed via constructors?
@Daniel: Injected dependencies need not be and should not be shared by different unit test classes. Each unit test class should construct and inject new mock objects needed by the class being tested.
Oct
8
answered Why does dependency injection encourage collaboration to be exposed via constructors?
Oct
7
comment Big O notation for the algorithm
@Ordous: only if you are sorting by comparison.
Oct
6
comment Why implement a lexer as a 2d array and a giant switch?
@greenoldman The lexical analyzer will construct a function to translate a character to a character class, and the DFA transition table will be indexed by character class. For your example, there is one character class. For mine there will be a couple of dozen, one for each character that appears in a token, and others for the digits, underscore, and whitespace.