There's pretty much never a reason to build your own SQL string outside of a library.
Not to negate your argument (with which I agree), I want to demonstrate a case where building your own SQL string makes sense. Suppose you want to perform a SELECT that matches a set rather than a given value:
SELECT make, model FROM vehicle WHERE vin IN ('1M8GDM9A_KP042788', '1M8GDM9A_KP042789');
The prepared statement is a function of the number of VINs in the set. Something like this python code:
VINs = ("1M8GDM9A_KP042788", "1M8GDM9A_KP042789")
SQL = """ SELECT make, model FROM vehicle WHERE vin IN (%s) """ % ', '.join(["%s"] * len(VINs))
dbconn.execute(SQL, VINs)
The risk to manage here is the possibility of an overflow in the number of parameters. You might need to restrict the size of VINs before attempting to prepare the statement.
...by means of HFT cheating people out of their money using an automated tool. How HFT isn't considered fraud, is beyond me... The fraudster on the corner with 3 cups and a ball is just a less tech version of HFT algorithms.
Are you implying that HFT is fraud merely because it is automated ("automated tool" and tech comparison)? Or because it is gambling (3 cups comparison)? If it's automation that you're irritated about, then yes HFT is a problem (along with every other non-cottage industry). If it's gambling, then you should be complaining about speculation and not HFT.
Who ports these days? Java is more portable by virtue of the VM. C is more portable by virtue of its simplicity.
Apparently not you. The language doesn't help you when there are differences with the filesystem structure, environment variables, shell execution, user interface guidelines and expectations, compatibility concerns with standard library versions (mscvrt.dll, libc.so, jre version), etc. Nontrivial multi-platform software is still hard to get just right.
Making splice() O(N) to give size() in O(1) is the reasonable and user friendly thing to do.
No, that's not reasonable. If std::list doesn't track size internally, it is still possible to have an O(1) size() equivalent by tracking it yourself. If it does track size internally, it becomes impossible to have an O(1) splice() equivalent. That's very important for moving sections of memory around in a resource-constrained environment.
Even assuming these apps were effective (which they're notoriously unreliable), anyone coherent enough to use this app and plan an alternate route is probably okay to drive.
I assure that I can be drunk as a skunk and still plan and use computers. Clumsily.
When you say "Information wants to be free," you're saying "people can distribute information for free," which has very little to do with the natural tendencies of the information itself.
That notion also assumes that information has no value. In fact, there is quite a bit of information that can be manipulated for profit, and typically the people who want information to be free are not the people who stand to profit from controlling it.
I'd guesstimate that the actual prototype definitions are at most 20% of the total line count on average. The rest is pretty much unique to the given compiler, and there's no way anyone could claim that it's not creative or copyrightable.
I think a reasonable argument is that the function/enum/union/struct definitions are themselves fact (and therefore not subject to copyright), whereas the mechanism used to express them on a given platform (compiler+os+extra) is another issue entirely. Similar to the phonebook argument - the phone numbers, names, and addresses are facts and thus may not be copyrighted, but the presentation is creative and thus may be copyrighted.
Yes, the arithmetic mean is not a resistant measure of center, and can be influenced dramatically by outliers. On the other hand, in a normally distributed set of data, the arithmetic mean and the median will be equal. In many populations, many of the statistics that you could measure will be (approximately) normally distributed.
That's a fair point. However, the argument that mean ~ median puts the cart in front of the horse. Why not just calculate a median in the first place? Then at least you don't care about the distribution. It also lends itself well towards quartile/percentile information, which is quite interesting for some topics (i.e. wealth distribution).
Since a metric which quantifies the quality of a lawyer is likely to consist of many variables, each with their own distributions, the central limit theorem implies that the overall distribution of quality will be normal (of course, this is under the assumption that a large enough proportion of those variables are independent, which may or may not be a dubious assumption).
Variable independence aside, I believe you're making assumptions that the central limit theorem doesn't allow. It's possible that while there are thousands of observable attributes of lawyers, the only one that matters is "mojo". If one has mojo, he(she) wins cases and finds legal loopholes; and if one doesn't, one suck balls. Therefore, your assertion that overall lawyer quality must be something near a Gaussian is incorrect in a mojo-driven universe.
That's my kind of WWW. A functional site stands on its own without javascript. IMHO a site that doesn't work without AJAX/hidden-iframe-JSON-loaders is something that doesn't need to be embedded in a web browser. Get off my lawn and whatnot.
Unless I go for the least common denominator, that means one palette for the red-green colorblind, one for the blue-yellow colorbind, one monochrome, and one for those who have normal color vision. This is at least two palettes, maybe more -- red and green are far too useful to ignore for those who can see them.
Are you a developer or an artist? I can see this being constraining for an artist, but from a developer's perspective I think the addition of constraints makes decisions and arguments with artists/designers easier:
Red/green and blue/yellow distinctions must also have luminance distinctions, to allow a colorblind viewer to see a distinction. Constraint on color ranges reduces arguments.
Color can only be used as a visual hint. E.g. a green "Yes" button and red "No" button (not a "green" button and a "red" button). Constraint on textual content reduces arguments.
Colors that are very similar to each other should be used for similar tasks, so that the inability to distinguish between them does not harm a user. Constraint on color range (as well as total number of colors in use) reduces arguments.
Furthermore,these constraints will improve the ease of use for many users, not just those with handicaps. Combined text and color is easier for scanning while still being very clear. Poorly-calibrated LCDs (or at odd viewing angles) are less likely to blend colors that shouldn't blend. Bright and dark regions pop visually. Many of these issues are overlooked by someone who is looking for precise artistic control in an interface.
Maybe you missed the memo, but the world got more complicated than that after kindergarten.
Are you suggesting that complex social situations render simple guidelines worthless? I don't care how complex the world can be; "two wrongs don't make a right" is always a good starting point.
I didn't say anything about intent. I was talking about the portion of my activity which is in violation of the law vs. someone else's activity, which was in direct response to the GGP post.
Intent is at the heart of the consideration of relative guilt of Google vs. IsoHunt. It can be assumed that Google's low percentage of linked torrents (relative to total number of linked documents) indicates relatively honest[1] intent, whereas IsoHunt's high percentage of linked torrents (relative to total number of linked documents) indicates intent to aid copyright infringement. The percentage reasonably indicates intent because a judge cannot read minds, which is why IsoHunt will be screwed in court and not Google. The same logic (percentage implying intent to aid crime) does not apply to speeding.
[1] the notion of "honesty" is used pretty loosely in this context, with the assumption that most torrents exist for the purpose of copyright infringement rather than efficient distribution of Linux distros and World of Warcraft patches.
I'm sure RMS would be ok with a law that did away with copyrights and said that all code and culture that was distributed should be freely shareable.
You clearly haven't read enough RFCs! Otherwise, you would know that "should" means "maybe" which devolves into "fat chance, sucker!" as soon as the first asshole shows up.
...the market perceived it to be a good bang for the buck.
...the price reached a level that people were willing to pay.
IANAEconomist, but those statements sound identical in the context of video game purchases. Whether the market's perception is due to the price by itself or the psychological impact of a temporary price reduction is another issue. However, nobody buys a video game if they don't think it's a good deal (where "good" is really "good enough").
That is, unless your friends are speculators who think they can buy underpriced video games and sell them to a market for a small profit. Then I suppose I could see the distinction between "bang for the buck" (profitable) and "willing to pay" (break-event).
Have you ever tried to argue with a photo lab clerk?
OMG you're totally right. They just never let up about those bathtime pictures with the neighbor kids! It's like fighting with a brick wall and then they call the police.
(And if it's completely IO bound, there's never been any reason to fork it 20 ways.)
I can think of a few reasons:
Code with blocking I/O is easier to write than asynchronous I/O. The system calls are easier. The inter-task scheduling is managed People Who Get Paid To Do That instead of the local application developer, which means it's less prone to weird corner cases like starvation or lost signals.
Some per-process limitation crops up, such as a 32-bit memory space ceiling or a ulimit. Splitting tasks into multiple processes allows the kernel to manage a larger amount of resources (virtual memory, open file descriptors, what-have-you) than can any single process.
Some inherent unreliability exists in the system, such as dynamic linkage to plugins like FlashPlayer.exe or mod_php.so. Splitting tasks into multiple processes allows one of them to die in a fire after shitting all over its own stack.
A number of people came out of the woodwork to chastise this child for potentially ruining the teacher's career and life. I wonder if people are going to speak up against this blogger as he caused Moore to lose his job and impacted his reputation accusing him of being a crook.
Perhaps that is related to the presence of the "Sex Offender List" lifetime achievement award? Also, consensus at the time was that the child was lying. Lying is morally wrong. Mortgage fraud is lying. These people coming out of the woodwork are supporting the moral value of honesty, not the mere act of "public accusation".
Am I the only one who scanned this and thought, "This SOB's wife died, and he's asking /. for opinions on reformatting her laptop?"
Python DBAPI supports sets natively? You just made my day!
I've been doing the same in C using libPQ, except that it uses $1, $2, ..., $N for placeholders. I wonder if there's another way in that language...
In related news, teenagers are still bad at driving! Won't they ever learn proper lane usage?
One of the tables replies, "Naturally."
Not to negate your argument (with which I agree), I want to demonstrate a case where building your own SQL string makes sense. Suppose you want to perform a SELECT that matches a set rather than a given value:
The prepared statement is a function of the number of VINs in the set. Something like this python code:
The risk to manage here is the possibility of an overflow in the number of parameters. You might need to restrict the size of VINs before attempting to prepare the statement.
Are you implying that HFT is fraud merely because it is automated ("automated tool" and tech comparison)? Or because it is gambling (3 cups comparison)? If it's automation that you're irritated about, then yes HFT is a problem (along with every other non-cottage industry). If it's gambling, then you should be complaining about speculation and not HFT.
Apparently not you. The language doesn't help you when there are differences with the filesystem structure, environment variables, shell execution, user interface guidelines and expectations, compatibility concerns with standard library versions (mscvrt.dll, libc.so, jre version), etc. Nontrivial multi-platform software is still hard to get just right.
No, that's not reasonable. If std::list doesn't track size internally, it is still possible to have an O(1) size() equivalent by tracking it yourself. If it does track size internally, it becomes impossible to have an O(1) splice() equivalent. That's very important for moving sections of memory around in a resource-constrained environment.
I assure that I can be drunk as a skunk and still plan and use computers. Clumsily.
That notion also assumes that information has no value. In fact, there is quite a bit of information that can be manipulated for profit, and typically the people who want information to be free are not the people who stand to profit from controlling it.
I agree with you!
I disagree with you! I believe that most people mean "arithmetic mean" when they say "average". It may simply be a product of local math education.
I think a reasonable argument is that the function/enum/union/struct definitions are themselves fact (and therefore not subject to copyright), whereas the mechanism used to express them on a given platform (compiler+os+extra) is another issue entirely. Similar to the phonebook argument - the phone numbers, names, and addresses are facts and thus may not be copyrighted, but the presentation is creative and thus may be copyrighted.
That's a fair point. However, the argument that mean ~ median puts the cart in front of the horse. Why not just calculate a median in the first place? Then at least you don't care about the distribution. It also lends itself well towards quartile/percentile information, which is quite interesting for some topics (i.e. wealth distribution).
Variable independence aside, I believe you're making assumptions that the central limit theorem doesn't allow. It's possible that while there are thousands of observable attributes of lawyers, the only one that matters is "mojo". If one has mojo, he(she) wins cases and finds legal loopholes; and if one doesn't, one suck balls. Therefore, your assertion that overall lawyer quality must be something near a Gaussian is incorrect in a mojo-driven universe.
FWIW, I am typically a grammar nazi, too :)
That's the joke.
That's my kind of WWW. A functional site stands on its own without javascript. IMHO a site that doesn't work without AJAX/hidden-iframe-JSON-loaders is something that doesn't need to be embedded in a web browser. Get off my lawn and whatnot.
Are you a developer or an artist? I can see this being constraining for an artist, but from a developer's perspective I think the addition of constraints makes decisions and arguments with artists/designers easier:
Furthermore,these constraints will improve the ease of use for many users, not just those with handicaps. Combined text and color is easier for scanning while still being very clear. Poorly-calibrated LCDs (or at odd viewing angles) are less likely to blend colors that shouldn't blend. Bright and dark regions pop visually. Many of these issues are overlooked by someone who is looking for precise artistic control in an interface.
Are you suggesting that complex social situations render simple guidelines worthless? I don't care how complex the world can be; "two wrongs don't make a right" is always a good starting point.
Intent is at the heart of the consideration of relative guilt of Google vs. IsoHunt. It can be assumed that Google's low percentage of linked torrents (relative to total number of linked documents) indicates relatively honest[1] intent, whereas IsoHunt's high percentage of linked torrents (relative to total number of linked documents) indicates intent to aid copyright infringement. The percentage reasonably indicates intent because a judge cannot read minds, which is why IsoHunt will be screwed in court and not Google. The same logic (percentage implying intent to aid crime) does not apply to speeding.
[1] the notion of "honesty" is used pretty loosely in this context, with the assumption that most torrents exist for the purpose of copyright infringement rather than efficient distribution of Linux distros and World of Warcraft patches.
Emphasis mine:
You clearly haven't read enough RFCs! Otherwise, you would know that "should" means "maybe" which devolves into "fat chance, sucker!" as soon as the first asshole shows up.
IANAEconomist, but those statements sound identical in the context of video game purchases. Whether the market's perception is due to the price by itself or the psychological impact of a temporary price reduction is another issue. However, nobody buys a video game if they don't think it's a good deal (where "good" is really "good enough").
That is, unless your friends are speculators who think they can buy underpriced video games and sell them to a market for a small profit. Then I suppose I could see the distinction between "bang for the buck" (profitable) and "willing to pay" (break-event).
OMG you're totally right. They just never let up about those bathtime pictures with the neighbor kids! It's like fighting with a brick wall and then they call the police.
I could be wrong, but I don't think "partisan" was meant in the political sense. I think the word is being more generically used, as in a firm adherent to a party, faction, cause, or person; especially : one exhibiting blind, prejudiced, and unreasoning allegiance.
Sadly, you are probably right that the term refers to a majority of the population.
I can think of a few reasons:
Really? It was always the best in SimCity 2000.
Perhaps that is related to the presence of the "Sex Offender List" lifetime achievement award? Also, consensus at the time was that the child was lying. Lying is morally wrong. Mortgage fraud is lying. These people coming out of the woodwork are supporting the moral value of honesty, not the mere act of "public accusation".