381 reputation
26
bio website
location Grosse Pointe, MI
age 47
visits member for 3 years, 4 months
seen yesterday

Android, Java, .NET, and Web developer. I've used a variety of languages, from various dialects of assembly language to Python and Ruby. I've toyed with some other languages that I don't know well, like Lisp, Scheme, Smalltalk, Scala, Erlang, and Go.


1d
comment Pointer indexing
I was thinking of adding "with a compiler switch". Obviously you wouldn't want that for optimized code. But, you're right, and that's why I gave up writing C ten years ago.
1d
comment Pointer indexing
If you really want to use indices from 1 without invoking undefined behavior, you could instead allocate space for n + 1 floats and then legally use indices from 1 to n instead of 0 to n - 1.
1d
comment Pointer indexing
I disagree that that is "fortunate". I think it would be much better if compilers emitted code that immediately crashed whenever you invoked undefined behavior.
Jun
26
awarded  Enlightened
Jun
26
awarded  Nice Answer
May
12
comment Does C++ compiler remove/optimize useless parentheses?
s/oldes/oldest/. Good answer, +1.
May
6
comment How can I hide my signature in a program?
You want "versus", not "verses". Unless you and Bob are writing poetry. ;)
May
6
comment How can I hide my signature in a program?
The first one is blech and, as pointed out, is easily defeated by a formatter; the second will give warnings in any good IDE.
Apr
25
comment Strategy for generating unique and secure identifiers for use in a “sometimes offline” web app
"malicious/rouge client" -- rogue.
Apr
25
comment What algorithm should I use to create an automatic staff scheduling feature?
I suspect this is equivalent to the SAT problem, which is known to be NP-complete, but there are no doubt good algorithms that get reasonable results.
Feb
27
comment Able to read Code but struggling majorly to write it
If you were learning to play the violin, would you expect to become good at it just by reading about it, without picking up a violin and playing it?
Feb
7
comment Good idea to put bug numbers in a comment in the beginning of the source file?
There's often another way to get that information (on the project I'm working on, it would be right click > Team > Show Annotations to get the git blame of the current file), but the difference is, with comments there is discoverability -- they can jump out at you -- and with annotations, you have to consciously decide to go looking for them.
Jan
28
comment Returning different types from one function in a dynamically typed language
The above code won't even compile, since getValue doesn't have a return type. Presumably you meant to have it return T.
Jan
17
awarded  Nice Answer
Jun
1
answered When using method chaining, do I reuse the object or create one?
Jun
1
awarded  Editor
Jun
1
revised Approaching Java/JVM internals
Added URLs for OpenJDK and the javac lambda hg repository.
Jun
1
answered Approaching Java/JVM internals
Jun
1
comment Efficient Bus Loading
I can't imagine why this answer got downvoted. Upvoting to compensate. Well done.
Jun
1
comment Review quality of code
What does "unless is ROM is" mean? What is "ROM", here?