193 reputation
14
bio website
location Seattle, WA
age 29
visits member for 2 years, 8 months
seen Jul 3 at 14:33

Apr
26
comment Are there numbers that are not representable in base 10 but can be represented in base 2?
@PatrickM: "Aside: is there a word to indicate numbers that do or don't share all common factors?": Any integer is a factor of itself, so if all factors of m are factors of n, then it trivially follows that m is a factor of n. One term for this, as you clearly know, is factor. Another is divisor.
Nov
5
comment What is meant by, “A user shouldn't decide whether it is an Admin or not. The Privileges or Security system should.”
@Phil: user.getRole().isAdmin() implies that a given user has only a single role. That's even worse than user.isAdmin(), which implies only that a given user either is an administrator everywhere or is not an administrator anywhere.
Oct
26
comment What are the safety benefits of a type system?
@BenjaminGruenbaum: Your comments are valuable, and that paper is interesting, but it does not bear out your claim that "it's usually undecidable in static languages like Java too", since it demonstrates that it is decidable in C#, and leaves open the question of whether it's undecidable in Java. (And anyway, IME, when a compiler for a statically-typed language can't decide that something is well-typed, it rejects it (or fails to compile it), so undecidability is an annoyance rather than a hole in the type-safety.)
Oct
17
comment How much freedom should a programmer have in choosing a language and framework?
@brichins: I think one of the big problems with this answer is that it actually doesn't point out what you say it does!
Oct
6
comment Why is quantity in software still written as “1 result(s)”?
@Aaronaught: No, no, you're misunderstanding my comment. I noticed the RTL issues, and saw your comment about them, so I looked past them. I'm talking about the actual translation that Google Translate gives: it's drawing a distinction that does not exist, and that therefore isn't relevant to real localization done by humans.
Oct
5
comment Why is quantity in software still written as “1 result(s)”?
+1, but I think this might say more about Google Translate than about correct localization. For example, for Hebrew it thinks that when you've got one item, you should say matsa prit 1 "found 1 item", and when you've got two, you should say 2 pritim nimts'u "2 items were found". In reality, of course, there's no such distinction: matsa 2 pritim "found 2 items" and prit 1 nimtsa "1 item was found" are both fine. (Still, prit 1 "1 item" vs. 2 pritim "2 items" is genuinely tricky.)
Oct
3
comment Optional semicolons
@MichaelT: I don't think your classifications are correct: Perl arguably belongs to both groups, and JavaScript is actually in the "statement terminators" camp (since implementations are required to infer a semicolon before } or at end-of-file).
Oct
3
comment Optional semicolons
[Highly pedantic note: I should say that technically speaking, per the spec, a JS program containing return followed by a newline is invalid until the semicolon is inserted, because the syntax of a return statement forbids a newline after the keyword. But this amounts to the same thing.]
Oct
3
comment Optional semicolons
@delnan: The reason it's surprising is that JavaScript usually doesn't insert a semicolon at the end of a line, except to fix an otherwise-invalid program. After return is one of only a handful of cases where JavaScript will insert a semicolon even if the program would be valid without it. (But of course, this undermines Mason Wheeler's point. The problem isn't that the semicolons are optional, it's that the rules are inconsistent.)
Aug
3
comment Are bugs part of technical debt?
+1. I think BЈовић's answer is pretty much right, but your answer really hits the nail on the head. (I'm a bit confused by your use of the term de facto, though. I don't think you can be saying that de jure, a bug is technical debt?)
Jul
30
comment How to create better OO code in a relational database driven application where the database is poorly designed
Most of the problems you list . . . aren't. The use of surrogate keys rather than natural keys is actually a pretty standard recommendation nowadays; not "poor design" at all. The lack of constraints and the use of inappropriate column-types is a better example as far as "poor design" goes, but it shouldn't actually affect your application code at all (unless you plan to abuse these problems?).
Jul
27
comment Methods as verbs: is the object the subject?
@leonbloy: In this instance, I disagree; you are asking the OutputStream instance to "write" the specified bytes. You're not writing to the OutputStream instance, you're having the OutputStream instance write to whatever-it's-set-up-to-write-to. (But in general, I agree that the method-name is not always a verb with the instance as subject.)
Jul
27
answered Are closures sufficient to characterize functional programming?
Jul
21
awarded  Teacher
Jul
21
answered Is it necessary to follow the standard , take the C standard for that matter?
Jul
14
comment What's the difference between college-level and corporate programming?
@Bevan: The word "professional" is genuinely ambiguous; senses listed in the Wiktionary entry include both "Of, pertaining to, or in accordance with the (usually high) standards of a profession" and "That is carried out for money, especially as a livelihood." Being paid automatically makes you a professional programmer in the latter sense, even if it says nothing about the former.
Jul
4
comment Is fewer lines of code always better?
@dodgethesteamroller: Each of those claims seems intuitively obvious, but, don't they sort of contradict each other? I mean, with Java (unlike, say, C++) there aren't usually separate "debug builds" and "release builds"; so if two programs differ in their debuggability, that must be because they were compiled differently. No?
Jun
12
comment Should I use parentheses in logical statements even where not necessary?
@dodgethesteamroller: Well, I made the point before you did, so I don't think you can call it your point! :-) (See my comment five above yours.) . . . Re: Pascal: Oops, you're right. I was looking at or else vs. and also, rather than bare or vs. and.
Jun
12
comment Should I use parentheses in logical statements even where not necessary?
@dodgethesteamroller: Dude, you can find a language with any property you can think of. In this case -- Pascal, ALGOL 58, FORTRAN 77, and some parts of the POSIX shell. (Note that in the cases of ALGOL and FORTRAN, newer standards fixed this deficiency, and in the case of the POSIX shell, newer parts of the language have chosen to be inconsistent with the deficiency. Pascal is the only language that seems to have really wanted "and" and "or" to have the same precedence.)
Jun
12
awarded  Pundit