skysight-inc/HackerNews huggingface dataset:
Is there anyone who have really invested time to learn proper unit testing and still thinks it is not one of the best programming inventions ever? Seriously, there are lots of naive posts lately on HN...
The article is full of messy and wrong arguments that are hard to summarize.
"Now, retrieving 48 individual records one by one is sort of silly, becase you could easily construct a single where Id in (1,2,3..,47,48) query that would grab all 48 posts in one go. But even if we did it in this naive way, the total execution time is still a very reasonable (48 * 3 ms) + 260 ms = 404 ms. That is half the time of the standard select-star SQL emitted by LINQ to SQL!"

His "naive way" is the 48 individual SELECTs, and he's claiming that that's faster than one SELECT (star).

His point about SQL vs. LINQ may or may not be valid --- I don't know since I don't use LINQ --- but his argument and measurements are certainly flawed.

The nice thing about software such as a database is that, if you spend enough time, it's not some magical black box. If you read some books and papers or go to school or read some source code then you can actually have an understanding of what goes on "under the hood" and you don't have to resort to voodoo measurements. So, if you know something about RDMBSs, you know that once a query retrieves some rows from disk they're cached, so any queries issued shortly after will be served from memory. This is probably what happened here, since 3ms is less than the disks' seek time, not counting networking and processing overhead...

If you're absolutely unwilling to learn something about how a software works and feel compelled to measure it, then at least create meaningful measurements, including averages, medians, deviations, plots...

As a final note, as a developer who's startup is writing a soon-to-be-released high-performance replicated key-value store, if their site is such that performance matters, then these are exactly the type of queries that could be offloaded to some key-value store or even memcached and recomputed asynchronously in the background every minute.
Don't let the wavy camera dissuade you from watching - the audio is the thing. My camera-lady / wife got a bug bite right before the interview... thus the wavy camera, as she scratched it :) The others (which are coming) were more stable.

The part about Apple vs. GM culture is great.
But radio waves are light.
I mean how many users could take a PC with no OS and get Windows running on it.

Installation is an obstacle for linux adoption, but it's not (entirely) because the installation process is broken. It's because Linux doesn't have the OEM distribution model that Microsoft does.

I don't think this refutes anything you've said, I'm just pointing out that it is more than a software issue.
Mmm... as far as I know, the whole 'eye' portion of this article is based on a false assumption. I took a class in Neuroanatomy back in highschool, and IIRC the eye is not split with the left hemisphere controlling the right eye and right hemisphere controlling the left eye, but the left hemisphere controlling the _right field of vision_ and the right hemisphere controlling the _left field of vision_. This is why the optical nerve is shaped like this: |X| - with one half of the field of vision going directly to the adjacent lobe and the other half crossing over to the other.

Could be wrong, though.
Surprisingly (I just benchmarked it myself), the times are near the same.

Here's my benchmark (in case I made a mistake):

import time

def combine(upper,lower): return (2**32)*upper + lower
def combine2(upper,lower): return (upper << 32) | lower

def test_combine():
start = time.clock()
for i in range(10000000):
combine(i,i)
end = time.clock()
output = 'The time taken for combine() is ' + str(end - start)
print output

def test_combine2():
start = time.clock()
for i in range(10000000):
combine2(i,i)
end = time.clock()
output = 'The time taken for combine() is ' + str(end - start)
print output

Also see http://wiki.python.org/moin/PythonSpeed/PerformanceTips#Pyth...
This is a really elegant solution. One concern is that the increased wind drag may cause the incidence of downed power lines in storms. They would have to do some studies on long-term stability in high winds.

The other thing I wonder about is that becasue high-tension wires form catenary curves between the towers, would the turbines cause the cable to begin to swing, and in some conditions possible get close enough to the adjacent cable to arc and short out?
The purpose of the Hacker News website is to serve past/present/future ycombinator candidates. I'm not even a web app developer, I wrote C code for an $8 processor today.

