After the Tsunami, Japan's Sea Creatures Crossed an Ocean - <AUTHOR> https://www.nytimes.com/2017/09/28/science/tsunami-japan-debris-ocean.html <comment><USER2> > "The development of materials that can float for ages, and the rising levels > of seas due to climate change, make the possibility of these events larger > and larger."

I'm very curious how the total observed sea level rise of 19cm over the past 100 years has had any measurable effect on cross-continent species transfer by rafting.

I don't mean to belittle the current, or projected sea level rise, but merely point out that it's unhelpful to the climate debate to falsely attribute problems to climate change.

<comment><USER3> The source material for this stuff is things like plastic chairs. Sea level rise may not change the trip, but it will increase the frequency for people's stuff starting the trip as beach homes don't move until the ocean removes them which is becoming more common.

Put another way if the ocean was 7 inches lower then fewer homes would have been destroyed by the tsunami and less junk would have made the trip. Sea level rise stacks with other events so there is more small events and bigger events get magnified.

</comment></comment><comment><USER4> This is actually not too uncommon. Natural phenomena like hurricanes, tsunamis, etc are very good at keeping the diversity of ecosystems fresh. Parts of the southern Pacific Ocean are, by and large, a wasteland--not a lot of life in the water.

However, the small islands in the middle of the ocean are awash with all sorts of interesting life, commonly having landed there in some violent event. The warm climate actually is very good for growing vegetation, so herbivores can proliferate if they make it on-land.

The BBC documentary South Pacific covers this v well, definitely recommend watching.

<comment><USER5> Didn't mangroves cross the Atlantic to the US naturally?

