HNHacker News
TopNewBestAskShowJobs

pbh

269 karma · joined October 21, 2009

I'm a Computer Science Ph.D. I work at oDesk Research.

You can e-mail me at the name of this website at heymann.be.

submissionscomments
pbh··on When being idiomatic wears you out
I'm actually still confused as to the right way to do defaultdict in Ruby.

StackOverflow has three ways...

http://stackoverflow.com/questions/190740/setting-ruby-hash-...

(i) The most idiomatic way seems to be:

  (myhash[key] ||= []) << value
(ii) You can use .default

  myhash.default = []
(iii) You can use a default proc, as you note:

  myhash = Hash.new {|h,k| h[k] = []}
The problem with (i) is that it has weird results if myhash[key] has an actual value, but that value is falsy (e.g., nil or false).

The problem with (ii) is that all default values share the same empty array, so when that gets changed, they all get changed.

The one weird behavior with (iii), at least to me, is that if you access (but don't modify) myhash[k], then it creates a new key with the default value.

pbh··on Show HN: business plan forecasting (our new app)
No, it just seems to have a redirect from plan_ahead to plan_ahead#dashboard that breaks the back button (at least on Firefox 3.6.20, Linux).

(I'm not sure what the original commenter's platform is though.)

pbh··on Why U.S. Broadband is So Slow
I'm on sonic.net and get 20mbps down, 2 mbps up. You need bonded Fusion service to get those sorts of speeds though.

dslreports.com has speedtest results, down to zip code, though they don't include things like what service product and/or whether the service has some bandwidth cap.

pbh··on Retiring a Great Interview Problem
I hope readers aren't getting the impression from this article that the code examples provided are the correct way to do word segmentation in English. (Though I understand this is an article about interviewing and not about word segmentation. And this might be considered a preprocessing step for doing things correctly...)

Norvig gives a very approachable version of English word segmentation that uses a language model below.

http://norvig.com/ngrams/

pbh··on Mark Cuban: If you want to see more jobs created -- change patent laws
I have no idea about the lobbying, but the article seems to suggest that he is just paying increasing insurance and settlement costs instead.
pbh··on Mark Cuban: If you want to see more jobs created -- change patent laws
According to Wikipedia, Mark Cuban has $2.5 billion.

If he thinks the patents are bogus (which I totally believe), why not fight a high profile, precedent setting case?

If he thinks the law is broken, why not lobby for patent reform? Or a loser-pays system?

pbh··on “Real Names” Policies Are an Abuse of Power
Since we are on the topic of names, Bringhurst notes:

"An increasing number of persons and institutions, from e.e. cummings to WordPerfect, now come to the typographer in search of special treatment. In earlier days, it was kings and deities whose agents demanded that their names be written in a larger size or set in a specially ornate typeface; now it is business firms and mass-market products demanding an extra helping of capitals, or a proprietary face, and poets pleading, by contrast, to be left entirely in the vernacular lower case. But type is visible speech, in which gods and men, saints and sinners, poets and business executives are treated fundamentally alike. Typographers, in keeping with the virtue of their trade, honor the stewardship of texts and implicitly oppose private ownership of words."

http://en.wikipedia.org/wiki/Robert_Bringhurst

pbh··on Crazy, Heretical, and Awesome: The Way I Write Rails Apps
Ah, down to 14s for 100 tests. I had originally avoided spork because it looked rspec only, but I guess there's spork-testunit as well.

Thanks!

pbh··on Crazy, Heretical, and Awesome: The Way I Write Rails Apps
That's clearly part of the answer: running 1.9.2-p180-patched instead of 1.9.2-p180 drops the total test suite time from 65s down to 52s.

But the test suite still takes 52s, of which only 12s is actually attributable to tests (since rails actually outputs the times for the test portion). FWIW, all of that measured test time seems to be for bcrypt (even with the test-specific initializer to make it faster) rather than persistence anyway.

Thanks for reducing things by 13s, at least. ;-)

EDIT: Actually, it looks like I'm down to 30--40s now, so that helped a lot. Basically, all of the non-test-time seems to be rails environment time (e.g., time bundle exec rake environment) which takes about 6-7s per run (times 3).

pbh··on Crazy, Heretical, and Awesome: The Way I Write Rails Apps
I'm a (somewhat new) Rails developer now, and I'm really confused by the premise of this article.

Why are Rails test suites so slow? For a small app, one of my test suites takes about a minute for 100 tests. That's crazy!

This author seems to suggest persistence is the issue, but that doesn't make any sense to me. A disk hit is like, what, 10ms? Even if every one of my tests hit the DB once, and if there was no caching, that still would only be 1s. If I set the development database to be an in-memory SQLite, would that magically speed up my tests 100%? (I kind of doubt it.)