The title (as submitted by the author of the blog) says "Absolutely Must Know," which is quite hyperbolic.

I would suggest: Basic tricks of bit manipulation.

Consider that this topic is covered in K. N. King's book C Programming: A Modern Approach, in Chapter 20: Low-Level Programming, on page 451
I don't know of a solution better/more efficient than a written test. The education system is different in India and I like that system somewhat better. There is an entrance exam you need to give to enter into high profile colleges which has a defined syllabus but no questions are repeated and are based on your understanding of the subject rather than rote learning.
Firefox 3.5 released but what’s new?
Internet giants, Mozilla have announced the release of the latest update of their popular, open source web browser, Firefox 3.5

The new release comes one year after the media rejected Firefox 3.0. However, this time, Mozilla promise to please Firefox users with outstanding new,useful features such as Private Browsing mode and vastly improved JavaScript performance. According to analysts, the new web browser is set to be the most revolutionary of its kind.
"it’s a great time for browsers!"

"it’s a great time for browsers!"

The Firefox site is expected to hit heavy amounts of traffic due to the release and Mozilla CEO John
You wouldn't, but let's say you wrote a function with the signature

fast_swap_values(unsigned long*, unsigned long*)

Users of the function could accidentally pass in the same addresses.
I'd rather spend my deduction and imagination time on problem solving than information gathering.

Or to be more specific: I'd rather spend my deduction and imagination time engaged with my peers on solving problems, than sitting in quiet contemplation of information that I do not have convenient access to.
Digg Goes to the Source to Avoid Duplicates
tests are very efficient, but the SAT only tests one dimension of a person. it provides a very flat picture of a potential student. i agree that the system in India sounds distinctly better, but still not perfect in my opinion.
MacRuby Drops GIL, Gains Concurrent Threads
Here is a list of his counter-points to objectivism and my list of counters to them:

1) "If [social program] restrictions can make twenty million hungry, then destruction [of social programs] could quite possibly starve to death vast numbers of people."

This does not prove that objectivism is flawed just that migration to a purely objectivist system would be difficult. The real issue in this case is the populace being accustomed to a certain way of life and then changing it on a dime and expecting them to change on a dime or starve.

2) "The first flaw results from Objectivism's overextension of the correct repudiation of rewarding people for need to the prohibition of even helping those in need."

In Atlas Shrugged, Dagny is helped when she is injured after a plane crash by the industrialists that were abandoning society. Rather than view it as helping those in need, think of it as investing in those in need. If you're a leech on society and then you fall on hard times why should society work harder to find a way to save you? It's not pretty, and I'm fairly opposed to it, but it is logical.

3) "Further, by saying he will never live for the sake of another, John Galt and the Objectivists cannot live their lives for Ms. Genovese's sake even long enough to make a phone call."

Making a phone call in this situation would be an investment in your community. It would do even an objectivist a disservice to have a murderer running around and perhaps targeting them next. Self-interest would dictate that the crime be reported. What those people went through is something much more to the core of human instinct which unfortunately may or may not follow philosophical knowledge to the tee, even within the objectivist. :)

*Concession-

I will give the writer this point: I'm not sure what reason an objectivist has to try to maintain the world past his/her lifetime (RE: the OP's environmentalism point). This is something I'm curious about. Is the ultimate idea that other objectivists should work to ensure that this objectivist doesn't screw up their future?

[edited typo]
It looks horrible too. A family member has undergone a similar one in Russia, although in her case it was a necessity (she could not walk a mile without her feet starting hurting). They break your bones and install fixtures with metal rods driven through your feet/ankles/shins. Then they use these fixtures to control the way your bone fragments knit back together over a period of several months.

It is hard to imagine that someone would put herself through this for pure cosmetic reasons.
I wish to disagree on some of the views put forth by the author. I've certainly learnt a lot just using the internet ( ex. learning a new programming language.) I even bought a couple of books which were helpful to me, but not as useful as the web.
There needs to be focus no matter whether you read a read or you browse. Clicking != stupidity as long as you know what you want.
Malcolm is wrong
He's not selecting each row one-by-one.

