Better HN
topnewbestaskshowjobs
Log inSign up

mapgrep

6,331 karma · joined Sep 23, 2010 (16y ago) · 813 submissions

Submissions

comment 15y ago · link · parent

I really enjoyed O'Reilly's compact "Up and Running with Rails," which I bought because I could never remember the basics after two reads through the default (monster) rails book, "Agile Web Development with Rails."

Sadly, O'Reilly appears to have lost interest in this series; the Rails book dates to 2006 and is too far behind now to recommend. Look no farther than the #2 rated Amazon review ("28 of 29 people found the following review helpful") to find out why: "Given that this book is only 127 pages long without the Appendix, it's a pretty pricey little item.... a $29.99 retail price seems exorbitant... this little book would make a great introduction to a more comprehensive book on Rails. Stand-alone, it feels like a rip-off."

I was also going to recommend "Effective Perl Programming" -- but now I see that the second edition has been bulked up to 500 pages from the original ~200. Ugh.

comment 15y ago · link · parent

I have a relative who spent about 20 years in therapy, and was very set against any drug treatment. This is someone who exercised, also participated in 12 step groups (for friends/spouses of addicts), group therapy, made lots of friends, etc.

After being nudged a bit by a doctor and finding the right antidepressant, she has done a total 180 and is something of an advocate for mental medication, for those who need it/are diagnosed for it.

To answer your specific question, she seems to be spending much more time and energy on productive things, i.e. getting advanced degree, professional license, giving presentations for work, than on interpersonal drama and other side effects of depression that had haunted her. She did go through one or two meds before finding the "right" one. Not sure how long treatment lasted for her, I believe she is no longer on them.

I have come to realize as a result of this experience just how biased our whole society is against medication for mental health disorders. Just as it was biased against therapy for decades and decades (and now, ironically, therapy is considered by some a way of being tough and avoiding medication). I was so happy to see the "say yes to drugs" portion of TFA.

comment 15y ago · link · parent

Three easy reasons search engine owners /might/ pay for a full copy of the web crawl:

-Faster. You don't have the latency of millions of HTTP connections, but instead a single download. (Or a few dozen. Or a van full of hard drives.)

-Easier. The problem of crawling quickly but politely has been handled for you. The reading of sitemaps has been handled for you. The problem of deciding how deep to crawl, and when to write off a subsite as an endless black hole, has been handled for you. Etc.

-Predictable. Figuring out, in advance, how much it is going to cost you to crawl some/all of the web is, to say the least, tricky. Buying a copy with a known price tag provides a measure of certainty.

Of course, I am leaving out the potential pitfalls, but the point is there /are/ arguments in favor of buying a copy of the web (and then building your own index).

comment 15y ago · link · parent

I really appreciate your reply and the global perspective!

That said, I'm not sure about Germany being approximately as rough as the U.S..

* Retirement - Our benefit is well under half of yours. The _minimum_ German pension, the floor, after reform will be 67 percent of national average wage (cites below). In the U.S., the average social security benefit is $1,153, annualized to $13,863 or about 34 percent of the average national income of $40,711.

So our _average_ govt. retirement benefit (34%) is about half of your _minimum_ retirement benefit (67%). In fact, the maximum U.S. benefit of $2,346 is just 69 percent of national income, i.e. the current German minimum (!) (it will go down to 67 percent under the current reform).