When I run rake tests, there seems to be some super long delay on the rake part, and not on the test part. Is the slow test speed related to loading and unloading the code in development (which apparently 1.9.2 is slow at)? Is this due to some rake bug? How would I even find out?

pbh··on Panos Ipeirotis: A tale about parking
I think that you make an important point. Not counting detected cheaters in course evaluations seems like a good policy. This is especially true because student evaluations have been shown in a number of cases to be very highly correlated with the student's expected grade.

However, I still agree with Panos' diagnosis that his student evaluations went down in response to detecting cheating. He presumably has data from hundreds of students over years of classes. The primary difference between this year and past years was almost certainly his detection of cheaters. While removing cheaters from the evaluation pool may mitigate the problem a little, I find it pretty plausible that evaluations went down because of some cheating-detection related phenomenon, like the more adversarial atmosphere, his own feelings about the cheaters, or students feeling attacked or accused.

pbh··on Panos Ipeirotis: A tale about parking
It has been fascinating to watch the reaction to Panos' blog post on cheating. I agree and disagree with this follow-up post, however. On one hand, I agree that most reactions have generally been shallow and poorly thought out. On the other hand, I think that what made Panos' original post so compelling was his comprehensive listing of the many disincentives to fighting cheating at the university, including the impact on his salary.

Overall, the result of Panos clicking more or less a single check box (and, admittedly, doing a few Excel tricks) to detect cheating was: (1) 45 hours of students crying in his office, (2) his class took on a powerful negative atmosphere, (3) his best students were turned away during office hours, (4) his student evaluations went down, (5) he arguably made less money than he would have otherwise, (6) he was called a racist in at least one public forum, (7) the reputation of his university and/or program was damaged, and (8) he was sent a cease-and-desist letter.

Ultimately, this is a huge set of disincentives. It is not surprising that most would simply choose the more appealing alternative of just deciding that a professor cannot be responsible for making students want to learn.

What is most discouraging about the salary information is not the money itself, but the implication that even Panos' department was not willing to give him support when he tried to fix the problem in his own classroom. (Arguably, they must have known that addressing cheating would have a huge impact on course evaluations.)

pbh··on Why I will never pursue cheating again
Your claim that the author has drawn the wrong conclusion relies on a major assertion for which you have failed to provide support. Specifically: why do you think a 22/108 cheating rate is non-standard for a large US research university's business school? Are there institutions that check such things in any sort of systematic fashion (e.g., TurnItIn run on a substantial portion of the classwork)?

It seems to me that the incentives that Panos describes, such as poor evaluations, funding/salary, disinterested administrators, and awkward one-on-one confrontations are common to many top institutions.