Yes he does: "even if we did it in this naive way, the total execution time is still a very reasonable".

He's getting 48 records back using two queries.

This is equally silly. The two queries would be equivalent to the single one if there weren't two round trips instead of one, more traffic (the ids are retrieved twice instead of once and they are also sent to the server) and the overhead from concatenating and then parsing all the ids in the second query.
And that was a great list of broad generalizations by you! Thanks for illustrating.
The writing style is very odd. It begins normally, but the second half or so is written in a high-school-student-esque manner. The last paragraph actually begins with the words "in conclusion"(!) It's as if the author had started to write this piece in an honest way, and then, halfway through, remembered that he was writing it for a class.
The "New" Michael Jackson Fortune
There actually are guarantees, they're just a guarantee of ranges. (When bit-twiddling, you always want to use the unsigned version.)

char is guaranteed to be at least 8 bits.

short is guaranteed to be at least 16 bits.

int is guaranteed to be at least 16 bits.

long is guaranteed to be at least 32 bits.

long long is guaranteed to be at least 64 bits.

unsigned long is guaranteed to be the same size as a pointer.
I can say that I got bored during my SAT test. At the time, I was taking AP Calculus (which I also found easy), and the SAT was testing pre-calc. I sped through the answers just to get out of there. If I had actually cared, I'm pretty sure I could have scored 1600.

Edit: My point being, even if IQ and SAT are correlated, I suspect there are a large number of intelligent people for which test does not correlate. i.e. p < 1
That's how a VAT is supposed to work. In theory it is the most efficient and fair form of taxation.

I think Japan could maybe pull it off, but I wouldn't be too surprised if it bit them hard in unexpected ways.
Ask HN: does anyone know when the Everyblock code is going to be released?
According to http://everyblock.com/about/faq/ and http://holovaty.com/writing/everyblock-future/ Everyblock's grant ends today (June, 30), and the team is supposed to release the code under the GPL license. Is anyone actually informed and know when this is going to happen? Those pages are kinda vague and do not set any real timeline.
If I want the RAM back, yes. FF bloats overnight, as well.
This likely was the method employed:

http://www.ilizarov.org.uk/content.htm

I have talked to wearers of such cages. Not fun, but they are a great alternative to amputation.
Good points about the risk-taking required to become rich. Very helpful to entrepreneurs.

The author does simply assume, however, that becoming rich should be an overriding goal in itself.

He does not consider this goal in relation to others - for example, character, contentment, learning, relationships, etc. (other than to mention in passing the wreckage in such areas that can sometimes accompany the gaining of wealth).

Not that he should. He is not trying to be philosophical. But the approach is inherently limited in omitting any larger discussion.

Good thought-provoking discussion within its limits, though.
If you're that old then you should be investing in cryonics. Same logic. Death is for people who don't understand technology.
If you buy Windows and have trouble installing it (which, by the way, is far less likely in my experience than with most Linux installs -- although things are getting better on that front, too), there's a phone number I/my grandma can call for help. You'd be surprised by how big a difference that makes.
We're going to need all the wind power we can get, so this definitely helps. But it also complicates the problem of power transmission, and requires selling new technology to a power industry that is very conservative and slow to adopt changes.

Wind farms, for all their innovation, are just parked somewhere and hooked up through a generation transformer into the distribution system. This would require re-engineering the distribution system, something that's already more "smart" and complicated than most people think.
I agree with you, but do you know of a better/more efficient solution?
Hi, I'm the original author. That wasn't the point I was trying to make at all - despite the attention grabbing headline it's really talking about the value of functional and integration tests.

In retrospect I wish I'd used a different title and skipped the first few paragraphs - I'd intended it to be a bit of humorous indirection making it sound like the post was going to be against automated testing whereas it is really very much in favour of it, but unfortunately people have taken it the wrong way.
This is a pretty good quote though:

"I think sometimes we take for granted how fortunate we are as developers to be able to make such a direct impact on problems instead of being wholly dependent on others."
We are developing SAT prep apps for iPhone, desktop and web and I believe that people can score higher if they practice a lot which is not true for an IQ test IMO.

If you had the same access to the item content of IQ tests that you have to the item content of the SAT, you could definitely develop an IQ test-prep application of similar effectiveness.

One paragraph in the submitted article caught my eye, because it reports an opinion I had previously found in another set of sources: IQ tests correlate strongly with the SAT because both primarily tap scholastic ability (as contrasted with "general intelligence"). Who says this? Lewis Terman said something much like this when discussing the second major version of his Stanford-Binet IQ test:

"	There are, however, certain characteristics of age scores with which the reader should be familiar. For one thing, it is necessary to bear in mind that the true mental age as we have used it refers to the mental age on a particular intelligence test. A subject's mental age in this sense may not coincide with the age score he would make in tests of musical ability, mechanical ability, social adjustment, etc. A subject has, strictly speaking, a number of mental ages; we are here concerned only with that which depends on the abilities tested by the new Stanford-Binet scales." (Terman & Merrill 1937, p. 25)

Julian Stanley, the founder of the Center for Talented Youth at Johns Hopkins University,

http://cty.jhu.edu/set/jcs-apa.html

and probably personally acquainted with more young high scorers on the SAT than any other researcher until very recently, long ago noticed that IQ tests tap mostly scholastic aptitude.

"The Binet scales and their descendants are perhaps the most publicized accomplishments of modern psychology. The term IQ, though often misunderstood, is a household word. The practical success of the 'IQ test,' in its ability to place individuals along a spectrum of scholastic aptitude from dull to bright and in its relationship to school and occupational success, has overshadowed doubt about what the tests were measuring in an exact, psychological sense." (Hopkins & Stanley 1981, p. 348).

"Most authorities feel that current intelligence tests are more aptly described as 'scholastic aptitude' tests because they are so highly related to academic performance, although current use suggests that the term intelligence test is going to be with us for some time. This reservation is based not on the opinion that intelligence tests do not reflect intelligence but on the belief that there are other kinds of intelligence that are not reflected in current tests; the term intelligence is too inclusive." (Hopkins & Stanley 1981, p. 364).

REFERENCES

Hopkins, Kenneth D. & Stanley, Julian C. (1981). Educational and Psychological Measurement and Evaluation. Englewood Cliffs, NJ: Prentice Hall.

Terman, Lewis & Merrill, Maude (1937). Measuring Intelligence: A Guide to the Administration of the New Revised Stanford-Binet Tests of Intelligence. Boston: Houghton Mifflin.
> When you're already assuming something like RSS feeds for app updates exists, don't you think it's possible to have an application download them once a week and update all apps automatically?

So where can I get this program you speak of? Why doesn't it exist? (edit: and if it doesn't exist because you don't even have RSS feeds, isn't it even harder than watching those and manually installing?)
i really don't like the reliance on SAT scores for college admissions