</comment></comment><comment><USER6> [https://news.ycombinator.com/item?id=15367077](https://news.ycombinator.com/item?id=15367077)

</comment><comment> orbital-decay There's also a long-term experiment being performed on the International Space Station:

[http://knts.tsniimash.ru/ru/site/Experiment_q.aspx?idE=191](http://knts.tsniimash.ru/ru/site/Experiment_q.aspx?idE=191) (in Russian, but Google Translate seems to work well on this one)

It's not finished yet but apparently preliminary results [1] show that microorganisms can be lifted into the upper atmosphere from the oceans somehow.

[1] [https://www.energia.ru/ktt/archive/2015/01-2015/01-03.pdf](https://www.energia.ru/ktt/archive/2015/01-2015/01-03.pdf)

</comment><comment><USER7> Give me your tired, your poor, your teeming masses huddled.

I know this is the wrong answer, but my hungry mouth welcomes every one of these creatures to their new home.</comment>


Ask HN: How big is the Bitcoin algo trading market? - <AUTHOR>

<comment><USER2> They are a tight lipped bunch.

I recently asked the Chinese language forum on Bitcointalk.org about their use of trade platforms and bots and the people in the forum seem very skeptical of bitcoin trading in general especially at Chinese exchanges. I found this to be quite a surprise given the Chinese markets own bitcoin trading volume. The Chinese exchanges themselves report that their mobile platforms are very popular which is even more of a surprise.

I think algo trading in Bitcoin is a hobby for most and very few take it seriously beyond writing or customizing their own platform.

However there are more brokerage services opening to provide liquidity and trade impact minimization for professional financial services.

The biggest algo traders might be the Chinese exchanges themselves to support zero cost transactions.</comment>


Firejail – Linux Application Sandbox - <AUTHOR> https://wiki.archlinux.org/index.php/firejail <comment><USER2> I presume "jail" In this context derived from FreeBSD jails. The Free/Open/NetBSD systems are generally easier to harden against attacks than Linux distros (in part because the are full operating systems and not "kernel distros"). I wonder if security consciousness could be the impetus needed to get users looking at *BSD for desktop use in high security environments.</comment>


The Cloud Computing Strategy from Jeff Bezos - <AUTHOR> http://www.wired.com/techbiz/it/magazine/16-05/mf_amazon

<comment><USER2> The article is not about a strategy but about a Wired journalist fawning over Bezos.</comment>


The first step is to start - <AUTHOR> http://37signals.com/svn/posts/2538-the-first-step-is-to-start <comment><USER2> Strong agreement. You learn a lot more by doing than by fantasizing about doing some day. You'll also get a lot more mileage out of your book (or web) learning with just a little practical experience. I guarantee you, within 2 weeks of hanging out your shingle you'll have a radically different, improved perspective on where your actual business challenges are. (The stupid, detail- oriented mechanics of business like "charge customers' credit cards" and "incorporate" and "do bookkeeping" paralyzed me for so long prior to actually starting. It turns out that these matter so much less than e.g. marketing it isn't even funny, for my business at least.)

My one suggestion: get a mentor. Plumb them for advice. Thomas has taught me more about consulting (beginning with "You know, you could do consulting.") in three minute chunks than I managed to learn in my entire life, even in six years while employed by businesses which did consulting.

<comment><USER3> I hate to admit it, but trepidation at the "incorporate and do bookkeeping" part is exactly my roadblock. Paralyzing is an apt description. What was it that finally got you around it?

<comment><USER4> You could just not do it.

I've been in business for the better part of 10 years without incorporating or doing bookkeeping beyond a quick 20 minute Excel session at tax time.

My theory is that as long as everybody else keeps good books, I don't have to. The bank has just as much interest in remembering what happened to my money as I do, and frankly they're better at it than me. When I need to know, I look it up.

</comment></comment></comment><comment><USER5> And the next step is to finish what you start, no matter what. Andre LaMothe, founder of xgamestation, a video game development kit company, and author numerous programming books including "Tricks of the Game Programming Gurus", describes how he motivates himself. I've always found this quote inspirational when I lose steam on a project:

"Hmm, that's a hard question. I guess that the best answer is that by the time you are old enough to understand that you are NOT going to be a rock start or a unique, beautiful snowflake, it will be too late. Lack of motivation fundamentally comes from fear -- you are afraid to do things since you don't think you can do them internally -- which is 99% true.

However, the good news is that if you REALLY try to do anything, there is nothing that you can't do within reason of course. So my suggestion is simple and basically how I start anyone I mentor -- start with ANYTHING that you want to do, something small. Then start it, work on it everything single day until its done, I don't care if you are sick, haev to work, goto school, your girlfriend wants to do something, whatever, just work on it everyday -- at some point you will get to a point where you find your own mental limits, this is usually the point where every single person quits and then sells themselves the bullshit concept, "I could finish it if I wanted"-- this is crap, the fact is THEY can't finish it, but this is just the moment of transformation -- now, here is where you are going to triple your efforts, read whatever you need to read, and finish it, no matter what -- And if you don't think this advice is true I have heard it personally from every single iconic computer person on the planet -- the key to success is so simple -- just finish everything.

You will never become motivated, until you don't need to become motivated then you will be motivated, hard to explain, but that's the way it works --

Additional, arguement -- what are you doing anyway? If you aren't 10x smarter than everyone now, how will you compete in 10-20 years? Imagine the math, physics, computer science, nanotech, biotech, etc. that will be common then -- thus, you better get crackin! There is so much work to be done and no time to do it -- if you are less than 40 and aren't working at least 15-18 hours a day you are not working enough, you simply can't compete with the best in the world unless you are willing to throttle it that much --

NeCroN.TTL "

</comment><comment><USER6> As an interesting counterpoint, I often find myself with the exact opposite problem: I start too often. It's to the point now where I have 4 or 5 active side projects, and then I think of something else cool that I want to build... and then it's hard to actually work on and continue with them, especially after the 'fun stuff' of the initial creation is over.

<comment><USER7> I feel the same way. I am far too often starting a new project, or coming up with new random ideas. I put things aside and have to work hard at finishing them. I think starting is the easiest part, and finishing is the skill that needs to be preached.

</comment></comment><comment><USER8> "You probably don't even know what skills you need, so don't worry about it. Start with what you already know."

For my first startup, I created the whole site from scratch. I had developed software for years and thought I had a pretty good handle on things.

I did know _some_ things, but was surprised by how many gaps there were in my knowledge. Coding something from the front end all the way to the back was a great way to learn.

That's not to mention the business and legal knowledge I gained. There's so much involved in even getting a small project going, that you can really only learn by doing.

</comment><comment><USER9> Good advice.

My only word of caution is to know what you're getting into. Programming is hard. It doesn't mean you can't do it, that you shouldn't try, or that starting is hard, it just means that it will take a lot of time and practice to do it well--and beginners tend to underestimate this.

And another thing: if your primary reason for wanting to build a web app is to make money, that's fine, but make sure that you enjoy the process of creating as well. If you end up not enjoying the programming side and seeing it as merely a means to an end, you won't be able to do it well.

</comment><comment><USER10> Great simple advice. Nike sums it up even shorter with "Just do it." And if you read between the lines, it says "Don't think." I'm not saying don't think at all of course, but one of the biggest things that keeps someone from getting started is overthinking. Overthinking what's needed, how much, how hard, what will happen if this, or that, when's the right time, what if it's a waste of time, and on and on.

Their second piece of advice that they infer in the article is the best way to learn is by doing. Because that's another big obstacle to starting, believing one is not prepared to get something done, and that the person just needs to learn a bit of knowledge before he or she gets started. Just start and learn along the way. How else did we learn how to walk when we were babies?

</comment><comment><USER11> Is life about repetition and habits? I think so and I think that's the underlying factor to messages that convey "just start doing it" and almost any other self-help type message out there. Get into a routine, figure out what works, goto 10.

It's not a huge secret and it's one of those simple things that people often overlook.

Personally, I like Jerry Seinfeld's method of productivity. Define tasks that contribute to a goal and every day that you contribute, physically mark it off on a calendar.

<http://robisit.com/9r>

</comment><comment><USER12> I love the drawing on the right side of the brain reference, one of my favorite books. <http://www.drawright.com/>

</comment><comment><USER13> I think this is great advice. Part of perseverance is not letting anyone else tell you what you can not do but even more important is not telling yourself what you cannot do.

</comment><comment><USER14> This is why many famous creatives are or were heavy alcohol or drug users (it's almost a running joke about journalists). These vices help shut out the critical voices for some people, for a while at least.

</comment><comment><USER15> What I really liked: "Start with what you already know". I think this is very smart

</comment><comment><USER16> You have to start if you want to accomplish anything. Never mind you don't have the skill, or it would take too long to come up with something meaningful...

Just do it!

</comment><comment><USER17> > _Don't worry about what you need to know in order to finish a project, you > already have everything you need to start._

Oh. Do worry. Worry much. Because the time you spend down a road that leads nowhere may not be worth what you learn on the way there.

<comment><USER18> That is a major pain, but the alternative — doing nothing — is an even worse use of your time. If you're fairly competent and resourceful, you're more likely to talk yourself out of doing something than you are to run into a dead end halfway through. And even if you do find that you truly can't finish, does that put you in a worse place than if you'd spent the time watching CSI?

</comment></comment><comment><USER19> There seem to be two models to success in a field: learn as a youth or learn once you are an adult. These two approaches are equally valid from what I have seen.</comment>


Live coverage of Elon Musk's Hyperloop announcement - <AUTHOR> http://live.theverge.com/live-hyperloop-announcement-elon-musk/

<comment><USER2> Remember 8/12/13 - might be a day similar to the day the first aircraft flew</comment>


Lord Camden on NSA Surveillance - <AUTHOR> http://www.juliansanchez.com/2012/09/05/lord-camden-on-nsa-surveillance/

<comment><USER2> Wow. How accurate is this evaluation of the challenge? I'm not a lawyer, but this would appear brazen if accurate.

<comment><USER3> I think pretty accurate. Isn't this how it works with the National Security letters as well? You can't even tell a lawyer if the Government is coming after you. One by one the law enforcement agencies are lobbying for laws that strip down the Constitution of all its worth.

It might be time for Americans to pass a system where every new law has to be reviewed by the Supreme Court, like it happens in other countries.

<comment><USER4> > It might be time for Americans to pass a system where every new law has to > be reviewed by the Supreme Court, like it happens in other countries.

I've always wondered why it is that we don't do that here. It's very much in line with the 'checks and balances' concept of the government's structure.

<comment><USER5> Would this tend to politicize the court? As it is, the court can at least ostensibly maintain some distance from the political lawmaking process. If it was an integral part, judges would be subject to a lot more political pressure.

<comment><USER4> As it stands, the court is the arbiter for whether a law (or section of a law) is legitimate and how it's applied. All this would do is remove the latency between legislation being written and it being 'tested'.

<comment><USER6> It probably wouldn't be practical, given that they currently don't review anywhere near 100% of legislation (but maybe that is a feature).

I would be concerned about the situation where the court effectively ends up with a veto and maybe decides that they should be the ones in charge. The only way out of that pickle is to reject the constitution.

</comment></comment></comment></comment></comment></comment><comment><USER7> I don't get this complaint. NSA "warrantless wiretapping" intercepts fall into two categories:

\- Intercepts where at least one participant is a foreign party and thus are 100% constitutional without a warrant, under well-established national security powers.

\- Intercepts where both participants are U.S. nationals.

Obviously, the latter would be unconstitutional to collect deliberately. But the whole point of these systems is to avoid collecting these communications, and to delete them as soon as they're discovered. It is, I think, fair to say that it's nearly impossible to devise a system that will collect what you want out of the first category while being absolutely certain not to intrude on the second. The revised FISA law was designed to ensure that there's judicial review of the process by which communications of the second category are identified and their intercepts destroyed. That judicial review has gone forward, as far as I know, and the program, with the current administration's blessing, continues to this day.

What's the injury to citizens and their rights? You don't trust the executive, under the supervision of both Congress and the judiciary, to follow the law and delete any intercepts with your name on them? Well, then you have bigger problems.

</comment><comment><USER8> Catch-22 says they have a right to do anything we can't stop them from doing. - Joseph Heller</comment>


NULL vs. Empty Strings – Why Oracle Was Right and Apple Is Not - <AUTHOR> https://josjong.com/2017/10/16/null-vs-empty-strings-why-oracle-was-right-and-apple-is-not/ <comment><USER2>
        if (!myString) {
        }

Good old JavaScript.

<comment><AUTHOR> yeah I think actually python and ruby do this as well …

<comment><USER2> Pretty sure an empty string is truthy in Ruby.

<comment><AUTHOR> Yes you're right. Ruby actually supports the comparison the author seeks [0]:

        > nil.to_s == ""
        > "".to_s == ""

[0] [https://stackoverflow.com/a/9915384](https://stackoverflow.com/a/9915384)

<comment><USER2> I think it might be more idiomatic, and more in the direction of what the author seeks, to check `my_string.present?` which is false for nil and empty string.

<comment><AUTHOR> That's what they are. Pick one and invert the logic.</comment></comment></comment></comment></comment></comment>


Ask HN: Best way to manage a single server from Git in 2017? - <AUTHOR> I'd like to run a single, small VPS for some personal projects. I want the configuration of this server to be entirely driven from a git repository. What are the simplest tools for doing this in 2017?
Puppet? Chef? Ansible? I'm only running one server so I don't want to have to think about separate coordinator nodes, puppet masters or anything like that.
For any suggested solutions, are there rock solid tutorials on using them to manage a single instance? <comment><USER2> I suggest you invest a little time with Docker instead of the software you listed</comment>


Org-mode capture update - <AUTHOR> http://joshrollinswrites.com/2018/09/04/org-mode-capture-update/ <comment><AUTHOR> In his reddit post[0], the author does note that this link goes to a spam site about 10% of the time.

0: [https://www.reddit.com/r/emacs/comments/9cv585/orgmode_captu...](https://www.reddit.com/r/emacs/comments/9cv585/orgmode_capture_update_the_art_of_not_asking_why/e5dev8u)</comment>


How to create MVC folder structure in Flask similar to Codeigniter - <AUTHOR> Hi
I'm a PHP (Codeigniter) developer who needs to work with Python for a new project. I have decided to use Flask on Google App Engine. However I'm confused on how to create the models and controllers like in Codeigniter.
Can someone guide me on how I can go about this?
P.S. I'm new to both Python and Flask <comment><USER2> Check out [https://github.com/mjhea0/flaskr- tdd](https://github.com/mjhea0/flaskr-tdd)</comment>


Think Relevance podcast with Rich Hickey - <AUTHOR> http://thinkrelevance.com/blog/2012/07/31/rich-hickey-podcast-episode-014 <comment><USER2> This has a really interesting discussion of "machine listening" starting about 13 minutes in.

</comment><comment><USER3> I agree with his recommendation of Don Reinertsen's _Managing the Design Factory_. (I assume that's the book he recommended.) I read it last year and it had a strong effect on me.

<comment><USER4> The book linked from the show is The Principle of Product Development Flow: Second Generation Lean Product Development.

Link (no affiliates): [http://www.amazon.com/The-Principles-Product- Development-Flo...](http://www.amazon.com/The-Principles-Product-Development- Flow/dp/1935401009/ref=la_B001H6UEJS_1_1?ie=UTF8&qid=1343771924&sr=1-1)</comment></comment>


The Rust Language and Special Cases - <AUTHOR> https://blog.infinitenegativeutility.com/2018/6/the-rust-language-and-special-cases <comment><USER2> Relevant Reddit discussion: [https://www.reddit.com/r/rust/comments/8o0i1b/the_rust_langu...](https://www.reddit.com/r/rust/comments/8o0i1b/the_rust_language_and_special_cases/)

</comment><comment><USER3> The idea for try fn doesn't special case Result, it's built on the Try trait, similar to how closures are built on the Fn traits.</comment>


ICE Tells Foreign Students to Leave the Country If Their Schools Are Online-Only - <AUTHOR> https://www.motherjones.com/politics/2020/07/ice-tells-foreign-students-to-leave-the-country-if-their-schools-are-going-online-only/ <comment><USER2> It is just horrific to watch the unfolding of everything that gives us a competitive edge and makes this country stand out. At the same time watching people cheer it.

We are sending our best and brightest into the welcoming arms of the competition. And I don't mean this in a good guy bad guy way, more in the sense of healthy competition between sports teams.

We already know about the countless contributions of Immigrants, even when it comes to job creation from immigrant founded companies. As we turn them away, we continue to dissolve into unprecedented dysfunction, at a time that we most need to attract that energy to get us out of this nasty rut.

As an immigrant who came here from India at age 12, this is home. And it's sad to see your home being eaten into by politically motivated termites and rotting at every level at the core, while many of my fellow Americans cheer it on our self-destruction.

<comment><USER3> I'm not seeing it. Unless Europe suddenly figures out how to pay real wages at the same time that China discovers how to not be horrible people can always be imported at the discretion of whoever is managing the system. People come to the US for the money.

<comment><USER4> Higher wages in US is just cost of doing business - most top tier people won't work in US at lower salaries because of extreme uncertainty and zero safety net.

Salaries in Canada are lower but the safety net makes up for it.

<comment><USER5> this has to be a joke post. the safety net is provided to poor people, by the taxed salary of the high paid people. you are saying the high paid people want to work in canada, so they can pay for poor people?

my job pays 250k standard in the states. literally the same job, at the same company, is 160k canadian. it's even less in france.

yes, yes, you get insurance. so do i -about 8k/year taken out of my paycheck.

</comment></comment></comment></comment><comment><USER6> What the f*ck is wrong with these people, this is so transparent. First they didn't want the "bad" immigrants coming, or the illegal immigrants, but now they don't want the students in higher education that are studying in the USA to be here either?!?!?! As if it's the students fault that the school they attend is forcing them to do online classes temporarily.

I'd imagine a good bit of these students have pretty extensive lives and plans in the US since they're here LEGALLY.

<comment><USER7> Hopefully colleges will create some sort of "hybrid" programs that is not completely online to allow foreign students to stay in the US.

But yeah, this is very sad.

<comment><USER8> It would be challenging to do so - the rule states that full time students can only enroll in one full-time online class.

<comment><USER9> That's not true, if the school is using a hybrid model students can take more courses online. [https://www.ice.gov/news/releases/sevp-modifies-temporary- ex...](https://www.ice.gov/news/releases/sevp-modifies-temporary-exemptions- nonimmigrant-students-taking-online-courses-during)

</comment></comment></comment></comment><comment><USER10> So... highly political, but to all the Americans here who just couldn't bring themselves to vote for email lady because she was just too neoliberal: mazel tov!

<comment><USER11> FYI, Obama administration ICE did plenty of these things. For instance the fake College sting operation was started under Obama administration. as soon as Obama took oath new immigration policies screwed h-1bs. Due to high unemployment Obama administration believed that these people were stealing jobs from Americans and contributing to high unemployment of American citizens. There were no protests at JFK for these people against these policies.

It's simply partisan thinking to believe that your political side favors legal immigration, they don't.

</comment></comment><comment><USER12> Is this move by ICE going to be additional motivation for schools to not go remote for September?

Even if they believe that will probably to cost lives on campus and in the local community?

</comment><comment><USER13> I'm sure we'd love these students to come to Australia, once the border lockdowns are finished. Maybe an Australian university or one from another country will replace Havard, MIT etc in the global pecking order.

<comment><USER14> Education is already a big business in Australia, those universities love the foreign student revenue so much that they even lower the bar for English requirements so that more students can come over.

[https://www.abc.net.au/4corners/cash- cows/11084858](https://www.abc.net.au/4corners/cash-cows/11084858)

<comment><USER15> Yep, and at a time when interstate borders have not reopened, let alone national borders, the Australian federal government is making an exemption for one group - international students

[https://www.theguardian.com/australia- news/2020/jul/07/austr...](https://www.theguardian.com/australia- news/2020/jul/07/australia-to-allow-international-university-students-to- return-before-all-state-borders-open)

</comment></comment></comment><comment><USER16> Twitter had hashtag #labswithoutvisas going on few weeks back where some professors have posted images of what their labs would look like without people on visas [1]. And this would be true for way more labs than what you will see on twitter. Most likely within couple of years, number of research papers coming from US would decline drastically.

[1] [https://twitter.com/hashtag/labswithoutvisas](https://twitter.com/hashtag/labswithoutvisas)

[sarcasm] Oh wait! All these research positions can go to Americans now, damn those pesky Indian, Chinese, Korean... etc kids who have been snatching these opportunities from deserving Americans. I don't see why Americans won't fill in these positions and MAGA. [/sarcasm]

</comment><comment><USER17> What a disaster this administration is - literally taking the US backward deep into the Trump cave. I experienced great joy showing up at the US consulate to return my green card with a great big F-U smile on my face. Good riddance.

</comment><comment><USER18> Why is this such a problem? So they go back home for a year, save lots of money on US rents, stay enrolled, then come back once in-person classes start again? is there any evidence that universities want to disenroll these students and therefore lose their extremely high tuition fees?

<comment><USER19> Well, first, some schools are going online only for the latter half of the semester. But my understanding of the current guidance is that this is not enough to meet the in-person requirements, and so students may have to leave anyway and miss that half. Second, intl. travel is highly disrupted already and will continue being so. Some countries will fare worse under covid than others, and so students may get stuck, even after their school states are doing better. No guidance was given on students from travel ban countries, who were already here after the travel bans. Third, student visas expire. Visa politics are very volatile lately. Summing up, many people are now subject to gratuitous uncertainty about whether they'll be able to come back in at all over the next 12 months. Suppose you have to leave, a lot of people have already signed leases, etc.

Finally, the guidance so far is quite ambiguous. It is not clear who is able to remain and who won't, and my department sent an email basically saying they are waiting for extra information to know what's going on. That already is bad in itself.

<comment><USER20> An additional challenge is that classes will, almost certainly, be scheduled based on "local time". Students attending from other countries may find themselves needing to significantly time-shift their studies.

<comment><USER21> This is definitely a major issue - the US has a lot of students who come in from China, which would require a very significant time shift. Those students may also not be able to access the digital resources they need for class due to internet censorship, or they may simply be unable to join live class sessions due to latency or overall speed issues.

<comment><USER20> I had overlooked the potential impact of internet censorship. It seems like it would be very hard to take a graduate-level class without access to resources like Google Scholar.</comment></comment></comment></comment></comment>


Amazon Responds To Outage, Confirms Offline For 49 Mins - <AUTHOR> http://techcrunch.com/2013/01/31/amazon-responds-to-outage-confirms-offline-for-49-mins-aws-unaffected-outside-groups-uninvolved/

<comment><USER2> Using _very_ naïve calculations, it looks like they lost up to $5 million in revenue because of this.

[http://www.wolframalpha.com/input/?i=%28Amazon.com%27s+annua...](http://www.wolframalpha.com/input/?i=%28Amazon.com%27s+annual+revenue+%2F+%28minutes+in+a+year%29%29+*+49+minutes)

(This ignores a lot of important factors: not all pages being down, it happening in peak US hours, not accounting for the uninterrupted AWS revenue, having to purchase new hardware, damaged brand, etc)

<comment><USER3> A former Amazon.com engineer in the other discussion thread has indicated that Amazon never seemed to lose revenue during these outages.

 _> During my time as an engineer working on Amazon.com, we occasionally experienced outages of various lengths. One of the surprising details about these outages is that they really didn't result in any revenue loss. That is, it appeared that customers would simply wait until the website was available again to make their purchase. I would be surprised if that effect doesn't still happen today especially with the availability of Amazon on a variety of platforms (i.e. customers are comfortable ordering from their phones when they couldn't get to the website from their desktop computers)._

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

<comment><USER4> Not to mention, it's free PR. I'd forgotten I needed to order some stuff, but this reminded me, and so I placed the order once they were back up. I'm not sure how common that reaction is, but it might offset the downtime to some extent.

<comment><USER5> This almost makes me wonder whether a startup should identify easily-fixed weak points in its architecture and work on the fix so that it's ready to go, but don't deploy it. When the weak point eventually fails, rush to deploy the ready-made fix and then include a wonderful technical post-mortem of what happened, how you overcame an architectural weakness, and post it on High Scalability and submit it to HN. Small downtime; big PR boost.

<comment><USER6> A fine idea for a one or two man shop but if with a larger organization you then have a conspiracy. If word leaks could cause some major issues (along with more publicity).

</comment></comment></comment></comment></comment><comment><USER7> For a potential reason why this might not make any difference to Amazons revenue/sales/whatever one should read this gem of a past by John Allspaw (Ops whiz kid for those who have no idea who he is) :: [http://www.kitchensoap.com/2013/01/03/availability-nuance- as...](http://www.kitchensoap.com/2013/01/03/availability-nuance-as-a- service/)

</comment><comment><USER8> > Site outages are never good things but feel particularly shaky when they are > linked to e-commerce sites or other places where user data is stored.

Or, you know, when we've trusted the affected company in turn to run the infrastructure for so many of our businesses.

</comment><comment><USER9> I'm not sure if it was related but Amazon wouldn't let me rent a movie tonight... Tried on multiple platforms (directly from PS3, website) Not cool!</comment>


How to Write JavaScript When You Don't Know Where to Begin - <AUTHOR> https://carlanderson.xyz/how-to-write-javascript-when-you-dont-know-where-to-begin/ <comment><USER2> If you (really) don't know where to begin -- that is, you don't have enough "monkey grease" under your belt to just pick up some examples and documentation and propel yourself along -- then you should probably start with a different programming language.

That's not to get into an overall advocacy debate in regard to JS, btw. But even its staunchest advocates will acknowledge that it can be quite slippery to work with, in certain parts.

<comment><AUTHOR> Do you think the programming language you start with makes that much of a difference?

Like, does everybody who chooses python have an easy time while everyone who chooses ruby is doomed to failure, etc?

<comment><USER2> _Do you think the programming language you start with makes that much of a difference?_

Yes (and you'll find a lot of advice from experienced hackers emphasizing this point).

If not exactly the first language you start using -- at some point one should definitely start making a serious investment in a language with what we might call "solid bones" (that is, strong CS fundamentals). Or at least wit a high "fundamentals-to-fluff" ratio (and most especially a high "fundamentals-to- cruft" ratio).

Which isn't to say that "fluffy" languages (like Python or Ruby) are always bad. Or that crufty languages (like JS) cannot in some contexts be "good enough" (and certainly good enough to pay the bills).

But the point is, one should at least _know_ (and know through grit and experience; not through second-hand opinion) when one is in a fluffy or crufty environment (and how it is that one got there -- hopefully by being consciously aware of the tradeoffs involved).

A key trait of inexperienced programmers is not that the use or don't use certain languages (or databases, or other tools). It's that they don't _recognize_ situations when they're using an (inordinately) crufty one. For the simple reason that they have... insufficient basis for comparison.</comment></comment></comment>


Shoutcube – New-age chat app - <AUTHOR> http://shoutcube.com/ <comment><USER2> I don't see the difference between this and IRC.</comment>


Functional thinking: Why functional programming is on the rise - <AUTHOR> http://www.ibm.com/developerworks/library/j-ft20/ <comment><USER3> Some ideas that are ubiquitous within functional programming are certainly on the rise, for example:

\- functions as first-class entities in programming languages, and consequences like higher-order functions and partial evaluation;

\- a common set of basic data structures (set, sequence, dictionary, tree, etc.) and generalised operations for manipulating and combining them (map, filter, reduce, intersection, union, zip, convert a tree to a sequence breadth-first or depth-first, etc.);

\- a more declarative programming style, writing specifications rather than instructions;

\- a programming style that emphasizes the data flow more than the control flow.

I see these as distinct, though certainly not independent, concepts.

I'm not sure whether functional programming itself is really on the rise, not to the extent of becoming a common approach in the mainstream programming world any time soon. I don't think we've figured out how to cope with effectful systems and the real world having a time dimension very well yet. (I don't think we've figured it out very well in imperative programming yet either, but the weakness is less damaging there because there is an implicit time dimension whether you want it or not.)

<comment><USER4> To me, the future will most likely be languages that allows both functional and OO styles to interoperate. Programmers will pick the style or mix of styles most appropriate to the particular sub-problem they're solving.

We already do this with some of our high-level languages like Ruby and JavaScript. With these, we have higher-order functions, map and friends, closures, etc.. But we also have our familiar OO constructs. Almost every program I write in these languages uses all of the above, not just the functional or OO subset.

I so far have not seen any practical advantage in going purely functional. I've tried it a number of times, but I always find that the real-world programs I write need to be stateful. Yes, functional languages do of course have facilities for handling state, but they always seem super awkward, especially compared to the elegance of state handling in OOP.

For example, consider a simple, 1980s-style arcade game. There are a bunch of entities on screen, each with attributes like velocity, health, etc.. How do you maintain this state in a purely functional language? I've seen various suggestions, but they all seem to boil down to setting up a game loop with tail recursion, and then passing some game state object(s) to this function on each recursion. Doesn't sound so bad, but what happens when you have a bunch of different types of entities? E.g. player characters, monsters, projectiles, pickups, etc..

Well, every time you add a new type of entity (or a new data structure to index existing entities), you could add another parameter to the main game loop. But that gets crazy pretty fast. So then you have the clever idea to maintain one massive game state hash, and just pass that around. But wait, now you've lost something key to functional programming: You can no longer tell exactly what aspects of the game state a function is updating, because it just receives and returns the big game state hash. You don't really know what data your functions depend on our modify. Effectively, it's almost like you're using global variables.

I'm using games as an example here, but the same sorts of problems come up with almost any stateful application.

This is why I prefer languages that allow you to seamlessly mix functional and OO styles. They give you many of the benefits of FP without forcing you to deal with the difficulties described above.

<comment><USER5> If you mix FP and OO you'll often end up with terrible FP which simply reproduces the "old" approach: lots of mutable stuff everywhere. Many Clojure toy games are like that: they start with a lot of "variables" in mutable refs.

But it doesn't need to be that bad: you can create a game that is fully deterministic. A game which is purely a function of its inputs. And it can of course be applied to more than games.

The problem is that it feels "weird" to non-FP people.

The state monad is definitely what you're looking for. If you use a state monad approx. 95% of what you just wrote is utter rubbish.

But the state monad (and the maybe monad) sadly aren't _that_ trivial to understand.

<comment><USER4> > If you mix FP and OO you'll often end up with terrible FP which simply > reproduces the "old" approach: lots of mutable stuff everywhere.

What I'm suggesting is that mutable state isn't inherently bad. It's entirely possible that we will someday enter a new age of mainstream, pure FP where we look back at mutable state and cringe. But that's pure speculation. Our current world is full of successful applications written in languages built on mutable state.

So I'm not saying that mutable state is inherently better than the alternatives. Just that the case against it--and for the alternatives--has to be pretty darn compelling to outweigh the tremendous real-world success of languages like Ruby, Python, JavaScript, and so on.

</comment></comment></comment></comment><comment><USER6> The thing is that any imperative programmers who have composed SQL subqueries have have been doing this kind of thinking for years whether they realise it or not. The only substantial difference is that the data is in the process' memory as maps and lists as opposed to relational tables in the db. You end up with exactly the same kind of patterns of composition in the code.

<comment><USER7> Completely disagree. Composing SQL queries even on multiple levels (as in subqueries) might involve a way of thinking that remotely resembles to functional programming, it is way too simplistic for comparison with real world functional programs, at least in my experience.

I know I grasped SQL really quickly, and still get puzzled by Haskell after 6 months of trying.

<comment><USER8> "[SQL] is way too simplistic for comparison with real world functional programs"

Another way of interpreting that is that the ideas behind SQL are so powerful that it's able to be one of the most successful programming languages of all time without all the bells and whistles of a language like haskell.

It's so successful that it can get by with horrid syntax, a ton of special cases built in, and the mess of SQL NULL semantics.

Sometimes it boggles my mind that more functional programmers don't get involved in databases, where all of their ideas are already proven to be useful.

I don't necessarily disagree with you, depending on what you mean by "real world" programs. I just think that if there is already an area where the concepts are useful (whether you call that a "real world program" or not), it makes a lot of sense to keep trying to build from that. Trying to convince someone to learn haskell to build a website when they already know and like ruby is an uphill battle.

<comment><USER5> _"Sometimes it boggles my mind that more functional programmers don't get involved in databases, where all of their ideas are already proven to be useful."_

But some do. For example Rich Hickey used Clojure (which both users and encourages FP but still allows to bend the rules when needed) to create Datomic.

It's a DB but it's CRA instead of CRUD. Making it just so much easier to reason about. The DB is ever-growing and any query becomes "query at time t". And later on, when you query again "query at time t", you CANNOT get a different answer.

Typical CRUD DBs are place-oriented mutability mess and, honestly, reading about MySQL fanbois vs PostgreSQL fanbois arguing about which one is the best looks, from a CRA point of view, as a blind man arguing with a one-eyed about who has the best eye vision.

Datomic is ACID, has infinite read scalability and can use SQL DBs (and many others) as their persistence stores.

It is as Real-World as one can get since that Rich Hickey as seen exactly what we're all witnessing daily in the real-IT-world: a gigantic ball of mutability mess.

To me the revolution is on and there's no going back for those who switched.

From there it's just a matter of time.

<comment><USER8> Thank you. I knew that Datomic existed, and some of the basic things you pointed out here, but I'll take a closer look. It seems like you really think it has a lot of promise.

That being said, I don't think CRA is a panacea. Databases will always have a "read, decide what to do, write" pattern (because that is what happens in the real world, and databases model the real world). If the read happens at time T, and the write happens at time T+100; then you could have a race condition if something happens at time T+50.

Postgres can detect such race conditions by using true serializability (based on a technique called Serializable Snapshot Isolation[1]). It gets tricky to apply the same technique for temporal databases, though I believe it's possible. Do you happen to know what techniques Datomic offers users to help avoid/detect/resolve race conditions?

Don't get me wrong. I think it's a very useful direction to go in. I've done a lot of work on temporal features in postgres. I'm also aware of some of the limitations, however. You still need some kind of coordination and something resembling locks or a conflict detector.

(By the way, please avoid derogatory comments about people who make different technology choices than you do. An argument could be made that postgres is CRA. And even if not, CRA versus CRUD is a small part of what is actually important to users; many of whom face a different set of trade-offs than you do.)

[1] <http://drkp.net/papers/ssi-vldb12.pdf>

</comment></comment></comment></comment></comment><comment><USER9> I think a big one is concurrency.

Highly concurrent application will become more popular. Functional programming via immutable data structures is one sane way to manage that. Clojure is doing it. Erlang has been doing it for years. Haskell has that.

Fear of large, mutable state is well founded.

What else I think is healthy is adoption of these patterns. It is possibly to be diligent and try to apply some of the idea using other languages (C++, Python etc). It is just a different way of thinking and structuring code.

</comment><comment><USER10> They are assuming that functional programming is on the rise. With the exception of Clojure (which is more popular by virtue of being new), I don't know of any functional language that are in any measurable way more popular (I assume that is what they mean by on the rise) than it has been in the last 10 years.

In fact, the only application I use that is built using functional programming is Xmonad.

Also, none of the top languages on the TIOBE survey are purely functional, although one in the top 20, 'lisp' with .9% and falling, does promote a functional style.

People expound the virtues of functional programming year after year, and then go off and get a bunch done with Python. Steve Yegge said it best: [http://steve-yegge.blogspot.com/2010/12/haskell- researchers-...](http://steve-yegge.blogspot.com/2010/12/haskell-researchers- announce-discovery.html)

[http://www.tiobe.com/index.php/content/paperinfo/tpci/index....](http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html)

<comment><USER11> Hypothetically you are a big company able to deliver increasingly complicated software that far outperforms the competition because of functional programming. Would you want to correct a remark like this by IBM?

Why on earth would you want to educated pointy-haired individuals when you can be another vapid supporter of the six-sigma model?

</comment></comment><comment><USER12> Why is functional programming on the rise?

I have heard several times that the big payoff with function programming comes from parallel processing. Because functions typically have no side effects they can operate on a set of inputs in parallel without modification. This is important because future increases in processing power are expected to come primarily from more cores rather than higher clock speeds as in the past.

Is this correct? The author seems to focus on other real but lesser benefits.

<comment><USER13> I've done a bunch of both 'classic' and functional programming, and for me the biggest difference is a switch in code-writing mindset.

In imperative languages, generally, I tell the computer what and how it should do - no matter if it's assembly, C, Java or [most of] Ruby.

In FP languages (Haskell or Scala, haven't worked with Lisps), I generally tell the computer what needs to be computed and expect it to figure out how to do it - what order of execution, what grouping of data, what to cache.

If you compare Java code and Scala code for the same algorithm, using the same JVM API - then the main nonsyntactic difference between them will be a pile of missing Java lines detailing the order of processing steps and loops, which probably weren't essential to the algorithm - when writing the Java code I could've written it in opposite way with the same result.

What I lose in FP is the ability to easily explicitly do time/space tradeoffs. Sometimes I need to control that, and then it's a bit trickier. However, it can be fixed with minor refinement of language and libraries - the original article cites a great example on how memoization should be implemented in all great languages.

Parallelism currently is just a nice bonus - say, I lose 3x performance by not detailing a great execution path manually in C++; but I gain 3x performance since most of the code is trivially parallelizable to run on 4 cores. For example, in Haskell it's often literally a one-line change, while in Java it'd be a pain in the butt to make everything safely threaded.

<comment><USER14> _Parallelism currently is just a nice bonus - say, I lose 3x performance by not detailing a great execution path manually in C++; but I gain 3x performance since most of the code is trivially parallelizable to run on 4 cores._

Parallel extensions have been (and are being) added to OOP languages to make it's use not only simpler, but even as a preferred general design.

<comment><USER13> In order for such extensions to work on most of my code well, my code needs to written in an FP-inspired style that many new additions to OOP languages do - like C++11, python, etc.

As a crude example - there is a big conceptual difference between a for-loop that processes all the elements in a list or array, and a map operation to all the elements in it.

The for-loop specifies that the execution will be sequential and in a specific order, so it can't really be parallelized automagically.

The map-loop says that it might not be such, so you cannot (a) use a mutable state such as counter incrementation inside; and (b) use the 'previous item' in the calculations.

But in practice, you can write most computations in both of these ways - <USER2> if you switch from 'idiomatic C' for-loops to map operations (and the equivalents for the many other common data processing tasks), then code is much more parallelizable both in FP and classic OOP languages.

BUT - it means that much of your code needs to be written in FP-style even if the language is not FP, so you need to think in FP-style. If you use these "parallel extensions" and the new "preferred general design of OOP languages" then much of your code will be stateless and w/o sideeffects; much of your code will look quite different than classic/idiomatic code that the OOP langage had earlier.

<comment><USER12> Thanks for the explanation. Popular "modern" languages like Javascript, Ruby or Python already have many of the "FP" features mentioned in the OP and comments: first class functions (though not so simple Ruby) and high level data processing functions (e.g. map, filter, select).

As best I can tell the big new benefit of FP is the potential, generally not currently realized, for automatic parallelization. The cost is having to think in a new way that is, at least initially, somewhat confusing.

Alternatively non-FP languages could simply import ideas from FP and gain the benefits in an evolutionary way. For example if Mads wanted to he could rewrite the Ruby interpreter to have map, filter and many other methods automatically use multiple cores. Eventually programmers using the new multi- core version would learn which structures were, such as map, or weren't, suc as for loops, going to be parallelized.

There would be many language specific details to work out. For example determining if there are truly no side effects in a particular situation. This is not always so simple in non-FP languages but still not as complex as analyzing every possible for..end loop.

As 4, 8, 16, 32 and more core processors become more and more common the pressure to either change to FP languages, incorporate FP feature in non-FP languages or find some other parallelization methodology (?) will become irresistible.

</comment></comment></comment></comment></comment><comment><USER15> Doesn't this just bend back to Moore's law? Sure, there are more "efficient" data structures for use in functional styles now than there were in the past, but they all seem to treat memory as if it is free. Basically, now that we have such impressive computing resources, we can start thinking of the programs we are writing in terms of the abstractions themselves, and less in terms of the abstraction that is the computer. (That is, many of us are lucky enough to not worry about caching strategies, threading concerns, etc.)

The entire debate about immutable structures is amusing when you consider old resources where there is not spare room for a new copy of a string just from a different starting point. (Referring to the new Java behavior of .substring)

</comment><comment><USER16> I have been meaning to dig deeper into functional programming, specifically Clojure, but as a newbie to functional programming, I am finding it hard to find a detailed tutorial that I can start to get started with the concepts and programming used in Clojure. Would anyone have any recommendations for a guide?

<comment><USER17> This site is a bit old now (not sure if it's kept up to date) but I found it helpful when I first started playing with Clojure several years ago (wow...that long already)?

<http://java.ociweb.com/mark/clojure/article.html>

</comment></comment><comment><USER18> Highly recommend LiveScript if you like CoffeeScript or JavaScript or functional programming.

<http://livescript.net>

<comment><USER19> Any reason why they ripped the original name for Javascript off? I totally thought you were joking until I went to the site and noticed it's a current project.

<comment><USER20> The name is a joke, the project is not. "LiveScript was one of the original names for JavaScript, so it seemed fitting. It's an inside joke for those who know JavaScript well." (from the site)

LiveScript hasn't been used as a name for JavaScript in almost two decades.

<comment><USER19> Thanks for explaining.

</comment></comment></comment></comment><comment><USER14> The majority of people Are Lazy - This is why java and other languages abstracted further than C/C++ became so popular. Functional programming is more natural and comes with a smaller learning curve. It does not require the same amount of discipline to become proficient - nor the conceptual, analytical problem solver skills to master. But that is just the language, what about the design of an large scale application suite?

So people with less analytic abilities and problem solving skills, (I think of those who HAD TO choose Humanities and arts majors here?) Can actually pick it up. This can be looked at as good or bad, in the long run it is probably good overall because the understanding of hardware and memory become less important as processors, memory, storage, and bandwidth become cheaper There will always be the geeks who still understand everything and can design and architect the software for the developers to code.

One downside may be that those with the analytic/problem solving minds will lose their art in a sense and lose the very thing that keeps their minds sharp. Another thing worth mentioning is, there is going to be a lot of changes for developers. Wages will go down as it gets easier to learn how to program - thus more programmers flood the market (supply and demand), also their will be a separation of Architects and code monkeys - the latter being the Humanities graduate type.

To sum up - This will "Dumb Down" your average developer and create a clearly defined separation between developers and designers/architects.

</comment><comment><USER21> Quite off-topic, but the underscores for the variable names in the first code snippet are totally irritatingly useless and anachronistic in the most ugly looking way.

<comment><USER22> They mark the private variables so you don't have to remember which ones are private when you read further down the page. That's pretty common place and good style, IMO. What makes you think they're anachronistic?</comment></comment>


The driver behind NASA's Mars Rovers - <AUTHOR> http://www.pcworld.idg.com.au/index.php/id;563338166;fp;2;fpid;4

<comment><AUTHOR> I must confess I was very excited when I read it! It's indeed one of the best IT jobs in both worlds :D I wished I could work on something like that. Btw, I was surprise he went so open with the stuff the Rovers where running :)

</comment><comment><USER2> Fantastic article, thank you!</comment>


New Study: Immigrants are Better Educated than Germans - <AUTHOR> http://www.spiegel.de/international/germany/new-study-immigrants-are-better-educated-than-germans-a-901681.html <comment><USER2> The sad truth is that most or at least very many of my fellow Germans don't believe studies like this.

Some still believe that most immigrants come into Germany looking to live on welfare. Our constitution says "The dignity of Humans is untouchable". The going interpretation of the federal court is that immigrants, especially from the EU or asylum seekers, are humans, and thus the state has to pay them the same basic living subsidy as they pay unemployed Germans.

A common interpretation is that this subsidy is higher than in a lot of European countries, and those poor should be immigrating in droves. But they don't. I suspect higher living costs, language difficulties and social ties play a more important role than one or two hundred Euros per month.

When Polish people gained freedom to immigrate to Germany as a result of joining the EU and the Schengen Treaty, all sorts of German organisations predicted a deluge of undereducated low-pay workers. They didn't come either, at least not in the feared numbers.

In the US as in Germany there are varying views on facts and numbers around immigration. I'm no longer convinced that there is any basis for restrictions on immigration. Nations would have to adapt to that, but so do we have to adapt to a shrinking workforce.</comment>


How Is Disinformation Gaming Ad Tech? [pdf] - <AUTHOR> https://disinformationindex.org/wp-content/uploads/2019/09/GDI_Ad-tech_Report_Screen_AW16.pdf <comment><USER2> The rise of fake news, disinformation and the subsequent flaring of ignorance and hate are directly related to the currency of the web - ad imps.

This is not new but has been exaggerated by the scale and the lack of any human oversight that Google and other ad exchanges offer. Pair in the ability to cookie match based on "intent" and thousands of other psycho-graphic and historical data points, and you have a definitive problem.

For the longest time the issue was with the publishers themselves not being vetted. As bot filters and traffic reviews became better, they switched from sites themselves, to ads distributed.

But the real issue is that media (not just digital) has ZERO incentive to change their practices. Attention is the currency of media and since controversy and sensationalism draw more eyeballs, they are used by actors across the spectrum to enhance their audience size and their revenue. Google and FB use this to their advantage by providing no market basis for their price.

IMHO Facebook's problem is not the ads, its the fact that content distribution is sold as ads and 99/100 people cannot tell the difference between a friend sharing something and that something having been a paid boost or placement.

The funny thing is that almost all of our current social issues are directly tied to advertising pushing the wrong message to the wrong people and the wrong time. Its the only reason we have Trump, or Kardashian for that matter and is the reason words no longer have any actual meaning. Dont believe me? Just look at words like Unlimited, guaranteed, free, etc for examples of this perversion.

When we allowed the use of words without any legal blowback, we started down the slippery slope that ended with Trump. A man who is neither virtuous nor experienced at anything but playing the media sensationalism card better than anyone...

<comment><USER3> The problem of unqualified freedom of speech is that it amounts to freedom to lie without consequence for those that have power. And once you can lie with impunity, you have a mechanism to consolidate that power, either by disrupting those hostile to you (fake news, astroturfing, etc) or by providing support to those that support your goals.

<comment><USER4> You're kind of right, but not quite.

When the bolsheviks took power the first thing they did was seize the means of communication in order to control speech. They became the only authorized voice to speak.

So it's not freedom of speech but control of speech by a single entity that establishes "narrative" that is the problem.

<comment><USER5> So maybe whats important is striving for an greater equality of power to speak? Power is both politics and money, and if you have enough of it, you can control the narrative and cause problems.

</comment></comment></comment></comment><comment><USER6> It has recently come to light how Google helped fake news sites in Brazil:

[https://theintercept.com/2019/11/19/fake-news-google- bloguei...](https://theintercept.com/2019/11/19/fake-news-google-blogueiros- antipetistas/)

Apparently, the advertisers were not aware of where their ads were being shown.</comment>


Ask HN: Internships in Social Work - <AUTHOR> I have a friend in college with me who is looking for internships in Social Work. She's had a lot of success finding smaller internships around our university, but I don't think she found any of them really fulfilling. I believe she's looking for larger opportunities in cities like Chicago, but usually she's told that these opportunities are only available for graduate students.
I wasn't sure how much truth there was to that statement (I'm a CS major), and please let me know if there is/isn't. But perhaps more importantly, I'm trying to come up with some tech companies or social startups (large or small) that might be oriented enough in the Social Work direction to be fulfilling for her.
Does anyone have any ideas? She's doing very well academically and extracurricularly, and in general she's an amazing person and I'd like to see her able to do what she loves to do. <comment><USER2> My beloved is a clinical social worker, adjunct professor, and has supervised social work interns.

To a first approximation, social work internships tend to be focused on graduate students because an accredited graduate degree is typically a required credential for professional licensure and internship (field placement) is typically part of the accreditation criteria.

Because licensure occurs at the state level it is not applicable to US Federal agencies. This, at least on paper, may open up internship opportunities to undergraduates at places like the Veterans Administration and civilian positions with the Department of Defense.

That said, competitive internships are going to favor graduate students and Federal internships are often more competitive in desirable locations than in less desirable locations. An undergraduate major has a better shot in places where there is not a ready supply of graduate students. And more competitive than other social work internships because they are always paid internships.

In terms of career, a bachelor's degree does not open a lot of doors in social work. Typically industry hires bachelor's level social workers because they are cheaper than licensed social workers and social work is not a high paid field to begin with.

As for tech, social work is done on a case by case basis so it does not really scale via automation. The few therapy/counseling platforms I've seen use licensed therapists (a social worker needs a clinical social work degree (among other requirements)). A social work degree is might be adequate for a sales or administrative role for the same reasons as a liberal arts degree...all this with the caveat that there may be a startup out there that is looking specifically for bachelor of social work candidates -- such a company probably has the pick of the litter.

Anyway, good luck to you and your friend.

</comment><comment><USER3> Totally agree with brudgers, all of that seems to be the case for my wife, who is currently going through a masters program.

In regards to the tech companies, I cannot think of one that would fit this case, and if she is looking for a future career as a clinical social worker, a somewhat related position NOT using a license at a tech company wouldn't be all that relevant.</comment>


Show HN: Text-Based Hate Speech and Abuse Detection That Works - <AUTHOR> https://hexis.ai <comment><USER2> Site doesnt load for me.

<comment><AUTHOR> last minute typo correction.. sorry for that!</comment></comment>


Ask HN: How do Flickr, Youtube and other high traffic websites handle file uploads? - <AUTHOR>

How do Flickr, Youtube and other high traffic websites handle file uploads? I am mostly interested to know what they do on the server side.
I might be mistaken, but I read PHP might not be great at being a daemon to handle file uploads due to memory leaks. Is this true? Is Python or Java a better choice? How do you handle your file uploads?
I appreciate any help in pointing me to a better solution. <comment><USER2> one of the Flickr engineers, cal Henderson, wrote a book with a title something like "building scalable websites" that was published by O'reilly. I'm pretty sure he covers that topic. You may be able to get acces online via your public libraries web site (you can in seattle, at least).

There are the obvious issues with file uploads, they can take a lot of bandwidth, and disk space, but there are a lot of less obvious problems.

1\. File uploade take a lot longer than most web requests, both because of the size of the data, and because most client connections download faster than they upload.

2\. As a result, file upload requests hold server resources longer than other requests. This usually comes down to memory, but there can also be file handle and socket limits. Also, more in the past than in the present day, just the CPU overhead from dealing with lots of open sockets could get to be an issue.

3\. File uploads often carry a lot of memory overhead. The braindead simple way of handling way fileuploads in PHP, etc ends up buffering the whole file in memory until it the upload is complete. That can really add up. Furthermore, the process handling the upload request has the memory overhead of the PHP (or ruby, or python...) interpreter, and any code and libraries associated with your application. This overhead is carried even though most of that code and data structures are unnecessary for most of the request durration.

This memory useage really stacks up when each upload request lives for seconds, or minutes, rather than the milliseconds required for most requests.

There are lots of ways to deal with the resource issues. Writing the upload to disk as it arrives is a big improvement. You can go further by having a separate app/server instance that is tuned to minimize the size of each app/interpreter instance is another.

There are also ways to take advantage of file upload features built in to a front end webserver (like nginx) to buffer the whole upload to disk before your app has to get involved. Not to mention the amazon examples mentioned.

Turning to a specialized custom file upload server written in Java or C seems like an optimization you undertake if you outgrow the other solutions (including more memory per server, or more servers)

Imple

</comment><comment><USER3> Here are some interesting stats in how much data 4chan handles on any given day while the upstream might not quite compare to something of the likes of Flickr or Youtube, but from what I can tell while software is certainly important it is your hardware that will make or break whether or not your site can handle such volume.

 _4chan is currently powered by seven servers (five content, two database). We are colocated on a full 500mbps Global Crossing connection, allowing us to push over 5TB (5,000GB) of data per day_ [Image: <http://content.4chan.org/img/traffic.feb5-12.png>]

</comment><comment><USER4> I'm not entirely sure about them, but I use S3 and EC2 with SQS so that the user can upload the file, it will be encoded while waiting in a queue, then place itself back into storage. That way nothing ever touches my production server.

<comment><USER5> Yep, I use this model, too. Using this model is great, too, because multiple disparate servers can be dealing with the media coming from/heading to S3. You don't get stuck with media files on one box.

It's like a giant disconnected filesystem.

Oh, and use whatever language you are most comfortable using.

<comment><USER6> I use merb on ec2 with a redirect back to the app server to write the db reference. We are using a regular html based file uploader and also have a flash uploader - which sometimes gives us fits.

</comment></comment></comment><comment><USER7> Use this nginx module: <http://www.grid.net.ru/nginx/upload.en.html>

It is highly scalable and spools the uploads to disk and does the mime parsing in efficient nginx C code> then once it finishes it just passes some params to your backend processes with the location of the file on disk and you can process it however you want.

<comment><USER8> I use this too.

And, FWIW, I see some people suggesting merb, which is cool, but even the guy that wrote merb(ezmobius) uses this now.

</comment></comment><comment><USER9> One really easy way that works extremely well is to use an old school CGI script to handle the upload. It will die as soon as the upload process is finished, which keeps things very self contained and clean.

The most important thing (as others have noted) is that you do processing asynchronously. Get the file on the server, queue it (however simply), and then process the uploads in however big of batches your machine(s) can handle optimally. 99% of the time you're going to want ffmpeg for videos and ImageMagick for images.

</comment><comment><USER10> So, what you want to do is stream the file to disk. The problem that most people will face is that someone is uploading a 100MB video file and your code is trying to hold it in memory. Bad! Get it on disk, then deal with it by opening the file.

In terms of a daemon, you don't need one. PHP and other languages can execute other processes. So, you want to convert that AVI to Flash? Save it to disk, then execute another process to convert it.

</comment><comment><USER5> Sniff around the Amazon S3/EC2 documentation and you'll find pipelines demonstrating what you want to do, such as:

[http://developer.amazonwebservices.com/connect/entry.jspa?ex...](http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1602)

</comment><comment><USER11> If you plan to deploy your client application as an HTTP application then there isn't much you can do other than let your web application handle it (php/python/ruby whateveer).

Another option is writing an uploader as a stand-alone application (such as flickr uploader, facebook's iPhoto plug-in and alike)

The third option is BAD but still exists on facebook as java applet within the browser.

The forth option is to write the client in one (or many) of the browser extenders such as Google Gears, MS Silverlight, Adobe Air/Flex/Flash to do this (look also at <http://www.jnext.org> and <http://www.google.com/search?q=flash+uploader>).

All these 3 can be implemented at the server side in whichever language you choose.

</comment><comment><USER12> You are mistaken and it's not true. If your site is php, let php handle the uploads.

</comment><comment><USER13> so for the most part i don't think i can answer in detail, but in public situations hi5's response has been that they have a dedicated pool of servers running the upload, and they store the file on a static server. once that server fills up, they provision a new one. i will call this the viking image upload process, as its like a viking burial process. each one of those images is then buffered by a CDN.

i should point out that hi5 has more photo uploads per day than flickr does.

</comment><comment><USER14> <http://code.flickr.com/svn/trunk/uploadr/></comment>


Understanding the Y combinator (in JavaScript) - <AUTHOR> http://logicmason.com/2014/understanding-the-y-combinator/ <comment><USER2> Neat, but the video ended too quickly! Is there a follow-up that explains the structure of the lisp implementation? I tried writing it out but don't feel entirely comfortable with the idea that I've understood it fully. Would be great to have the implementation also explained in as much detail.

<comment><AUTHOR> OP here. This video was just a one-off that was essentially a one-off warm-up for Nathan's class, but I absolutely recommend going through the rest if you're interested in programming languages or want to learn how to write an interpreter or compiler. It was really useful for me and it's totally free at [http://nathansuniversity.com](http://nathansuniversity.com)

<comment><USER2> Awesome, thanks for the tip. I guess I'm looking for a good way to get into functional languages and I liked the video because it felt like it was to the point and not loaded with abstractions. I'll def check out the rest of the class!</comment></comment></comment>


Drupal Contributors Threaten to Quit After Developer Is Banned for His Sex Life - <AUTHOR> https://heatst.com/tech/drupal-contributors-threaten-to-quit-after-a-developer-is-banned-for-his-private-sex-life/ <comment><USER2> I suppose my question is, why does it matter what an OSS contributor does in his spare time? And why should that prevent him from contributing? Am I missing something here?</comment>


The C language is purely functional (2009) - <AUTHOR> http://conal.net/blog/posts/the-c-language-is-purely-functional <comment><USER2> For some context, conal did the pioneering work on "classic" Functional Reactive Programming with Hudak, before the Haskell language had moved to monadic IO.

Originally, IO in Haskell was done based on streams as in Miranda from which it was inspired. A program is then a transformation on a stream of operating system events into a stream of operating system commands, both represented as data. That's pretty cool, because it makes it easy to write your program and then mock the operating system rather than actually touching the real world. The closest we have to this now is the "interact" function, which allows you to model your IO as a transformation of a stdin stream to a stdout stream.

Conal isn't much convinced that monadic IO was the best solution to the IO problem. The idea that monadic IO is a "pure" or "denotational" way to interact with the real world is arguably pretty weak, and that's the point of conal's post here: if you take the idea to its logical conclusion, we might end up just concluding that cpp is pure and denotational.

Instead, conal has worked on FRP approaches to interacting with the real world which are pure and have a very denotational feel to them: you're just writing down functions from time and a time-stamped stream of events. I still hold out enormous hope for this approach, but I'm not placing any bets on it.

<comment><USER3> I knew there was a 'pre-monad IO period', but I never knew exactly what that was. I've been interested in FRP for a while, but never drew the connections. Thanks for this comment!

</comment></comment><comment><USER4> Link to Google Cache for those who can't read the article:

[http://webcache.googleusercontent.com/search?q=cache:J5AGFg1...](http://webcache.googleusercontent.com/search?q=cache:J5AGFg1OKSAJ:conal.net/blog/posts/the- c-language-is-purely-functional&strip=1)

</comment><comment><USER5> This is an extreme exaggeration, but it illustrates the point that a C programmer writes some source code that produces effects only at runtime and the compiler may be thought of as a pure function (though, with a bit of external state, but that is manageable in Haskell too).

The point is, it is the runtime system that produces the side effects, just as Haskell RTS does; the only difference is that Haskell annotates effects with its type system.

On the other hand, it completely blurs the line between "pure code" and "effectful code". Though the definition of "pure code" is rather tricky (we used to it in the Haskell meaning, with memory management completely abstracted away and explicit signatures of side-effect presence), but what's the point of a term that applies to all source code in existence?

<comment><USER6> > the only difference is that Haskell annotates effects with its type system.

I kind of disagree. Haskell doesn't only annotate effects with its type system. Haskell goes much further than that. It encourages an explicit and clear split between purely-function code and side effects.

But what do I know? Despite reading about it a lot, I've never written any Haskell ;)

<comment><USER5> Haskell does [partial?] type erasure, so RTS often knows nothing about types, it can't distinguish a pure function from any other one. The type consistence and runtime correctness is assured by the typechecker at compile time.

<comment><USER7> Total type erasure, at least ignoring `Typeable`.

</comment></comment></comment></comment><comment><USER8> > _"C programmers" really program not in C, but in the purely functional > language cpp (the "C Preprocessor")._

Well ...

</comment><comment><USER9> The C Preprocessor might be functional in the same sense as the lambda calculus but that's about it.

And actually it isn't really: it needs to be supplied "evaluations" to work. Evaluation is naturally recursive but cpp only performs one pass, so you need to explicitly request more evaluations (or "scans").

See here: [http://pfultz2.com/blog/2012/05/10/turing/](http://pfultz2.com/blog/2012/05/10/turing/) and here: [http://theorangeduck.com/page/c-preprocessor-turing- complete](http://theorangeduck.com/page/c-preprocessor-turing-complete)

<comment><USER10> Not being Turing Complete makes it less than the lambda calculus, which is still consistent with "purely functional". Purely functional is about expressive power you can't have, not power you can. So take the lambda calculus and restrict it, it remains purely functional.

<comment><USER9> Yeah right, but that makes a bar stool into a purely functional language as well; so the point is kinda pedantic.

Not being able to recurse makes the language awful to use for almost everything excepted simple substitution, which is effectively what it is used for.

<comment><USER10> The C preprocessor, combined with the EVALn macros, is Turing-Complete-up-to- N-iterations, so not quite a bar stool.

</comment></comment></comment></comment><comment><USER11> Isn't it possible to learn functional programming in C ?

I often read people saying learning a functional language taught them good programming practices that they could apply to other language, so I conclude that functional programming is only made mandatory and very encouraged in functional language, but it doesn't mean it's not possible to use functional programming to a language like C.

I guess one way to learn functional programming simply would be to write as many pure functions as possible, and go from there. No need to learn a functional programming language. Honestly, haskell melt my brain several times and I did not see the point of learning it.

<comment><USER12> Functional programming generally involves a lot of dynamic memory allocations (which are usually optimized in some way). Without some form of assisted memory management, this quickly becomes excruciating. C also lacks function closures, so important abstractions like function composition, partial application and higher order functions. It __also __lacks type parameterization and polymorphism.

Not everyone will consider all of these to be fundamental to functional programming, but I'm certain most people would require at least one. C simply doesn't provide powerful enough mechanisms for abstraction to enable any interesting parts of functional programming.

C++, Rust, D and Nim all do, however. If one ever felt the need to use them in a functional matter it would be possible, albeit unpleasant.

Additional reading: [https://news.ycombinator.com/item?id=8609775](https://news.ycombinator.com/item?id=8609775)

<comment><USER13> >Functional programming generally involves a lot of dynamic memory allocations (which are usually optimized in some way)

It's symptomatic of many functional languages, but it's not a prerequisite.

> . C also lacks function closures, so important abstractions like function > composition, partial application and higher order functions.

That, on the other hand, is a core feature of functional languages (what does it mean to have functions as first class citizens if one cannot manipulate them in an algebraic way?). I actually think it's the only needed feature to qualify.

> It also lacks type parameterization and polymorphism.

These are strongly typed languages features, I wouldn't define a functional language by it (I don't think it's necessary), although it appears in many of them.

<comment><USER14> If I get the point of the article, the author would argue that cpp provides some form of closure (you can code a macro that generates a function that behaves somewhat like a closure if you want...)

</comment></comment></comment></comment><comment><USER15> I feel primitive. Separating runtime from dev time is as advanced as the steam engine.

</comment><comment><USER16> Too bad that the pure cpp code can't issue C actions which depend on results of previously issued actions. You can't implement _cat_ in cpp+C, while you can in haskell.

<comment><USER6> > You can't implement cat in cpp+C

Yes you can.

I think that you missed the point of the article.

Just write a cpp macro that outputs a cat implementation in C.</comment></comment>


Show HN: Deploy a fullstack website on AWS with one command - <AUTHOR> https://github.com/tobilg/aws-fullstack-website <comment><USER2> This repo uses the Serverless Framework. It is an excellent abstraction framework for constructing, orchestrating, and deploying "serverless" applications to AWS (and other clouds). Instead of building 1000s of lines of esoteric cloudformation yml, a few lines of higher level definition can deploy your app.

I've built quite a few lambda + API gateway based apps lately, a couple are open source. Want to replace your DDNS service for your home network? Use this app, which will cost you $0 a month (not including the cost of a domain name): [https://github.com/jmb12686/serverless- ddns](https://github.com/jmb12686/serverless-ddns)

</comment><comment><USER3> Am I missing something or is this now using the term "full stack" to describe... a particular stack?

<comment><AUTHOR> With "fullstack" I meant a Frontend together with a Backend... All with one CloudFormation stack :-)

<comment><USER3> ... but it's clearly a very specific "stack". It's a weird way to describe it is what I'm saying.

Developers call themselves "full stack" because they work on frontend and backend (let's not debate how valid it is in their case) - in this case I think you'd be better off just referencing the specific tech your tool will support provisioning for.

Full stack is essentially like if a classic "lamp" setup tool just said "sets up your server", and never specified what it sets it up for.

<comment><AUTHOR> Feel free to read the README.md of the repo, in my option it clearly described what gets deployed.

Interesting semantic discussion nevertheless.</comment></comment></comment></comment>


Clang 3.4 Release Notes - <AUTHOR> http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html

<comment><USER2> For anyone interested in LLVM/Clang you might like to know I've just started a weekly summary of developments.

Find the first issue here [http://llvmweekly.org/issue/1](http://llvmweekly.org/issue/1) and subscribe at [http://llvmweekly.org/](http://llvmweekly.org/)

<comment><USER3> Neat! But the RSS link is a 404.

<comment><USER2> Thanks for the report, fixed!

</comment></comment></comment><comment><USER4> This is the first release to ship clang-format, which is a really nice code formatting tool. Hooking it in as part of your source control is an easy way to ensure a basic level of code formatting compliance and reduce code review noise over formatting!

I'm pretty excited, and am going to look into using this release on my codebase at work soon!

</comment><comment><USER5> Interesting note--this release brings a front-end cl.exe replacement for Visual Studio:

[http://llvm.org/releases/3.4/tools/clang/docs/UsersManual.ht...](http://llvm.org/releases/3.4/tools/clang/docs/UsersManual.html#clang- cl)

</comment><comment><USER6> I am waiting for the concept-lite feature support but I don't know why Clang people don't even mention it. Am I missing something?</comment>