pbh··on How to Make Text Look Interesting: Minimalist Web Design
Even more confusingly, The Elements of Typographic Style actually has sub-editions. For example, I have version 3.2. However, none of the online booksellers seem to account for this, and simply say that they have the 3rd edition. Alas!
pbh··on The FBI stole an Instapaper server in an unrelated raid
There has been some academic work on this (CIDR'05), but I'm not sure if it has been used in practice.

http://ilpubs.stanford.edu/659/

pbh··on Encrypt Your Private Dropbox Data With EncFS
This idea seems to come up every few months. Don't do it! (At least unless you seriously understand the caveats or something substantial has changed with encfs and/or Dropbox.)

Here's my comment from a year and a half ago: http://news.ycombinator.com/item?id=895660

... and from a few months ago: http://news.ycombinator.com/item?id=2454924

pbh··on Dropbox Encryption with TrueCrypt
encfs didn't work for me either. See this comment from a year and a half ago:

http://news.ycombinator.com/item?id=895660

Dropbox supposedly encrypts server side. If you want to encrypt client-side, use SpiderOak or TarSnap. These hacks on top of Dropbox don't mesh with the semantics of Dropbox properly and will cause problems days, weeks, or months down the line unless managed extremely carefully.

pbh··on [dead]
I actually think there needs to be an explicit tag for landing pages on HN. This sort of thing seems to be increasingly common, for example:

http://news.ycombinator.com/item?id=2260581

Personally, I don't think a web page saying that you might make something, together with an e-mail signup, is news. That said, people are free to disagree (as with, e.g., Offer HN posts). I just think we need clear labeling.

pbh··on Delicious's Data Policy is Like Setting a Museum on Fire
Probably a substantial fraction of the public delicious data was collected for this:

http://ilpubs.stanford.edu/858/1/2008-2.pdf

The primary issue is that it does not seem terribly clear what the legal status of redistributing such data would be, and/or whether this is changed in any way by Y! shutting down delicious.

pbh··on Ask HN: Why aren't scientific journals free on the web?
Admittedly, the OP is not very clear. There could be at least three questions, based on the headline, the body text question, and the example URLs cited:

(1) "Why are journals not open access?"

(2) "Where can I get free copies of academic articles?"

(3) "What open access journals/preprint servers exist?"

My response attempted to answer (1) and (2) with "most journals/conferences are ultimately not interested in dissemination of research results to the general public" and "Google Scholar, which generally has un-paywalled PDFs from academic web pages," respectively. Other people answer (3) elsewhere in this discussion, with answers like arXiv and PLoS.

If your point is that it is not yet clear economically how academic publishing will work in the future, then, I agree.

pbh··on Ask HN: Why aren't scientific journals free on the web?
A fairly detailed (if opinionated) answer to your question is here:

http://www.zephoria.org/thoughts/archives/2008/02/06/openacc...

The summary is: (1) academics have historically given away their research and reviewing work for free to (revenue seeking) journals and professional associations to get distribution and prestige, (2) this no longer makes sense with the Internet, and (3) academia, journals, and professional associations are in an awkward transition as a result.

In the meantime, just use Google Scholar and hope that you are reading something important enough that someone has possibly violated copyright and posted a version online without a paywall.

pbh··on Stanford PhD Dissertation Browser
I can't speak for Dan, but it's probably best if you don't do this! I think most of the data itself is UMI data from ProQuest, which seems to be licensed pretty strictly.
pbh··on AWS Compute Cluster #231 on Top 500
It looks like they are using extra-large standard and extra-large high CPU instances rather than the more recent quadruple extra-large "cluster compute" instances. Maybe that's the reason? (EDIT: Though amock seems to have said it better than me.)
pbh··on Please fork, contrib & push Paython (Payments in Python) forward
If you have already looked into this (and decided to write your own), it would be great to see a blog post or similar on the current state of payments in Python (and what you intend to do differently).

It seems like there's Satchmo, various Satchmo forks, and GetPaid, but I can't tell which are directly or indirectly tied to various frameworks (Django, Plone). Are people just coding directly to payment APIs? Is everyone running on Django or Plone?

http://www.satchmoproject.com/

http://bitbucket.org/bkroeze/django-bursar

http://bitbucket.org/diefenbach/django-lfs/

http://www.plonegetpaid.com/

pbh··on Yahoo Pipes compiled to Python now run on Google App Engine
Does anyone know if it is actually possible to use Yahoo! Pipes commercially?

I have always wanted to use Pipes, but unless I am misreading the Terms of Use (1.f.iv), it seems to suggest that you are not allowed to derive any income from any service that uses it.

pbh··on Michael Stonebraker: Why Enterprises Are Uninterested in NoSQL?
I'm very confused by this comment. Did you switch mysql and pgsql in this comment, or was this what you meant as written?

MySQL has always struck me as having a non-standard and quite strange type system (broken time/date types without microsecond accuracy, explicitly sized text types, ...). I've always seen PostgreSQL being marketed as a drop in replacement for Oracle due to superior standards support. If anything, PostgreSQL seems much more similar to Oracle than MySQL.

I'm also very curious what sorts of things I should avoid if you really do have a very long list of queries that PostgreSQL handles really poorly.

pbh··on Ask HN: Is a Ph.D. in CS worth it?
One of your previous comments is, I think, one of the most succinct descriptions of why I'm planning to leave CS academia. (That said, CS academia has been pretty good to me.)

"While amazing, groundbreaking research is possible in academic computer science - the general lifecycle of research is some irrelevant poorly made prototype that ignores any number of real world concerns and leads to a couple of uninspired papers that noone reads."

http://news.ycombinator.com/item?id=1376259

pbh··on Relational database pioneer weighs in on NoSQL
I for one am relieved that SciDB will be supporting bulk load rather than the "single road insert" that we have been saddled with all this time in other relational database products.
pbh··on PhD or Not PhD: that is the question
The situation is very analogous to undergraduate with advanced placement (AP) courses.

Any university is going to require you to get credit for, e.g., some introductory computer science sequence (CS1, CS2) to get a bachelors in CS. However, universities vary a great deal in whether they (a) require a particular AP score, (b) require you to take a local test to prove your knowledge, or (c) whether you can just talk to someone and convince them you know the material.

The difference at the PhD level is that in many cases, incoming students have the equivalent of ten undergraduate and graduate courses in the sub-area, rather than one or two. This means that students at less curriculum-oriented universities can largely avoid taking classes, even though classes are "required." People are mostly fine with this because the thesis is usually a much higher bar than core curriculum competency anyway.

pbh··on Ask HN: Sorting massive text files?
I believe GNU sort is a single-threaded external multi-pass/multi-way mergesort.

http://en.wikipedia.org/wiki/External_sorting

The reason to split is not to replicate mergesort, but rather to get around single threading in GNU sort. Of course, there are better options if this is a regular task, but GNU sort just happens to be really common and easy if it's a one-off.

I do wish I had a better split (since split seems to read the whole file) and a better sort (that was parallel and reasonably common) though.

← PreviousPage 2 of 3Next →