3,110 reputation
21026
bio website
location Chicago, IL
age 26
visits member for 3 years, 1 month
seen 14 hours ago

May
13
comment Why does Java support brackets behind variables and even behind method signatures?
Since you'd typically use array indexes as foo[i], I'd argue declaring arrays as int foo[] makes a hell of a lot more sense than other ways around. It's also entirely clear which variable is an array, while int[] foo, bar is not. (Is it just foo or are both of them arrays?)
May
12
comment Should I use initializer blocks in Java?
@amon and dirkk: The original post (probably the one Simon saw) had a typo with the "first constructor/second constructor" comments that made it look like there wasn't one. Granted it would have been a syntax error, but SE's syntax highlighting made the intent harder to spot.
May
11
comment Should you always pass the bare minimum data needed into a function in cases like this
@GlenPeterson See this question on hashing multiple times. It can be more secure if you're careful about it, but more likely than not it will become less secure due to collisions. Hence, as BenLee suggested, use bcrypt, which is built to do this safely.
May
9
comment How to deal with team members writing bad code
@Kevin That's quite a bad one. With no actual reason given, would you also jump off a bridge if everyone else is?
May
7
comment Why would Square inheriting from Rectangle be problematic if we override the SetWidth and SetHeight methods?
@Doval Which is why this is a good question: Rectangle and Square (or Circle and Oval) are two of the go-to explanations for explaining why inheritance is nice. Yet they're wrong(ish). Kind of like Fibonacci and recursion, it's a common example that beginners don't understand the nuances of.
May
6
comment Utility Functions Best Practices
@JohnGaughan Not necessarily. The wrapper could be for a specific, common use of a flexible system. For example, such as in the question, SQL that takes no parameters is a common but specific subset of SQL in general.
May
6
comment Is converting/casting a boolean to int a good idea?
In some languages (like SQL), null can make booleans tri-state, so there's a further example.
May
5
comment How can I hide my signature in a program?
This is outright giving the other students the assignment. If caught, you would have been expelled from my college for cheating. The public log doesn't matter; it's trivial to change variables and other such conventions without understanding the logic behind the code, making it harder to spot/compare automatically.
May
4
revised Why is studying an lisp interpreter in lisp so important?
Bullet points instead of a big blob, fixed my name
May
3
comment What's the verb for “currying”?
@Pacerier ...both of which are derived from the verb. Aside, dictionary.com is usually a better reference - it's far more thorough, and includes all the meanings of "walking". The actual action (present participle form) is what I was referring to, which the noun forms are derived from.
May
3
comment What's the verb for “currying”?
@Pacerier Had to search for "act of a verb", as I've not heard that particular phrase before. It results in a wikipedia page on the Finnish language and someone asking how to explain something in Italian (using not-very-good English). Apparently it's not typically used in English. My best guess is that you're referring to something like a gerund or the present participle verb form...
May
3
comment What's the verb for “currying”?
@Pacerier A technique refers to a thing. The particular thing being referred to in this case is a verb. Separate concepts. (For example, "walking" and "running" are a techniques for getting from place to place, but they are not nouns either)
May
3
comment What's the verb for “currying”?
@Pacerier "currying" (the programming technique) is never a noun
May
2
comment Why don't more languages have the ability to compare a value to more than one other value?
That particular numpy example could be rewritten clearer as 2 in [1, 2, 3]. On the other hand, if numpy has a .all() or something, the equivalent plain python is not nearly as concise.
May
2
comment Where can I find “SVN for Git Users” resources?
@IdanArye git mv is implemented as add+remove. git uses heuristics to determine if a move or copy took place during a commit (I think the default is, "is 80%+ of the file the same?")
May
2
comment Progressive Enhancement vs. Single Page Apps
@AlanShutko Perhaps with iframes. Multiple pages, but technically the URL isn't changing... ;)
Apr
30
comment Why is studying an lisp interpreter in lisp so important?
You can do it in other languages, but not nearly so easily. - Like? (The question to me seems to be because statements like these are often made, but almost never get more specific)
Apr
30
comment If you need more than 3 levels of indentation, you're screwed?
@Steve314 It's one at-a-glance-thing when you comprehend what the whole structure is doing. But when trying to comprehend it, each of the 7±2 "things" include stuff like: 1) iterable variable, 2) loop instance variable, 3) loop body if comprehended as a whole, (or if not yet comprehended as a whole, from wheaties' example:) 4) the if condition, 5) which case is used, 6) another if, 7) another if...
Apr
30
comment What does 'stage' mean in git?
@jiggy git allows you to stage part of a file. You can also stage a file, make further modifications, then commit the state it was in at staging. You can't do that in subversion.
Apr
27
comment Why do browsers these days ship with dev tools
@Snappawapa So remove the link in the menu/the hotkey to open it. Takes almost no work to keep it out of the hands of those who don't understand it. So why don't they?