3,353 reputation
21030
bio website
location Chicago, IL
age 27
visits member for 3 years, 10 months
seen 21 hours ago

Apr
8
comment How do you store “fuzzy dates” into a database?
+1, It's ugly and creates a lot of useless extra information for the new entries that don't require it, but on the other hand it does keep queries much simpler than they otherwise would be. We've been using a similar solution for a related issue for a while now.
Apr
7
comment How to maintain user relationship when user unfollows another user
UNIQUE (follower, following), then, if that makes more sense for you. I tend to use pkey in that situation, though, since that combination is the key for that table.
Apr
7
comment How important is it to reduce the number of lines in code?
@mh01 I'm guessing because most of this one is wrong? Specifically, in most cases, it is more important to increase the number of lines of code by breaking out complex operations into more readable steps is not my experience at all. Complex code can more often be made more readable and less buggy by making it smaller and simpler, because it got to be complex from being written by someone who was new to the language/new to the problem/not sure what they were doing.
Apr
7
comment How to maintain user relationship when user unfollows another user
Why even have the ID column in a links table? Does your database not allow PRIMARY KEY (follower, following) to keep the two unique together?
Apr
6
comment how to stay efficient when a build is almost always broken
@Useless Depends on the VCS. Subversion allows committing changes as long as there's no conflict with the specific files you're committing.
Apr
5
comment What is the difference between “Syntax” and “Syntactic Sugar”
@Giorgio I never said they were contradictory or mutually exclusive - but the two uses don't mean the same thing, either. One is a superset of the other.
Apr
5
comment What is the difference between “Syntax” and “Syntactic Sugar”
@Giorgio Half the definitions of ad-hoc follow your definition. The other half are about improvising a solution - something created later. That second definition is how I know the word, and how I hear it used most of the time - and how Bart seems to understanding it.
Apr
5
comment What's the word for an operation that can be applied multiple times and never change state beyond the initial application?
Are you asking about something like a GET request (where the same result is returned every time no matter what), or are you asking about something like the assignment operator (which does have an effect, but repeating the same assignment doesn't change anything)?
Mar
31
comment Are There Any Flaws With This Git Branching Model?
@ReinHenrichs The "evil merges" that mmutz was describing have nothing to do with git bisect alone. It happens when feature A changes a function that feature B also uses. All tests will pass in both A and B prior to the merge, but after the merge tests can break due to incompatible changes between A and B - but git bisect can't partially apply one branch to another, so its only clue is that the merge commit is when the bug was introduced.
Mar
31
comment How can you provide a public writeable API and not get spammed?
Hint: All websites have a pseudo-API by way of GET and POST requests between the browser and web server, which can be scripted and therefore would be accessible by the bots you fear.
Mar
31
comment Ambiguous use of “Controller” in MVC
The intermediate layer is the later that deals with input, isn't it?
Mar
28
comment Any performance advantage in copying the session to a variable?
@Cymbals PHP uses copy-on-write, so $copiedSession = $_SESSION isn't actually a copy; they really are pointing at the same data structure until one of them changes - if Brandon is correct and it really is just an array. If it's a special object, I'm not so sure.
Mar
25
comment Keep a programming language backwards compatible vs. fixing its flaws
An aside, that blog post annoys me because he mixes non-issues (stuff that's only a problem if you're thinking with another programming language - like writing Python as though it's C) with actual problems in the language...
Mar
24
awarded  Popular Question
Mar
23
comment Negative test cases confusion
@user970696 In your comment here, "positive" is being used for "the test passes" and "negative" for "the test does not pass". It sounds like that book is not only using nonstandard terminology, but using the same nonstandard words for multiple things.
Mar
22
comment Python code style - blank lines in long list
@DemianBrecht Downvote is based on the first half. Your edit doesn't stand alone, and is meaningless without the comments (I didn't get what you were trying to explain with it until afterwards - I thought it was an addition to the first block of code) - I'll remove it if you clear up the answer.
Mar
22
comment Python code style - blank lines in long list
@DemianBrecht You're increasing complexity, decreasing readability, and gaining no additional flexibility (that couldn't be done more simply), all in the name of "being pythonic" - IMO, very bad advice.
Mar
22
comment Python code style - blank lines in long list
+1, you should never make something more complex if it also makes it harder to understand for no real benefit.
Mar
22
comment Python code style - blank lines in long list
If it makes the code easier to understand, who cares about "pythonic"?
Mar
18
comment Do Flexibility and Inconsistency,Unsafety Overlap?
@Esailija If I had to guess, I think Pindexis is thinking of something where the function had 1 or 2 required arguments (which could be named), but the rest are variable. The function body was probably written to use arguments for all of them (which, IMO, is usually easier to read, since the named arguments would still show up in arguments IIRC)