[German data: http://www.economist.com/node/618334 ] [U.S. social security benefit data: http://www.aarp.org/work/social-security/info-07-2010/maximu... ][U.S. wage data: http://www.ssa.gov/oact/cola/AWI.html ]

* Unemployment - (-edited thrice-) The average is 47 percent of wages in U.S. vs 60 or 67 percent in Germany depending on if you have kids. Germany is still more generous. [German data http://www.oecd.org/dataoecd/9/54/29730499.PDF http://www.justlanded.com/english/Germany/Germany-Guide/Jobs... ] [U.S. data http://www.cbpp.org/cms/index.cfm?fa=view&id=3394 ]

If you are right about "housings costs + 500 per month" this is, indeed, be about in line with U.S. benefits which average $300 per week (~1300 per month); our housing payments average $684. Not sure how to reconcile that with the 60 percent figure from OECD and elsewhere.

comment 15y ago · link · parent

The reason American workers say they can barely survive on $60k a year is that they pay out of pocket for things German workers can take for granted:

* Comfortable retirement - 401k contributions. Yes America has social security but it's not a ton of money compared to other national pensions and if you're young you worry about it not being around at all by the time you need it.

* Unemployment - You should probably have ~6 months living expenses saved up, if not a year, in case you get laid off. U.S. unemployment benefits are fairly marginal (~700 per month cap when I used them in 2002, which you owe tax on), especially compared to Germany/France.

* Life insurance - If you have kids and/or a non working spouse you need to make sure they will be OK if you die, since we have such a weak social safety net.

* Education for your kids - 529 and educational IRA plans allow people to save for our increasingly expensive higher education even before the child is born (I-Bonds can be used this way). Cuts to public colleges have been harsh this year so don't think those will save you.

Yes many Americans blow their salaries on dumb consumerist crap, and tend to overinvest in things like real estate. But even the prudent ones will be trying to jack up their salaries because there are SO many things you are supposed to save for to be considered a responsible American adult.

comment 15y ago · link · parent

"Facebook only has publicly facing information, stuff that you've already shared with other people."

Stuff you've shared with other people != public information. That's the whole reason Facebook exists.

comment 15y ago · link · parent

The `cpan` command line utility automatically downloads and installs dependencies when you use it to install a module. It's the rough equivalent (and precursor to) ruby's `gem`.

comment 15y ago · link · parent

The creator of CoffeeScript acknowledges debugging is a problem and somewhat "daunting" for beginners (though your issue sounds more like an editor config issue). http://thechangelog.com/post/849754840/episode-0-2-9-coffees...

comment 15y ago · link · parent

Around the time this was posted to HN, Stuart Morgan of Google and the Chromium project added a comment to the bug report that "this is a security feature that is applied to certain specific plugins even when they are up to date."

http://code.google.com/p/chromium/issues/detail?id=78768#c1

[speculation]

Maybe it's to do with this, patched in a new OS X release only a couple of weeks ago?

"An integer overflow existed in QuickTime's handling of movie files. Viewing a maliciously crafted movie file may lead to an unexpected application termination or arbitrary code execution. "

http://www.net-security.org/secworld.php?id=10770

[/speculation]

comment 15y ago · link · parent

I think I grok your meaning of "efficiency" now; I'm definitely not suggesting you are an intolerant person.

I would politely challenge, however, the idea that there's roughly equal virtue between Brooklyn-style embraced diversity vs Japan-style conformity. Not only does multiculturalism have a genuine moral attractiveness, which should not be dismissed, it makes for a stronger, more resilient country over the long term. Fresh ideas, fresh values, fresh labor, fresh taxpayers, fresh consumers, fresh inventors and indeed fresh culture are stengths that have been indispensable in allowing the U.S. to overcome its many deep (and often chronic) flaws and attain the level of economic and cultural success that it has. Similarly, a tendency toward xenophobia has hampered Japan's many intrinsic strengths, which have nevertheless been strong enough to set the country as an (oft misinterpreted) example of How To Win.

TLDR: Monoculture is a harmful, false optimization at the national level (though quite useful within, say, an apartment, church or startup incubator).

comment 15y ago · link · parent

"Please note that I'm not saying all monocultures are safe."

Sure, but you attributed safety and other "efficiencies" in Japan to "monoculture." You also wrote, "Multiculturalism means lowest common denominator."

Now you seem to be attributing safety in Japan not to monoculture but to /Japanese/ culture. Fair enough.

In that case, what would happen if 10 million Japanese moved to Bangladesh, making it more multicultural? Would it be a less "efficient" culture? Would it be anchored by the "lowest common denominator," or would the nation improve through the infusion of new cultural values? It seems doubtful that, after conducting this thought experiment, most people could honestly conclude that, "Multiculturalism means lowest common denominator." It likewise seems hard to imagine Singapore in its present state -- including efficiency-wise -- if all those ethnic Chinese has never migrated there.

The big context here is that you were defending Japan against criticism that it is a "closed off culture" and "too exclusive, too slow to change." That criticism is very well earned; for all its many virtues, there is a disturbing level of racism in Japan, against Koreans and Americans of black heritage (usually in military service there but not always, see http://www.time.com/time/magazine/article/0,9171,1101880815-...). There is also the matter of Japan's depressingly extended economic stagnation, going on 20 years old now, which is widely and credibly explained as being closely tied to an unwillingness to embrace new, often foreign values around business, corporate culture, risk taking, credit and competition.

The one time I visited Japan, for two weeks, I conjured many positive words to describe the country. "Efficient" was not one of them. The grueling, sit-at-your desk 14 hour workdays that are de rigueur in Japan are not particularly efficient. The make-work jobs everywhere also seemed inefficient, like the guy in a uniform bowing in apology non-stop to people driving by a construction detour in the road, or the full time ticket taker/thanker in the back of the bus who collected my payment stub. The many ritual greetings and apologies also did not seem efficient.

I have a hard time seeing how multiculturalism would not ENHANCE Japan's efficiency -- and economy.

Update:

"The swiss are also sometimes criticized for being unique in their ways and resistant to change. Culture is not the same as race or language."

In that case, Brooklyn is a monoculture of New Yorkers, or Americans, and your original distinction between it and Japan is rather meaningless.

comment 15y ago · link · parent

"There are efficiencies you can gain by having a monoculture. Nobody has to lock their bikes, subways can have nice cloth seats and you can walk around in any neighborhood and be safe."

Bangladesh is 98% ethnic Bengali; you can read about their crime here http://travel.state.gov/travel/cis_pa_tw/cis/cis_1011.html#c... ("U.S. citizens should avoid walking alone after dark, carrying large sums of money, or wearing expensive jewelry").

Lesotho is 99.7 percent Basotho, with an intentional homicide rate seven times higher than the U.S. http://en.wikipedia.org/wiki/List_of_countries_by_intentiona...

Meanwhile, Singapore, split between large numbers of Chinese, Malays and Indians is one of the safest places in the world (http://en.wikipedia.org/wiki/Crime_in_Singapore). Also safe is Switzerland, which is so ethnically diverse there are three official languages, each widely spoken within the country. (http://travel.state.gov/travel/cis_pa_tw/cis/cis_1034.html#c...) .

comment 15y ago · link · parent

They're under certain obligations of the Ruby license, no? Wikipedia claims MacRuby is "based on Ruby 1.9." Ruby 1.9 is distributed under GPL and the Ruby License, which states:

  2. You may modify your copy of the software in any way, provided that
     you do at least ONE of the following:

       a) place your modifications in the Public Domain or otherwise
          make them Freely Available, such as by posting said
	  modifications to Usenet or an equivalent medium, or by allowing
	  the author to include your modifications in the software.

       b) use the modified software only within your corporation or
          organization.

       c) rename any non-standard executables so the names do not conflict
	  with standard executables, which must also be provided.

       d) make other distribution arrangements with the author.

