3,293 reputation
21030
bio website
location Chicago, IL
age 26
visits member for 3 years, 6 months
seen yesterday

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
Apr
10
comment How can I make my logging more useful?
...by writing better log messages?
Apr
9
revised Real time unit testing - or “how to mock now”
[Edit removed during grace period]
Apr
9
answered Real time unit testing - or “how to mock now”
Apr
9
comment Real time unit testing - or “how to mock now”
@mika Is this question strictly limited to testing, or is an answer involving some refactoring of the code also acceptable?
Apr
9
reviewed Approve Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?