22,798 reputation
23792
bio website
location Dallas, TX
age
visits member for 3 years, 5 months
seen 11 hours ago

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.


Jun
18
answered How to avoid downcasting?
Jun
17
comment What complexity do DI frameworks add?
@Dennis: Guice isn't intrusive at all. The Guice container is merely an alternative way to get object instances. You can still call constructors if you like. That is handy for unit testing with mocked dependencies.
Jun
17
comment How to define different names for the same type and have the compiler check them?
perhaps, but explicit instantiation prevents a lot of very useful compile-time type calculus. The result is that for many applications (e.g. engineering calculations involving diverse physical units) C++ can provide more compile-time type safety than Ada. There's no analogy between the implicit typing of FORTRAN and the automatic generation of new types for the results of computations. Also FORTRAN had implicit type conversions making the consequences of an unfortunate name choice potentially catastrophic.
Jun
17
comment How to define different names for the same type and have the compiler check them?
-1: For this purpose, C++ templates are much more powerful than Ada generics. With automatic instantiation of types and functions, it is possible to get complete compile-time dimensional analysis. Ada generics are not as powerful because all types and free functions must be explicitly instantiated. Compile-time dimensional analysis is not practical in Ada without compiler modifications. See people.cs.kuleuven.be/~dirk.craeynest/ada-belgium/events/13/…
Jun
16
comment Regex to String generation
@Giorgio: yes, if you take the legal transitions at each state in collating order. The previously tried inputs are recorded, to after backtracking you just take the next legal character after the one previously used.
Jun
14
answered putting methods in base class that doesnt make sense/belong there
Jun
13
awarded  Nice Answer
Jun
13
comment Diagram to show code responsibility
@MikeSamuel: has someone asked you to do this? Or are you trying to convince someone that the product will be buggy if they don't make all those developers and maintainers follow some practice that you will define?
Jun
12
comment Diagram to show code responsibility
Technical arguments won't help your situation. Been there, done that. If they could follow technical arguments they wouldn't have hired a bunch of asshats. They will dump a couple million into a big pile of WTF and either cancel the project entirely, push it to a buggy conclusion, or start over with a new contractor. Your best move is to look for a position on a project where someone has a clue.
Jun
12
comment Can an object oriented program be seen as a Finite State Machine?
@Steve314: removed my negative vote
Jun
12
answered Accepting a numerical range in a function call
Jun
12
comment Accepting a numerical range in a function call
Which language? The answer to an API design question like this one is ALWAYS language-specific.
Jun
11
comment Array of pointers in C++.
The declaration and assignments to ptr do nothing and could be deleted without changing the behavior.
Jun
10
answered Regex to String generation
Jun
3
comment Serialized values or separate table, which is more efficient?
He's right only if the database is very large. Otherwise it will all be cached and the fetch time will be insignificant.
Jun
2
comment Serialized values or separate table, which is more efficient?
Is request_creation_email_config a model, or just a string? What is your colleague hoping to save? Disk space? Table joins?
Jun
2
comment Can an object oriented program be seen as a Finite State Machine?
-1: Push-down automata are NOT as powerful as Turing machines.
Jun
2
comment Can an object oriented program be seen as a Finite State Machine?
@Steve314: Formally, deterministic automata are in a single state. Each input leads to a new state. For non-deterministic automata, each input can lead to multiple states. A non-deterministic automaton with N states can be emulated by a deterministic automaton with 2^N states.
May
29
answered Algorithm for flattening overlapping ranges
May
23
comment Eliminating Magic Numbers: When is it time to say “No”?
Why write the awkward phrase "DAYS_TO_SECONDS_FACTOR" when standard English already have a perfectly good, unambiguous name for that number: "SECONDS_PER_DAY".