Java LINQ – C# LINQ examples running on Android - <AUTHOR> https://github.com/mythz/java-linq-examples/blob/master/README.md <comment><AUTHOR> Something that stands out here is Java's reluctance to add proper Type Inference, which particularly stands out in linq43:

[https://gist.github.com/mythz/7e263820332a0fcea766](https://gist.github.com/mythz/7e263820332a0fcea766)

What's interesting was that Type Inference was actually considered and rejected because it was considered "un-Java Like" [http://programmers.stackexchange.com/a/184183/14025](http://programmers.stackexchange.com/a/184183/14025):

> Humans benefit from the redundancy of the type declaration in two ways. > First, the redundant type serves as valuable documentation - readers do not > have to search for the declaration of getMap() to find out what type it > returns. Second, the redundancy allows the programmer to declare the > intended type, and thereby benefit from a cross check performed by the > compiler.

With "Humans Benefit" cited as the rationale, which seems to contradict the behavior in IntelliJ IDE's which _automatically collapses_ boiler-plate code into a "typeless lambda format" of what the source code would've looked like if Java had lambdas.

<comment><USER2> To be fair a lot more type inference is done in Java 8 (it's not just lambdas), it's just not available for Android.

And Java tends to do type inference on the right hand side instead of the left hand side, so things look a lot cleaner if you chain them instead of assigning them to intermediate variables.

<comment><AUTHOR> > And Java tends to do type inference on the right hand side instead of the > left hand side, so things look a lot cleaner if you chain them instead of > assigning them to intermediate variables.

This example _is_ chained, i.e. there are no intermediate variables.

<comment><USER2> The customers and customerOrderGroups are intermediate.

I would expect in reality to do something like this in Java 8 (Disclaimer probably not exactly correct syntax, not near a Java compiler)

      getCustomerList()
        .map(c -> tuple(
          c.companyName,
          c.orders.stream()
            .collect(groupingBy(order -> order.orderDate.year)).entrySet().stream()
            .map(yearGroup -> tuple(
              yearGroup.key,
              yearGroup.items.stream().collect(
                groupingBy(order -> order.orderDate.getMonth() + 1)
              )
            ))
        .forEach(Log::print)

Further it looks like we should probably have domain types for MonthGroup/OrderGroup etc instead of tuples, which would make it still cleaner

<comment><AUTHOR> > The customers and customerOrderGroups are intermediate.

The `customers` and `customerOrderGroups` are variables in _each of the examples_. Which is the point of a close 1:1 translation between different languages. linq43 groups Customer Orders in a _single expression_ by Year/Month into an anonymous structure. This just doesn't translate very well to Java 7 which lacks many of the language features to make it more readable.

Of course it can be rewritten using Java 8 streams which is much better suited for functional programming courtesy of lambda's (which is the primary cause for much of the boiler-plate). But until it's supported in Android we have to make do with what we have.

\----

Should also give a shout-out to RetroLambda which I just discovered in the comments: [https://github.com/orfjackal/retrolambda](https://github.com/orfjackal/retrolambda)

Which looks like it's a post-build Maven and Gradle plugin to back port Java 8 features to be able to run on Java 7 Android and JVM runtime. Not sure if there are any disadvantages with this approach (debugging?) but it's an interesting alternative.

Another option would be to just use a different JVM language, Kotlin looks the most appealing to me which supports Android and has good Java interoperability: [http://kotlinlang.org/docs/tutorials/kotlin- android.html](http://kotlinlang.org/docs/tutorials/kotlin-android.html)

<comment><USER2> Yes Kotlin seems like a very nice option for Android.

One could also go for implementing a more Linq-esq style in Java. Something like [http://benjiweber.co.uk/blog/2013/12/28/typesafe-database- in...](http://benjiweber.co.uk/blog/2013/12/28/typesafe-database-interaction- with-java-8/) could be implemented on top of collections as well as databases.

</comment></comment></comment></comment></comment></comment><comment><USER3> Just because they can translate doesn't mean it's good. If you check out this example: [https://github.com/mythz/java-linq- examples/blob/master/READ...](https://github.com/mythz/java-linq- examples/blob/master/README.md#linq19-selectmany---indexed) it converts 6 lines of readable C# to 20 lines of bad formed Java. It would be a lot nicer to see a Java 8 translation - a lot more comparable.

<comment><AUTHOR> Right, but Java 8's not available on Android which is a constraint for this library.

If that's "bad-formed Java" what's a better functional form? Or do you mean for Java it's better to use an imperative-style with mutating collections?

<comment><USER4> It's better to write code that is amenable to being understood when read. These Java forms accomplish things 'the LINQ way' but at the expense of completely obscuring the intent of the code. LINQ makes sense in C# because the syntax supports a mapping from a declarative query to stream-oriented operations. Without the syntactic support, it becomes unreadable.

<comment><USER5> I usually prefer the chaining method extensions for collections myself... Even then it's far easier to follow than the Java examples, or even the Java8 comments... but that's mostly personal preference. I'm also not sure how/if this has an IQueryable interface equivalent, which is pretty cool as well.

</comment></comment></comment></comment><comment><USER5> Wow, that just looks hideous... at first I was hoping this was some kind of Java preprocessor for linq constructs... but it's just plain ugly.. it's even worse than the method chaining you can do in C# with lambdas, which I prefer over linq syntax...

        var result = someEnumerable.Select(x => x.Bar < 5).ToList()

Still a lot cleaner than the type specific mess in the examples... I think sticking to for-loops is probably cleaner than that mess.

I don't mean to be critical here, it's just I don't think it's really any better than without the "LINQ" for Java in this case.

</comment><comment><USER6> this has a nicer syntax IMHO: [https://github.com/keredson/DKO](https://github.com/keredson/DKO)

<comment><USER5> Thank you.. that definitely is a much nicer syntax, and closer to C#'s method chaining.

</comment></comment><comment><USER7> > linq102: Cross Join

I think it's an inner join, not a cross join. SelectMany() produces a cross join.

</comment><comment><USER8> Yes, it's all perfectly Turing compatible, of course we can also do that on Android.

That is also totally not the point.

<comment><AUTHOR> Most Developers don't care if an academic turing-complete brainfuck can be made to run on Android, they care if they're able to be more productive and create more readable and maintainable code.

Running on Android was a constraint for this library, the natural approach to functional programming in Java 8 would've been to use Java 8's new stream API, but as that's not available on Android we fallback to using what currently does work on Android - which _is_ the point of this library.

</comment></comment><comment><USER9> Java is such a boring not-elegant language.

<comment><USER10> $LANGUAGE_I_HATE is $CRITIQUE_1 and CRITIQUE_2.

And I know, I know, bash is even less elegant and more boring. Haha.

<comment><USER10> You know, I am pretty impressed I got down-voted. Every time I see someone mock Java or PHP around here, people are quick to point out no language is perfect and personal biases are not great for reasoned discussioned. I thought there was no perfect language?

C is also boring, but I assumed mocking it here would be asking for free kicks to the face. Apparently, I was wrong.

</comment></comment></comment><comment><USER11> Not a great fan of LINQ if I'm honest. Sure it's terse and powerful but with it comes great responsibility and a relatively large pile of tasty landmines. Three regular problems I see:

FirstOrDefault being passed 2 rows = non-determinism. This one is always fun when your SQL server doesn't guarantee the order of rows returned so every time you hit .FirstOrDefault you get a different item. Never happens in dev due to the tiny datasets fitting in a single page.

There's also Single being passed 2 rows = crash. SingleOrDefault being passed >1 rows = crash.

And when it does crash it's entirely not helpful because the lambda block reports no state information in the stack. Inevitably this leads to adding precondition checks to avoid "Hey everyone, one of the 20 LINQ expressions in this method blew with more than one element in the sequence".

Then there's the fact that you don't know the size of the set of data nor really think about it. So if someone passes in a collection of 10 rows in dev and it works out that it's O(N^2) and has a random .ToList() in it then you're up shit creek in the memory and time departments when that 10000 items collection appears in production.

None of this unique to LINQ but it hides a lot of problems behind a wall of pain.

From extensive experience; there be dragons.

<comment><USER12> With all respect, it doesn't sound like you've taken the time to understand LINQ:

\- Single and SingleOrDefault crashing with >1 row is a feature, not a bug. It means that your expectation that your filter is unique was incorrect. In that scenario, a crash is what you want. It's like when we use asserts. Similarly ..

\- First and FirstOrDefault are only really appropriate after an OrderBy, i.e. to get the top item of a particular ranking. Using them anywhere else is almost always incorrect, and in the very few cases where it isn't, needs a comment to explain why, or I'll bounce your code back to you in review :).

LINQ is very expressive (you can do a lot with a little bit of code), especially with the embedded (non-fluent) syntax. That means that, yes, you can write some non-optimal code without realizing it, because it's only a few lines. On the flip side, you can also refactor that code quickly into more optimal patterns. By comparison, old-school iterating through collections is often much more difficult to refactor.

<comment><USER11> I understand LINQ very well (right down to code generation and expression trees) but unfortunately I work with a lot of other people's code.

Perhaps that is the problem? :-)

More seriously, the thing has really leaky abstraction boundaries which is a main pain point. I have to write and manage a lot of boring enterprise code and creativity and expressiveness go a long way to introducing a lot of additional work.

<comment><USER13> LINQ is not where the leaky abstraction is, IEnumerable is. IEnumerable makes virtually no guarantees about anything, including order, finiteness, side effects and speed/efficiency.

This is actually one of the main reasons that the BCL team introduced the IReadOnlyXXX<> interfaces - over the years, many .NET developers trying to do the right thing and express intent in their code had taken to using IEnumerable<> in method signatures to signify that the method would not modify the list/collection... but an IEnumerable doesn't have to be a list/collection, it can be infinite! In trying to do the right thing and be expressive with intent, lots and lots of people were unwittingly losing the expression of another (very important) assumption.

Any time you are wrangling any kind of enumerable in code, you _have_ to think about its guarantees and assumptions. LINQ's expressiveness might make it easier to forget this but it's still the rule - if I hand you a "malicious IEnumerable", it doesn't matter if you use LINQ or a couple of foreach loops, it's going to launch the missiles on every call to MoveNext() regardless.

If you are trying to express intent in your code, IEnumerable is almost _never_ what you want to use.</comment></comment></comment></comment>


Canonical.css now v2 and CC0 - <AUTHOR> https://github.com/marxo/Canonical.css <comment><USER2> The README doesn't mention which browsers it supports (presumably at least the Chrome/Firefox/Edge evergreens?). I would add that, and perhaps a comparison of sizes between this and Normalize.css.

<comment><AUTHOR> Thanks for the tip, I'll be improving that in the patch releases soon.

Until that is done: It supports IE11, FF48+, Edge and Chrome. Mobile browser tests are on the way. Some things are ported from Normalize.css for backword compatibility, but the goal is to remove them as soon as IE11 drops below 1%.

<comment><USER2> Yeah, that sounds sensible. Having IE11 support is probably the biggest deal breaker for most web developers interested in this kind of project now.

<comment><AUTHOR> In the future there might be a file version with IE11 and without IE11 support. IE11 is currently at 3,7% globally, so I still see considerable use there.

<comment><USER2> I meant that a lot of developers are now treating IE11 as the lowest supported version, so having it is a must. Having two branches (one without IE11) is probably the best.</comment></comment></comment></comment></comment>


Show HN: Schezzle, a flexible website monitoring tool - <AUTHOR> https://schezzle.com <comment><USER2> The ability to create dynamic POST monitoring checks is interesting. I have an API that requires a current timestamp be applied to each call plus an HMAC header. Typical uptime monitoring service does not allow that.

<comment><AUTHOR> The driving force behind it is that monitoring shouldn't fit into a mold. My thinking is that you should write a script to perform whatever mission critical thing your application provides, and monitor the output of that.

Thanks for the feedback!</comment></comment>


Your passwords don't suck, it's your policies - <AUTHOR> http://www.zdnet.com/blog/identity/your-passwords-dont-suck-its-your-policies/482 <comment><USER2> From the article:

 _> He currently has Java and JavaScript Object Notation (JSON) versions and is planning a JavaScript version._

Does the author have any (basic) knowledge on the field he is writing about?</comment>


Show HN: I built a Segway for under $300 - <AUTHOR> http://guavaduck.com/segfault/

<comment><USER2> This is really cool! Do you have any plans of documenting how you did it?

<comment><AUTHOR> Thanks! What would you be interested in besides what I've already written up?</comment></comment>


Should America Have Entered World War I? - <AUTHOR> https://www.nytimes.com/2017/04/06/opinion/should-america-have-entered-world-war-i.html <comment><USER2> This article mentions that had the US not entered World War I the likelihood of World War II happening was much lower.

I'd like to propose the idea that World War II, in all it's horrificness, saved us from much worse.

In a rather bizarre and twisted sense, we may be very very lucky that WWII happened and that it happened at the exact time that it did: happening late enough that we saw how awful modern total war is, but not so late that we would have the weapons to truly eradicate ourselves.

<comment><USER3> Unfortunately, I think you mean it was "recent enough" we were able to see how awful it was. Which means that if we give it a couple more generations to fade out of (some) living memory, we open up ourselves to another conflict, this time with the ability to eradicate ourselves.

Which then raises the question, had WWII not happened, would we have gotten nuclear weapons when we did? And would the next "awful" conflict have been apocalyptically so.

WWII ultimately jumpstarted so much of the scientific advancements we have made in the last 70 years that it is impossible to say that we would have been able to eradicate ourselves without a modern total war.

IDK. I'm not disagreeing, just thinking aloud. You make an interesting point. And certainly one that is fun to hypothesize about.

<comment><USER4> We likely would not have gotten nuclear weapons when we did, but they would probably have happened by the 50s and 60s, as would rocketry. There was already research on nuclear fission happening in the 1930s (in Germany, of all places), and people had already speculated on its use as a weapon. The German nuclear weapons program had already begun when Germany invaded Poland. WW2 massively accelerated this research and let researchers get away with things they wouldn't otherwise have been able to do (like building a nuclear reactor under the bleachers of Stagg Field in Chicago). Given the scientific progress made in the 30s, though, it's likely that it would've happened anyway by the late 1950s.

Interestingly, if WW2 had not happened, it's very likely Germany would've been the first country with nuclear weapons, and hence the world superpower now. Most of the original researchers on nuclear fission were German, and many of the key scientists on the Manhattan project emigrated from Germany or Nazi- controlled countries. The key uranium mines of the 1930s were in the Belgian Congo, and the ore that was eventually used for the Manhattan Project was sitting on the docks in Belgium when the Nazis invaded.

</comment></comment></comment><comment><USER5> Alternative outcomes of WW1 represent some of the most interesting "What if?"s of the history of the 20th century.

It's a fascinating conflict to read about, since it seemingly could have gone either way up to nearly the end of the war. Compare that to WW2, where by late 1942 I think it was more or less clear that the axis powers would not be winning on the offensive, and it became more of a question of how absolute the end would be (armistice vs surrender).

WW1 also lacks as clear of a "good" vs. "bad" narrative as the WW2 has, which makes it complex, and complex history is typically more interesting to me.

Obligatory shout out to Dan Carlin's Hardcore History podcast. It's not a perfect academic take on the topics he covers, but he weaves a good story.

</comment><comment><USER6> _America should have minded her own business and stayed out of the World War. If you hadn 't entered the war the Allies would have made peace with Germany in the Spring of 1917. Had we made peace then there would have been no collapse in Russia followed by Communism, no breakdown in Italy followed by Fascism, and Germany would not have signed the Versailles Treaty, which has enthroned Nazism in Germany. If America had stayed out of the war, all these 'isms' wouldn't to-day be sweeping the continent of Europe and breaking down parliamentary government, and if England had made peace early in 1917, it would have saved over one million British, French, American, and other lives._

-Winston Churchill

<comment><USER7> The reasoning there is kind of hard to follow. Did the US add the War Guilt clause to a treaty that was otherwise going to be fairly neutral?

In school we learned that it was England and France who pushed for the punitive version of the Treaty of Versailles, but I guess this could be my American textbooks whitewashing the world.

<comment><USER8> The idea is that if the US had not entered the war, then the UK and the continental powers would have worn themselves out (they were already pretty worn out by the time we joined) and have sued for peace (armistice) and hammered out an agreement. It wouldn't have been ended up being lop-sided, because there would have been no winner(s) dictating terms -- just a bunch of tired people agreeing to quit and not fight again. Who knows if this is true or not, but the Treaty of Versaille was negotiated between clear winners and clear losers - which was enabled by the US joining the war late on one side.

<comment><USER7> The confusing part is, if the war was ended indecisively then how is that going to prevent future wars? Brush fire wars plagued Europe for centuries until WWII came about and everybody realized that war was too dangerous to toy with anymore.

The people might have been different, but I don't see how an indecisive WWI prevents another border skirmish from getting out of hand 20 years later. Maybe it would have been better for the Jews, but even that's iffy given the generally hostile attitudes of continental Europeans to Jews and Gypsies.

<comment><USER8> Counter-factual hypotheticals are tough. I think it intriguing to consider that the US staying out would have prevented the rise of the Nazis and Soviets, but I'm not in a position to run the experiment.

</comment></comment></comment></comment></comment><comment><USER9> A lot of assumptions in this article with no reasoning behind them.

tldr version: US not entering WW1 means the war would have ended anyways in a year or two and there would have been no WW2 and no military industrial complex.

Seems like quite a stretch on many fronts.

<comment><USER10> >US not entering WW1 means the war would have ended anyways in a year or two

That is a fact. US contribution in WW1 was, while very much appreciated, extremely minimal and did not affect the balance of forces that much.

The rest is up to debate.

<comment><USER9> > That is a fact

We have differing definitions of facts, I guess.

</comment></comment></comment><comment><USER11> I don't get this assumption by Kazin in the piece:

 _> How would the war have ended if America had not intervened? The carnage might have continued for another year or two until citizens in the warring nations, who were already protesting the endless sacrifices required, forced their leaders to reach a settlement._

I don't see how any of the belligerent powers would have moved towards a negotiated settlement if they'd only bled a little more. By 1917 they'd already poured out absolutely staggering quantities of blood, buckets and buckets of it, and their positions had not softened in the least. If anything, they'd become _stiffer_ \-- negotiation became less and less feasible as the casualty figures increased, because it seemed to the both the public and the politicians to be a betrayal of the all the sacrifices that had been made. (People have always had a poor understanding of sunk costs.) Tossing even more sacrifices onto the pile wouldn't have changed that dynamic.

What seems like a more likely outcome is what actually happened in Russia: the fighting rages pointlessly on, the situation locked in stasis, even more money and blood pouring down the hole, until the people back home literally can't afford bread anymore -- at which point there is some kind of social revolution that turns the existing order completely upside down. And this repeats itself until enough combatants on one side or the other have fallen into chaos that the side overall can't fight effectively anymore, at which point the other side becomes the "victor" more or less by default, simply by virtue of having collapsed slightly more slowly than everyone else.

And what comes after that? It's hard to say, but a Europe where the Russian experience was repeated in several other major powers doesn't sound like the starting point of a notably happier timeline than the one we actually got.

</comment><comment><USER12> I've often thought the same thing. There wasn't anything about the Central Powers that made them uniquely bad at the time of the Great War, no great principle was at stake --- this was much more an imperial shoving match than a contest between freedom and authoritarianism. We basically dared the Germans to sink our civilian maritime traffic by sending arms to the U.K., and we had picked sides long before the Zimmermann telegram -- it's no wonder the Germans wanted Mexico to start a war with us.

Who's to say what might have happened if we'd stayed out of it. The Ottoman, Austro-Hungarian, and Russian empires almost certainly would have collapsed anyway. I suspect an exhausted Germany, with the Eastern front pacified and a stalemate on the Western front, would eventually have sued for peace with an equally exhausted France and Britain.

<comment><USER13> I don't think the germans sue for peace without the US involved. The Russian army had been destroyed. They could devote nearly all their resources to the Western front. They probably can't win, but they also can't lose, so you either get years of stalemate or both sides grudgingly agree to peace.

<comment><USER12> Agreed. One could envision an iron curtain falling across Europe decades earlier, dividing Europe along the Western Front. I'm not sure it would have been a better outcome; I'm not sure it's possible for the Great War to have had a good outcome. But it certainly would have been different without US involvement.

</comment></comment></comment><comment><USER14> There's an interesting bit at the end of John Barry's "The Great Influenza" about how Wilson got the flu at Versailles. Barry suggests that Wilson was physically and mentally affected and thus gave in on terms around punishing Germany for the war. Apparently until he got the flu he'd been pushing back hard against anything like that.

<comment><USER15> My European history teacher had the same theory. Although there was also some hubris involved as he didn't take any senators like he should have

</comment></comment><comment><USER16> "Alone among the former belligerent nations, the United States observes a holiday on the anniversary of the Armistice" \- Canada has Remembrance day on November 11th.

<comment><USER12> I think the point was that ours is "Veterans' Day", on which nobody mentions the events of 100 years ago, whereas "Remembrance Day" is actually about the Great War.

<comment><USER17> [http://www.legion.ca/honour-remember/remembrance-day- ceremon...](http://www.legion.ca/honour-remember/remembrance-day-ceremony/)

> Every year on November 11, millions gather to collectively stand in honour > of all who have fallen in the service of their country.

[http://www.statutoryholidays.com/2017.php](http://www.statutoryholidays.com/2017.php)

> Remembrance Day | November 11, Saturday | National except MB, ON, QC, NS

[https://en.wikipedia.org/wiki/Remembrance_Day](https://en.wikipedia.org/wiki/Remembrance_Day)

> Remembrance Day (sometimes known informally as Poppy Day) is a memorial day > observed in Commonwealth of Nations member states since the end of the First > World War to remember the members of their armed forces who have died in the > line of duty.

\---

Armistice day is November the 11th (1919) and can be commemorated every year. Remembrance day is every November the 11th. Remembrance Sunday is the second Sunday of every November.

When someone observes Remembrance day, on the 11th or the second Sunday, they are Remembering those who have `fallen in the service of their nation`.

Veterans Day is a day that honours those that have served in the US military. Also on November the 11th.

They all share a common history (ie. Armistice day) however they are all subtley different days.

Most Commonwealth nations have Remembrance Day observances, slightly fewer have Remembrance Sunday observances.

Most central European nations observe a similar day in meaning (remembering the dead) but on different dates.

</comment></comment></comment><comment><USER18> For those interested, this is covered with detail and nuance in the beginning of Adam Tooze's book "The Deluge"

[https://www.amazon.com/Deluge-America-Remaking- Global-1916-1...](https://www.amazon.com/Deluge-America-Remaking- Global-1916-1931/dp/0143127977)

</comment><comment><USER13> "How would the war have ended if America had not intervened? The carnage might have continued for another year or two until citizens in the warring nations, who were already protesting the endless sacrifices required, forced their leaders to reach a settlement."

This is crazy talk. Germany was a de facto military dictatorship at the time. The legislature and citizens had no say. The only reason the war ended as quickly as it did is they realized the stream of fresh troops from the US doomed them.

Like most military leaderships the Germans were delusional about their capabilities. It's amazing they surrendered when they did, instead of fighting the allies inch by inch in germany. Because they surrendered in a "moment of clarity" it created the whole "stab in the back" theory that Germany could have won victory but it was taken from them.

If the US doesn't enter, the privations of Germany aren't as awful, and their delusions of victory would won out over pragmatism. The war could have lasted years longer.

<comment><USER19> Maybe, but then the resulting peace treaty would likely have been non- punitive, and then the Nazis and Hitler would never have happened, along with WWII.

</comment></comment><comment><USER20> No. Should America Have Entered World War II? Also no.

<comment><USER5> I'm curious, are you saying that America should not have responded militarily to the attack at Pearl Harbor, or to the declaration of war on it by Germany?

<comment><USER21> The US was provoking both Germany and Japan. Presumably if we'd actually wanted to stay out of the war we would have stuck to our own knitting.

The US was "lending" warships to the UK, and American destroyers were dropping depth charges on German submarines in an effort to get supplies the Germans were trying to choke off to the UK. In the North Atlantic we'd already joined the war, if unofficially and not wholeheartedly. This is one of the reasons Hitler decided to honor his ally's request to make it official.

In the Pacific US forces were essentially blockading Japan's oil supplies in an effort to force the Japanese out of Manchuria. Japan _had_ to go to war with the US or give up any imperial ambitions (and we knew that wasn't going to happen).

<comment><USER22> The US embargo of Japan wasn't a blockade and wasn't really an aggressive move. It was a move to not participate in unchecked expansion of Japan by brutal means. Not giving into the whims of monsters isn't provoking them in the slightest.

</comment></comment></comment></comment><comment><USER23> No.

edit: What did it solve? Nothing, as proven by WW2.

What did WW2 solve? Very little; see the Cold War that followed.

Lindbergh's view that the Germans and Russians would exhaust themselves, was accurate. That Japan was goaded into war against the USA seems clear enough.

Even worse, the "success" of WW2 justified the creation of a huge bureaucracy, the largest growth after the war up to now has been the size and scope of government, with all the interference in all our lives, that it entails.</comment>


Kubernetes-Native API Gateway for Microservices - <AUTHOR> https://www.getambassador.io/ <comment><AUTHOR> Are there any other open source API GW software which can manage microservices running on kubernetes? Traefik is very new and is advertised more as a reverse proxy and load balancer which is comparable to NGINX. There is kong which is based on openresty and nginx core. This has added some useful plugins but open source version doesn't have dashboard or analytics.</comment>


Lack of Affordable Health Insurance Is A Brake On Innovation in US - <AUTHOR> http://www.businessweek.com/smallbiz/content/apr2008/sb20080430_430663.htm

<comment><USER2> This is actually a usefully brief summary statement to pass on to contacts less familiar with the topic of entrepreneurship and its demographics. Enough to raise a question or two in their minds.</comment>


Ask HN: Recommendations for an online service that prints and mails postcards? - <AUTHOR>

I'm trying to find an online service that can print and mail semi-customized postcards as part of a direct-mail marketing campaign.
This is all within the United States.
I have a database of several thousand recipients. I also have a program to automatically generate globally unique coupon codes.
Can anyone recommend a webservice, preferably with an API, that I could use to automate the printing and mailing of these postcards?
Thank you! <comment><USER2> Postful is one I've used in the past. Does have API:

<http://www.postful.com/help/integration>

And, PostalMethods is one I've been meaning to try -- again with API:

<http://www.postalmethods.com/></comment>


What do you think of my startup idea? - <AUTHOR> I studied a lot of sociology in college and noticed a way that one could organize communities around their shared preferences of content so that people could discover new content with what should be a much higher degree of relevance then current recommendation systems.
I'm calling it a discovery engine, where the user can enter the name of a specific piece of content they have in mind, or something they are generally interested in, and receive recommendations of new content from like-minded people.
Just like Wikipedia issued a call to all people interested in making an encyclopedia, this would issue a call to all early adopters to be recognized as authorities and trend-setters.  Think The Tipping Point by Malcolm Gladwell, but taking place online, efficiently, and transparently.
The project calls for combining social-bookmarking and user-generated media with an algorithm that both aggregates similar collections of content into networks and makes recommendations of content based on the evolving network structure.  The ranks of "influence" and "in the know" are measured against networks of users with similar collections of content.  These two rankings incentivize users to continually post relevant content because they want to remain "influential" and "in the know" in front of the people that are genuinely interested in the same content.   The majority of users coming to Topiat for recommendations receive relevant recommendations fueled by the work of those who are genuinely influential and in the know.
But unlike current recommendation systems, which are domain specific and treat an individual as the sum of all their preferences (e.g. Netflix), the discovery engine would allow users to create networks based on all types of content (any combination of music, products, images, videos, URLs etc.) and enables users to explore different interests they have with the ability to create multiple groups of content on their profile.  Each group of content becomes aligned with similar groups of content, from which recommendations are generated and delivered to the user (e.g. my oldies music compared with users with similar tastes in oldies music, my surfing group compared with other users that think of surfer the same way I do).
I'm putting together a Y combinator funding proposal based on this basic idea and am looking for feedback before I send it in.  If there are any developers that like the idea and want to know more, let me know.  Additionally, if you are good with machine learning techniques (e.g. neural networks) and are interested, let me know.

<comment><USER2> what's a one or two sentence explanation that would get my little sister to use this? what value would she get within the first 2 minutes (assume early on, before you have a ton of people using it?)

ideas like this are tough because they're only really useful once an incredible amount of content has been submitted. what tricks can you do to make the site be sticky to the first 100 users, when nothing yet is submitted? what are the first concrete things the user sees, or does, when they arrive at the site?

i think that's why these recommendation sites are only successful in niches (e.g. travel (tripadvisor), food/entertainment (yelp), movies (netflix)).

<comment><AUTHOR> I've got a few ideas, such as front-loading the site with content and preference data by using differnt API's, such as Flickr's API, Youtube's, del.icio.us, Last.fm's. This way when you showup, lots of your preferences and rating "work" comes along with you. Additionally, the preference dataset is jumpstarted.

What you would tell your little sister about the site is "find more things you like, and if you're good at finding new content, be recognized for it."

</comment></comment><comment><USER3> Here's an example of how I would use something like this: I want to watch a movie that's similar to Jurassic Park. I can go to the site and type that in. The web application picks apart the constituent pieces of "jurassic park," like "action movie" and "dinosaurs" and "made a lot of money," then looks for other movies that match the criteria based on information from IMDB, Google, and MPAA.

Then, it looks for people who have voted/commented on the movie, and extrapolates a probability of you liking other movies that they have rated highly or poorly. If your rating history is similar to theirs, it rates their other movies with similar pieces higher. If your history is very different, or if they voted Jurassic Park very poorly, then the other items they voted highly are placed low on your recommendations.

I think that's awesome.

</comment><comment><USER4> Description is too long, doesn't make sense. However it also sounds like the plan of no fewer than 10 already existing startups with tons of venture money that are already doomed to failure ... Except for Ning.

<comment><USER5> It made sense to me. It's a great idea but implementation is going to be incredibly challenging. It's only doomed if the founders don't have the skills to actually implement a better recommendation everything.

I think an uber-short pitch here is "A better recommendation engine for everything" which of course only makes sense if you know what a recommendation engine is.

<comment><USER6> Even if you built the most perfect possible recommendation engine, it still wouldn't matter unless you were able to build a large enough user base who was actually using it.

Re: ability to get recommendation engines working better, see the Netflix $1M competition as an example of just how hard it is.

</comment></comment></comment><comment><USER7> This is kind of what I tried to do many months ago. It was also based on the premise of transparent authority, many-to-many content and user connections, categorization on multiple dimensions, and such. I also approached it from a sociolinguistics angle. The problem with sociology and the like is that the metrics themselves are very broad and hard to quantify.

The application's complexity spiraled out of my control. I still believe in the core concepts, but execution of this thing in particular is very tricky. Theoretically speaking it could be the end-all recommendation engine, and that is, from my own experience, almost as lofty as building a Turing Machine. Granted that you have user input, it probably only needs to be half as strong, but that is already very strong, and very difficult (at least for me).

Now logic is one thing. One the same level of difficulty is how to make it user friendly; for this app, regardless of how hard the AI is, the UI is probably half the battle.

I'm not sure what kind of app you have in mind specificially. dcurtis's mockup is real slick and to the point. My implementation was a lot more passive, but I suspect internally the structures share commonalities with your proposal. If you are interested we can discuss. I won't be applying with my implementation though, because this the kind of site where without 100k users, a VC won't even bother. And no matter how good it is, it is much harder to get traction today, hence higher uncertainty, higher burn.

</comment><comment><USER8> Sounds like IRC. Once you find a chan you like and kind of settle in, you realize that the actual convo rarely relates to the title of the chan, but is still of interest to the people who regularly go there.

IRC is pretty popular, I don't see why your idea wouldn't be among the less BitchX-inclined internet crowd. ;-P

You'd have to be _brutal_ with the 'influence' system, though, to keep the trolls out of the 'ponies and barbie dolls' group.

The killer feature, to me, of an idea like this would be something like musicovery.com, where overlapping things lead you down new paths.

<comment><AUTHOR> Here are two large differences between IRC:

1.) One of the main problems I am trying to solve is in your second sentence: "Once you find a chan you like..." It's time consuming to find new content you like, especially in a setting as nebulous (for most people) as IRC. With the discovery engine, all a user needs to do is rate recommendations based on what they are interested in, and they are immediately connected with groups of like-minded people and what they know. Fast and easy.

2.) In addition to connecting to groups of like-minded people, the user gets recommendations from those who are most influential and most in the know. All content is not equally desirable, and users using the discovery engine will only get recommended that content which has empirically shown is wanted by people that think like them (relevant).

<comment><USER8> Of course. I only mentioned IRC because there are some similarities that seem to indicate your idea could work.

>only get recommended that content which has empirically shown is wanted by people that think like them

Seems like an OK idea, but I think the site might suffer if this is taken too far and the groups just become echo chambers, walled off from each other entirely. I just think a site could be more popular if it focused on finding common links in disparate groups instead of isolating them based on common differences. Think of it like radio: in my music directory, my biggest artists are The Crystal Method (41 songs), NIN (112 songs), and Sarah McLachlan (85 songs). No single radio station, AM, FM, or XM, that I am aware of covers a range like that. Wouldn't it be cool to find a place that let you keep close to your core group, but at the same time gave you tips on what other groups thought was cool, just in case you agreed?

</comment></comment></comment><comment><USER9> _"... I'm putting together a Y combinator funding proposal based on this basic idea and am looking for feedback ..."_

demonstrate the idea by showing ... build an app... Show me the demo

<comment><AUTHOR> That was my thought too so I have a demo under development. Unfortunately, it won't be ready by Oct.11, and of course, it's all about the right team anyway which is what I'm really interested in. The main reason for posting this idea is to find like-mided entrepreneurs interested in the idea so we can build a team and, as you said, "demonstrate the idea by showing...build an app".

<comment><USER9> _"... The main reason for posting this idea is to find like-mided entrepreneurs interested in the idea ..."_

Now I see. Even a mocked up static demo is better than nothing. The Oct 11 date is plenty of time. Now I get what _"your going to have to work real hard"_ comment means especially when you come up against fixed dates.

<comment><USER3> Here's a very rough mockup that was put together with some brainstorming, just to give an idea of what the first user introduction might be like.

<http://quarkfactor.com/topiat_example.png>

<comment><USER10> Dude, just want to say you have a great sense of design.

Are you applying for YC this round?

<comment><USER3> Thanks. And yes.

Send me an AIM IM: quarkfactor

</comment></comment></comment></comment></comment></comment><comment><USER11> The idea seems to be, basically, make a better social filtering application. I definitely think there's space for something really cool here, but no one's done anything close to useful yet, short of Amazon.

If I were you, I would try to, at least for the time being, try to pare the idea down into something much smaller and more manageable. Once you have that done as a proof of concept, if it's still too small you can expand to other areas. Along the way, you will've learned a lot about what you'll need to execute on the bigger idea. Why not start with the movie suggester you mentioned later on in the thread?

</comment><comment><USER12> What determines "groups of content" (people? algorithms? either way, the value is in figuring out how)

It isn't clear why "domain-specific" recommendation systems don't work within a group.

Note that it isn't obviously true that separating by group actually produces better recommendations. In fact, the (inadequate) evidence that I'm aware of indicates the exact opposite.

BTW - If you don't have the algorithms mentioned, how much do you think that you actually have? (I can imagine lots of wonderful things that would come from a personal transportation device that got 100mpg, but if I don't know how to make one....)

<comment><AUTHOR> "groups of content" are collections of content that users create themselves (the social bookmarking aspect of the site). Users that want to build a reputation for being in the know and influential are incentivized to make these collections relevant. The groups also become lists users can form to bookmark content they find around the web and want to save it one spot.

Based on what you have put into your collection of content, and collections others have made, the algorithm aggregates those similar people into the same network. People in the same network get content recommended to each other from their like-minded peers that they have not discovered on their own.

With regards to the feasability of such an algorithm, I've talked about it with many mathematicians and machine learning programmers and the wheel does not have to be reinvented for this application. The tools already exist, and just have to be customized and tweaked for this application.

<comment><USER12> In other words, I make a "group of content" that I call "movies" and it gets compared with other peoples' "group of content" that they called "movies".

Why isn't the netflix recommendation system useful for generating recommendations from "groups of content" labelled "movies"?

If it works for movies, why can't it combine "groups of content" labelled "science fiction"?

<comment><USER3> The point of having groups of content is to combine traditionally dissimilar types of content-- movies, music, housewares, etc...

For example I can make a group of content called "new living room" and add all of the things that go into my new living room. This includes the music and movies that I have stored there, the type of TV I bought, the type of couch, stereo receiver, speakers, or even the paint on the wall. When someone searches for something within that collection, the system knows that someone else, somewhere, has combined that "thing" with the other "things" in the collection, so they get rated higher as being compatible.

<comment><USER12> Why do you think that the netflix system won't do the right thing if we both put some music in our "groups of content" labelled "movies"?

<comment><USER3> I'm not sure what you're asking here-- Netflix doesn't care about anything but movies, and it probably wouldn't be able to recommend movies any better if it knew your musical tastes, or even how your tastes compare to mine.

The idea is that if you search for "sony SSK70ED," on the "discovery engine," it will show you what other people have paired with those speakers, such as receivers, furniture, and televisions. In a way those things are "similar" to the speakers because they complement them. Of course, the system shows you similar speakers first, but the complementing items are interesting results to have when you're searching for a specific item.

<comment><USER12> > I'm not sure what you're asking here-- Netflix doesn't care about anything > but movies, and it probably wouldn't be able to recommend movies any better > if it knew your musical tastes, or even how your tastes compare to mine.

That's wrong. The only thing that is movie-specific about the netflix recommendation system is the preference data that it runs over. It doesn't know movies from eyebrows.

If netflix (the company) also collected preference information about music, the recommendation engine would predict music preferences. And, since it would have both music and movie info, it would use music prefs to recommend movies and the reverse, just as it uses movie prefs to predict movie prefs today.

Amazon's "users who bought {something} also bought" is an example of "doesn't know anything about the domain". (They have to tone it down to keep it from recommending "strange" things that are way out of category.)

Disclosure: I know the guy who implemented NetFlix first recommendation system and have written a collaborative filter myself. I know what I can do with the fact that we both like the Pogues and Chunky Monkey. I still don't see what I can do with how we group those preferences.

<comment><AUTHOR> "I still don't see what I can do with how we group those preferences. "

The way in which this site will allow users to group their preferences seems like a slight organizational difference when compared with other recommendation sites that use collaborative filters, but it has huge implications. This post is meant to give people a taste of what I'm starting to try and find others who are interested. I'd love to talk about any and all specifics and their implications especially if you are programmer. If you want to chat my AIM is rocksld3.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> Delicious allows users to put a permissive license on their RSS feeds, so (IANAL and within reason) you can probably get those bookmarks and importantly tags. So how closely would making recommendations per tag match your idea?

Tags are a little messy, and perhaps overly specific, so you may need to cluster them and then do recommendations on that.

I'm not sure I understand how you plan on making 'influence' work, if someone bookmarks a link recommended to them do you simply increment all those who have bookmarked it before?

Please don't use the word incentivize, its terrible :)

</comment><comment><USER14> utter crap. Go back at the drawing board. Make something more tangible, enough with the pies on the sky.

These are concrete ideas:

Facebook, just like your silly school book, but online, and you can add friends

Google - search engine

Yelp - reviews of restaurants and businesses

las.fm - music recommandations from your friends

pandora - discover music according to your tastes

reddit/digg/news.yc -- recommending news and stories

Yours is not a tangible idea. Narrow it down to one sentence the main idea, and just one paragrapsh on how it will work, and then you have something more tangible.

<comment><USER3> I don't think you described those sites very well.

Facebook: Digitize your real relationships

Google: Find websites based on keywords

Yelp: Find restaurants, share experiences about restaurants

Last.fm: Discover new music based on popularity

Pandora: Discover new music based on constituent pieces

reddig/Digg: Discover news based on popularity

This idea: Discover new things based on constituent pieces, popularity, and relationships.

Seems like a natural progression to me, even if it seems complicated in the description.

<comment><USER15> Benefits

Facebook: Better contact with more people

Google: Answers to questions. Solutions to problems.

Last.fm: Good music

Pandora: Good music

reddig/Digg: Inspiration, quick and easy learning about tech, internet, politics

This idea: ?

For example, what's the benefit of getting movies that are similar to Jurassic Park? If you say "comfort and delight" I'd like to know how it's more comfortable than checking the movie with imdb and checking the recommendations. It has to be a bit more comfortable than the way people find movies today. Why would they check your service instead of just walking down to the video store and look at the selection?

<comment><USER3> This idea: find similar people, good music, good movies, and interesting things.

How are those not benefits?

The benefit of finding movies that are similar to Jurassic Park is that you find new movies that you might enjoy. This is very obvious. What is the benefit of finding new music on iTunes/Pandora? It's the same thing! Of course it's for comfort and delight. That's what you're supposed to be pursuing in life.

IMDB does not recommend movies at all. If it does, it does it horrifically badly because it has never helped me before. IMDB is not a recommendation engine, it's simply a database. And they don't seem to want to innovate beyond that.

Video stores are enormous and movies are ordered alphabetically by genre. There is no way to know which movie is good, or which one you will like, because all you have is a promotional paragraph on the back and a pretty picture on the front. This is also very obvious to me.

</comment></comment></comment></comment><comment><USER16> I'm not sure if it's possible to get enough traction for a general purpose recommendation system. Could this be a service that you offer to providers of niche sites? In terms of machine learning, I think you need to look at algorithms that work well with sparse data. This is particularly important in the beginning, but even later you might not have much data in every single field of interest. Good luck.

</comment><comment><USER17> its called digg.com and about a dozen other sites I've seen. You could even build most of this in Ning for free, right now.

My point being that I don't see anything in there that really evolves the social content sharing platform in any significant way.

</comment><comment><USER18> sounds like it can be taken care of by mahalo. machine learning < human sorting. i'm also not seeing a business model.

or... i might have said that because i want to discourage you from using this great idea and save it for myself... hmm...

<comment><USER3> Mahalo is trying to reinvent search by letting people chose the results, and that's not going to work. Using Google, I can manipulate the "machine" to give me precise results.

This idea is about finding new things based on things you already know. It's not possible to manipulate the Google "machine" to discover things that are similar to what you know you like.

<comment><USER6> Calacanis may be a dick but he has proven himself (to the tune of $30M or whatever).

I don't use Mahalo but I have no doubt he'll be able to monetize that kind of business and eventually sell out for a decent payday.</comment></comment></comment>


Google thinks "The C Programming Language" is... English? - <AUTHOR> https://www.google.com/search?q=the+c+programming+language&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

<comment><USER2> Yeah, seems like Google is parsing the query as ((the c programming) language). It manages to map "the c programming" to the book fuzzily, and then is telling you the language of that book, which it denotes by "Original language".

Awkward.

</comment><comment><USER3> You know, if they just made the titles of the explanatory elements of the card hyperlinks (so that you could click on the "C Programming Language" or, less likely to be useful "Original Language" explanations at the bottom of the card and get, respectively, a card for "C Programming Language", the book, and a page or card describing the "Original Language" attribute) this would be more useful.

</comment><comment><USER4> In Finland, it looks normal [1]. What are you talking about?

Google gives different results for different people, country, etc. So, the link in your HN title shows differently for different people. May be, you can post a screenshot?

[1]: <http://i.imgur.com/TcTkpUG.png>

<comment><USER5> <http://i.imgur.com/zWIdKcF.jpg>

</comment></comment><comment><USER6> Looks like a normal search page for me. I see nothing weird and no reference to "english"

</comment><comment><USER7> Orignal Language..kind of like Orignal Gangster..imo</comment>


Claims About Liquidity - <AUTHOR> http://marginalrevolution.com/marginalrevolution/2015/06/claims-about-liquidity.html

<comment><AUTHOR> I linked to this rather than the original FT piece because the FT is paywalled (sort of, you can fill out a survey and view the article for free)</comment>


Tsunami warning ends for B.C. after large earthquake strikes off Alaska - <AUTHOR> http://www.cbc.ca/news/world/alaska-earthquake-tsunami-1.4499558 <comment><USER2> I felt it here in Anchorage when I was on my way to bed. It felt like a shallow, rolling earthquake. It reminded me of a quake I experienced in 2001 in Washington state. The shaking went on for what I thought was 30 seconds. My wife woke up but my kids did not.

Within a couple of minutes, I saw the reported magnitude, depth, and location on the USGS earthquake site, [https://earthquake.usgs.gov/earthquakes/map/](https://earthquake.usgs.gov/earthquakes/map/).

About the same time, Google started showing a tsunami alert: [https://www.google.org/publicalerts/alert?aid=43774f005241ac...](https://www.google.org/publicalerts/alert?aid=43774f005241acb5&source=ogs&authuser=0)

We are in no danger from a tsunami here in Anchorage.

The alert shows potential tsunami waves arriving at coastal towns over the next couple of hours, with the first potential wave arriving in Kodiak in a few minutes. I have no idea how likely these waves are, but 7.9 is big. I am sure a lot of people are scrambling for high ground now.

God speed and be safe.

</comment><comment><USER3> What's really wild about this is that it's actually a strike-slip earthquake, based on the focal mechanism (e.g. [https://earthquake.usgs.gov/earthquakes/eventpage/us2000cmy3...](https://earthquake.usgs.gov/earthquakes/eventpage/us2000cmy3#moment- tensor)) Given how big it is, I'm extremely surprised that it's stike slip. Furthermore, given the area (shallow and very near a subduction zone), anyone would immediately guess that it was a megathrust earthquake, and therefore likely to produce a tsunami. Interestingly, it's not at all.

That's likely a big part of why the tsunami watch was canceled so quickly. In addition to there being no direct detection of tsunami waves, strike slip earthquakes don't produce significant vertical movement of the seafloor (barring triggering a landslide, anyway), and therefore don't typically produce tsunamis.

However, Mw 7.9 is huge for a strike-slip earthquake. They're usually not that large. Furthermore, it's out in the oceanic crust of the incoming plate, so it's not a subduction zone earthquake at all. Instead, it's related to internal deformation of the incoming plate (albeit very near the plate boundary, so it's not exactly an intraplate earthquake either).

Large strike slip earthquakes in oceanic crust aren't unheard of, but they're quite rare. This earthquake appears similar to the large strike-slip earthquakes near Sumatra in 2012 (e.g. [http://www.earthobservatory.sg/news/exceptionally-large- stri...](http://www.earthobservatory.sg/news/exceptionally-large-strike-slip- earthquakes-occur-offshore-sumatra)). Definitely interesting!

<comment><USER4> A 7.9 is quite large. That is about the maximum magnitude that the San Andreas fault produces and similar in size to the 1906 San Francisco earthquake.

</comment></comment><comment><USER5> Since the danger seems to be receding -- I hope NWS & related agencies can use this as a good drill to fix their web properties.

Tsunami.gov couldn't handle the load, and many other official links (like mobile.weather.gov) just dump you into a government shutdown notice. Cell.weather.gov isn't even resolving.

I'm sure someone thought the critical products would still be easily available even with a government shutdown, it sure didn't work out that way.

<comment><USER6> Why would a website go down during a government shutdown? It actually takes _more_ work to turn it off, doesn't it?

<comment><USER7> If there's no appropriation to pay for say, hosting or electricity, you have to shut it off.

</comment></comment></comment><comment><USER8> [https://twitter.com/SF_emergency/status/955764708442714113](https://twitter.com/SF_emergency/status/955764708442714113)

San Francisco Department of Emergency Management has tweeted that people within three blocks of the coast or five blocks of the San Francisco Bay should be prepared to evacuate.

Tsunami Watch for #SF. If you are w/in SF & 3 blocks of the Pacific Coast or w/in 5 blocks of SF Bay, PREPARE TO EVACUATE SO YOU ARE READY IF EVACUATION IS NEEDED. Check on neighbors who may need help. Visit [http://sf72.org/hazard/tsunamis](http://sf72.org/hazard/tsunamis) to see if you are in the evacuation zone.

<comment><USER6> Is Twitter really the official way to notify people of danger? Or is there also a cell phone warning system?

<comment><USER9> How would they know cell phone numbers? Where I live they call landlines for emergency alerts but there's no other way to specifically target residents.

<comment><USER10> How do amber alerts work? When I lived in SF I got SF-related alerts. I don't know enough about how they work - but it sounds like tech that could be re- used for major emergency alerts.

<comment><USER9> As I should have realized, they're sent to all wireless phones in the area. On an iPhone at least both Amber and Emergency alerts are on by default but you can turn either of them off.

</comment></comment></comment></comment></comment><comment><USER11> [https://tidesandcurrents.noaa.gov/tsunami/plot.html?stnid=94...](https://tidesandcurrents.noaa.gov/tsunami/plot.html?stnid=9457292&name=Kodiak%20Island)

So far so good.

<comment><USER12> Could you clarify what you mean by "good" here? I see a sine wave when I click now, with an amplitude of about .75 meters.

<comment><USER13> This sine wave is expected:

[https://en.m.wikipedia.org/wiki/Tide](https://en.m.wikipedia.org/wiki/Tide)

</comment></comment></comment><comment><USER14> When was the most recent 'red' tsunami warning for US west coast & BC? Which coastal areas were physically affected by that one?

Edit:

2005 review: [https://soundwaves.usgs.gov/2005/01/fieldwork2.html](https://soundwaves.usgs.gov/2005/01/fieldwork2.html)

Lessons: [https://pubs.usgs.gov/circ/c1187/](https://pubs.usgs.gov/circ/c1187/)

<comment><USER15> There's a difference between a watch and a warning.

</comment></comment><comment><USER16> Some buoy data: [https://twitter.com/BillKarins/status/955747863140675585](https://twitter.com/BillKarins/status/955747863140675585)

<comment><USER17> Link to the actual buoy data page: [http://www.ndbc.noaa.gov/station_page.php?station=46410&type...](http://www.ndbc.noaa.gov/station_page.php?station=46410&type=2&seriestime=20180123093315)

Worth noting that other nearby buoys don't show such a dramatic wave: [http://www.ndbc.noaa.gov/station_page.php?station=46409&type...](http://www.ndbc.noaa.gov/station_page.php?station=46409&type=2&seriestime=20180123093200)

Here's a map: [http://www.ndbc.noaa.gov/obs.shtml](http://www.ndbc.noaa.gov/obs.shtml) (click on the blinking ones)

And here's a map of tsunami-capable tide stations: [https://tidesandcurrents.noaa.gov/tsunami/#](https://tidesandcurrents.noaa.gov/tsunami/#)

<comment><USER18> What I don't get is that nearly all the buoys that have that moving icon "Tsunami alert" show some excitation at the ~9:45GMT mark.

But I would of course expect the buoys that are farther away to only show some kind of peak when the wave actually reaches them. And it looks like they are thousands of km away, so some of them should not even have been reached yet.

Some what is going on there? Is the data time actually shifted and not in GMT but 'earthquake propagation time'? Am I reading the plots wrong?

<comment><USER19> I'm probably completely wrong, but am wondering and trying to deduce the same thing. My assumption, guess really, is that they were remotely activated into "Tsunami Mode" \-- a more rapid-pulse reporting mode or similar, which just is a bit noisier perhaps?

Total layman's guess though -- would love to know more if anyone knows the answer.

<comment><USER18> > My assumption, guess really, is that they were remotely activated into > "Tsunami Mode" \-- a more rapid-pulse reporting mode or similar, which just > is a bit noisier perhaps?

That sounds like a very good guess. But then, the spikes that are purported to be the Tsunami in the media is just the ADC having a couple bad samples from being switched into a different mode or so :-)

If any USGS person is reading this thread here: Take it as a issue report that your page should be readable and understandable by lay persons, at least lay persons with a non-geophysics STEM background :D

</comment></comment></comment></comment></comment><comment><USER20> The Tsunami Watch for Hawaii was cancelled at 1:10am HST.

[1] [http://ptwc.weather.gov/ptwc/text.php?id=hawaii.TSUHWX.2018....](http://ptwc.weather.gov/ptwc/text.php?id=hawaii.TSUHWX.2018.01.23.1110)

<comment><USER20> All tsunami warnings and watches were cancelled at 2:12am HST / 3:12am AKST / 4:12am PST / 12:12pm GMT.

There remains a tsunami advisory in effect for South Alaska and the Alaska Peninsula.

[1] [http://tsunami.gov/events/PAAQ/2018/01/23/p3054t/5/WEAK51/WE...](http://tsunami.gov/events/PAAQ/2018/01/23/p3054t/5/WEAK51/WEAK51.txt)

mirror of [1] [https://gist.github.com/mckaydavis/8693d4ae9bb844f8bccef90bd...](https://gist.github.com/mckaydavis/8693d4ae9bb844f8bccef90bd498ceb3)

</comment></comment><comment><USER21> USGS page for this quake: [https://earthquake.usgs.gov/earthquakes/eventpage/us2000cmy3...](https://earthquake.usgs.gov/earthquakes/eventpage/us2000cmy3#executive)

<comment><USER22> That page seems to state the magnitude was 7.9.

<comment><USER16> Looks like they just downgraded it which is common once they get more data in. Was originally reported as an 8.0.

</comment></comment></comment><comment><USER23> That's a big quake! Thank God didn't cause a tsunami, although data from buoys showed VERY early on that probability was VERY low for such an occurrence. Watch for sustained wave height for serious tsunami warnings, issues coming onshore. Should you see a quick rise, sustained or increasing height offshore, then a drop... Don't wait for it! Get off the beach, away from waterways & to higher ground. I suppode those of us in California need to be on watch for the next few weeks! DutchSinse on YouTube has been working on earthquake prediction for years, and although not 100% accurate, he's been a LOT more accurate than anyone else, and has nailed the bigger quakes. I haven't taken the time to learn his methods insideout, but I've seen him call accurately numerous earthquakes. I believe with more funding, and a staff, this guy could save many, many more lives. Having worked with these buoys, and on other NOAA projects, this DutchSince guy has a method to call earthquakes early. PLEASE support him! He is the best bet to predict quakes, to tell the difference between quakes and drilling, quakes set off by drilling, etc. He's self- taught, and is more of a scientist than many I've met that went through years of "training" of methods that simply don't work. He breathes & lives this stuff, and he is onto something, far more than ANYONE else! He gets resistance from oil companies, which is sad, as he can save them money and lives! So get your batteries, your earthquake kits, Ham radios & be ready! Stay safe, always be prepared & ready for any type of disaster! Stay safe!

</comment><comment><USER24> In case you're wondering whether an Alaskan earthquake could cause damage in California, the answer is yes. The tsunami from the 1964 Good Friday earthquake in Alaska obliterated the port of Crescent City:

[https://en.wikipedia.org/wiki/Crescent_City,_California#Tsun...](https://en.wikipedia.org/wiki/Crescent_City,_California#Tsunamis)

</comment><comment><USER25> I hope everything is okay - but I'm finding this a fascinating real-time case study of the chaotic nature of breaking information during a (potential) disaster. Conflicting reports, false alarms, difficult-to-parse data...

<comment><USER26> And a number of false-but-believable tweets by people, I presume for the attention. E.g. "Harbor X is emptying", or "Wave now 60ft high!"

<comment><USER25> There was a study done a while back basically demonstrating that following breaking news too closely actually resulted in a less accurate recollection of the facts. Turns out it's difficult to forget compelling information even if it ultimately proves to be false (and you're aware that it's false).

<comment><USER27> Source?

</comment></comment></comment></comment><comment><USER28> The tsunami alert:

[http://ptwc.weather.gov/ptwc/text.php?id=hawaii.TSUHWX.2018....](http://ptwc.weather.gov/ptwc/text.php?id=hawaii.TSUHWX.2018.01.23.1021)

IF TSUNAMI WAVES IMPACT HAWAII THE ESTIMATED EARLIEST ARRIVAL OF THE FIRST TSUNAMI WAVE IS

                         0423 AM HST TUE 23 JAN 2018

<comment><USER26> Do you know why these reports mention Hawaii, rather than (say) Vancouver and other coastal cities nearer to the epicenter, where I would imagine a tsunami would reach first?

<comment><USER17> The page is specific to Hawaii, but you can go to [http://www.weather.gov/](http://www.weather.gov/) and in the map, click your region and then "tsunami warning" or "tsunami watch" to see estimated times for other states. This is the tsunami watch notice for coastal areas of Oregon, Washington & California: [http://forecast.weather.gov/wwamap/wwatxtget.php?cwa=sew&wwa...](http://forecast.weather.gov/wwamap/wwatxtget.php?cwa=sew&wwa=tsunami%20watch)

<comment><USER29> You can also quickly access this info at [http://www.tsunami.gov](http://www.tsunami.gov). Or at least normally it's quick; page is taking a good 10 seconds to load for me right now—under a bit of load, presumably.

It includes Canada as well. (In fact, the BC Emergency site quotes from it and links back to it!)

<comment><USER30> The servers/pipes at tsunami.gov are clearly grossly underpowered for their intended use.

Hopefully, they'll be able to get some equipment upgrades as a result of this.

<comment><USER29> I wonder what their infrastructure looks like. This is the poster case for a scalable cloud setup. 99%+ of the time their traffic is probably nearly zero, and when there will be a significant spike it's generally going to be predictable!

</comment></comment></comment></comment></comment></comment><comment><USER11> Kodiak Police Department 7 mins · TSUNAMI UPDATE: 0229 hours

Harbor officers report water reciding from our harbor. Citizens should remain in place and wait for further updates.

[https://www.facebook.com/KodiakPD/](https://www.facebook.com/KodiakPD/)

</comment><comment><USER31> > Tsunami warning ends for B.C. after large earthquake strikes off Alaska I > first interpreted this as "There was going to be a Tsunami, but then an > earthquake struck which nullified it."

</comment><comment><USER32> Wow 15 hours to australia, that thing is moving fast.

<comment><USER33> Will this wave affect boats? Imagine being on a yacht in the middle of the Pacific (not Atlantic Doh!) when a 10m wave moving at 20m/s hits (figures not accurate just guesses)

<comment><USER34> There probably won't be 10m waves in the middle of the ocean. The waves will only be a few inches tall, but moving FAST. Then they get dramatically taller as they are forced to slow down in shallow water.

<comment><USER35> This is the North Pacific in Winter. I'd be surprised if there weren't 10m waves out there.

<comment><USER34> Well, those waves have nothing to do with the earthquake anyway, and they aren't traveling at the speed of a jet plane :)

</comment></comment></comment></comment></comment><comment><USER36> would tsunami be a concern for Californians when a big earthquake happens in California?</comment>


Ask HN: Is del.icio.us the last remaining yahoo service you were using - <AUTHOR>

With the sunset of delicious, yahoo's reach in my daily life is essentially nil. Is it the same for other people out there? <comment><USER2> Yahoo could completely shutdown and I wouldn't notice until someone told me. Even Flickr.

</comment><comment><USER3> Flickr, and I still have a group of friends that I communicate with via a private yahoo group.

</comment><comment><USER4> I still have a Yahoo email address that I use whenever I don't want to give away my real email address.

<comment><USER5> Me too. Gmail is for people I trust, yahoo is for when I want the email but don't want the sender to have my "real" address (e.g. hotel/travel confirmations), and hotmail is for when I don't even want the email.

</comment></comment><comment><USER6> I haven't used a Yahoo service since the 90's.

<comment><USER7> I know this doesn't add anything in particular, but I'd like to reinforce your point.

Ditto.

</comment></comment><comment><USER8> They are still best for apps that rely on high content value, thus I still use them for Finance and Fantasy Sports.

</comment><comment><USER9> I use Yahoo mail for signing up to things. I check it once or twice a year. I have a flickr account but wouldn't notice if it disappeared. I use Yahoo site explorer for SEO tracking though, and that's useful. I also use Delicious more or less daily.

</comment><comment><USER10> It's the one I was using on a daily basis. Apart from that I occasionally I also use Flickr and BOSS named entity recognition service.

</comment><comment><USER11> I had stopped using del.icio.us a year or two ago. That may have been the only Yahoo! service I had ever used.

</comment><comment><USER12> Fantasy Football, that's about it.

</comment><comment><USER13> Yahoo email that gets checked about once a month, Flickr but sure I could move to picassa its only because of the convenience of iPhoto + flickr

Delicious is the only service I used at least every other day

</comment><comment><USER14> Delicious and Flickr.

</comment><comment><USER15> I still check my yahoo email from time to time, just in case. Yahoo mail could totally shut down and I wouldn't even care.

</comment><comment><USER16> Flickr

<comment><USER17> I'm still angry that yahoo bought them. Since then they've let flickr stagnate while the rest of the landscape innovated around them (almost making them obsolete) and they've added the encumbrance of being forced to login with a yahoo account.

<comment><USER18> I tried to sign up for Flikr and noticed Yahoo had bought them. Refusing to sign up for a Yahoo account, I now use Picasa for photo storage and sharing.

</comment></comment></comment><comment><USER19> It's the only Yahoo service I've used in _years_ , and I use it every day. <sigh>

</comment><comment><USER20> I use the geocoder. It's terms seemed less restrictive than Google's.

</comment><comment><AUTHOR> I totally forgot flickr, its the site I most visit.</comment>


Ask HN: What helps you focus at work? - <AUTHOR> I have been having a problem for the last 6 months or so. I'm working as a software engineer and at my regular job I can't seem to focus more than a few minutes at a time. This has been getting worse as of late. This is not an issue with programming in general since when I'm working on side projects in the afternoon I find that I can't stop working until I'm tired/have to got to bed. The weird thing is that I'm working with Python both on my day job and on my side projects, it's just that it's something with my day job that I can't seem to find the motivation to keep going. Obviously I can't quit, to work on my side projects now full time (though I would like to progressively/eventually do it). I would like to ask how have you dealt with similar problems before? <comment><USER2> Mainly it's because it takes more willpower to do something at work. This makes sense; that's why they give you money.

1\. Get enough rest, especially sleep. Without enough rest, your mind has little time to defrag. Without defragging, it wanders off easily.

2\. Let your mind wander, but not at work. Avoid social media and gaming as these give your brain more things to process. Games and social media are especially dangerous because you think you're taking a break but only make yourself more tired.

3\. Don't do anything tiring before work. I found my work productivity increasing greatly by avoiding morning exercise. These tap into willpower reserves.

4\. Avoid caffeine. YMMV, but I found that caffeine made it difficult for me to focus. Caffeine tends to be a counter for lack of sleep.

5\. Train yourself to be bored. Part of the problem is that your brain is already trained to reach for something whenever bored. When you feel the urge to look at HN or Reddit, just give yourself at least a 5 min time gap, to consider whether you really need to. Even better if you could give yourself 30-60 min gaps between the urge and the action.

<comment><USER3> Good points but I know a few people that are _more_ productive at work if they work out in the morning. I mean, they aren't running 5ks or lifting heavy lifts, but a few coworkers go for a quick run in the morning and they say it helps them a lot.

<comment><USER2> Ah, a quick run might help. Maybe to some people, it's the only exercise they get, which is better than nothing. I usually do my workouts on my break days. They help me sleep a lot better too, which keeps me rested for the work days.

</comment></comment></comment><comment><USER4> As you say, it's motivation. So you need to figure out how to align motivation between what you're doing at work and your own motivations. Motivation isn't just about technology you're using, it's about whether you're learning, how you feel about company's goals, and so on.

So you could:

* Switch to a more interesting project at work.

* Find a new job that's more compelling.

* Focus on second order motivations, like "I am making money to pay for food." This is harder.

More here: [https://codewithoutrules.com/2017/08/03/stay- focused/](https://codewithoutrules.com/2017/08/03/stay-focused/)

</comment><comment><USER5> It sounds like what you're working on in your day job isn't as appealing as your side projects. You might take some time to reflect on the reasons why - it may or may not be programming-related. It could also be about what value you see in your day job. For me to get out of my struggle, I identified some roadblocks that were preventing me in my day job, which included communication skills. Once I had the realization that communication skills was something I needed to develop in order to be successful in growing my own startup, I took every opportunity in my day job to take it as personal development.

</comment><comment><USER6> Dumb as it may sound, have a list of todos that each takes no more than 10 minutes. We generally think linearly, so go through the list of what you must do one at a time, and make the physical gesture of crossing out the item on completion.

</comment><comment><USER7> Turn the internet off. Focus will return. Use zeal docs and offline stackoverflow (via kiwix) and it will help get most dev work done offline. I mentor new devs and this is the number one issue I hear from them.

</comment><comment><USER8> If you were asked to explain why the project you are currently working on is useful to someone, could you?

</comment><comment><USER9> Loud music.</comment>


Ask HN: Learning FPGA's as a Software Developer? - non-entity I have a few cool projects in mind that would have me building some prototype hardware. As this hardware would probably go beyond what you could do with say an Arduino or similar MCU based board, and I'm not an hardware engineer, it seems like FPGAs or some other form of programmable logic is probably my best bet.
But most FPGA material seems to be for EE's. The HDLs seem foreign and there are so many brands, options, etc. It all seems so intimidating.
Are there any recommended resources for learning FPGA's coming from a software background? <comment><AUTHOR> Yes, they are for EEs or at least CompEs, since a knowledge of digital logic and electronics are necessary to use them.

For hardware, a common recommendation is hobbyist/educational boards from Digilent, like the Arty S7: [https://store.digilentinc.com/arty-s7-spartan-7-fpga- board-f...](https://store.digilentinc.com/arty-s7-spartan-7-fpga-board-for- hobbyists-and-makers/) It's inexpensive, supported by Xilinx's free tools, and has a fair bit of tutorials written around it.

As for learning to use it, there's really no getting around the fact that you'll have to acquire an understanding of digital logic, which is more like Factorio than programming. Make sure you pick a textbook whose focus is on teaching digital logic and happens to cover a HDL; there are a few out there which focus on the HDL and presuppose a knowledge of digital logic, which will not be of much help to you.</comment>


Moguls Rent South Dakota Addresses to Dodge Taxes Forever - <AUTHOR> http://www.bloomberg.com/news/2013-12-27/moguls-rent-south-dakota-addresses-to-dodge-taxes-forever.html <comment><USER2> What would you expect? If you live in a state like California and are in the highest tax bracket, your total tax rate (federal + state + local + various surtaxes) would be close to 60%. It is ludicrous to expect most people to just fork over such an outrageous percentage of their earnings without complain.

No wonder the high-income individuals are fleeing high-tax states and "tax- the-rich" ideology is failing to fill the states' coffers. Raising taxes hurts poor people more than the rich. [http://www.forbes.com/sites/trulia/2013/02/12/jobs-arent- lea...](http://www.forbes.com/sites/trulia/2013/02/12/jobs-arent-leaving- california-for-texas-but-people-are/)

<comment><USER3> Say your income is $406,750 (highest federal tax bracket for an individual). Federal income tax is $118,188.75. California income tax is $37,941.45. Effective tax rate is 38%. San Francisco could add 1.5% so now we're at around 40%.

How are you getting to 60%?

<comment><USER4> (Tax advisor here.) You don't get a 60% rate in the US. Anyone who claims otherwise doesn't understand the basic principles of U.S. taxation or is lying to try and make a political point.

State taxes are deductible for federal income tax purposes (meaning that they reduce your taxable income as determined for federal purposes). Also, Medicare and Medicaid taxes are _part of_ payroll taxes (or FICA, for the self- employed), so you don't pay them both.

As every tax advisor in the CNBC article pointed out, Michelson knows diddly squat about taxes. He was taking every single tax rate and adding them together, but he should have been averaging them out. For example, the 20% rate on his capital gains and dividends replaces the 39.6% rate; he's double- counting some of the FICA taxes, and worst of all, he thinks his _marginal rate_ (the highest rate he pays) applies to all of his income.

<comment><USER5> Thank you. I am so tired of seeing this 'federal + state income taxes are cumulative' lie. Not only is it dishonest, it's an insult to the intelligence since anyone who who has ever done their own taxes knows they're deductible just by filling out the 1040.

</comment></comment></comment></comment><comment><USER6> A quote from the article: "Just $1 million invested in a dynasty trust, and earning 12 percent a year, would swell to $1.9 billion in 85 years". So my question is how do I find a investment vehicle that gives me 12% return compounded year after year?

</comment><comment><AUTHOR> When I read stories like this I often wonder, would I do things any differently if/when I have that much money?

Would you?

<comment><USER7> No, you wouldn't. The thing is that all that top wealth is managed by a group of accountants and lawyers. Highly professional accountants and lawyers. (My friend is an accountant here in Silicon Valley who manages wealth for billionaires in a large accounting firm. He describes me some ways how they manage wealth.) So these people's role role, their only role, is wealth preservation, meaning tax minimization and avoidance. They know all the laws, rules and regulations, and they have fiduciary duty to manage the wealth efficiently and conservatively. Hence they will go to tax heavens and offshore, if needed.

<comment><USER8> So, every time a story like this comes up, it makes me wonder... Does anyone offer services like this for non-millionaires and non-billionaires?

<comment><USER4> If you're not in the highest marginal rate bracket, or most of your income is not investment income, it's generally not worth the expense of paying for these services.

Fees for these services generally start at $10,000, and only go up from there.

<comment><USER9> Out of curiosity, is any of this process of moving money around amenable to automation? Can the "rules" be systematized in software?

<comment><USER4> Yes, but the process of creating _and more importantly updating_ that software would involve so much human input that you wouldn't end up with much of a net gain in terms of time or costs saved.

US federal tax laws change every year, and are so interconnected that quite frequently small changes in one tax law can have massive impacts on entirely different areas of law. And that doesn't even take into account state and local taxes, or the taxes of the foreign jurisdictions you'd be dealing with, or the impacts that tax treaties could have, or even the impact that non-tax laws may have on financial transactions.

</comment></comment></comment></comment></comment></comment><comment><USER10> It's really stupid of me, but everytime I read about taxes, I am always "re"-amazed at how much money get spent on protecting money.

<comment><USER11> It's surprising how prone we are to forget that people act on incentives.

</comment></comment><comment><USER12> This reminds me of an article recently in businessweek about the tax loophole with trusts that Sheldon Adelson uses.

[http://www.bloomberg.com/news/2013-12-17/accidental-tax- brea...](http://www.bloomberg.com/news/2013-12-17/accidental-tax-break-saves- wealthiest-americans-100-billion.html)

</comment><comment><USER13> The article considers the rule against perpetuities to be an obviously good thing, but I have my doubt. Consider this argument for example:

[http://www.overcomingbias.com/2010/03/parable-of-the- multipl...](http://www.overcomingbias.com/2010/03/parable-of-the-multiplier- hole.html)

</comment><comment><USER14> Wow, who would have thought the Rule against perpetuities had actual implications in modern American law! I thought it was more of a trivia question that law professors might ask about in a property law class. Next thing you know, we'll be reading an article discussing the Rule in Shelley's Case!

</comment><comment><USER15> To steal a great phrase, every time I hear a story like this, I know the guillotines are coming closer.

<comment><USER16> The rich may be reducing their tax, but look how the government spends their own tax revenue, not much will change when the government spends trillions on their war effort.

</comment></comment><comment><USER17> Sounds like a good strategy. If I had so much money I would hire some of the smartest people in the world to save my taxes whatever way possible as long as the government (read as legal extortion gang) cant put me behind bars for it.

<comment><USER4> Tax shelters are very tricky. Unlike most other crimes, it's possible to be convicted of tax fraud even if the tax shelter was legal (or at least _not illegal_ ) at the time the shelter was put into place. This is generally because many tax provisions look to the facts-and-circumstances of a transaction or an item of income rather than to the strict letter of the regulations.</comment></comment>


How To Make A Megaflop (3 simple rules to ensure humiliating failure) - <AUTHOR> http://www.economist.com/node/21551455

<comment><USER2> Bad article. "Slaughtering a sacred cow" and "mixing oil and water" both can be formula for great movies. Which leaves us, not surprisingly, the third reason "produce a genuinely awful product" as the lone one.

On a side note, I think not having a wow moment is one recipe toward movie disaster. The other one might be: not being able to stir up emotions of the viewers.

</comment><comment><USER3> Strange article. Uses John Carter as an example, then none of the "3 simple rules" are applied to it. Nor is it mentioned the reality: the film is good, but was very badly marketed.

</comment><comment><USER4> Totally missing the point with The Producers. In the movie the "Springtime for Hitler" play becomes an (unplanned) success. And the movie itself became a success, showing that you can indeed "mix oil with water" with enough audacity. The article presents it like it is obvious that Hamlet or Lolita will never work as a musical - presumably because the material is too serious for showtunes - but Jesus Christ Superstar was a huge success.

</comment><comment><USER5> The Economist (at least, the UK version) is great, but the opinion pieces are often the weakest bits.

> _But the existence of flops such as "John Carter" is perverse proof that the > Walt Disney Company is doing something right._

</comment><comment><USER6> I thought we were using gigaflops… oh, OK.

<comment><USER7> I was also staring at the title for half a minute, puzzled as to what's the deal about failing to designing a CPU with a megaflop...

</comment></comment><comment><USER8> Interesting from the perspective of tech startups.</comment>


Ruby on Rails 2.3.8 Released - <AUTHOR> http://weblog.rubyonrails.org/2010/5/25/ruby-on-rails-2-3-8-released

<comment><USER2> This morning I wrote (<http://news.ycombinator.com/item?id=1375009>)

      And the Rails Tutorial book (http://www.railstutorial.org/)
      has again been updated:

        s/2\.3\.6/2\.3\.7/

      I hope this doesn't start happening every day. :-)

Turns out that was wishful thinking:

      s/2\.3\.7/2\.3\.8/

Get it while it's hot: <http://www.railstutorial.org/book>

<comment><USER3> I'm working through your tutorial, and I really -- really -- love it! Thanks for the work you put into it.

One thing though. Although it's great that you keep versions updated, perhaps you should mention that Heroku only supports rails version up to 2.3.5? As a total beginner, it took me a few hours to realize why I got strange errors when deploying...

<comment><USER2> Glad you like the tutorial!

Another reader mentioned the Heroku issue as well; sorry it caused confusion. I'll check it out and get back to you. If it continues to be a problem, I suggest moving back to 2.3.5 for now.

 _Update:_ It works if you add an explicit gem requirement to RAILS_ROOT/.gems:

      rails --version 2.3.8

My hope is that Rails 2.3.8 will Just Work™ on Heroku at some point; I have an email in to them to see if they expect this to be the case.

<comment><USER3> Ah, perfect! Thanks :)

For reference, this is where I checked the versions: <http://installed- gems.heroku.com/> But I guess all you RoR-gurus know that :)

EDIT: Also, [http://blog.heroku.com/archives/2010/5/25/rails_2_3_6_depend...](http://blog.heroku.com/archives/2010/5/25/rails_2_3_6_dependency_issues/)

</comment></comment></comment></comment><comment><USER4> It happens.

(Without meaning to sound callous to folks who have been reduced to firefighting this week: with sane practices on applying updated libraries to production, it happens to _other people_.)

<comment><USER5> This is why I fix the versions on ALL my gems to a known good version. Updates can only happen by changing that version in my source. Tests will be run after that, of course. I'm pretty sure it's standard practice now, but I can't believe there was a time when I didn't do this.

Just 2 days ago, a new version of authlogic was released that accidentally broke 2.3.5 compatibility. And that's a respected and widely used gem. It happens. Also, many gems are starting to deliberately break rals 2.3 compatibility - their newer versions are rails 3 only. Not to mention that gem authors sometimes deprecate and then obsolete some interfaces. So if you're not fixing your versions yet, and you don't have "sane practices" for updating them, it's time to start.

<comment><USER6> This is the main reason I think we need distributions (in the Debian sense) of gems. It needs to be ok for the gem authors to go ahead and break compatibility if they need to. App maintainers also need to know that they are safe unless they choose to opt in to breaking changes. A distribution would act as the go-between.

If you've got sane library management processes, you're pretty much safe, but that's a _huge_ amount of wasted effort - everybody has to figure it out for themselves. Right now, it's downright dangerous relying on upstream gems directly unless you know exactly what you're doing, and a distribution layer would let everyone share a common knowledge about which gem versions go well together.

It would also give a handy insertion point for backporting security fixes, which currently doesn't happen very often.

</comment></comment></comment><comment><USER7> It looks like the only diff is in activepack: [http://github.com/rails/rails/blob/2-3-stable/actionpack/CHA...](http://github.com/rails/rails/blob/2-3-stable/actionpack/CHANGELOG)

 _2.3.8 (May 24, 2010)_

* HTML safety: fix compatibility _without_ the optional rails_xss plugin.

 _2.3.7 (May 24, 2010)_

* HTML safety: fix compatibility with the optional rails_xss plugin. [Nathan Weizenbaum, Santiago Pastorino]

</comment><comment><USER8> Broad test coverage is not always the safety net that its proponents like to claim it is.

</comment><comment><USER9> jeez, when I read "2.3.8", I thought surely that was an error. 2.3.6 was just released.

<comment><USER10> ..with bugs. the last number in a semver is the patch level. they released a patch and then a patch to the patch.

</comment></comment><comment><AUTHOR> they did it for the lolz</comment>


Here's Some Working Code to Sort One Million 8-Digit Numbers in 1MB of RAM - <AUTHOR> http://preshing.com/20121025/heres-some-working-code-to-sort-one-million-8-digit-numbers-in-1mb-of-ram#comment-26386 <comment><USER2> Given the "write output" loop, the circular buffer has to hold the differences between successive entries (OK, after the first one, the difference between 0 and the minimum)--presumably in some variable-length encoding. Next thing to figure out: how to set an upper bound on the circular buffer size, and just what those magic numbers in LUT[] really are.</comment>