3,323 reputation
21030
bio website
location Chicago, IL
age 27
visits member for 3 years, 10 months
seen 2 days ago

Apr
3
comment Is it the standard accepted practice to install software using VBScript?
*entering a token, not license key
Apr
3
comment Is it the standard accepted practice to install software using VBScript?
"but actually, where is the difference for the user if he has to copy a VBS file to a second machine, or if he has to copy a license file?" - Entering a license key can have typos. But they do have to use email/flash drive/etc to get the file over there, so it is a trade-off
Mar
23
comment Method extraction vs underlying assumptions
You can also nest functions in C using gcc (but I don't know if that's a language thing or a gcc extension)
Mar
21
comment How come the computer doesn't have to read the entire table when the column is indexed?
Sounds like you need a better intuitive example of what an index is
Mar
12
reviewed Approve Why do schools teach arrays over List?
Mar
6
comment Name for a Function which Returns its Arguments?
@Telastyn And in Java 8 it's still called "identity". The name is easing out of its math/functional background and becoming the standard.
Mar
3
comment What programming technique is this?
I think you're running into memoization
Feb
20
comment How to sell DRY architecture
@gnat Doesn't seem like a duplicate - here they agree that quality is good, but not how to get quality code.
Feb
5
comment Is there a name for the problem of representing state twice and then getting out of sync?
With regards to databases, the equivalent of DRY is third normal form. Not sure if it can be applied to data in the code (free variables, object attributes, etc)
Feb
1
comment Literal strings vs. object properties in JavaScript
And if the latter's verboseness really is an issue for the user (as it would for me), the examples are really really easy to create a short wrapper that takes an array of objects and calls .addColumn() for each
Jan
30
comment Are there any benefits of using this extra variable in the for loop annotation?
According to your jsperf, the one without n is faster on my computer. So yeah, don't do this - assuming it even did anything (there may be more going on similar to what CodesInChaos mentions), it's a micro-optimization that's so minor, any other fluctuation in CPU usage has more of an effect.
Jan
15
comment Is there a pattern for a more “natural” way of adding items to collections?
@KilianFoth If you're restricting yourself to just one function/method, sure. But if you want to base it off of English or similar languages, a wrapper for the singular item seems closest: put(item).into(items)
Jan
9
comment One-line functions that are called only once
@JamesAnderson Current time shouldn't be treated as a global. Imagine unit testing a leap-year bug where the "current time" has to be set to something specific.
Jan
5
comment What are 4th & 5th programming language generations? Are there more of them?
"There is no universally accepted definition of what exactly defines the “nth generation” for n > 2." - Okay, so, what are 1 and 2?
Jan
5
reviewed Approve What are 4th & 5th programming language generations? Are there more of them?
Dec
23
comment JavaScript strict mode compatibility
@jfriend00 this === window in a regular function call, not undefined (unless there's something changing it higher up the call stack)
Dec
17
comment Are all magic numbers created the same?
@Snowman Fear the Leap Second
Nov
30
comment Why is the concept of lazy evaluation useful?
@stakx Without a better description, they don't seem to be related except by chance. The advantage of laziness in this example is that a lazy generator is capable of generating all possible states of the game, but isn't going waste time/memory doing so because only the ones that happen will be consumed. The generator can be separated from the consumer without being a lazy generator, and it's possible (albeit more difficult) to be lazy without being separated from the consumer.
Nov
20
comment Is using MultiMaps code smell? If so what alternative data structures fit my needs?
@SebastianRedl Looks like a little bit of both; YAML seems to allow deserialization into arbitrary object instances, and requires extra work to prevent code execution in dynamic languages
Nov
20
comment How do I review code changes that are the result of syncing?
What do you use for version control? git, svn, hg, etc..?