Need a Kidney? Not Iranian? You'll Wait - <AUTHOR> http://opinionator.blogs.nytimes.com/2015/07/31/need-a-kidney-not-iranian-youll-wait

<comment><USER2> The article is incorrect

> In every country that does transplants — except one — patients have two > legal ways to get a new kidney. One is to have a friend or relative who is a > blood and tissue match donate a kidney. The other is to get on the waiting > list for a deceased donor.

There are also kidney exchanges. If you have a friend or loved one whose kidney is not an exact match, they can exchange it for a matching one in an exchange market.

The NYTimes covers it some here [http://www.nytimes.com/2015/05/03/magazine/the-great- america...](http://www.nytimes.com/2015/05/03/magazine/the-great-american- kidney-swap.html)

There is an excellent EconTalk about matching economies as well. At 10:32 in is the kidney discussion [http://www.econtalk.org/archives/2015/07/alvin_roth_on_m.htm...](http://www.econtalk.org/archives/2015/07/alvin_roth_on_m.html)

UCLA's kidney exchange program [http://transplants.ucla.edu/site.cfm?id=112](http://transplants.ucla.edu/site.cfm?id=112)

</comment><comment><USER3> There should be more focus on the deceased donors issue: even when a dead person explicitly stated they were willing to donate organs, the administration still asks family, and they often refuse, mostly for religious reasons. Look what happened in France when the government tried to make deceased donation the default: all the religious zelots went postal about it, and it didn't happened. As a result, people continue to die by dialysis.

<comment><USER4> The real stink is about the problems of organ donation from somebody who is dying (contrary to intuition, you cannot get an organ from a dead person, even if they've only been dead 15 minutes. Chances of success are not zero, but so low it's only done as a very last resort). So what people think happens, that when you die organs are harvested, is not what happens. Sadly, that just doesn't work in the real world. Organs are harvested from live people.

The main reason people that you want organs from die is heart failure, doubly so for young people (if you bleed to death, say a large open wound, what kills you is failure of the heart to maintain pressure in your circulatory system. Internal bleeding ? Ditto ... So most accidental deaths are heart failure. ). Things like car accidents, falling of a building, stabbings accidental and otherwise, getting shot, ... all of these generally lead to heart failure.

If you die from heart failure, at the point where your brain stops working all the organs except the heart and lungs will have failed (the body has a priority system for blood distribution : first the heart and lungs. Then, for pregnant women, the baby and the womb and muscles involved in birth, then the brain, then the systems and organs in your trunk, then your extremities. If you intend to ever have a kid, I suggest you never read the medical literature on what can happen to a woman during childbirth, and learn this by hard: NEVER, for any reason whatsoever pull on a birth cord or cut it. Just put the baby on top of the woman, cover with a blanket, wait (even if the woman is hurt or even dead, just don't take the chance).

This means that, in the very common case of circulatory failure, if you wait for a patient to die, there will be no organ transplants available from that person. So in the usual case, the decision to harvest organs must be made before the brain fails, sometimes long before the brain fails. Can be hours before the brain fails in the case of internal bleeding.

In addition to that, a number of treatments that can work to save your life in the case of heart failure, such as lowering your body temperature by a lot, or simply operating on you for a few hours, will screw up any chance of successful transplants. Therefore, for donors they are not done.

Another thing that seriously lowers the chances of successful transplantation is using anaesthetics. It is not done. Organs are harvested without any kind of pain relief.

And also here's the difference between signing a donor card and not signing it. With a signed donor card, you are a donor. It's in the doctor's hands to take the decision to harvest your organs without any consultation (given the factors previously mentioned).

Without a signed card, doctors can still harvest your organs if either you or your next of kin agrees. Doctors will have to fairly explain the situation to you (if possible) or your next of kin, and then they get to make a decision, aware of the factors above. Needless to say, almost everybody says no.

Why ? At that time, "Yes" means certain death, and cessation of all medical efforts to save your life, "No" usually means 80-90% chance of death.

Example article on the subject : [http://www.wsj.com/articles/SB100014240529702046030045772699...](http://www.wsj.com/articles/SB10001424052970204603004577269910906351598)

<comment><USER3> The WSI article seems pretty biased but ok, everybody is entitled to an opinion.

However please note that we differ on two important things:

\- You seem to think that "dead" means the heart is not working anymore. For a lot of people, me included, if my brain is dead, then I'm dead, period, even if my heart is still pumping. Consequently, you misrepresent reflex (like the legs of a frog still able to have a reflex even if it's dead) with pain, which is not.

\- Your "80-90% chance of death" are unsourced and seem invented, which makes me question most of your arguments.

So basically you're just against deceased donation, and that's your right, but please do not mislead people with erroneous informations.

</comment></comment></comment><comment><USER5> Ironic to see a particular kind of freedom we'll likely never see in the US in a country which is less free in so many other ways.

<comment><USER6> Poor people selling their organs really doesn't qualify as "freedom" except in the most meaningless, pedantic sense.

<comment><USER7> Why not? That's a serious question; I'd love to hear your opinion.

It seems to me that _if_ they freely consent to sell their kidney, then they'll only do it because it's a better option than not doing it. Sure, in a perfect world everyone would have enough money to survive, and there would be no need for this. But is it really ethical to _deny_ them options?</comment></comment></comment>


India PM Modi Abolishes 500 and 1,000 Rupee Notes to Fight Corruption - <AUTHOR> http://www.bloomberg.com/news/articles/2016-11-08/india-abolishes-inr500-1-000-rupee-notes-to-fight-corruption <comment><USER2> [http://exchangemynote.in/](http://exchangemynote.in/)

</comment><comment><USER3> Extensive discussion here: [https://news.ycombinator.com/item?id=12900965](https://news.ycombinator.com/item?id=12900965)

</comment><comment><USER4> True 56 inch in Action. Just when I though my deadlines were tough, our Modi Ji does it starting midnight on the day it is announced for the entire country. Huge Respect. We expect some inconvenience initially but our digital systems are sufficiently capable to handle it.

Goes over to count how much do I have of those obsolete piece of paper.</comment>


Will the cloud will have its own Deepwater Horizon disaster?  - <AUTHOR> http://arstechnica.com/business/inside-the-cloud/2010/06/will-the-cloud-will-have-its-own-deepwater-horizon-disaster.ars?utm_source=rss&utm_medium=rss&utm_campaign=rss

<comment><USER2> What sort of 'data-breach' are they concerned could even remotely compare to the disaster in the gulf right now?

Unless each persons financial information including bank records are published and criminals drain their accounts or rack up debt, publish all medical records, or something like that, I don't see how these things can really compare.

The Deepwater Horizon disaster is destroying ecosystems, killing livelihoods and may take decades to correct. I don't see the comparison.</comment>


IT-Edit: Integrated Terminal Editor - <AUTHOR> http://www.open-source-projects.net/IT-Edit/IT-Edit_presentation.html <comment><USER2> Did I miss the point? Pretty much every text editor, let alone IDE, comes with an integrated terminal. E.g., gedit "embedded terminal".

</comment><comment><AUTHOR> [https://github.com/mrcyberfighter/it- edit-3.0/tree/master/it...](https://github.com/mrcyberfighter/it- edit-3.0/tree/master/it-edit-3.0)

</comment><comment><USER3> Maybe integration with Language Server can provide useful functionality like navigation and completion.

</comment><comment><USER4> Am i right to say that this is just an XServer within special application acting like tiling WM?</comment>


Meebo introduces xAuth (the scoble interview w/ whiteboarding) - <AUTHOR> http://www.youtube.com/watch?v=-UjXswWs7xg xAuth.org coming monday. <comment><USER2> Surely this won't be confused with Twitter's xAuth system, oh wait... - [http://groups.google.com/group/twitter-development- talk/msg/...](http://groups.google.com/group/twitter-development- talk/msg/b09f2a3324728d89)

<comment><USER3> Meebo did get the xauth.org domain, if that counts for anything.

</comment></comment><comment><USER4> I love toolbars! The more the better, it reminds me of the good old IE days.</comment>


Beware of Ballers on a Budget - <AUTHOR> http://www.bothsidesofthetable.com/2013/02/09/beware-of-ballers-on-a-budget/ <comment><USER3> Silicon Valley has been filled in recent years by people who've seen movies like "The Social Network" and read TechCrunch with its myth of the heroic entrepreneur, and have come here thinking this is how it is.

They are emulating a simulation of a startup that really isn't anything like the real startup. It as if Baudrillard's Simulacrum of a startup has taken over Silicon Valley. <http://en.wikipedia.org/wiki/Simulacra_and_Simulation>

These folks feel they have to live some mythical startup lifestyle and - <USER2> particularly hated phrase in my book - fake it till they make it.

<comment><USER4> _> Silicon Valley has been filled in recent years by people who've seen movies like "The Social Network" and read TechCrunch with its myth of the heroic entrepreneur, and have come here thinking this is how it is._

Really? I seem to have met someone like this last year when I first arrived in the Bay Area, but he seemed to be focused on the racier party scenes in "The Social Network." There was one incident where he decided it would be dandy repeatedly to leap up and down from his bunk to the floor, in the process spilling a glass of beer on a woman's Macbook and upending it face-down opened on the floor. He didn't apologize to her or even acknowledge that he did it.

This guy has the gall to mumble editorial comments under his breath while I'm trying to talk business to someone.

He's also the quintessential example I give of shallowness I've encountered in the Bay Area:

        "This needs better design."
        "Really? Do you know what those buttons do?"
        "...no."

When pressed for what better design constitutes, he recommends a different font and "some gradients."

<comment><USER5> In fairness, not knowing what buttons do at a glance can indeed be an indication of bad design.

<comment><USER4> Sure, but unless the buttons function as buttons was obscured, not pressing them to find out what they do during a critique is shallow.

</comment></comment></comment></comment><comment><USER6> Every city--and culture--has people who look flashy above their means. In Dallas, the stereotype is called called $30,000 Millionaires[1] and every car dealer can spot one from a mile off. Working for one can be a miserable experience or it can be a great way to expand your own wings. In my experience, the jet-setter likes "groupies" who appear to raise his own stature. Use this to your advantage to accompany him or her on these trips, then do your own networking either for yourself or for your company. Investing: if you don't have the resources, leverage someone else's.

1 - [http://www.dallasobserver.com/2007-11-29/news/douchebags- in-...](http://www.dallasobserver.com/2007-11-29/news/douchebags-in-the-mist/)

<comment><USER7> _"People who are actually from Gangnam never proclaim that they are—it's only the posers and wannabes that put on these airs and say that they are "Gangnam Style"—so this song is actually poking fun at those kinds of people who are trying very hard to be something that they're not."_

—PSY (via [http://travel.cnn.com/seoul/play/interview-psy-gangnam- style...](http://travel.cnn.com/seoul/play/interview-psy-gangnam-style-posers- and-hysterical-little-boy-285626) )

You're completely right. Every culture has this, and such people can be either dangerous or profitable -- depending on whether they're wasting your money, or spending their money in ways that benefit you.

</comment></comment><comment><USER8> It's funny that he praises Trevor Owens, but the picture on Trevor's Facebook page shows him (apparently) speaking at a conference: <http://www.facebook.com/trevor.owens>

Not to pick on Trevor but what qualifies him to run a lean/entrepreneurial workshop? Has he had a successful startup? If not, how is that any better than being a "conference ho"?

This post is weak-sauce IMO

<comment><USER9> absolutely nothing qualifies me to run a lean/entrepreneurial workshop. except our workshops kick fucking ass.

what qualifies you to start a business? what qualifies anyone to do anything?

<comment><USER8> Take a step back and think about what you just said. Many startups can be launched without any specific qualifications or experience. You can learn as you go, fumble around, yet still find product-market fit and grow. I've done it and so have many others.

Maybe I'm taking crazy pills, but once you enter the realm of teacher/speaker/mentor/workshop-runner, I thought it was sort of assumed that you've previously put your knowledge to the test and at least _tried_ to build something. Hell, even if you tried something and it was a huge smoldering failure, that's better than jumping on stage as soon as you close your copy of the Lean Startup.

Sorry, I really don't mean any disrespect. I just don't want to see an ecosystem of _"startups teaching people how to build startups that teach people how to build startups"_ I've seen it in other industries and it sucks.

<comment><USER9> No worries. I didn't mean to sound harsh in my tone. I thought your comment was a snap judgement without any real research. If you did do research you would know that I don't do all of the teaching, we bring in experts from every location, just like a conference.

</comment></comment></comment></comment><comment><USER10> > _"Whoa. Why so many on leases?"_

Because leasing is a pretty efficient system that can be economically superior to buying an asset that depreciates like mad the instant you sign the papers?

Leasing isn't reserved for people who can't afford to buy a car, just like renting isn't reserved for people who can't afford to buy a home.

<comment><USER11> Even more fun is when you buy a car for $17k cash new, 11 years later it's still "worth" north of $4k, but you own it outright, it's reliable and doesn't break down, and costs you basically gas (money/miles) + oil changes to operate it and statistically for the make and model has about another 80k miles before it's expected to start needed expensive repairs. At my rate that's 8-10 more years.

<comment><USER12> What car is worth 25% 11 years later? Honda civic?

<comment><USER11> don't know why you got downvoted, but yeah, I drive the most humdrum Honda civic imaginable. Other than tires, brakes and oil, the only thing I've had to fix was a $100 air mix sensor that broke after 10 years.

I _do_ wish I drove a nicer car, but then I remember that extra trip to Europe or Asia I take every year instead and it more than makes up for it.

<comment><USER12> I seem to get downvoted all the time here though. :-/

</comment></comment></comment></comment></comment><comment><USER13> The problem lies with the investors. They would rather invest in a group of guys well known on the conference circuit than the team of unknowns with great work ethic.

</comment><comment><USER14> My wife is a big fan of the term "ballin on a budget", which means that we get nice things by saving for them, and by learning how to make things like nice meals for ourselves. If we go to a restaurant and pay a lot of money for a plate and decide we like it, we'll figure out how to make it. Slowly but surely that bar of "what's worth going out to a restaurant for" is shrinking. Not that we don't go out to restaurants, we love doing it because it's fun, but we're learning how to make really high-quality meals together.

The other part of her "ballin on a budget" lifestyle is saving for nice things, not going into debt for them. The car we own is totally paid off. While it's not the nicest car you'll see in LA, it's definitely not a hoopty. One thing I do notice a lot about West Hollywood especially (where I live and work) is the fact that at least half of the nice cars have dealer plates on them still. People must not keep cars for much longer than a few months or something!

I like the term "30k Millionaire" better if you want to degrade people who go into debt to look richer than they are lol

</comment><comment><USER15> The interesting part is that the article ends with him and McClure traveling to China for a conference circuit. Did they have any customers in China?

As a rough proxy for the correlation between tech circuit exposure and results, it would be useful to make a scatterplot of the (number of times a company is mentioned on Techcrunch) vs. (exit value in USD). Two companies at opposite ends of the spectrum would be Foursquare ($2M revenue in 2012, mentioned frequently on TC) and Meraki (acquired for $1.2B in cash, handful of posts on TC).

<comment><USER16> Or Facebook, mentioned CONSTANTLY on TechCrunch, which is currently at a market cap of $68 billion on the public exchange.

Or many startups that get mentioned once on TechCrunch and never again and then fail.

I agree that the scatterplot would be interesting, but I think you are supposing that the answer will come out the way you expect.

</comment></comment><comment><USER17> Said the guy posting about taking several weeks off to go to China on a "tech tour". That seems like a massive boondoggle.

<comment><USER9> Mark was actually only there for the China part which was four days including weekend. He's actually highly interested in the business climate there and wants his kids to learn mandarin.

</comment></comment><comment><USER18> This problem might even be worse outside of the valley in places like Portland where I am writing from. They glamorize the valley lifestyle and act like they think all of silicon valley does.

</comment><comment><USER19> Gosh I am so different. I drive an economy car and I try not to spend so much money and live within a budget. I don't pretend to be something I am not. What you see is what you get with me. I don't live a startup lifestyle, I try to live a minimalist lifestyle by making do with less. Sometimes less is more.

As an executive I'd even go for a lower salary just so the company can have a higher profit or pay employees better benefits. That is the way I'd run my startup lower executive salaries, higher worker salaries and more benefits to keep them on, and then a higher return for shareholders as well. If anything I might even go the Steve Jobs route of $1/year CEO salary and be paid in stock instead.</comment>


Obama admits CIA 'tortured some folks' - <AUTHOR> http://www.theguardian.com/world/2014/aug/01/obama-cia-torture-some-folks-brennan-spying

<comment><USER2> It doesn't make sense to fire Brennan for starting the investigation that uncovered the misconduct.

<comment><USER3> Does anyone want to fire Brennan for starting an investigation?

I thought they wanted Brennan fired for spying on congress and then lying to congress about spying on them.

<comment><USER2> Well how do you know he had anything to do with it? He is responsible for it either way, but he may not have known about out and may not have lied.

How long has Brennan been in office? According to wikipedia, since March of 2013. Hmmmm... this is long enough that he _should_ have known what was going on.

</comment></comment></comment><comment><USER4> 'yeah, we ran few secret concentration camps in Europe, no biggie'

<comment><USER2> I don't think you can call something a concentration camp unless it has at least 40 people. Did these?

They are still abhorrent, but the purpose of a concentration camp is to control some ethnic group on a massive scale, not to indefinitely detain people they are capturing individually. So, say you're fighting a bunch of Dutch guerrillas. You round up all the Dutch civilians into concentration camps so that the guerrillas don't have anyone to go to for food.</comment></comment>


Ask HN: Why doesn't Microsoft release its OS in chip? - <AUTHOR>

I'm curious why Microsoft, the unbeaten OS maker in the world, doesn't release its OS in hardware chip (only). The way I see it-
Advantages:
. Flash memories (specially NAND) are dart cheap these days. And if Microsoft decides to go for it, NOR memories won't remain expensive given the volume of the OS Microsoft sells.
. Microsoft is losing significant amount of money to the hackers and crackers. And OS in chip only solution will force the customers buy the OS.
. OS hack will be significantly more difficult, if not impossible. Custom design of the chip will make hacking infeasible.
. Loading OS from flash to RAM will require significantly less time.
. Unique hardware identity per cheap (Apple's iPhone 5s+ like) along with crypto engine will make the users and their data more secure.
Possible solutions:
. RAM Slot: OS in a RAM slot comes to my mind first. A RAM stick can have the OS along with RAM chips. Users plug and play the OS. No more hassle to install OS. It will ensure OS license/user.
. Single chip: Single chip containing flash memory, cryptography engine, MCU and RAM for data and OS update/upgrade management will be shipped with the motherboards of the devices. It will ensure OS license/machine.
. BIOS replacement: replacing the decades old BIOS with a full fledge OS chip makes sense in terms of dynamic hardware detection, and security of the system.
What's the catch? <comment><USER2> How would you patch bugs? Add bug fixes after boot? After a while that will take hours to download and install. Amend an image loaded from the ROMs in flash, so each one is updated means pirates can send updated flashloads around. Apple uses a unique chip with serial etc, but even that is defeated. recently they require a serial number for each free OS download - that has crimped bootlegging, but there are new updated OS on torrents daily, so only the sheep are corralled...

</comment><comment><USER3> The catch is that you'd probably need everyone to upgrade their hardware and you'd still have to maintain an installable copy for the VM users

<comment><AUTHOR> Using OS in RAM slot, people would be able to upgrade their OS even in today's machines.</comment></comment>


Search Still Sucks - <AUTHOR> http://techcrunch.com/2011/02/12/search-still-sucks/ <comment><USER3> Btw Matt Cutts' statement _"Google's algorithms had started to work; manual action also taken."_ is weird. (<http://twitter.com/mattcutts/status/36502687868665856>)

All evidence indicates that JC Penny was ranked #1 until the NYT provided Google with the evidence that it had collected. Google then acted on the evidence. As a result of those actions, JC Penny's rank dropped from #1 to #71.

It is funny that he should say _"Google's algorithms had started to work"_. Presumably, the algorithm doesn't depend on a New York Times reporter telling Google that they were being gamed :)

<comment><USER4> I didn't understand that comment either until I read his comment here: <http://news.ycombinator.com/item?id=2212336>

Algorithmic changes went into play 1.5 weeks ago and had started to drop JCPenny, then the spam team gave them some cement shoes.

<comment><USER5> Sounds like Google intervened manually as well as doing algorithmic changes. How long till they do the same with Demand Media?

</comment></comment></comment><comment><USER6> At this point there's so much noise in Google Results that they're becoming an option of last resort. Not only is there a lot of noise, there's no real usable information from others on the quality of the results.

If I'm looking for a local vendor I go to Yelp, if I'm buying something I go to Amazon, and if I'm looking for coding help I go to Stack Overflow. I don't know that we necessarily need one site to replace Google; it seems to me that the era of free text search being the dominant paradigm may just be over.

<comment><USER7> I know what you mean about searching for local vendors or buying something; my experience is that a Google search isn't great for either of those. I still find Google pretty useful for coding help, though, and personally I don't tend to go straight to somewhere like Stack Overflow.

Could you give an example or two where Stack Overflow gets you an answer more quickly than a Google search?

Here's my example: In gdb, I want to list all of the threads in my running program. A Google search for "gdb list threads" gives me the answer in the first result. The same search on Stack Overflow doesn't seem to give me the answer in the first few results. This is hardly scientific, of course, so I'm interested to hear of coding questions where Stack Overflow does a better job than a Google search.

<comment><USER6> Mea culpa. SO was definitely my weak example there... if they had a better on- site search it wouldn't be an issue but I guess they mostly just optimize for Google search. So a lot of the time I end up Googling tech issues, but then clicking on the SO link because I know there will be multiple answers on that page instead of just one.

<comment><USER7> No worries, I also notice that SO comes up in Google results quite a lot and that's generally how I access it as well so I also do a Google search for tech issues and then end up clicking on the SO link.

Your post yesterday got me thinking about why Google is still pretty useful for coding questions but not so for searches of a more commercial nature. I guess it isn't worth so much money to game Google for the former (Experts Exchange notwithstanding).

</comment></comment></comment></comment><comment><USER8> It's funny that someone who just sold out to AOL would choose to trash Demand Media.

> _If Google was good at search, Demand Media wouldn't exist._

Would Associated Content? Would AOL?

\- - -

This is a cheap article that plays with words; it's titled "search still sucks", which is debatable but "truish", but what it really tries to say is that search "sucks more and more", which is provably false.

And it's 100% evidence free, too, as is the rule in the new entertaining noisosphere of blogism.

> _So what is the evidence that search still sucks? Well, you know it's true, > just like me._

Mr. Arrington sounds like a priest now; what's the evidence that God exists? Well, you know it's true, don't you?

\-- Well, no, I don't. What else do you have?

\-- Err, nothing.

</comment><comment><USER9> I was wondering why there were so few negative comments here on Michael Arrington posts.I have just read his biography on wikipedia.

Now I feel very naive. It Must be obvious I am new here. I understand no one here want to piss off this guy (like in my other comment). At least no one trying to launch a startup.

Ok now I need a new account.

</comment><comment><USER10> Search engines would benefit enormously from using data from social bookmarking sites. If you haven't lately used Delicious to search, I highly recommend it. The breadth of search isn't as far-reaching, but all of the results have essentially been pre-filtered by however many users have bookmarked it -- it's unlikely that many people would bookmark a spammy site or site with crap content.

I think Google results could vastly be improved if they tied together their normal rankings with a "how many people have bookmarked this URL (and to some extent, URLs from this domain)" metric. I've worked closely with Delicious' set of data, and it's nothing short of incredible. Billions of instances of people categorizing sites and vouching for their quality are going unused in the search space.

<comment><USER11> If black hat seos started to believe Google was paying specific attention to Delicious bookmarks, Delicious would be flooded with fake accounts faster than you can say "link farm".

History of search:

1\. New company releases new search engine, better than the competition because it pays attention to a previously ignored signal.

2\. Seos work out how to game the signal.

3\. New search engine is now as crappy as the search engines it replaced.

Really, internet search is like macroeconomics: soon after you understand {how to prevent recessions, how to find the best webpages}, the problem vanishes and is replaced by something even more complex and incomprehensible. Furthermore, this has already happened.

<comment><USER12> This has interesting implications, I think, in the business of search.

It's almost like a negative network effect. The more people that use a search engine, the more people try to game it, and the less useful it becomes for finding what you want. This seems like it'd make things much easier for new competitors like duck-duck-go to bring a superior product... at least until they gained enough market share to be worth SEO time gaming.

</comment></comment></comment><comment><USER13> _Travel searches, for example, are a joke, and startups like Gogobot are popping up to try to fix that._

This is how Google is finally toppled. Not by a "google killer" or another giant like Bing, but by a thousand tiny niche services that get "X" search right.

<comment><USER14> This is true, but it has always been true. Google has always sucked for product review searches, local service vendors (try finding a plumber anyone?), travel searches etc. The odd thing is why people continue to use it for all these things. Perhaps the ads?

</comment></comment><comment><USER15> 'Search still sucks' seems like quite an exaggeration when the average user (whoever that is) isn't even noticing any 'decline'.

I usually always find what I am looking for when using Google and haven't noticed any major changes recently when it comes to the search results. Maybe because I am taking some of my searches straight to respective sites like Wikipedia, IMDB, Discogs but still.

Also, ever since day one a bit of 'common sense' helps determining which results are actually useful (and I am all right with that).

</comment><comment><USER9> Apparently, this blog author has been ousted as "bribed by Microsoft for secret advertising disguised in posts"

There has been a lot "google search sucks" submission from Techcrunch lately. This was starting to feel a little weird. So I googled "Michael Arrington Microsoft" and got this :

[http://techrights.org/2010/02/07/michael-arrington- microsoft...](http://techrights.org/2010/02/07/michael-arrington-microsoft- bribes/)

Are people aware of this ? is it old news ? Is HN being spammed ?

<comment><USER16> There's a lot of "google search sucks" lately because google search sucks. I would also be wary of techrights.org when it comes to regarding anything Microsoft.

</comment></comment><comment><USER17> Google loves what you guys call spam because it allows Google to generate more revenues.

When a content farm pushes first pages results this causes the real manufacturers and businesses to use Google's advertising platform to reach their customers.

When you're looking for a kitchen appliance It's better for Google to return a landing page filled with Google Adsense ads instead of the official website of one of these appliance manufactures. Again for the same reason mentioned above.

It's all about the revenues.

\- Reza Sardeha

<comment><USER18> What this _really_ means, is that Google should eliminate the middleman. Google shouldn't fight content farms. It should become the unstoppable juggernaut among content farms and do this by being actually useful and creating pages with value.

</comment></comment><comment><USER19> Everything is amazing right now and nobody's happy: <http://www.youtube.com/watch?v=8r1CZTLk-Gk>

</comment><comment><USER18> I'm afraid to say something like this, but some linkspam/scraper sites are verging on looking _almost useful_.

I was trying to Google references to Greek Playwright Aristophanes' use of fart jokes (yes, seriously I was looking for that) and I came across this linkspam page:

<http://wn.com/2934_Aristophanes> (seems to have dropped in Google ranking)

For one thing, this site doesn't offend my eyes. It doesn't immediately insult my intellect, either. After the first second, though, it still proves to be just as useless.

In a way, what Cuil was trying to do was to apply enough AI to make an actually very useful scraper site. What would the world be like if such sites actually existed?

<http://wn.com/linkspam>

(Seems like the site is just trawling through my cookies to make guesses about what I'd like.)

</comment><comment><USER20> I totally agree! Googles search results is starting to suck. If I'm sitting with an errorcode for some sort of program, trying to search it on google, will just give me a couple of random generated botsites. I have moved permanently to Duckduckgo. :-)

</comment><comment><USER5> I thought this was a great point: "When companies start to flail they nearly always do a couple of things. First, they trash the competitors. Then the talk about how hard the problem is and that the solution is a long term one."

</comment><comment><USER21> Is this an article about how search sucks? Or is it an article about how Google can only do 50 things right instead of 500?

Google /= search, it's just one engine. No need to throw all your eggs in one basket.

</comment><comment><USER22> This is why I think it'd be great to see Google release all the 40,000+ test queries which Google/Matt Cutts took back in 2000. It would help to put to rest some of the "Google is regressing and getting worse" debate one way or the other (and I suspect by showing that such talk is more sensationalist than accurate; I think Google search has improved a fair amount).

The article does make some interesting points, and I am a bit confused at the supposed sequence of events with the JC Penny/NY Times story. Plus it does raise the question of why a company who previously has had some SEO issues was - apparently - able to game Google's rankings in such a major way (using such spammy methods) without Google picking up on it for months.

That's a conclusion point from the article which I think is a well founded one.

As for the other points in the article's conclusion though:

>> _"But all the evidence suggests otherwise. Demand Media is worth $1.6 billion, and their entire business is based on pushing cheap, useless content into Google to get a few stray links. If Google was good at search, Demand Media wouldn't exist."_

 _"wouldn't exist"_ is subjective. If Demand Media weren't pumping out content, what would rank in its place? Part of Demand Media's success is that they are 'filling in the gaps' and covering content surrounding keywords which don't really warrant much competition. Sure this isn't always the case - <USER2> Demand Media's sites do sometimes rank highly for some rubbish content with other alternatives available - but in many cases it does seem to be at least part of the reason for DM's success.

Do I like some of Demand Media's content? No.

Do I like that Demand Media seem happy to have some pages with more adverts than content? No.

Do I think that Google et al should not even index some of their pages (some of which can at current rank fairly well)? Yes.

Do I think that there's many good alternatives to some of DM's content? NO. Unfortunately.

>> _"And Bing wouldn't be making solid gains in search market share."_

I might have different ideas about what "solid gains" means, although to me a percentage point here or there doesn't amount to much.

If - say - a Presidential candidate seen his/her opinion polls increase by 1 or 2%, you wouldn't see a bunch of stories saying how the candidate is making "solid gains".

In-fact, if a mainstream media source run an article on (say) a political party who seen a 2% rise in their opinion polls - and thus concluded that said party is making "solid gains" - I'd feel intellectually insulted and suspect the mainstream media source of bias.

So I definitely feel that this conclusion point is sensationalism (and inaccurate sensationalism, at that) and nothing more.

So all in all, a decent article which makes some decent points (at times). But it does also feel a bit of a shallow 'staying in the bandwagon' type of article, too.

</comment><comment><USER23> If "the customer's always right", then, for the current search situation, you have to ask: Who's the customer?

\--

P.S. Google: I'd accept, gratefully, as a stopgap, being able to specify multiple "site:foo" parameters. I don't know what the computational (or financial) impact to you would be.

(So far, I've held off trying browser extensions to accomplish this, but I guess I can start looking for one having a good reputation.)

<comment><USER24> If you want this ability for one-off searches, you can use the OR operator.

site:<http://news.ycombinator.com> OR site:stackoverflow.com <query>

I don't know if there's a max # of sites you can add. I tried it with three and it seemed to work great.

[http://www.google.com/search?q=site:searchengineland.com+OR+...](http://www.google.com/search?q=site:searchengineland.com+OR+site:ninebyblue.com+vanessa+fox#sclient=psy&q=site%3Aninebyblue.com+OR+site%3Asearchengineland.com+OR+site%3Aradar.oreilly.com+%22vanessa+fox%22&fp=649be7798417a8e0)

(Yes, I did an ego search. Isn't that the best way to know if the results are likely accurate? :)

If there's a set of sites you want to search through often, you can set up a custom search engine for what you describe. For instance, see this page:

<http://www.toddnemet.com/>

<comment><USER23> I've tried that [before], but with multiple parameters, I simply got zero results. I then enclosed the site:foo OR site:bar within parentheses, leaving the rest of the query outside parentheses. Whichever site:foo came first would be matched, but only it appeared to be matched. Subsequent site:bar, etc. parameters did not produce any matches in the results.

I'll have a look at your links, in a minute -- probably should have done that first.

EDIT: Well, your second link sure works. I wonder what I was doing wrong. When I saw someone else('s or s') comments online to the effect that it didn't work, I assumed that was why my own experience failed.

I'm in serious need of some coffee, at the moment. Thanks for correcting my mis-impression; I look forward to straightening it out in my mind and taking advantage of this feature.

<comment><USER24> It could be that you were using a lowercase or. It has to be all caps OR.

(lowercase or just uses "or" as one of the search terms, which I think actually is considered a stop word and is then ignored.)

And I'm always a supporter of the more coffee recommendation.</comment></comment></comment></comment>


One Man's Quest to Outrace Wind (2011) - <AUTHOR> http://www.wired.com/magazine/2011/02/ff_fasterthanwind/all/1 <comment><USER2> The last time I read about this [1] was while working at a Silicon Valley startup with a small team of bright software engineers.

Most were perplexed by the problem as the URL spread, and the article, in my opinion, did more to confuse than explain. The newer article linked here, which I only skimmed briefly, looked to probably make the situation worse judging from its visual aids.

I thought it was obvious and simple to understand (and explain) how this worked:

The wind pushes the vehicle via simple drag forces, this alone can accelerate it, eventually approaching the speed of the wind.

The vehicle also drives a propeller via its forward motion through a mechanical drivetrain.

By spinning, the propellor acts as a forward motion compensator, and the wind will exert force against it even when the vehicle travels at speeds >= the wind.

Introducing sailboat-based analogies does not help understand any of this in my opinion, it only serves to confuse the audience. The folks behind developing this vehicle come from a sailing context, which explains why they're approaching it from that perspective. For the general public, sailing is not a natural model for reasoning about this stuff.

[1] [https://www.wired.com/2010/06/downwind-faster-than-the- wind/](https://www.wired.com/2010/06/downwind-faster-than-the-wind/)

<comment><USER3> I don't know if your explanation is simple or obvious either, except maybe in a very hand-wavey sense that may or may not correspond to the truth.

The sailboat thing isn't really an analogy—it's a direct comparison, and the operating principle is the same. There are a lot of resources explaining the phenomenon of "apparent wind" and how it's possible for a sailboat's downwind velocity _component_ to exceed the environmental wind speed. If you understand vectors at the level of a college freshman, you can understand how that works; you don't have to be a sailor. From there, the "cylinder Earth" thought experiment provides the intuitive leap to the operating principle of this dead-downwind vehicle.

They do touch on the concept of a faster-than-the-wind VMG downwind, but they probably should have emphasized it more in the explanation.

<comment><USER2> Introducing sailboats doesn't simplify explaining anything in my experience, they just pollute the mental model with more complexity.

There's value in the ground vehicle model for explaining to someone how sailboats can travel faster than the wind propelling them. But I don't think sailboats are a useful teaching aid in the opposite direction; explaining how the ground vehicle works.

So unless the goal is to teach specifically about sailing, I feel it's best to leave it out entirely. Except maybe at the end as a passing mention like "BTW, this is how sailboats manage to sail faster than the wind as well."

<comment><USER3> I have to disagree, because a sailboat is a pure manifestation of the model that must be understood to understand how this vehicle works: a foil held at a fixed angle in a moving fluid, constrained to move only along a straight line at a fixed angle wrt. the motion of the fluid.

Understanding this vehicle requires heaping more complexity (the spiral motion) onto that same model, so in fact I think a sailboat is a great teaching aid here, as it's a clean waypoint on the journey to full understanding. Sailboats also exist, and have non-controversially demonstrated the surprising ability to sail with a downwind VMG higher than the environmental wind speed, which will help skeptics to engage with the problem.

</comment></comment></comment></comment><comment><USER4> When I was a kid I used an erector set to make a car that moved directly into the wind using a similar technique. Many people don't think that is possible either, but with proper gearing, it works fine.

<comment><USER5> It's also possible to use a propeller sail to go directly upwind in water. You don't need gearing in water if you pick the right pitch on your underwater propeller relative to the pitch of your sail/fan.

[http://www.sailwings.net/windspinner.html](http://www.sailwings.net/windspinner.html)

</comment></comment><comment><USER3> Classic. I already knew about this, but the "cylindrical Earth" thought experiment is new to me and as a sailor (lapsed) with a physics degree I have to say I find it immediately convincing. It's not controversial that you can sail faster than the wind on some angles, so with a propeller in the mix I don't understand why so many smart people were willing to make absolute statements that this is not possible.

</comment><comment><USER5> If you can go downwind 3x faster than the wind, can you turn and go perpendicular to the wind using this mechanism? Can you turn again and go directly upwind?

At a multiplier of 3x windspeed, it seems like the fact that there's wind at all is irrelevant other than to get off the starting line. You're generating your own wind power by pushing the propeller through the air. Is this correct?

Because if this works other than directly downwind, you have a perpetual motion machine - scale up, drive in a circle, and hook a dynamo to a wheel. Which makes me think I've neglected something somewhere...

Edit - from the Wired article:

 _" Skeptics think that the wind is turning the prop, and the car is turning the wheels, and that's what makes the car go," Cavallaro said. "That's not the case. The wheels are turning the prop. What happens is the prop thrust pushes the vehicle."_

OK, now I'm really confused. I thought the prop rotation was screwing through the air slower than the relative airspeed and driving the wheels - now you're telling me that the wheels are spinning the prop to produce forward thrust?

If he can go from sitting still: wind speed -10, ground speed 0, to W0/G10, and accelerate up to W20/G30, what happens if the wind drops to 0 mid-run? Can he keep going at W20/G20, isn't that easier than W20/G30?

<comment><USER6> Here is a simplified picture.

The propellers are being pushed into a spin by the difference between the airspeed and the groundspeed. (Note that the propellers are locked to the ground by the wheels.) As they spin, the blades generate lift. That lift then pushes the craft forward.

Take away the difference between airspeed and groundspeed, and nothing is keeping the blades spinning. Therefore the system will run to a stop due to friction.

The connection between spin and lift is mediated by aerodynamics, not a mechanical linkage. And aerodynamics allows the vehicle to be pushed faster than the spin. Which is why, if you get friction low enough, it can go faster than the wind. And not slightly faster, but a lot.

</comment></comment><comment><USER7> So my question is, given the cylindrical Earth thought experiment (which I do find quite compelling), why bother with the weird drive train involving the wheels? Putting sails of the right proportion on a propeller shaft should be enough.

<comment><USER5> Because the cylindrical Earth experiment neglects the reaction forces of a sailboat's keel, or the land-boat's wheels. The propeller shaft would just rotate, you need that cylindrical Earth to have, essentially, a ballscrew spline.

You can't generate the differential with clever aileron wings, either - has to be in a different medium, otherwise the thing would just tumble.

<comment><USER7> I think I get it. I would have thought plain, free-spinning wheels could serve the role of the keel (I guess they do in a normal sail car), but you need to transmit that keel action from the wheels on the ground to the sort of virtual cylindrical Earth the propeller lives in.

<comment><USER8> In a normal sail car you'd have to tack, but otherwise the same forces apply. The clever thing about the propellor is you get a sort of cork-screw-tacking for free allowing your motion to be in-line with the wind instead of having to be at an angle.

</comment></comment></comment></comment><comment><USER9> I remember reading this in the physical magazine. Super interesting article around physics and harnessing the wind.

Spoiler: They went almost 5x faster than the wind propelling the craft

</comment><comment><USER10> i think sailboat based explanation is useful only to the point. Airplane wing provides better and simpler model outright. It becomes more intuitive when you think how this craft goes straight into the wind (that is what sailboat can't do).</comment>


MongoDB Atlas - <AUTHOR> https://www.mongodb.com/cloud/atlas/migrate <comment><USER2> I'm a bit confused by this. It seems to be a database as service, but when I register, it asks if I want to use aws or azure. Is this self-hosted then?</comment>


Kubernetes – The Hard Way - <AUTHOR> https://github.com/kelseyhightower/kubernetes-the-hard-way <comment><USER3> I'm surprised that RedHat's OpenShift 3 / Origin does not get any publicity on HN. It uses Kubernetes (of which RedHat silently became the largest committer) and also fills several missing parts including a CD pipeline.

[https://www.openshift.org/](https://www.openshift.org/)

It's amazing to see how many large Enterprises already selected OpenShift, either in various cloud setups or on premise scenarios.

Looks like that for many HN people there is only AWS and GCE out there.

<comment><USER4> Apparently the goal of this guide it to setup a kubernetes from scratch (on top of VMs provisioned on an orchestration-agnostic public cloud), not how to use a managed kubernetes cluster as provided by openshift.

<comment><USER5> Perhaps the parent was referring to the self-hosting OpenShift option which acts as a Kubernetes distribution:

[https://docs.openshift.org/latest/getting_started/administra...](https://docs.openshift.org/latest/getting_started/administrators.html#getting- started-administrators)

</comment></comment></comment><comment><USER6> Cannot find much on mounting storage to the container. It exactly that --storage-- that has been recognized as a difficult problem when moving an infrastructure to containers.

Given the title "The Hard Way", I kind of expected it would dive deeper into this topic.

<comment><USER7> Of course - following the first law of technical documentation, the amount written about it is inversely proportional to the complexity of the problem.

Seriously though, it is getting a bit silly how almost every single kubernetes demo involving persistent data just uses emptyDir or hostPath and we are all supposed to pretend that those are a production-ready solution that won't lose data. AFAIK the PersistentVolumeClaim and StorageClass stuff will be the solution for this?

<comment><USER6> To me it seems that there are many approaches. A storage cluster seems to be a necessity for anything serious. But then the questions is: which one? Open source solutions are not too many (Gluster, Ceph, FreeNAS come to mind), and from the closed source camp ScaleIO looks really promising.

But non of these are part of your K8s tutorial :)

<comment><USER8> And gluster at least has horrible performance and stability issues. And with containers, kernel panics kill an entire host…

<comment><USER9> Do you have more details on performance and stability issues? The recent releases of gluster have been working very well.

Gluster is completely in userspace. How would stability issues, if any, in userspace cause kernel panics? Can you comment more about that?

<comment><USER8> > Do you have more details on performance and stability issues?

Tried using it for a while (last November until ~April) on Debian Jessie, with latest versions. Lots of bugs with SSL mode, lots of desynchronization issues, crippling performance issues, …

And no matter what I ran into, the bugs were already known and filed for months at that point, with zero developer reaction.

> Gluster is completely in userspace.

Unless you try using its NFS server to get not _entirely_ disastrous performance.

<comment><USER9> What workloads were you using Gluster for? How did you reach out to the developers? Usually the mailing lists are very responsive and most bugs brought up on the lists are addressed.

> Unless you try using its NFS server to get not entirely disastrous > performance.

Wrong again, Gluster's NFS server is in userspace too. Not sure how that can cause a kernel panic.

<comment><USER8> > What workloads were you using Gluster for?

Sharing config files. Wordpress sites. Django sites. The performance was too shitty for everything.

> How did you reach out to the developers? Usually the mailing lists are very > responsive and most bugs brought up on the lists are addressed.

IRC. I ended up finding all my errors unresolved by it in the mailing list archives with zero developer attention, and since I didn't have the time to help RedHat make their product actually usable, I dropped Gluster.

> Not sure how that can cause a kernel panic.

I guess it's technically not a kernel _panic_ if I/O just stalls so hard that you can neither mount nor unmount nor otherwise access _any_ of your NFS targets… but you have to hard reset the whole machine anyway.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> Previous discussion: [https://news.ycombinator.com/item?id=12323187](https://news.ycombinator.com/item?id=12323187) (23 days ago, 79 comments)

<comment><AUTHOR> Thanks!

Please see author's tweet here - [https://twitter.com/kelseyhightower/status/77498377095689830...](https://twitter.com/kelseyhightower/status/774983770956898307)

The github repo is updated with updated DNS add-on, better examples and AWS support.

<comment><USER11> Please note, this is not a supported AWS configuration. This is just a way to run Kubernetes on AWS instances, but it is really just treating them as bare- metal.

My advice: You should be using kops or kube-aws for production. (I work on kops, so I am biased to believe it is important)

<comment><AUTHOR> Thank you! Learned about kops today.

</comment></comment></comment></comment><comment><USER12> Is there a "Kubernetes - The non-Google Way"? It seems like every tutorial is for GCE.

<comment><USER13> I've updated the tutorial to include AWS a few days. Based on your feedback I've added a note regarding AWS support toward the top of the project README and in the project description field.

In some cases you'll find side-by-side labs that focus solely on AWS like this one for bootstrapping the underlying compute: [https://github.com/kelseyhightower/kubernetes-the-hard- way/b...](https://github.com/kelseyhightower/kubernetes-the-hard- way/blob/master/docs/01-infrastructure-aws.md)

In other parts of the tutorial you'll find sections for both GCE and AWS that highlight the different commands required for each platform - only a small fraction of the tutorial requires something different between GCE and AWS. Both cloud providers are now treated equally in the updated tutorial.

<comment><USER12> Thanks, Kelsey!

</comment></comment></comment><comment><USER14> The very first Lab link gives a 404 error. Heads up.

<comment><USER15> That's why it's "the hard way"

</comment></comment><comment><USER11> Please note that this guide is _only_ for learning purposes - it makes a lot of decisions that do not follow the recommended production approach. If you're installing for production purposes, you should use one of the existing tools if you can (I work on kops and so naturally recommend it for AWS). If none of the tools meet your needs, you should probably first open issues on those tools; if you still must write your own installation method, you should combine this guide with the official documentation to understand a cluster as created by one of the recommended tools, before building your own.

<comment><USER13> Happy to improve the tutorial to incorporate the production approach that should be taken for each task. The main goal is allow people to run through a cluster bootstrap step by step so they learn how things work.

If you don't mind filing a few issues on the project I'll be happy to rework each lab to start addressing these concerns. Until then I've added a note to the README regarding production readiness, but that should not prevent people from learning.

<comment><USER11> You should participate in sig-cluster-lifecycle. The conclusion of that sig (or my interpretation of it) was that having a production suitable cluster is - today - essentially orthogonal to having a discoverable build-your own cluster. So we are all best served by having this document for those that want to learn about how kubernetes works, but a separate approach for installing a production cluster that prioritizes correctness over obviousness. I think what you are doing is great, but I worry that using words like "support" imply that you will be offering some support for people that try to run this in production.

However, the long term goal of sig-cluster-lifecycle is to bridge the gap here, to make a production configuration easy and obvious. So I'd love to see you start using the new kubeadm work, for example, so that we can meet in the middle!

<comment><USER13> Thanks for the feedback. My goal is to augment those tools with step-by-step documentation so people get an opportunity to learn how things work. Yes, I will attempt to "support" people as they attempt to learn things the hard way.

I would also like to note that I'm not in competition with those automation tools. I'm just really focused on helping people learn. Some parts of the Kubernetes community really want to learn this stuff without an automation tool so they can skill up to build their own, custom, tools that match their preferences and tradeoffs.

<comment><USER11> That's wonderful - I think what you're doing is super important - <USER2> wants configuration to be easy enough that the automation tools are a comparable effort to doing things yourself! Helping people that go the kubernetes-from-scratch route has proven really difficult in the past, hence the focus on making things easier before encouraging manual installation, but I'll start sending people your way :-)</comment></comment></comment></comment></comment>


Ask YC: Best book for Java - <AUTHOR>

I am working on a project that the client wants in Java, specifically using Struts. Any recommendations on a good book for learning Java for an existing programmer? time as always is a scarce quantity.<p>EDIT: Web Programming in Java <comment><USER2> If you haven't done web development with Java/Struts before, you actually may want to reconsider whether taking this project on with a tight deadline is in your best interest. The tool ecosystem is very different for the Java web developer, and I'm afraid you may find yourself spending more time reading API docs and puzzling through XML configuration files than actually writing code.

If the client wants Java/Struts code for a _good_ reason (like they have in- house programmers who can maintain Java webapps) your first Java project may not be up to the standards they expect. If they want it for a _bad_ reason (say, because the CIO read about it in an in-flight magazine) then you should be able to push back on the decision and choose a framework with which you're more comfortable.

<comment><USER3> You will be able to pull it off if you learn well under pressure. Java is consistent so it's easy to learn the basics quickly. There are some things that are good to know upfront, like j2d2's comments. I'll also add:

6) It's easy to be verbose in Java and verbosity can quickly tie you into a certain design. Either plan for more learning/design time early or spend that time learning Eclipse (fwiw, I personally don't enjoy using Eclipse, but many people do and it does make refactoring a lot easier).

7) Choosing between similar datatypes can have unexpected impacts. This is re- wording of j2d2's #3. See also: <http://www.google.com/search?q=java+vector+vs+arraylist>

re: Struts 2 specifically, I like it. It's a reasonable and well-designed Java framework. I've used WebWork (which became the codebase for Struts 2) and Struts 2 for several successful projects. (Success in terms of delivering on time and the hand-off to internal developers).

<comment><USER2> Learning the basics of the Java language is indeed pretty easy. The syntax is fairly consistent (assuming you ignore generics and annotations to start with) and the core class libraries are useful (if a bit eclectic).

Regardless, the original poster didn't ask about learning "Hello, World!" He asked about ways to learn both the Java language and the Struts stack on a tight schedule in order to deliver a project to a paying client.

That's a tall order, and one I don't think most people can pull off without expert mentoring. There's just too much material to absorb, and having so many unknowns going in to a project will make cost estimation very difficult indeed.

The original poster might be able to reasonably offer a discounted billing rate and/or more relaxed delivery schedule in order to manage expectations, but I personally haven't encountered many people doing hired-gun J2EE consulting on the cheap.

</comment></comment></comment><comment><USER4> I'm assuming you are looking for Struts 2, if this is the case there are only few good books out there. I own all these books below and they are useful, but they are not as updated as the latest release. My suggestion to you is to keep an eye on the struts 2 wiki and join the mailing list to get the latest information.

1\. Practical Apache Struts 2 Web 2.0 Projects (Practical Projects) by Ian Roughley - [http://www.amazon.com/Practical-Apache-Struts-Web- Projects/d...](http://www.amazon.com/Practical-Apache-Struts-Web- Projects/dp/1590599039/)

2\. Starting Struts 2 by Ian Roughley - [http://www.amazon.com/Starting- Struts-2-Ian-Roughley/dp/1430...](http://www.amazon.com/Starting-Struts-2-Ian- Roughley/dp/1430320338/)

3\. Struts 2 in Action (In Action) by Don Brown, Chad Davis, and Scott Stanlick - [http://www.amazon.com/Struts-2-Action-Don- Brown/dp/193398807...](http://www.amazon.com/Struts-2-Action-Don- Brown/dp/193398807X)

</comment><comment><USER5> I'm developing a webapp in Java/Struts for a client now and have found the internet (a variety of sites, via search engines) to be my best resource. I don't think I've used a book in years now.

Here's a few I've run across:

<http://www.theserverside.com/>

<http://www.developer.com/>

<http://www.javaworld.com/>

There's a ton more.

And the sources, of course:

<http://struts.apache.org/>

<http://java.sun.com/>

I use MyEclipse to develop and it's pretty helpful and has Struts support:

<http://www.myeclipseide.com/>

<comment><USER3> This also:

<http://www.infoq.com/books/starting-struts2>

</comment></comment><comment><USER6> A few things to remember when programming java:

1) It's _not_ pass-by-reference. Java is pass-by-value, but it is passing pointer values, not variable values. This sometimes behaves like pass-by- reference but if pass a from foo() to bar() and call new on a inside bar, a will get it's old value once bar() returns to foo().

2) Eclipse has a tremendously useful debugger and, as an emacs guy, I can vouch for Eclipse being well worth learning. You can change code in running programs, but beware it reruns whatever method you're in. Sometimes (possibly all times) without resetting values changed in that method.

3) Use interfaces when you can. Map instead of HashMap, etc.

4) Leverage the classpath for testing bugfixes easily. Create a jar with your _fixed_ class, put it in front in the classpath. Keeps things simple and let's you build upon anything you shipped to a client.

5) If you have to use RMI, understand why readExternal() must reflect the order of things from writeExternal() and how this can break easily. This specific case may not be useful to you right now, but it will help you understand what RMI, and serialization in general, is actually doing.

I'm sure there are other good lessons but it's been a while since I worked with someone new to java.

</comment><comment><USER7> Bruce Eckel's _Thinking in Java_ (available free online, just as are his C++, Design Patterns and .NET books) is excellent, combined with just API references.

</comment><comment><USER8> I would also read Effective Java along with Struts related text book. Here's the link to the book [http://www.amazon.com/Effective-Java-2nd-Joshua- Bloch/dp/032...](http://www.amazon.com/Effective-Java-2nd-Joshua- Bloch/dp/0321356683/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1213823747&sr=8-1)

</comment><comment><USER9> Kashif:

1) Head First Java 5 1) Effective Java

The strategy here is to study both interchange; once you learned a topic from HF Java 5, check the best practice in Effective Java.

2) Head First JSP/Servlet 2) Any Struts 2 book

You can start with the basic few chapters from HF JSP/Servlet and move on to Struts 2. If you found alien concepts in Struts 2, check back HF JSP/Servlet.

</comment><comment><USER10> Just Java by Peter Van der Linden is an exceptional introduction thats comprehensive and well thought out (may be not just for complete newbiee)

<http://www.amazon.com/exec/obidos/ASIN/0131482114>

</comment><comment><USER11> If you read this book you will _know_ Java.

<http://www.deitel.com/Default.aspx?tabid=1191>

Highly recommend.

<comment><USER12> I had one introductory Java class that used that book and I didn't find it very helpful. I ended up using it literally as a doorstop after the prof suggested we do so as a joke, only kept it to do the assignments from the book, and went with Eckel's Thinking in Java instead.

That was a few years ago and a couple editions back..but I think some of it was personal preference/frustration. It's been a while so I forgot what my particular gripes were..I thought the introductory stuff was okay but (iirc) what ended up happening was that the book didn't cover anything particularly advanced that I wanted to know more about, which at that point was probably things like JDBC and JavaServer...things...I guess back then it was JSP and servlets, it looks like they dropped that for JSF in the newer editions. Obviously I can't expect a book to cover everything, but I mean I was expecting at least a gloss-over of the more advanced topics.

Plus, if I remember correctly, a new edition of Thinking in Java was less than half the price and an older edition is available online for free. Sooo...

<comment><USER11> I initially hated the book. I though its attention to detail was anal at best. But if you took the time to read it all, it really did cover a lot and I felt that I had a solid and complete understanding of the concepts (not a feeling I get when reading most other books).

True it didn't cover the advanced stuff which is why I bought 'Advanced Java How to Program' as well.

</comment></comment></comment><comment><USER13> Go over "How to Win Friends and _Influence People_ " by Dale Carnegie and then convince them to stay away from Java.

You will benefit not only yourself, but the humanity as whole :)

<comment><USER14> Replies like this are incredibly unhelpful. I suppose google uses Java because it's such a destructive force.

I recommend starting here - <http://en.wikibooks.org/wiki/Java_Programming/Struts>

<comment><USER15> Google has different cost structure, most companies pay a lot more for programmers' time than they would pay for hosting an app. Developing in web frameworks like rails and django is 5-10x more effective and is totally worth time switching. Also you can host rails app on java app servers today with jruby.

</comment></comment></comment><comment><USER16> I started with the Java tutorial. Back then I really liked it. Not sure if it is still as good (feature creep), but might be worth a look.

</comment><comment><USER17> SICP

<comment><USER18> This is an absolutely terrible response. Did you even read his question? The original poster is already an experienced and proficient programmer. He just needs to understand the syntax and concepts of a new language.

SICP uses Scheme, not Java. SICP does not teach Java's syntax, nor object- oriented fundamentals, nor web development with Struts. What possible rationale makes this a good suggestion?

<comment><USER17> Why so harsh? I think he'd be better off reading SICP than a java book, despite the _short term_ reasons to do otherwise. And so what if it's in scheme? if he can't understand scheme then he's not a proficient programmer.

<comment><USER12> I'd have to disagree, because the short term reason is a pretty big one.

Not saying SICP sucks, I think the original poster would benefit from reading it..but at this point if he/she/it is working on said project NOW and needs a good Java/Struts book NOW, SICP isn't going to be that helpful.

Only in the long run.

<comment><USER17> I understand that some people will disagree. I might be wrong. That's no reason for him to be harsh. It's good for the poster to get a variety of advice.

</comment></comment></comment></comment></comment><comment><USER19> Please save yourself from the limitations in java syntax and use clojure/jython/scala. Clojure is my favorite -native java speed but lisp syntax, and awesome lock-free multithreading.

What your client really wants is the JVM and its libraries, not java the language.

<comment><USER20> I don't know anything about Jython or Scala, but I do know that Clojure does NOT have native Java speed.

Clojure objects are Java Objects, so they must be boxed & unboxed by the JVM.

Clojure is decently fast, but well-written Java will continue to smoke it for some time to come.

<comment><USER21> > Clojure objects are Java Objects, so they must be boxed & unboxed by the > JVM.

I presume you meant Clojure numbers, because there is no notion of 'boxing' for reference types. For all non-numeric objects, the Clojure representation is the same as the Java representation. Type-hinted calls to methods of said objects generate the same bytecode as Java, with the same performance.

As far as numbers, recent enhancements ( <http://clojure.org/java_interop#primitives> ) allow Clojure to produce primitive arithmetic with the same speed as Java, but with a more-powerful, macro-amenable syntax.

While Clojure offers higher-order constructs with an attendant, but not prohibitive, cost, performance-oriented Clojure code can match the speed of Java.

<comment><USER20> Rich, you're seriously some kind of linguistic superhero. Or maybe like the Monty Python version of the Spanish Inquisition. Either way, it's impressive.

This:

        As far as numbers, recent enhancements allow Clojure to
        produce primitive arithmetic with the same speed as Java,
        but with a more-powerful, macro-amenable syntax."

Just blows me away.</comment></comment></comment></comment>


What we learned having startups work in a Moroccan surf town for a month - <AUTHOR> http://www.thebluehouse.io/blog/2015/4/8/what-we-learned-having-startups-work-in-a-moroccan-surf-town-for-a-month <comment><USER2> Uhh...so what did you learn?

<comment><USER3> Surfing.. I'd hope!</comment></comment>


Card Trick Leads to New Bound on Data Compression - <AUTHOR> http://www.technologyreview.com/blog/arxiv/26078/

<comment><USER2> dupe 1 day ago, 2 comments):

<http://news.ycombinator.com/item?id=1942400></comment>


Ask HN: What's the code you've written of which you are the most proud? - <AUTHOR> A few hours ago mc42 asked for the most elegant piece of code people had seen (https://news.ycombinator.com/item?id=11005003) but I'm sure many of us write code which doesn't get widely noticed; and there are other reasons beyond elegance why someone might be particularly proud of some code.<p>So what piece of code have you written which you are most proud of? <comment><USER2> I guess this [https://github.com/shi-yan/Pillow](https://github.com/shi- yan/Pillow) .

back then, coding was my hobby. I could sit there for long hours and never felt tired. this is a project I made during that time. I'm proud of it because I dared to make something I have no basic knowledge about and I could solve the problems piece by piece.

I'm a better programmer now, but the excitement of programming is long gone. programming is a boring career now.

</comment><comment><USER3> I worked on an electronic health record system. Many customers complained that they couldn't use it effectively with the keyboard. It was web based. New large customers reported queues in the waiting rooms because of the UI. The company didn't take it seriously. But then we each got two days to work on anything we wanted, as a creative experiment. I made a new widget with a hot key that brought up a HUD. It let you navigate to other pages extremely quickly using Ctrl-P style abbreviation. And a clever type of nested menu, with special support for accessing the most common tasks on patients, etc. And it scraped the current DOM in a pragmatic way to provide quick links to things shown on the current page. This led to unplanned features that came up in my demo. It was such an effective solution to a very real problem—and it could be dropped in as a JAR file without even modifying the rest of the software. I left the company not long after and I don't think they used it.

</comment><comment><USER4> I wrote some stuff in the early nineties that still gets spun up once in awhile for testing purposes. Probably the only thing I've written in the past that still runs, or even exists on a disk. So that's cool.

To tweak the question a bit, the things I've written recently that I'm most _happy_ with are personal productivity/automation tools that I use all day, every day. I often need to do "a thing" between tasks. These "things" are not really part of the task, they're just needed to get to the next task, and they're disruptive enough in time and focus that I feel I've gotten off the train and then back on again. Now I really don't think about them, and my involvement with these things is only as long as it takes to type out the command.

</comment><comment><USER5> 3 come to mind...

First, as the lead on a team of 3 I wrote a web app in 2 months that caused the cancellation of a $30+M contract that had been given to a competitor. The team decided to try out Ruby on Rails for the first time (this was 2007 iirc) and it was such a delight I haven't stopped being primarily a ruby/rails developer since.

Second, at the last place I worked I was the primary developer on a team of 2 that wrote an iphone app that was on the end of the year top apps on the itunes store as an honorable mention. The app is not available anymore unfortunately.

Third, at my current gig I wrote a kick ass custom CRM for our sales team that enabled our team to 3-4x their productivity.

</comment><comment><USER6> Probably the toy compiler I wrote for a c like language: [https://github.com/claassen/CmC](https://github.com/claassen/CmC) and the parser generator it uses to parse source code: [https://github.com/claassen/ParserGenerator](https://github.com/claassen/ParserGenerator)

<comment><USER7> Does it handle left recursion? If so, how?

</comment></comment><comment><USER8> Some drawing app with HTML5 Canvas API [https://github.com/nkudo/canvas- project](https://github.com/nkudo/canvas-project) Really enjoyed every single minute I spent coding this app, pure bliss.</comment>


React: Another Level of Indirection - <AUTHOR> http://www.lispcast.com/react-another-level-of-indirection <comment><USER2> I've been playing with Facebook's React to make an internal interactive resource scheduling system for our company. So far I think I'm getting it... and am thrilled with how it works.

React eschews the attempt to split the View / ModelView that are the hallmark of most full-service frameworks. Instead of this separation, React applications are built by defining reusable, nested components, each having a render() method that mixes binding and logic to build sub-parts of a web page using their custom DOM. Each component has an internal mutable state and a set of read-only properties it gets from its parent context. In React, "data binding" is just part of rendering.

Since React owns the DOM, it's incompatible with JQuery; or rather, if you use JQuery, you could do it in a leaf node and manage the boundary carefully. React tracks things by using a hierarchical identifier, each key unique within each level of the structure. It then has a predictable/fast algorithem for detecting changes and updating the DOM. Unless you provide your own component keys (used to build the DOM id) all the way down, you need to use CSS classes (rather than IDs).

Finally, I'd say, React really seems like a library -- and one that has a low API to functionality ratio. That is, it really does something substantial with relatively few things you need to learn. If you have your own in-house framework, it might be something you could weave in gradually rather than do a wholesale adoption of a larger (measured via API surface) framework.

<comment><USER3> I haven't used React, but the approach you describe sounds very much like how early C++ UI toolkits worked. Applications would be built of "reusable, nested components", often called "widgets". The widgets would be placed into a hierarchy, with widgets often creating their ancestors. Widgets would have a paint() method that would take the widget's internal state and the state of the widget's container(s) into account when displaying (or updating a previous display) of the widget.

\- Pacabel

<comment><USER4> One thing I'm not clear from your description is... The widgets were tightly- coupled with their ancestors? (In order to create them)

<comment><USER5> In general, no. You would typically take your widget, create it, and put it into a widget-agnostic container or layout manager. The widget wouldn't know about it's parent or children. The widgets would communicate by sending signals which bubbled up or down the container heirarchy, triggering repaints, resizes, and so on as needed.

Of course, this varied by toolkit.

</comment></comment></comment></comment><comment><USER6> I spent the holidays building a four screen admin UI with lots of fast moving tables and lists, and React was able to work with me from who-cares spaghetti all the way to clean enough to hand-off to a team, all without missing a beat or imposing much up-front cost. I'm a fan now.

<comment><USER7> As someone who spends his entire life writing admin screens and more user- friendly but complicated to develop variants of CRUD, I don't suppose you could release the source code of what you wrote?

<comment><USER6> Always do. I plan to debase this before merging to master (the history is a mess) but here it is

[https://github.com/couchbase/sync_gateway/tree/adminUI/utils...](https://github.com/couchbase/sync_gateway/tree/adminUI/utils/assets/jsx)

(Edit to link to my jsx views.) Also I only barely used the forms stuff so I haven't got an opinion on it yet.

<comment><USER7> Thanks. I've yet to find forms I love in anything, but not tried Reactive's take yet :)

</comment></comment></comment></comment><comment><USER8> Am I the only one who doesn't like React? It is an ad hoc hacky solution to the view update problem. Diffing DOM trees is not just done for efficiency, but also for correctness. If you have a textbox somewhere with the cursor in it, and you update some other part of the DOM because of a network event, you want to retain that cursor position. If you just blindly put a whole new DOM on the page then the user would be confused because the focus on the textbox and the cursor position would be lost. With DOM diffing you have to keep in mind how exactly the diffing is performed because it will have actual visible effects on the user interface when user interface elements have state that is not represented in the model. You just have to hope that Reacts diffing gives you the behavior that you want. And what about interface elements that have internal state but which are implemented in Javascript rather than in the browser itself? React doesn't do anything to solve the view update problem for them. Seems to me that we need a more principled solution that tackles the problem head on, instead of a hack that happens to do the right thing most of the time.

<comment><USER9> React's diff algorithm is completely deterministic. For form inputs and other components which have their own state, it's recommended to put a `key` attribute on each one so that React understands what you meant if you reorder elements in a list: [http://facebook.github.io/react/docs/multiple- components.htm...](http://facebook.github.io/react/docs/multiple- components.html#dynamic-children). Idiomatic React code usually has very little state except at the top of the tree so this is rarely a problem.

<comment><USER8> Right, but why do diffing in the first place? First generating a whole new tree and then computing the diff is (1) wasteful (2) leads to problems because you need to find the correspondence between nodes to preserve state. If you do something like Self-Adjusting Computation [1], you can still write your program as if you are generating the DOM as a function of your data, but the machinery under the hood can compute the diffs _directly_ by keeping track of the dependency graph and the correspondence between the old and the new is fully automatic.

[1] [http://www.umut-acar.org/self-adjusting-computation](http://www.umut- acar.org/self-adjusting-computation)

Assume you have a function f that takes the model data as input and computes the DOM as output:

        dom = f(model)

If we now do an update to some model data, that has some effect on the DOM. When executing f for the first time, the machinery of self-adjusting computation records the dependencies of the different dom elements on data in the model. If some part of the model is updated it can propagate the changes along those dependencies to compute the parts of the dom that change as a result.

<comment><USER10> David from Meteor here. We're moving away from DOM diffing for essentially the reasons you describe. If you assume that views are written in a template language, which is the norm, then diffing is usually unnecessary. I'd never heard of self-adjusting computation, but it sounds a lot like what Meteor does! Thanks for the link.

All that said, I think React's model is great, and performance is actually fine. The React guys are not naive about browser performance; they've thought way harder about it (and tested more) than the commenters here seem to realize. The diffing is performed in pure JavaScript and is very fast. Creating a framework for declarative views in JavaScript is a pretty tough problem, and diffing is a major tool in the toolkit of ways to make it possible, the same way treating certain objects as immutable or storing JSON in your database are tools that enable certain styles of programming.

What pulled Meteor away from diffing as a central paradigm was the desire to stay closer to today's web development techniques and make things simpler for the developer. We wanted to provide the ultimate automagical version of templates and jQuery rather than something new you have to understand. When you have templates, you don't have to lean on diffing as much. When you have jQuery in play, you make fewer assumptions about owning the DOM (in React, every DOM element is backed by a component).

In the long term, the jQuery part will fall away as declarative templates and components do the heavy lifting and the DOM is seen as less hostile (with IE8 retiring, for example).

</comment></comment></comment></comment><comment><USER11> I wonder if it's possible for browsers to start implementing this natively.

Have the browser make a shallow copy of the DOM and allow developers to manipulate the shallow copy. Then have a update() function that will take care finding the diffs and update the actual DOM. Seems like it would be much faster than a javascript implementation also.

<comment><USER12> At that pint you have now implemented a desktop UI styled API 'n the browser! I'm not against that by any means, I just think it's funny :)

<comment><USER13> This is _exactly_ the goal. The DOM's strength was representing documents, not user interfaces. In this era of web apps, trying to use the DOM to build UIs is a massive pain. The web is really years behind in providing a native UI tool kit, and all of this DOM abstraction is just an attempt to paper over the real problem: The DOM is not good for building UIs.

<comment><USER14> > _The DOM is not good for building UIs._

Funny, after years of Win32 C++, VB, and then web development, I find I can slap together an interface so much faster and better-looking using HTML/CSS/JS than anything for the desktop.

However, "slap together" may be the important phrase -- putting together a well-architected, consistent, extendable, etc. interface is perhaps a little hairier. But the DOM is _great_ for building UI's quickly, with trivially easy custom styling and graceful resizing.

<comment><USER13> You just build UI's using the DOM? No abstraction libraries like jQuery? You've just won my "real programmer" award.

<comment><USER15> Technically jQuery normalized the DOM between browsers and added some stuff like QuerySelectorAll that is now standard so you don't really necessary need it anymore for anything.

</comment></comment></comment></comment></comment></comment><comment><USER16> React user here. Some comments seem to suggest that React doesn't play well with other libraries; it's really the opposite. Here's a React Chosen component in 25 lines of code: [https://github.com/chenglou/react- chosen/blob/master/react-c...](https://github.com/chenglou/react- chosen/blob/master/react-chosen.js)

The React todomvc examples also uses Backbone and/or Director.

</comment><comment><USER17> I've tried to understand what´s so special with react from the project's home examples, but it seems to me like an api similar to angularjs's directives, only using javascript to build the widget´s html instead of a template. Could anyone here with an experience of the two enlighten me?

Edit : to be more precise, i've written fairly complex directives in angular and i don't understand the problem react is better solving. Synchronisation between dom and model is something you have to deal with manually anyway since it often includes validations rules and default behaviors, that can't be guessed easily ( invalid user input, no value appearance, etc..)

<comment><USER18> If you're already using directives to get all your app's state out of the DOM then there's not a lot of practical benefit to using React over Angular. You get some perf gains due to the DOM update batching and it's conceptually cleaner. I think Angular is better for a mixed designer/developer team if the dev builds directives with the goal of letting the designer work independently since non-directive Angular is extremely easy to learn.

The excitement here is that React is a MUCH better match for Clojurescript. The React model is a one way rendering into a virtual DOM, computing a minimal edit list against the real DOM, and applying it in one batch. The idempotent render lines up with pure functions. The batch nature lines up with the epochal time model of Clojure's vars. Clojure's persistent data structures allow react to bypass model mutation checks.

I discussed the topic of client side state with various people at a couple NYC Clojure meetups in the spring and at Clojure/West and everybody had ideas for a solution but nobody had THE solution. The React model, if not React itself, is that solution for Clojurescript. I'm disappointed that I didn't look into the implementation details of React when I checked it out this Summer and found it unremarkable.

<comment><USER17> Not sure i got this right, but my client side state lies in the model javascript layer (i'm talking single page application here), and the synchro between model and DOM is handled both by two-ways data binding (not exclusive to angular) and directives for micro DOM states. I don't quite see the need for diffing at the DOM layer, if you can already observe the changes on the model layer and recreate the Part of the DOM...

So maybe it´s just a clojurescript thing, but i really feel like i'm missing something.

<comment><USER18> You pretty much have it. React is a better match with the Clojure programming model.

Pulling your application state completely out of the DOM is the key win and everything else is incremental gains/taste.

Since I care about this a lot I'll write more stuff:

Consider the basic conceptual model of Backbone. Your model changes, you get an event, you run your model object and matching template through your template engine, you get an HTML string and innerHTML it into the right place in the DOM. It's a simple functional transform of data into DOM in response to an event and the simplicity is a large part of the initial appeal of Backbone.

The issue with the event->model+template->innerHTML sequence is what I call the idempotent update problem. The transform from model into the DOM is idempotent and as long as your model and template are the same the resulting DOM subtree will be identical. This is a problem because identical means blowing away all the state that was previously in the DOM subtree: event handlers, form fields, subcomponents, widgets from other libraries, etc. In small apps, this isn't a problem you just event delegate the listeners, be careful around your forms and widgets and you're fine. The problem is that when your app gets big enough you want to split it into components so you stay sane and once you do that you invariably want to nest your components and the idempotent update problem bites you hard. There are workarounds and people manage but you lose the conceptual simplicity of the Backbone model almost immediately.

The benefit of the virtual DOM/diffing approach is that it lets you retain the simplicity of the idempotent transform of model to DOM while solving the idempotent update problem. Of course, with React you have the issue of getting things back from the DOM to your model that two way bindings give you but two way bindings are incompatible with the Clojure model.

Angular templating system and bindings deliver the same benefits and it remains my preferred javascript solution to the problem. Other people complain about the introduction of a lot of extra things you need to know (scopes, change propagation, directive phases, digest cycle), how things can interact strangely (directives and repeats), and that the system is monolithic (providers, DI, promises). These are legitimate complaints but I've been interested in this problem for years and I have yet to find a system that doesn't have legitimate complaints and angular is roughly equal in complexity to anything I've found that covers the same ground.

<comment><USER19> Could you give a more concrete example of the idempotent update problem, please? It's too abstract for me to follow.

<comment><USER18> Here's a fiddle:

[http://jsfiddle.net/H4ADp/](http://jsfiddle.net/H4ADp/)

The counter shows the portion of the application state you're tracking while the contents of the textarea show the part you're not. It's obviously stupid but the contents of the textbox are an easily visible way of allowing you to mutate the DOM (other mutations could be attached event listeners, instantiated jQuery UI widgets, etc) and see it undone.

I'll add that even if it seems like you can track all the state (e.g. add a textarea field to the model and set a keyup or blur to save the contents for re-render) that's a disaster. If you're typing in the middle of the textarea the cursor position isn't remembered. You can store that too but what if you resize the text field? The list of edge cases is endless. You really want to bypass it by using something that updates the DOM intelligently.

<comment><USER19> Thanks, that example makes the issue very clear.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> In David Nolen's blog post on Om, he has a link to an Om version of TodoMVC. Does anyone see it at TodoMVC? I can't seem to find it.

EDIT: Of course I find it just after I posted this! The link looks like a single link but it's actually two! :p

</comment><comment><USER21> I got started with React on a project last week. It's magic when it works, but initially it takes some thinking to figure out how all the components should fit together, and where the interactions should take place. It took me a while to figure out that my interactions on one component might trigger a method that should belong on a parent component a few levels up, and to have to pass that method down in the props for the child to call.

React provides a syntax called JSX that looks a lot like regular HTML, but is transformed into native JS before it hits the React engine. It's brilliant, but requires node somewhere along the line to do the transformation. I got stung by this — building a Rails app, and Rails on Heroku ships with an ancient version of Node that causes the transformer to error out. Solution in the works ([https://github.com/heroku/heroku-buildpack- ruby/pull/177](https://github.com/heroku/heroku-buildpack-ruby/pull/177)), but if you're using Rails and Heroku, stay away from JSX for now

<comment><USER22> In a Backbone project I'm working on, every app component and view passes a context object down to any children it creates, which is a copy of the context object it received upon creation, optionally augmented with methods it contributes from itself and other providers. So it's basically a component tree, with an API that grows as you descend down the branches (yet remains distinct between branches). In essence, the context forms a sort of scope that subcomponents can use to communicate with others.

By convention, components "import" API calls into themselves in their constructors. This makes it very clear what the dependencies are.

The beauty of this setup is that intermediary objects don't have to worry about explicitly mediating the interface between their ancestors and descendants. The only components that have to do any mediation are common ancestors of components that need to communicate across branches, but this mediation can be contained, rather than polluting the entire hierarchy.

It's also trivial to mock out the context methods during testing. Similarly, you can use a sort of name-based polymorphism to provide alternate implementations of the context methods, dependent on configuration or parent component, perhaps.

It seems to me that a similar scheme would fit nicely with React's model.

</comment></comment><comment><USER23> After 1-2 hour of playing I've converted my jquery view (still not 100% same, but almost) to a react, look here. There is a mini tutorial too. [https://gist.github.com/totty90/8209324](https://gist.github.com/totty90/8209324)

<comment><USER24> That definitely belongs in an external gist or something similar. I'm surprised hacker news doesn't have a max length.

<comment><USER23> fixed, sorry

</comment></comment></comment><comment><USER25> My takeaway:

 _Any other problems left? I can 't think of any. That's something to discuss on Twitter._

Meaning that the remaining problems are trivial misconceptions that can be disposed of within 140 characters.

</comment><comment><USER26> For a quick try of React in CoffeeScript, I put together [https://github.com/xixixao/mimosa-hyper](https://github.com/xixixao/mimosa- hyper)

</comment><comment><USER27> It would be great if someone can extract the virtual DOM engine part into its own library. New framework/library with different approach in other area can be develop while utilizing the virtual DOM part.

At least I would love to see the combination of Angular directive (ability to combine cross-cutting aspect into a single DOM node and, may be, digest loop) with React's virtual DOM.

</comment><comment><USER28> ReclineJS is pretty awesome, albeit a bit slow, with larger data sets. I'd wonder how snappy it would be if it were ported over to react.

[http://okfnlabs.org/recline/](http://okfnlabs.org/recline/)

</comment><comment><USER29> Like this a lot! especially the live update example on the website. I think we are beginning to see how web developer tools that are browser-based make certain things possible that would never be possible with native tools.

<comment><USER30> _how web developer tools that are browser-based make certain things possible that would never be possible with native tools_

What do you mean? Can you give me an example?

<comment><USER29> Yes there are many...for instance visual layout driven web development is one obvious example.

I know people who prefer native tools always get defensive about the idea of the browser becoming the default platform for web development (and possibly software development in general), but I really don't see it happening any other way.

The ways browser tools for instance can use the browser itself to help simplify web development is something native tools are never going to be able to do. For instance I envision being able to integrate the debugging/developer facilities built into the browser directly into my browser-based developer product without much heavy lifting.

I may be bias given that I am a founder of a startup (see profile for link) building a browser-based developer product...but I have also spent years working with native IDEs including attempting to build my own IDE ([http://bit.ly/IwZCEL](http://bit.ly/IwZCEL)), the browser advantage is just apparent to me. Granted there are still improvements to be made to browsers in order to bring them to parity with native environments for software development in general but I think it is just a matter of time.

<comment><USER30> Oh ok, I think I understand what you mean.

Though working with QML in QtCreator has been a pretty streamlined and effective experience for me and for web development, at least _right now_ (ie like you say, this will improve in time, in which case you may well be right) I see browser tools (eg the debugger) as a part of a much larger toolchain (editor, REPL, etc).

Though you can build a native editor that has, for example, webkit embedded to augment what the tool can do. Or do something like LightTable which is, AFAIK, build on top of an embedded browser. I think a hybrid approach gives the best of both worlds. Then again, with the trend of everything moving into the browser, I guess this shouldn't be necessary in the future.</comment></comment></comment></comment>


Blogger ate up a blog post - <AUTHOR> http://intosimple.blogspot.com/2011/11/new-blogger-ate-my-blog-post.html The blog deleted was the one mentioned in http://news.ycombinator.com/item?id=3225055 , i.e. http://intosimple.blogspot.com/2011/11/decline-of-ubuntu.html <comment><USER2> Original Poster should re-write the post. The second version is always better.</comment>