http://www.ruby-lang.org/en/LICENSE.txt

Not sure how this is compatible with "Apple apparently decided to not share MacRuby with other OS X developers" but I do not know much of MacRuby, maybe someone else can weigh in.

comment 15y ago · link · parent

There is a free Google Apps and a paid Google Apps ("for Business," formerly "Google Apps Premiere" http://www.google.com/apps/intl/en/group/index.html)

But your boarder point still stands - the OP may well be a paying customer and he did not indicate he was using the free edition.

comment 15y ago · link · parent

There is no package manager built into Linux.

There are a variety package managers to choose from on Linux (apt, yum, portage) just as on Mac OS X (which has MacPorts, Homebrew, and Fink).

Perhaps you are thinking of apt, a popular, slick, "best of breed" package manager that is native on exactly one of the many Linux distributions: Debian. It is technically "third party," though "built in," on other Linux distributions like Ubuntu, which is based on Debian but not the same thing as Debian.

Anyway, packaging is a mess on both Linux and OS X. Even on Ubuntu and Debian you have to go outside the built in packager for a truly good experience in certain cases, e.g. Ruby via rvm; Rails and other ruby packages via gem; Perl modules via CPAN, etc.

Yes, OS X would be better with a package manager other than the one built into the App Store, but a lack of one does not make it Not Unix.

comment 15y ago · link · parent

Sadly this feature comes just as SSDs are heading toward ubiquity -- whole disk encryption greatly slows down SSDs to near hard drive levels when done in software, as PGP users have learned (http://forum.pgp.com/t5/PGP-Whole-Disk-Encryption-for/PGP-WD...).

That said, some SSDs can do their own encryption in hardware, but they need OS support (via Trusted Computing Group standards) for it to be effective (storing the key within the controller would defeat the point). Hopefully this, too, will be supported under Lion. Certain versions of Windows 7 already support it.

In any case it's a very positive (if long overdue) move.

comment 15y ago · link · parent

keep_if is like select! but slightly different; each_entry is like each but slightly different; flat_map is like map but slightly different.

In no case are you saving more than a few keystrokes, yet any ruby coder who works with other ruby coders now has more language "surface area" to learn in order to read ruby.

This, guys, is how Perl became Perl. Oy.

keep_if is the truly maddening WTF eye-bleeding rage-inducing make-a-normally-calm-rubyist-very-stabby one.

First off, it's a mutator but the name doesn't end in a bang. It should be keep_if! but for some random reason isn't. Yet another example of how the pleasant idea of using question marks for bool-returning methods (file.exists?) and exclamations for mutators (file.delete!) is just that -- a neat idea (very!) inconsistently applied and thus pointless. Ruby should use method punctuations consistently or get rid of them, for heaven's sake.

keep_if is also egregious because it is the THIRD verb for doing basically the same thing. We already had find_all and select (synonyms) and now select! and, presumably, find_all!. So your workaday ruby coder gets to pick between find_all, select and keep_if to pick items out of an array based on truthiness of a callback. He gets to figure out which two are true synonymous and which is a near-synonym , and then wonder/research why you would ever want to use the near synonym.

Which brings us to the third reason keep_all is egregious, which is that brings very, very little to the table. It is just like select! except it always returns the object, whereas select! returns the object except when no changes are made, in which case it returns nil. In this regard select! behaves like your other ruby mutators (string.sub! and string.gsub!, for example). Now this behavior, which keep_if was invented to circumvent, can be annoying in a very narrow range of circumstances, for example when you stick a mutator on a var at the end of a method and take it for granted that it will always return the thing it's mutating, as your return value, until one day your method is randomly returning nil and you have to delete a single character from your method to fix this. But 99/100 times the whole reason you are using a mutator is that you don't care about the return value just the side effect (the mutation); if you cared about the rv you would just use the non mutator.

So keep_if is "fixing" a "problem" with an extremely minor scope and with an extremely easy programmer fix.

Also, keep_if is a one off.

In other words:

If it's problematic that mutators in ruby return nil on non mutation, then the Correct Solution, i.e. the non aneurism inducing one, is either to change how ALL mutators work, say in 2.0, or to invent some kind of new standard alternate syntax like say a double bang or something. Because there are a LOT of mutators that work the way select! works.

The way NOT to fix this (supposed) mutator problem is to invent a one off solution for one particular type of mutator, a solution that invents /a whole different name/ for the method it is altering, thus setting the precedent of sprawling the language. By the apparent reasoning behind keep_if we now need something called like, oh I don't know, "rewrite_all" to similarly be like-but-not-quite-like "gsub!". And "rewrite" to do same for "sub!", and so on and so on for the other mutators until ruby is getting nearly as bloated and unreadable as.... Perl. (Which I love and used to code in but, let's face it, has some mmmmmhowdoyousay -- issues? -- with readability.)

So keep_if is a one-off inelegant language bloating solution to a non problem. That's egregiousness three.

Egregiousness four is that keep_if was introduced at the same time as the thing it was invented to fix -- the (apparently sometimes) undesirable behavior of select!. select! was introduced.... at the same time as keep_if. Ugh. Facepalm.

So it's not like I'm going to stop using ruby or anything, and it's not like anyone would care if I did, but I am going to have disagree with you a little here about these new methods being "lovely," in the sense that methods that will eventually send ruby spiralling into, at best, a /near brush/ with morbid, Perl-esque language obesity are not "lovely" /in my humble opinion./

Anyway sorry for the rant! (And Ruby 1.9 does, in general, rock the Casba, previous nothwithstanding.)

comment 15y ago · link · parent

Jeff, the other founder, is in El Cerrito.

comment 15y ago · link · parent

If you're going to use the BOM despite it not being in the HTTP spec, why not ignore the spec entirely for encoding? The spec is pretty brain dead in that it says the HTTP header should override explicit declarations within the document itself.

When I've written this sort of code I've found it most practically effective to look at any explicit document declarations (meta tags), then the BOM, then any XML declarations (XHTML was big once upon a time), then the HTTP headers. Far more people have control over their HTML docs than over their HTTP server configuration and I think it's insane to look at the former and ignore the latter. (Actually, there was one case in which I did so: When the BOM and the HTTP headers agreed, I would ignore meta tags, which are downright wrong more often than you would think. For some reason there are a lot of pages out there encoded in UTF-8 but with meta tags declaring Latin-1 [not vice versa like you might think]. This seemed to be correlated with ColdFusion.)

That said, it's impressive that he's thought through different paths for text/plain and application/xml. The last, most comprehensive function I wrote to do this assumed HTML or XML, which obviously isn't comprehensive, and I missed the text/xml wrinkle.

comment 15y ago · link · parent

I thought Chrome came bundled with Flash Player http://techcrunch.com/2010/06/25/google-chrome-flash/

...which supports H.264 in an MP4 container...

http://diveintohtml5.org/video.html

....so I'm not clear on what's actually happening here. Is Chrome going to just stop handing off MP4/H.264 from video tags to the bundled Flash Player even though it's there and can play it? Or will it stop bundling Flash Player? Or bundle a crippled Flash Player? None of the above?

comment 15y ago · link · parent

You: "They are trying to get incentives right, rather than outright banning HFTs."

Article: "Firms that fail to meet standards aimed at protecting long- term investors won’t be allowed directly on the Credit Suisse venue"

So it's both: They are outright banning AND adjusting incentives.

comment 15y ago · link · parent

It's fairly terrifying what an accretion of these sorts of options did to Perl, and I say that as someone who does a lot of Perl5 coding and enjoys it.

It would be one thing to just have a new symbol that was a drop-in alternative to what works now. But in this case you have a _sometimes_ alternative, so you need to remember a new rule, if only to be able read other people's code. That cognitive cost outweighs any keystroke benefit IMHO.

comment 15y ago · link · parent

The subject line was "Joe - Your CD Baby Order!" when I ordered last year (but with my actual first name).

Kind of annoying because then you do have to read through all that (same message) to figure out that the order actually shipped and wasn't unavailable. Of course, the use of an exclamation mark in the subject line was a clue all was well.

comment 16y ago · link · parent

The Libya story is here: http://blogs.jobdig.com/wwds/2007/11/19/sr-71-now-that-was-s...

I love that he accidentally overshoots the refueling in Gibraltar -- and ends up next to Sicily.

The more detailed Libya stuff is at the end, though he summarizes it in the beginning.

comment 16y ago · link · parent

Wait, if you've got the capability to intercept and rewrite arbitrary http forms, couldn't you just rewrite the homepage of Google.com the same way? The "action" attribute on the form gets changed to https -mybank- dot com slash profile, hidden fields are inserted, etc, and when the user clicks "Search" he's actually updating aforementioned profile page.

If this is possible, then the dual cookie method would seem to make sense.

1
2425262728