3,236 reputation
21029
bio website
location Chicago, IL
age 26
visits member for 3 years, 3 months
seen 4 hours ago

May
13
comment Why store a function inside a python dictionary?
@mdeutschmtl "the fact that what you see on the surface is just a conventional way of presenting something much deeper." - that's called syntactic sugar and exists all over the place
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
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?
Apr
26
comment Are there numbers that are not representable in base 10 but can be represented in base 2?
@Ramhound Given memory limitations, binary can represent 0.0999999....998.. exactly, but not the full number 0.1 - approximations like rounding to the nearest hundreth with 0.100 are an implementation concern that involves not showing you all the digits and rounding it instead.
Apr
22
comment Are multi-line comments a critical facility in a modern language?
@HostileFork That's an old question that predates Programmers.SE. As I understand it, it can't be migrated here now.
Apr
22
revised Using multiple Git repositories instead of a single one containing many apps from different teams?
Fixing a link