You certainly are far from alone in that opinion. What would you suggest that colleges look at rather than SAT scores when choosing from a larger number of applicants than the colleges can offer admission to?
We've had the discussion before, but humor can get modded up. It just needs to actually funny, as opposed to just the poster thinking it's funny. (You're not as funny as you think you are.)
Excellent article, but the notion that we should believe that idiocy was at the heart of this seems quite wrong to me. At best, willful idiocy.

It seems more likely to me to fall under the Wall Street koan, "You'll be gone, I'll be gone", rather than bad math.
But they cannot help their neighbors!
I wonder why he felt the need to go to Russia. There are many competent physicians in the US doing Ilizarov procedures.
Answered in standard FAQs:

http://www.alcor.org/FAQs/index.html

http://www.alcor.org/sciencefaq.htm

http://www.benbest.com/cryonics/CryoFAQ.html

http://wiki.lesswrong.com/wiki/Cryonics
that's not good, hackers, that's not good!
What are good resources to learn proper unit testing, by the way? (no offensive; curious)
A tale of two cancellation processes
Yeah, I'm not suggesting that the Linux installation process is as friendly as Windows (though, as you said, things are getting better). But how many Windows users even know what an operating system is? How many of them realize that Windows isn't built-in to the computer? I think there's a mental obstacle here that would make installing Windows difficult for many (but not all) Windows users.
Very interesting article. I've always wondered if any other site (e.g., HN) that allows user submissions of links could do much the same to cut down on the number of duplicate submissions.
No, it would be like calling them US engineers, which they are. (Except that I imagine the Nazi engineers may have been more directly employed by the Nazi government than LHM is by the US govt. That's just speculation though.)

"Nazi" refers to Nazi Germany as well as the party itself.
The internet is filled with authors who do that trick. It's a bait-and-switch, and I know I don't like reading it.

People didn't "take it the wrong way." You did not clearly express yourself. If you want to talk about the value of functional and integration tests, then talk about that.
Could you satisfy a nerds curiosity and explain what just happened here?
Cables are separated regularly on long stretches of cable. I've seen separators on all kinds of power cables, so I doubt shorting out would be a serious problem, however the cables reaching a harmonic might be a problem. Suspension bridges can be brought down by wind, so when you start attaching multiple cables into one unified body with high drag, you're going to begin risking a wind-induced harmonic taking out your power lines.

It's a good idea, I doubt they'll replace power plants, but they're likely to be far more useful and practical than their windturbine brethren due to the sheer fact that they may be able to make the construction of power cables profitable in themselves. Instead of costing for maintenance and the average 7% drain of long distance power cables, using this style of wind turbine could turn existing power cables into profit or at least give them a break-even potential.
I like the idea, but am inclined to complain that I'm a programmer, not a used car salesman.
That's wonderful, if you can hack it. However, in the real world, we have billions of people on the planet who are not capable of living the life they imagine.

What people take issue with is Rand's ideological claim that the best way for the people of Earth to achieve a future in which everyone has the capability to "self-actualize" is to focus primarily on their own "self-actualization." That's not obvious at all. Most people feel that our overall well-being is served when the most fortunate among us (those with the resources to pursue their own dreams, and excess resources beyond that) are taxed to some degree to try to give other people a better chance at a self-actualized life.
I don't think the author did a very good job of making the case that people are thinking less due to the web. "Sometimes you need to get a second book on a subject and that gives you time to think" is not a satisfactory substitute for actually measuring how much thinking people using books versus the web to acquire knowledge do.

I also think the focus on clicking is a little bit misplaced. A similar argument would be that listening to a lecture is better than reading a book because a reader spends all her time turning pages.

I feel like this is a really interesting topic that isn't addressed very well by this article.
I suspect a large wooden flying wing would have been subject to warping unlike most WW2 planes, which would produce unpredictable behaviour. When your entire plane is a wing, you don't want it changing shape in mid-flight. We're not birds, I doubt many human pilots would be able to intuitively control a plane that changes shape and flight profile during turns.
Lifeguard, 16
Glad I'm not alone on that one.
Er,

it's way way more simpler than that. London's primary data store is in a number of buildings on the edge of Docklands/Isle of Dogs, on a road called Marsh Lane. Leading away from that, is limeharbour, and on this road there are at least 100 man hole covers, showing the logos of all the main transit companies (colt, etc). Here, let me show you: http://bit.ly/qvEXM

how hard, exactly, would it be to lift these covers and snap all the cables in sight?
> Keeping very many bookmarks or history items seems to destroy performance...

Amen to that. I have ~12,000 bookmarks, and FF3 on Windows takes ~10 seconds to both start up and shut down.
Wireframe magnets template for whiteboarding
Naked, Couch, Pound, Bang... all in one small phrase. I, for one, think you jumped to a valid assumption.

Aside from that, it's actually a great little breakdown of the OTP setup that backs CouchDB. Great article Harish.