Warn HN: Using CCAvenue (India) for net-banking? You may be losing money - <AUTHOR>

(I don't know whether this is true for CCAvenue in other countries, but it will not hurt you to find out.)
I was analyzing the security of our startup's payment infrastructure when I found that CCAvenue is using a very poor error detecting code instead of a cryptographically secure hash to validate the payment from the bank.
As a merchant what this means to you is that even if CCAvenue[0] tells you that the payment is done, the money may never reach your account. Why? Because it is easy to forge a response from CCAvenue saying that the payment has been made.
There is nothing you can do to prevent this attack. To prevent these type of attacks, CCAvenue should switch to a better[2] hashing algorithm.
One thing you can do is to verify with your bank (after the fact) that you did indeed receive the money. But for many merchants like us, we would have already shipped the item to the customer before we even receive that data from our bank.
[0] May be CCAvenue is not the one telling you that the payment is done. But there is no way to find out.
[1] Better is a wrong word here. They are using a broken error detecting algorithm instead of a hash. <comment><USER2> _Because it is easy to forge a response from CCAvenue saying that the payment has been made_

The IP from which this response comes should be an indication? Not 100% secure, but a useful heuristic.

<comment><AUTHOR> The IP will be the same. See my response here: <http://hackerstreet.in/item?id=6737>

<comment><USER2> Ouch. That indeed sounds terribly insecure. It saddens me that any organization handling money (or any kind of user authentication) does it this way. It relies 100% on "client-side" security. Even 15 years ago these kinds of things were exploited.

I was thinking in terms of the Paypal API, they send an independent request from their server to your website.

</comment></comment></comment><comment><AUTHOR> Few more details here: <http://hackerstreet.in/item?id=6727>

<comment><USER3> This link seems to be broken. Could you pls check?

<comment><AUTHOR> It is working for me. I tried in Firefox4, Chrome11, IE7 and IE8.</comment></comment></comment>


How Google—and 104 Other Companies—Are Tracking Me on the Web - <AUTHOR> http://www.theatlantic.com/technology/archive/2012/02/im-being-followed-how-google-151-and-104-other-companies-151-are-tracking-me-on-the-web/253758/

<comment><USER2> My startup is in digital advertising (includes desktop, phones and tablets) space. And I know digital advertising is hated by users. There are three main reasons, online ads are obnoxious, obtrusive and invade end-user privacy. Lets step back and understand how come advertising was considered as glamorous and it turned into evil with digital medium.

Advertising for years operated on the "purchase funnel" concept [1][2]. Top end of the funnel is occupied by big brand advertisers whose goal is to create awareness for the brands/products. If you create enough awareness, end- consumers will eventually buy your products. Generally, brands/companies with millions of dollars in advertising operate at the top end of the funnel due to financial resources they have at their disposal. At the bottom of the funnel there are low end marketers whose sole goal is to find right customers and make immediate sale.

Other mediums like TV, Out of the home, Print (big magazines not newspapers) have top of the funnel advertisers pouring millions of dollars. Due to nature of the medium, you don't know who is watching/viewing your ad (targeting is very limited). So they engage in creating awareness and eventually prospective customers.

In digital medium, it's easy to track who is going to be end-user so low-end of the marketers came into play where you mostly get banner ads like deals, discount offers to make sale immediately.

Unfortunately, digital advertising ecosystem so far has built around low-end marketers as customers. Due to this advertising on digital sucks. Banners are terrible way to advertising for big brands who are not particularly interested in immediate sale. Result- we haven't seen big brands doing huge campaigns in digital arena. The share of digital advertising in overall advertising pie is very small.

To cater, low-end marketers we have crazy level of targeting and people feel violated when it comes to privacy.

Innovation (to address aforementioned problems) is happening in digital advertising, albeit at much slower pace. We are seeing new ways of advertising. Video is attracting bigger brands who are interested in creating awareness. There are some other interesting solutions popping up (we are building one, sorry for shameless plug) where by catering to different set of customers with different objectives we don't have to build user behaviors by doing crazy data mining. I'm optimistic, as big brands and top end of the funnel advertisers come into the play, we won't need crazy targeting and invasion of our privacy. Don't forget digital advertising in current state is utterly broken and everyone inside industry knows, we will definitely see much better solutions in next couple of years.

References: [1] Purchase Funnel - <http://en.wikipedia.org/wiki/Purchase_funnel> [2] Understanding the funnel: [http://sethgodin.typepad.com/seths_blog/2006/01/understandin...](http://sethgodin.typepad.com/seths_blog/2006/01/understanding_t.html)

</comment><comment><USER3> It's a lot more than 105 companies.

But I always hated the word tracking for them. They fall into many different categories. Some companies collect behavioral data, others personally identifiable information, others bring offline info online, some are seen across various sites but only because they are integrated in other services. So they aren't necessarily tracking you but partnering with one that is.

Also a lot of these are the backbone of ad:tech which powers the free services people use daily.

Now some of them are definitely not necessary and worthy of blocking, so really it comes down to what privacy means to you. Personally I'm fine with most, but many people are not.

Just remember the old overused phrase does stand true. If you're not paying for it, you are the product.

</comment><comment><USER4> Might I note that, as you read that article, The Atlantic itself is using similar advertising and likely has the majority of those 105 companies on its site? :D

Not blaming them, they need those ad dollars to keep their site running too!</comment>


Hackers in Perth? - <AUTHOR>

Any HN readers floating around in Perth, WA? I've just arrived, if anyone would like to meet up for a quick coffee let me know! <comment><USER2> There's not much going on here. Look on meetup.com for a few things that might interest you.</comment>


Ask HN: Do we need any more real-time collaboration tools? - <AUTHOR>

On Saturday, I enjoyed watching the live broadcast of YCombinator's 2013 Startup School.  For the first two talks I just watched, but then a tweet came across the stream below the video referencing a Google Doc containing notes on the talks (I'm sure many of you have seen it).
I collaborated on the document with ~6 people throughout the rest of the event, and we worked together with almost no friction.  There was a small amount of meta-discussion, but no outside communication and we put together a pretty detailed and well-formatted account of the event.
If Google Docs could get their shit together on inline images, it seems to me that it'd be a tool with relatively little left to improve upon.
TL;DR: I see new real-time document collaboration tools and features every day. Do we really need any more players in this space? <comment><USER2> there is infinite opportunity to reinvent the basics

</comment><comment><USER3> Answer: yes.</comment>


Details About Proxy.app V2 for Mac OS X - <AUTHOR> http://blog.websecurify.com/2015/07/proxyapp-v2-is-near.html

<comment><USER2> nice, I've been looking for a fiddler-like alternative for OSX. does it allow to compose requests as well?

<comment><AUTHOR> Not V1. V2 yes, it will.

<comment><USER2> awesome, thanks.</comment></comment></comment>


Glitch lays off roughly half of their staff - <AUTHOR> https://twitter.com/casseylottman/status/1263870866586251264 <comment><USER2> I'm not even sure how Glitch makes money. It's a useful free tool to spin up a server or full stack app quickly but I don't see anyone using it in production. It befalls a similar fate as CodeSandbox, but at least CSB can be used as an online editor similar to Microsoft's GitHub Workspaces.

<comment><AUTHOR> Making money in developer education is especially difficult. Especially if it isn't the specific core of what you are building. Surely there is plenty of education specific resources there, but it isn't as focused on it as Codecademy for example.

The last funding round closed in November 2018 at $30MM, which is a considerable sum - but it's been a year and a half since then and head count of 100-ish people does begin to accelerate the burn rate especially if the eyeballs and users haven't converted into paying customers.

</comment></comment><comment><USER3> Is that the former Fog Creek/FogBugz company?

<comment><AUTHOR> Yes - [https://medium.com/glitch/fog-creek-is-now- glitch-5a57dab604...](https://medium.com/glitch/fog-creek-is-now- glitch-5a57dab604e3)

</comment></comment><comment><USER4> I thought this was going to be about a bug.</comment>


Ask HN: Help me build better product by providing quick feedback - <AUTHOR> Greetings,
I am building a desktop app for developers to fight procrastination. Please help me with your valuable feedback(will take about 3 mins of your time).
The app lets you set your immediate goal with deadline and shows curated bite sized motivational content(<3 mins). And then the app goes in the background, it notifies the user once when deadline is near. You can checkout more about the app on landing page http://getmomentum.tk
I am looking for following answers to build product that can help others not just me 1. Do you think this app will help you motivate yourself and achieve goals within deadline?
2. What will be the most important aspect of app for you to try it out?
3. What features would you suggest to make this app work for you?
4. Any other feedback/feature request you want to share?
Thanks a lot in advance <comment><USER2> It looks like a cool app! 1) I can't say for sure that it would help me motivate myself, but it certainly cheers up. 2) I recommend avoiding long videos; GIFs, fun images, and quotes will be better

<comment><AUTHOR> @itsquiz, thanks for the heads up. Will add your feedback to the list. We are working on curating awesome content which should not take more than 3 mins at a time. Will enforce users to not spend more than 3 mins on our app each time. If you can also share any content sample that you want to see in app, that will help us curate much better. Thanks for the feedback.

</comment></comment><comment><AUTHOR> Please checkout the landing page for better understanding the product [http://getmomentum.tk/](http://getmomentum.tk/)</comment>


MateBook 13 Whisky Lake and Nvidia MX150 Ultraportable - <AUTHOR> https://consumer.huawei.com/cn/laptops/matebook-13/ <comment><AUTHOR> They almost got this perfect, except for no thunderbolt and 8GB ram...

I also prefer the Matebook X Pro design with the super slim bezel and webcam integrated into the keyboard.</comment>


Show HN: Sci-fi movie review site (side project) - <AUTHOR> http://scifireviewed.com/

<comment><USER2> Sites like these rise and fall on two things: the delivery of the content, and the quality of the content. The delivery here is top notch, I found it very easy to navigate and get the information I wanted. I know your community is small right now, but the quality of the reviews I have read is excellent. I added a few reviews of my own and I hope that the quality stays high as your community grows. Good luck!

<comment><AUTHOR> Thanks for the comments and reviews!

</comment></comment><comment><USER3> Can you allow sorting of movies by rating? That's what I'd need to use it as a discovery engine.

<comment><AUTHOR> This will be done later. The site is new and not many movies are rated yet. We don't plan to add critic ratings, only ratings by site members.

<comment><USER4> Even with a small number of movies not having sort by rating is annoying. I recommend you rush the feature in some form.

<comment><USER5> Agreed. It was the very first thing I looked for.

Even if there aren't enough ratings to be meaningful, seeing movies higher up or lower down than fans think they should be will encourage them to jump in and 'fix' things. :)

</comment></comment></comment></comment><comment><USER6> Nice site! The content shines through, so I immediately got excited. Two suggestions... On the movie detail page, please put the trailer above the fold. That's what I came for. As well, possible to include links to Netflix so I can stream/order it?

<comment><AUTHOR> Thanks for the suggestions. We'll add links to Netflix. Putting the trailer above the fold is something we can consider if many people will want that.

</comment></comment><comment><USER7> @kheruc I know it's a side project, but I own sfmdb.com - was going to use it for something totally different that will probably never happen now, but it's not a bad name for your site - happy to give it to you if interested?

<comment><USER8> :O You're just going to _give away_ a five-letter .com domain?

<comment><USER9> are they valuable?

<comment><USER2> Short domain names are hard to get on account of there being fewer possible combinations. Finding a short domain that meshes with your application is definitely valuable, since it is easier to remember and type. We can debate whether or not a five letter domain counts as short, but I'd say it's valuable to someone who wants to make money. Certainly a good deal at $0.

</comment></comment></comment></comment><comment><USER10> Would be awesome to have a site like this but for Sci-fi TV Shows.

Anyway I love the site, in particular the genre filter. It's been bookmarked. Good job!

Just one suggestion, I like watching trailers on the Apple site, so a link to that would be epic.

<comment><AUTHOR> Thanks for the suggestions, including sci-fi tv shows is also in plans. I'll look into adding links to apple site.

</comment></comment><comment><USER11> Should show ratings in the movie directory pages, instead of just on the movie details pages.

</comment><comment><USER12> How about taking votes on movies we'd like to see made?

[My entry: _Consider Phlebas_ ]

<comment><AUTHOR> Ha, this is already on the todo list! We plan to add best sci-fi books as well and it will be interesting to see which books visitors will most want to see made as movies.

</comment></comment><comment><USER13> Cool idea! Are you using IMDB API?

<comment><AUTHOR> Thanks! We're using TMDb API, but all data is manually checked for accuracy. For now we are focusing on quality sci-fi movies and there aren't too many of them :)

<comment><USER14> Nice! Keep 'em coming! :-)

</comment></comment></comment><comment><USER15> enders game?! had no idea this classic was coming :) Awesome site btw! Care to give any details on how you built it what stack?, I always find that part interesting :)

</comment><comment><USER16> I love it. It was exactly what I was looking for.

<comment><AUTHOR> Thanks! This is what I was looking for as well and I decided to build it :)

</comment></comment><comment><USER17> How did you build your search for this?

</comment><comment><USER18> No sort by rating?

This make the site utterly useless and pointless, the cool of review sites like this is see new good movies that you did not watch.

<comment><USER19> Not having a sort by feature does not seem like a show-stopper. Prioritising features is difficult, and getting a site out and seeing how users interact with it is crucial.

My reaction: The site's design is incredible. Navigation is intuitive and the information easy to read / digest. Great job!

Suggestion 1: I think the homepage could benefit from a mission statement. Perhaps a thin, elegant banner located beneath the search and above the 'Recently Premiered SciFi Movies' header.

Suggestion 2: Add 'Latest Reviews' to your main navigation.

Best of luck!</comment></comment>


SSL Week Means Less Weak SSL - <AUTHOR> https://blog.cloudflare.com/ssl-week-means-less-weak-ssl/

<comment><USER2> For people in London on Tuesday (24th Feb), DC4420 will have a talk about Superfish by Marc Rogers and Filippo Valsorda of Cloudflare

Details at [http://dc4420.org](http://dc4420.org)

<comment><USER3> Is the talk in the basement of The Phoenix? (and is there a bar in the basement or should I use the upstairs bar?) - I work nearby so this might be a good opportunity for attending my first talk

<comment><USER2> that's right, it's downstairs at the Phoenix. There's a bar down there.

</comment></comment></comment><comment><USER4> One thing I'm sad we didn't get to include this week is Tor specific improvements; we made a lot of those over the past couple months, but there's still more to do -- that's Q2.

Everything this week is HTTPS and TLS specific.

</comment><comment><USER4> We had all this planned for the past month, but "recent events" definitely make it timely.</comment>


Earth had a near-miss with 'city-killer' asteroid this morning - <AUTHOR> https://www.smh.com.au/national/earth-had-a-near-miss-with-city-killer-asteroid-this-morning-20190725-p52apn.html <comment><USER2> Whenever I read articles like this, a couple of questions come to mind. Cumulative probability of being struck by one of these things within next 10, 20, etc. years? What would we do if we did see one coming that was going to strike earth given 1 day, 1 week, 1 month, etc. lead time?

</comment><comment><USER3> A little over 10 Earth radii. That is very close for something this size, compared to other near misses trumpeted as "close".

<comment><USER4> Scaringly close. 70,000 km is only 11 times the radius of the earth.

That means a rock that size thrown at random that does get that close or closer to earth has a probability of a collision course with earth of about 1 in 11² ~= 0.8%.

Being on collision course doesn't imply it will impact, as it may explode in the atmosphere (probability? I wouldn't know) or bounce of it (probability effectively zero, I would say/guess)

<comment><USER5> TIL: Meteors don't just _burn up_ in Earth's atmosphere. Some explode.

[https://physics.stackexchange.com/questions/76045/why-do- met...](https://physics.stackexchange.com/questions/76045/why-do-meteors- explode)

</comment></comment></comment><comment><USER6> I find this report raises my hopes for Giant Meteor 2020. For this asteroid we had a couple days notice, perhaps it would be nicer if we get can get early confirmation for a 2020 run.</comment>


Hypothesis: Music Lets Us Practice Feeling Strong Emotions - <AUTHOR> https://whatismusic.info/blog/HypothesisMusicLetsUsPracticeHavingStrongEmotions.html <comment><USER2> This assumes that an appreciation of music is specifically selected for, which seems far-fetched to me. I see music in the same way that I see other arts an humanities where the appreciation is a by-product of other selected traits, such as language acquisition and production, pattern finding, etc. I believe there has been some research to suggest that music can be composed for other animals, matching their hearing abilities, communication sounds and the like. This is contrary to "we evolved music specifically." Music may allow us to practice strong emotions, but so may painting, story, games, pornography, and cooking. That's a far cry from saying we evolved the ability for cubism and abstract expressionism in order to practice feeling emotions. You can say we can practice feeling strong emotions through art, therefor art. But it's hard to posit the inverse of that sentence.</comment>


Ask HN: Where's the best place to work remotely? - <AUTHOR> It was nice taking a break for the holidays - but now that I'm slogging back to working remotely, I'm trying to think of new places where I can work.  Does anybody have any thoughts or recommendations?
I've been doing the public library, but I feel a little guilty about making it my workplace, day after day.  There's some nearby coffee shops, but sometimes it's hard to find a comfy chair there.  A few local restaurants offer wifi -- even the nearest Subway sandwiches -- but there's only one restaurant that's gone out of their way to say "Stay as long as you like!"  My girlfriend suggested the library at the local community college (though I think I'd feel guilty unless I'd signed up for a class).  I'm surprised there's not more free co-working Meetups (on Meetup.com).  Maybe I should make my phone into a mobile hotspot and then just work in the park?
Anyways, I'm looking for suggestions.  When you've been working remotely, what were the best places?   (And how do you find them?) <comment><USER2> Im having the same challenges. In my case working from home not by choice, and will likely continue to be remote for a few more months.

Its not too bad when the kids are at school, but my biggest challenge is to convince my wife that 'I'm working'

I keep telling her 'No, I cannot watch the baby or run errands' because I need to focus on what I'm doing. She tells me she understands ,but after a few days it starts again.

I've done Coffee shops and libraries and I like working in that setting, my two main concerns are

\- Meeting/Phone calls ( I dont want to disturb others)

\- Physical Security ( too much of a hassle to take my laptop with me to the bathroom, and no proper anchor point)

If I don't have any more meetings for the day, I will just go and work from the Library/Coffee shop.

I've seen other guys working from coffee shops, that somehow take phone calls and attend meetings ,and I can barely hear them. If I ever master that skill "speaking quietly, yet clearly without actually whispering" it would make a big difference in my life.

<comment><USER3> > I've seen other guys working from coffee shops, that somehow take phone > calls and attend meetings ,and I can barely hear them. If I ever master that > skill "speaking quietly, yet clearly without actually whispering" it would > make a big difference in my life.

First step is to get a good mic.

<comment><USER4> If you missed Krisp.ai, check it out.

[https://news.ycombinator.com/item?id=18460726](https://news.ycombinator.com/item?id=18460726)

[https://krisp.ai/index.html](https://krisp.ai/index.html)

</comment></comment></comment><comment><USER5> I've worked from my house for roughly 10 years and I will be honest there are days when I question my own sanity. I have a wife and teenagers, so after around 3pm my day is useless, hence I work early or late, and I just expect 3-10pm to be crappy for work (which generally is totally fine). Currently I am working early mornings anyway, like 4am to 1pm or so.

There are also some days where my wife just has 0 respect for my office door and just keeps walking in interrupting me until she sees me look at her with that specific stay the fuck away, but remember I love you, look. Years of doing this has led to a balance but it takes time to get to, and some days it just doesn't work to be honest. If I know I have a critical day coming up, I always prep my family ahead of time, if it becomes one of those days midway through, I lock the door and tell them to give me time. They have figured this out and it works pretty good now without any friction or hurt feelings.

Outside of this, I also like to schedule and spend time at hot desk spaces some days and just go to a coffee shop or similar places other times. It helps to just have a different physical view some days IMO. I also will just sometimes leave the house without a destination and find a corner in a park or near the ocean and work, which anyplace near water is my personal heaven, so that usually lets me function and refocus some which is helpful.

I have done super critical conference calls from my truck when I am out or even from my back yard with just a quick finger for mute. Honestly sometimes I think this is better for me personally, because being outside and walking around almost helps me think clearer some days. I figured this out when I worked in the office actually, as I used to use walking (outside) meetings as a way to do 1-1's.

</comment><comment><USER6> I've been a digital nomad for about a decade and have worked from all sorts of spaces. What makes for an ideal workspace depends on the type of work you are doing and various other factors in your life. If your work involves a lot of interacting with clients, or handling sensitive information, public spaces like cafes, restaurants, etc. are not going to be a good fit. Trying to participate in a conference call with a barista in the background running the blender doesn't help support your professional image and billing rates. Personally, I work mostly from coworking spaces, or from the place where I'm staying (e.g. AirB or Hotel). It's really worth paying the money for a workspace where you can count on having consistent access to a quiet environment and not being interrupted.

</comment><comment><USER7> > I've been doing the public library, but I feel a little guilty about making > it my workplace, day after day.

Don't feel guilty. That's what your taxes pay for.

<comment><USER8> To add to this: if your library is a part of a system (as most are in the US), you could go a little farther to another one to get a change of scenery. Sometimes working in just another room from your usual work space will improve your clarity of thought immensely.

<comment><USER9> What do you do for monitors? I need 4 screens.

<comment><USER10> Really? People are plenty productive on a single monitor every day. I have no idea what you do or who you work for, but it seems like "need" might be a bit of an exaggeration.

<comment><USER9> I trade stocks so I need many charts open. Also another screen to code on. The issue is libraries don't have monitors in general so a single laptop screen is not ideal.

</comment></comment></comment></comment></comment><comment><USER11> No need to feel guilty about the library, serving the public in a variety of needs is what they are there for. That said, why not home? If there are specific reasons that home isn't a good or preferred locale, those reasons might help guide the suggestions you receive.

</comment><comment><USER12> Don't you have some co-working space around you? Usually you can rent a shared desk for a very little fee (something like 300$ month)

<comment><USER13> $300 per month strikes me as being quite steep for a shared desk.

<comment><USER9> This is why companies want remote workers. Cities like Toronto, where I am, an office is more than some of the employees salaries.

</comment></comment></comment><comment><USER14> When I was freelancing full-time, I rented some shared/temp office space. For $400 a month, I got an office with a locking door, a desk, chair, space to plug in multiple monitors, access to conference rooms, and a mailing address. The place I rented was a ten minute walk from where I lived, so I got the best of all worlds.

</comment><comment><USER15> I love working remotely from a home office in some sunny spots of the Mediterranean. If you choose well, you can find cheap places with great weather all year round, quality food and very good services (including healthcare).

For me nothing beats a quiet home office as I need to do really deep work in probability & logic.

</comment><comment><USER16> A coworker and I sometimes work remotely from the local community college library, since they have private rooms that you can grab. You shouldn't feel guilty -- that's what it's there for after all. (You should feel guilty if you go on there and talk on the phone all the time though).

</comment><comment><USER17> University libraries are usually pretty great if you can find one that permits non-student access - depending on your city they may have better internet than the public library.

If you can find coffee shops that are inside business parks or college campuses, those too usually have great internet and plenty of outlets. Employees at those kinds of locations are also unlikely to bat an eye at you camping out for half the day while you work.

But yeah, for me its a circuit of home, coffee shops, and libraries.

If you're working full time, or have a long-term contract, I'd recommend at least trying a co-working space. It seems silly to pay 300 bucks for a desk, but it can be nice if you 're working steadily and can afford it.

</comment><comment><USER13> Anyone rent dedicated office space? By that I mean 4 walls and a door that you can close. I was thinking that if I ever get back into full-time remote work I might try to find something like 100 sq. feet to rent.

<comment><USER18> I'm renting a private office space where I do my work as a remote contractor. It's glorious; it's also my firm's biggest expense, but hey, life quality.

For various reasons I'll be terminating the lease soon. Instead I'll spend money on renting a bigger apartment—one with a room dedicated as an office.

Four walls and a door is the only way to work as far as I'm concerned. Stable internet, my own printer, silence, comfort, etc.

<comment><USER19> I did the same thing – I had an private cabin in a co-working space for some time and then moved out to a larger apartment with a dedicated office room. It's been working pretty well so far, although I have make sure I go out for workout and some tea every day to prevent myself from going insane.

</comment></comment></comment><comment><USER20> My big advantage of being remote is zero commute (used to do 5 to 6 hours of commute per day). I have a dedicated room at home and I would not trade that for some office space I had to drive to without some compelling and temporary reason.

Occasionally, the sounds of the house interfer, but I can either drown it out with white noise or ask those making the noise to stop. My wife and kids are very good at respecting my workspace.

</comment><comment><USER21> Please, do not be those people who squat all the seats in coffee houses.

</comment><comment> gamma-male Hotel lobbies, cafes, other people's places in other countries.

</comment><comment><USER22> For me definitely not home, as I get depressed 2 days in. Strangely, I rarely leave home on weekends. For me, libraries is the best.

</comment><comment><USER23> at home</comment>


Greater than 50% chance of failure; kickstarted easily - <AUTHOR> http://www.kickstarter.com/projects/sparse/sparse-bicycle-lights

<comment><AUTHOR> OK, so this is kind of old, and the prototypes look really cool, and the product name is cool. Apparently one can be a professional product designer or even a professor of product design without understanding basic probability. They identify 4 separate failure modes, and estimate probabilities of 15%, 20%, 25%, and 5%. By my math, if these failure modes are independent, this is a 51.55% chance of overall product failure.

I suspect they overestimated the probabilities of each of these scenarios, except for the 5% "acts of god" estimate.</comment>


Google, it's time – We want Scala for Android - phatak-dev http://blog.madhukaraphatak.com/scala-for-android/ <comment><AUTHOR> Um, people have already been able to use Scala to make Android applications. Just about anything that doesn't require dynamically generated JVM bytecode can manage, difficult and error-prone as it is.

If we're talking about official support, then I'd rather Java 8 instead. And beefing up ART even more.

<comment><USER2> Technically speaking, Android doesn't fully support Java 6. It's only a partial implementation of Java, since Java is overweight. The Android team has been adding requested features to the SDK in piecemeal form.

With that said, you can already get Java 8 lambdas in Android using the retrolambda project.

[http://zserge.com/blog/android-lambda.html](http://zserge.com/blog/android- lambda.html)

<comment><USER3> How does this work with a jar which contains classes using java8 features? Will it work in this situation or is it only for classes to be compiled? Can retrolambda be applied in other situations to keep the java version at 6 but use java 8 features?

</comment></comment></comment><comment><USER4> Who's "we"? How about we ask Google to focus on things the vast majority of Android developers actually want? Java 7/8 comes to mind. Even if we're looking for just an alternative Android dev language Scala probably wouldn't even be in the top 10.

<comment><USER5> What matrix are you using where Scala wouldn't make it in top 10? I would bet it would be one of the top choices.

<comment><USER6> All the various language surveys that have come up these past months (RedMonk, TIOBE, job boards, github popularity, etc...) put Scala in a distant #30-50 slot. Certainly not in the top 90% mainstream languages.

<comment><USER7> Number 14 on Redmonk.

[http://redmonk.com/sogrady/2014/06/13/language- rankings-6-14...](http://redmonk.com/sogrady/2014/06/13/language- rankings-6-14/)

"The next JVM language to learn" (Java-focused survey): Scala leads comfotably with 47%.

[http://zeroturnaround.com/rebellabs/interview-with- typesafe-...](http://zeroturnaround.com/rebellabs/interview-with- typesafe-4-answers-about-the-past-present-and-future-of-scala-development/)

Apart from that, you are completely missing the context. People are not looking for a random language, but for a language which is compatible with Java and Android, allows gradual migration and protects existing investment.

Scala is the top-contender here.

<comment><USER6> "Next language to learn" is the kind of metric you'd use if you don't have real numbers to your advantage. TIOBE lists Scala at 0.03% mind share, and you'll get similar numbers if you look at other metrics (see my post above).

For Android, there are already more projects written in Kotlin and Clojure on Android than on Scala, so not sure why you think Scala is the "top contender".

On top of that, Scala's upcoming adoption of Java 8 means that Scala on Android is effectively dead for several years, until the Android team decides to adopt Java 8 (since they're not even on Java 7, this might be a while).

Typesafe just doesn't care about Android, why would you take such a risk to pick a language that is so poorly supported?

<comment><USER7> You are really getting a bit desperate ...

</comment></comment></comment></comment></comment></comment><comment><USER8> I agree that Google should add more languages to android. And while Scala is a great language, it's very complex - so it won't benefit many of the less skilled users.

A better language would be something with the simplicity and power of python, but with good performance.Groovy could be one such language.

<comment> phatak-dev Scala is not complex in terms of the language design. Most of features [or complexity] come from the libraries.

<comment><USER9> Implicits? Compared to Java, Scala is not a simple language. I'd say Scala's complexity is on the order of Haskell + Java syntax with additional glue on top of that.

Not to say this is bad, it just means you need greater discipline when writing software in Scala. A bit like C++ (yes, I went there! :-)).

<comment><USER7> The great thing is that as soon as people mention C++, it's immediately clear that this person has not a single clue what he/she is talking about.

</comment></comment></comment></comment><comment><USER2> Why not Kotlin? It's more like a modernized Java. It's closer to what Android developers are used to and it already supports Android. It interoperates well with existing Java code in your Android app.

Also, it has excellent IDE support, since JetBrains is behind it.

[http://kotlinlang.org/](http://kotlinlang.org/)

<comment><USER10> It's less mature than Scala; it has a smaller developer base or library ecosystem, and it is missing many Scala features (higher-kinded types, implicits). Most of Kotlin's features are already present in Java 8; if you're going to go to the trouble of supporting two languages, it seems perverse to pick Java and Kotlin when they're so similar.

<comment><USER11> If Google can't resolve their differences with Oracle Kotlin could be a way forward. Especially given the Android Studio connection.

</comment></comment></comment><comment><USER12> I'm not sure the author understands why Java is the language in the first place - there is an army of developers who knows how to use Java. Yeah, it might not be the best language ever, but neither is C++ and neither is Scala.

For what Google is doing their choices were basically C++ or Java, there is no other embedded, performant option that hits mass quantities of developers worldwide. Every other language is either too niche, or not performant enough, or doesn't have the features you would want. Sure, I guess they could have done C#, but I'm pretty sure Google hates Microsoft, so that's not going to happen.

iOS only has Objective-C because of NextStep and OS X. Otherwise, it could very easily have had C++ or Java. Blackberry ended up with C++ for their native toolkit.

Has there been a significant mobile platform that wasn't C++ or Java that doesn't have some historical reason like Obj-C has behind it?

<comment> wes-exp I think WebOS was going to use JavaScript.

The thing about Java and C++ is that they themselves are around for historical reasons. Far better languages have already been proven out. But, it will take a major industry player to move the masses forward on this. Apple's Swift effort gives hope on this.

<comment><USER13> > Far better languages have already been proven out

For what they do, C and C++ don't really have serious challengers yet, not that there aren't some promising contenders.

<comment> wes-exp When I say proven out, I don't mean in the sense of being widely used; I mean academically. In other words, I am trying to say that it's not a research problem, it's a problem of, say, engineering and marketing to bring it to reality. Cool language features are well established in academia (but tend not to go anywhere due to entrenchment and industry complacency – in that sense I would agree that they aren't 'proven').

<comment><USER14> If Google says "This is the second official lanuage for Android" I bet any adoption issues would go away a la Swift.

<comment><USER12> Google would need to do this internally. Good luck convincing the 10,000 developers inside of Google stop using Java. Sure, they aren't all on Android, and there are plenty of people using Go, or Dart, or Python, but moving a company culture that large away from Java doesn't happen overnight.

Obj-C to Swift won't happen overnight at Apple either, but it is much more likely to happen because they've been gradually working towards it for years now with LLVM and such.

</comment></comment></comment></comment></comment></comment><comment><USER15> Please not scala! I prefer to have clojure for android. Scala is too complex, to ugly, and tries todo too much. Its also to heavy for android (it needs tons of libs to run).

<comment><USER16> Clojure would be too large a leap syntax-wise I think. Scala at the very least gives you both FP and OOP in the same language.

<comment><USER17> Perhaps, but some people have built pretty amazing abstractions in Clojure. I just found this tutorial, and was quite impressed:

[https://github.com/krisc/events/blob/master/tutorial.md](https://github.com/krisc/events/blob/master/tutorial.md)

<comment> phatak-dev Similar abstractions implemented in Scala [http://macroid.github.io/tutorial/BuildingLayouts.html](http://macroid.github.io/tutorial/BuildingLayouts.html)

</comment></comment></comment></comment><comment><USER18> Over the last few months I've been writing Scala full time, and have even written some (demo grade) Android apps in it. My opinion is: Android should _not_ adopt Scala as one of its primary languages.

I think a platform's primary language should be accessible. It is an unfortunate fact that the stuff that most people only know about programming using some object oriented imperative language. People find it harder to hobby with unfamiliar styles, and it is hard to find leverage within your organization to go into unknown territory. If it isn't a popular widely known language (Java) it should at least _resemble_ popular widely known languages (Swift). Give people a piece of Java or Swift code, and they can read it. Give people a piece of Scala code, and they usually cannot.

Scala _can_ be an accessible language; its imperative syntax is really nice. But Scala _is not_ an accessible language in that idiomatic real-world Scala and most of its libraries are written in a wholly unfamiliar style. Powerful, yes. People should learn it, yes. But if Scala comes to Android it will only serve to make the platform seem _less_ accessible. And that's a much bigger downside than whatever expressivity Android Java currently lacks.

Scala can't even properly be a primary language in _parallel_ to Java at the moment. Swift is just a better syntax for expressing idiomatic Objective C programs. Good Swift programs should look mostly like good Objective C programs with a different syntax - Swift has been made for this purpose [1]. Scala is _not_ a better syntax for expressing idiomatic Java programs. Despite backwards compatibility, good Scala programs look very different to good Java programs. This means that Google cannot present them as equivalents. The Android platform APIs heavily promotes mutability which makes writing idiomatic Scala code for Android a pain in the ass. Should Google ask people to write non-idiomatic code for their new primary language, or should Google provide new APIs for their new primary language?

I dislike Java very much. But I think it's a great language for Android, because everyone can do it and that makes the platform accessible. There's only one other language I can even remotely imagine in its place, and that's Dart. And that's not happening either.

In the meantime, making Scala run on Android is perfectly doable. That is good enough for me.

[1]: I'm aware that this comparison doesn't do Swift as much justice as it should.

<comment><USER10> The advantages of immutability are real. At some point an improvement has to be a change. Even if Google sticks with Java-only, I would very much hope they will offer a more immutability-friendly API in parallel with the existing one.

Certain Scala libraries are indeed not accessible. But the trend is in the right direction (there are better alternatives to requests now, and even scalaz has become less symbolic in recent releases). If Google were to provide the same APIs and sample programs that they currently do, those programs would be as accessible as they currently are - probably more so, given Scala's cleaner syntax. You say this could make Android less accessible. Maybe. But it could also make Scala more accessible, providing a whole new class of developers with a stepping-stone from somewhere very familiar towards these valuable high-level features.

As the Python folks say, a good language should make easy things easy and hard things possible. IMO Scala does both halves better than Java. It's just that so far, people have mostly been using it for hard things.

<comment><USER18> Google should do something about their APIs, sure. But they should do something about their APIs _before_ doing something about their language.

The problem with Scala is not symbols or legibility (although that used to be a major problem), but the fact that its programming style tends to be mostly functional. Monads, for-sugar, implicits, immutability: stuff everyone should master but in practice very few do.

> You say this could make Android less accessible. Maybe. But it could also > make Scala more accessible, providing a whole new class of developers with a > stepping-stone from somewhere very familiar towards these valuable high- > level features.

The Android developers unfortunately have no interest in making Scala more accessible. They have an interest in making Android more accessible. They would have to make a lot of sacrifices to make Scala a primary language for Android, and the benefits would be rather small from their perspective.

Scala's killer apps are on the server side. That seems to be going quite well so far.

<comment><USER10> > The Android developers unfortunately have no interest in making Scala more > accessible. They have an interest in making Android more accessible. They > would have to make a lot of sacrifices to make Scala a primary language for > Android, and the benefits would be rather small from their perspective.

Accessible is one thing, but not the only thing that matters, particularly as the platform matures. If using Scala makes developers more productive, or leads them to write less buggy code, that could be a huge advantage for Android.

<comment><USER18> If Scala makes developers more productive and code less buggy at all, it will only do so for _some_ developers. Look at the investments required: APIs need rewriting, apps need rewriting for the new APIs, people need to be trained within Google, people need to be trained for it outside of the workplace, and other people will still look at Scala code and stay behind confused.

And you need to do that for what? Because Java is too verbose? I hate (real- world) Java as much as the next guy but I don't have any illusions on this because the argument just doesn't add up and the effort doesn't seem worth it by a big margin. It would be much more feasible if Google would release an improved Android APIv2 with stronger immutability, first-class support for Java 8 and its features (lambdas, Optionals) and no 64k DEX limit. That would be a _huge_ improvement for both Java and Scala Android devleopers, and it would also be _feasible_.

</comment></comment></comment></comment></comment><comment><USER19> I want Python for Android.

Ideally, it would compile to Dalvik/ART or ARM. It would use something like PySonar to infer types or use annotations to be able to use native types when possible (for speed & correctness). When the type isn't given or can't be deduced, it would fallback to boxed objects (like Nuitka does, in the way the offically C-Python keeps its objects in memory).

But that is not neccessary, all that is needed is a decent wrapper to the Android API for Python, and some packaging support. It is now already possible to compile Python for Android to include it in your app. What I'd like to be able to do is to write the whole thing in Python (+ a GUI design tool maybe).

I already see some people saying, that's not possible, because an interpreted language uses too much resources (CPU, memory, esp. battery) for mobile. Well, 90% of the apps I use are not computationally expensive. The consume battery mainly via network access, and via the screen, both of which is independent of the language or runtime used. And when they are doing something computationally intensive, it is usually the layout and drawing of the GUI - most of which is done by the native framework anyway. Most apps are literally just fancy listboxes and details pages, with a database and a web backend. (The great exception are games, of course.) For these apps, a rapid development language like Python (or Javascript, or heck, a new VB) would be great, ideally augmented by good tooling. And if you have something CPU intensive (map routing, image processing, complex translation etc.), you'll just write it in a C library anyway.

<comment><USER20> [http://kivy.org/](http://kivy.org/)

Best you'll get, and quite good.

</comment></comment><comment><USER21> It is not going to happen.

Google IO 2014, Android development fireside:

[https://www.google.com/events/io/schedule/session/85311b0e-7...](https://www.google.com/events/io/schedule/session/85311b0e-70ca-e311-b297-00155d5066d7)

The answer to this request is "Java is the _official_ Android development language".

<comment> phatak-dev Direct link to the question [https://www.youtube.com/watch?v=K3meJyiYWFw#t=1566](https://www.youtube.com/watch?v=K3meJyiYWFw#t=1566)

<comment><USER22> That wasn't linked correctly.

</comment></comment></comment><comment><USER3> I would be happy with Java 7/8.

<comment><USER23> I bet if Google asked Oracle nicely, it could happen :-)

</comment></comment><comment><USER24> Why do people think that Swift has a managed runtime with garbage collection? It has reference counting, it's compiled into native code. It has a small runtime lib. linked into the executable (but hey, even C executables have it).

<comment><USER21> The younger generations grew with VM based implementations, never learned the memory safe system programming languages that lost the market to C and C++ and lack compiler design understanding.

As such, any language they see announced as safer than C and C++ must be VM based.

</comment></comment><comment><USER25> If they're not even giving us Dart or Go for Android (their own languages), what is the probability they will give us _official_ support for Scala? Yes, Scala runs on the JVM, and the former two don't. And yes, Go is not really designed as an end-user GUI application building language. But Dart has a nice VM of its own and is designed for client-side apps. I would like to see Dart on Android and the original author is definitely confused when he calls Dart and Go "niche" languages (as a way of dismissing them) and somehow doesn't feel the same way about Scala. Scala might be marginally more popular than Go/Dart but it's not an order of magnitude. In fact, according to the latest Tiobe index (a terrible metric in my opinion, but one indicator) Go is more popular than Scala by one place.

<comment> phatak-dev Original author here

I don't mean disrespect when I say niche. I just mean in terms of community, Scala seems to more diversified as it gets used in variety of fields compared to Dart and Go. This is just view of mine.

</comment></comment><comment><USER6> The problem is that Scala generates very big jar files, which is why the only couple of Scala Android applications I've ever seen are toy apps. There is no doubt that any more sizeable project will blow up Dalvik's various restrictions like is already happening with Scala apps without ProGuard.

There's also the fact that Typesafe doesn't care about Android so even if your current app works on Android, a future version of the compiler might make it blow up on the phone after you recompile it.

Unfortunately, the Ceylon team doesn't seem to be interested in supporting Android either.

Which leaves Kotlin, as a reasonable option for non-Java development on Android.

At any rate, don't expect any help from Google about Scala, they're not even supporting their own non-Java languages there (Go, Dart).

<comment><USER7> > The problem is that Scala generates very big jar files, which is why the > only couple of Scala Android applications I've ever seen are toy apps.

Yes, it's the same problem why compiling Scala to JavaScript is impossible ... oh wait!

In both cases the standard library overhead is a few dozens of kB! The horror!

That's why nobody is using Scala.js or Scala-on-Android for anything serious ... oh wait!

That's already happening.

<comment><USER6> That's three strawmen in a row, none of them coming remotely close to addressing the point I made above.

The web (scala-internals, scala-users, stackoverflow) is filled with threads of people trying to run their Scala code on Android and being mystified by fatal errors from Dalvik or DEX generation simply dying on them.

<comment><USER26> Maybe this could change if Google helped, don't you think?

<comment><USER6> Of course, but it's obvious they have zero desire to help support Scala on Android. First because they don't use Scala at all internally and second because even the languages that they created (Go, Dart) are not supported on Android. If Android ever officially supports a language other than Java, you can bet it will be one of these two.

<comment><USER26> By the way it seems that Dart is struggling to get any support at all within Google. Also, it's not statically typed and bringing it to the Android runtime might be much more effort. In short no, I wouldn't bet Go or Dart will be the solution, not unless these languages change a whole lot.

</comment></comment></comment></comment></comment></comment><comment><USER27> The article reeks of ignorance. Swift doesn't really have GC (but ARC) - [https://www.google.com/webhp?sourceid=chrome- instant&rlz=1C5...](https://www.google.com/webhp?sourceid=chrome- instant&rlz=1C5CHFA_enUS504US504&ion=1&espv=2&ie=UTF-8#q=apple%20swift%20uses%20arc). It also takes an unnecessary dig at nodejs. Has the author ever written node.js production code? What bugs has the author found and filed?

I am sure most android devs rather have a major ramp up of the Android APIs rather than switching the programming language. The real problem with Android is the ungainly APIs and how very cumbersome it is to develop anything reasonable.

<comment><USER28> Adding more complexity to scala is its dependency on ASM for class file creation [1] and more refined performance options like tail-recursion [2] are implemented in a contrived fashion to make scala actually port to a non- standard JVM like dalvik .However if things were to change from ground-up like ARM actually made easy for functional programming.

These facts actually can make porting a performance application to scala quite a job!

[1]: [http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded...](http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2012Q2/GenASM.pdf) [2]: [http://blog.richdougherty.com/2009/04/tail-calls-tailrec- and...](http://blog.richdougherty.com/2009/04/tail-calls-tailrec-and- trampolines.html)

</comment></comment><comment><USER29> Can we have a good Lisp for Android already?

<comment><USER30> Clojure sorta runs on it. It has various issues, but is usable. It's nice having a repl into your phone.

<comment><USER31> There's also a commercial ($200) Common Lisp implementation that targets Android (and iOS): [https://wukix.com/mocl](https://wukix.com/mocl)

Somewhat different setup though. Instead of a Java-replacement language on top of a JVM, I believe it's compiling to native code. The intention seems to be to target "logic-heavy" apps where a smaller portion of the code is UI. You still write the UI in each platform's "normal" way (Java on Android, Obj-C on iOS), but call out to Lisp for the real work. I'm not 100% sure on this part, but I believe that's done on Android via the NDK route, not Dalvik/ART. No idea what happens on iOS.

</comment></comment></comment><comment><USER32> You can use Scala for Android right now, as people are pointing out. However, it feels like a "second-class citizen" because the Android JVM has been optimized for enterprisey, Java-style coding with fewer, longer-lived objects than functional programming usually demands.

At a guess, I'd say that with Java 8+ they'd have to fix that. Probably why they said "no comment" as pjmlp pointed out ([https://news.ycombinator.com/item?id=8192614](https://news.ycombinator.com/item?id=8192614)).

</comment><comment><USER33> Theres a different between "supports writing your own code in that language" and "the platform APIs are in a language".

In theory, it should be possible to write code on the Android platform using any JVM language. Groovy, Scala, Clojure, Kotlin, etc. There are hiccups to that right now but you can hack your way to it generally.

But Android's APIs are going to stay in Java. That is a lot different than Apple's move to Swift, where the platform itself is moving to the new language.

</comment><comment><USER33> This has a lot more to do with refactoring the build system than anything else. The more the build system adheres to the Java Gradle plugin, the easier it is to use Scala or other JVM compatible languages. There is an open ticket for it, and supposedly Gradle 2.0 will make this possible.

[https://code.google.com/p/android/issues/detail?id=56232](https://code.google.com/p/android/issues/detail?id=56232)

</comment><comment><USER34> Swift doesn't have a GC from what I know it has automatic reference counting. It's not really the same thing.

It's on compile time and not at run time. It injects release/retain calls between acquiring ownership and relinquishing ownership.

I could be wrong but I don't think they added GC to Swift, as Objective-C (at least not on Mac OS) doesn't have it.

EDIT: They got rid of the GC on Mac OS as well. They use ARC there as well just like iOS.

<comment><USER35> Correct, Swift uses reference counting in just the same way Objective-C did.

</comment></comment><comment><USER36> 1\. Most of the threads like this are going to turn into I like this language so let's rewrite Android in that.

2\. Even if Google changes the primary development languages of Android where do you go to ask developers to port their Java libraries, technical bloggers to update their blogs with Scala code or change thousands of questions on SO.

Documentation/Q&A created around Java/Android is equally important.

</comment><comment><USER37> according to apple, swift uses ARC, not GC. [https://developer.apple.com/library/prerelease/mac/documenta...](https://developer.apple.com/library/prerelease/mac/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html)

How does Scala solve any of the problems with Java?

<comment><USER10> It unifies the type system, which gets one of the big headaches of Java out of the way.

It has a generics system that makes a lot more sense (allowing covariant/contravariant types, rather than forcing use-site variance everywhere).

Case classes are wonderful for making simple data classes easy to read (and write).

Honestly Scala is all about solving the pain points with Java, so just look at anything that's been written about it. [http://www.scala- lang.org/](http://www.scala-lang.org/)

<comment><USER37> right, all nice to have things.

Does it actually solve any real problems?

Does it fix GC performance? Does it fix API issues? Does it remove the need for JNI bindings to native code?

No?

<comment><USER10> Repetitive code is a real problem. Or do you think performance is the only thing that can ever qualify as a "real problem"?

Implicits make it much easier to deal with API issues.

</comment></comment></comment></comment><comment><USER38> No. Google its time, we want Go for Android.

<comment><USER39> It's being talked about [https://docs.google.com/document/d/1N3XyVkAP8nmWjASz8L_Ojjnj...](https://docs.google.com/document/d/1N3XyVkAP8nmWjASz8L_OjjnjVKxgeVBjIsTr5qIUcA4/mobilebasic?pli=1)

<comment><USER40> Yes, however there is a major caveat: "Providing a Go equivalent to the Android platform is intractable."

What is actually happening: "There is however, a subset of Android apps written against a much smaller C-based API surface provided in the Android NDK: Games. It is feasible to build Go support for Android providing the equivalent features found in the NDK."

Source: parent link ([https://docs.google.com/document/d/1N3XyVkAP8nmWjASz8L_Ojjnj...](https://docs.google.com/document/d/1N3XyVkAP8nmWjASz8L_OjjnjVKxgeVBjIsTr5qIUcA4/mobilebasic?pli=1))

</comment></comment></comment><comment><USER41> Knowing that Google and JetBrains have a good cooperation (Android Studio will replace Eclipse plugin as a preferred way to develop apps for Android), I kinda-sorta expected Kotlin to be backed from Google as an official Android language on the latest I/O.

</comment><comment><USER42> "As phones are getting faster memory is not an issue anymore." No, its not true. Memory is an issue. Android does not only run on premium devices but also economical devices.

</comment><comment><USER43> Um... why .. on .. earth.. scala. Make it stop.

</comment><comment><USER44> I think there are better selections than groovy to be the next language supported on Android.

</comment><comment><USER45> Make golang for Android and I'm yours.

<comment><USER46> Swift would be better.

<comment><USER47> Rust would be better.

<comment><USER48> No~Go is the best~ Too simple, and too powerful~

</comment></comment></comment></comment><comment><USER49> My bet is for golang.

<comment><USER50> Current design of Android makes any non-JVM language a rather illogical and problematic choice.

Writing JNI bridges for everything and reboxing costs would be prohibitive.

<comment><USER51> So what? I think with the arrival of ART, it's also not an impossible task anymore, in terms of compatibility. They just need a separate team to rewrite all the _existing_ API's in Go (and also catch-up with the _new_ ones by the time they finish this project). How much would that take for a team of 20 developers? I imagine not that long.

In theory, they could make ART allow for both the Java code and the Go code to work on Android, no? So we could have Google push new app development to Go, while they deprecate Java over the next 5 years (after Go support is out).

But to get developers to write Go, they also need a significant market share of Android L/ART-enabled devices, like over 50 percent, which will take 2-3 years to arrive there anyway. They can use this time gap to port Android APIs to Go, and when ART is on 50-70 percent of the devices, announce that developers can now write Android apps in Go, too (for Android L+ only).

They could announce it at the release of Android N (the one after M). By then Go 2.0 will probably be out, too, so they can support 2.0 on Android from the beginning, especially if they plan Go 2.0 to have some pretty major incompatibilities with 1.x. In the meantime, the Go team could also work on some "made for Android" features for Go 2.0, to make Go more optimized for Android. By then, they'd probably only have to support ARMv8, too (preferable, I think). So they can target only 64-bit ARMv8 hardware with Go (from what I hear Go works better with 64-bit hardware anyway).

I think Google can do this. They just need to plan it out. Three years is probably a reasonable time period for this.

</comment></comment></comment><comment><USER52> No

</comment><comment><USER53> Scala doesn't have very good type inference, dude...</comment>


6.184 - Zombies drink caffeinated 6.001 - <AUTHOR> http://web.mit.edu/alexmv/6.001/ <comment><USER3> There are a whole bunch of these IAP courses - <USER2> <http://stuff.mit.edu/iap/>.

Does anyone know if somebody is going to make videos of these? I couldn't see any mention of it on the site.

<comment><USER4> For this particular course, use these:

[http://groups.csail.mit.edu/mac/classes/6.001/abelson- sussma...](http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman- lectures/)

(These videos are also under a Creative Commons license and available on YouTube).

</comment></comment><comment><USER5> Seems like the "Caffeinated Crash Courses" is something I've been looking for for a while. Does anyone know if there are videos of these courses, or of similar fashion (Entire topic in <2 hrs) somewhere on the web?</comment>


Why Hasn't the World Been Destroyed in a Nuclear War Yet? - <AUTHOR> http://nautil.us/blog/why-hasnt-the-world-been-destroyed-in-a-nuclear-war-yet <comment><USER2> I think the only reason is luck really.

Stalin died shortly after the Soviet Union became a nuclear power. I read an interview of Beria's son explaining that Stalin was planning an all-out nuclear war. Given that killing a few dozen million people wasn't really a big deal to Stalin, there was a real risk he would have gone ahead.

McNamara in the excellent Fog of War also mentioned that Kennedy was extremely close to giving the order to bomb Cuba, I think he even mentioned that at one point the order had been signed, ready to go.

The Cold War is gone, but I think we have another danger. Drones and Robots have made it much cheaper for big powers to be more aggressive militarily. And the US is working actively on shields that could shoot down ICBMs. If the US can attack cheaply on the ground (as in with no US casualty) and not be deterred by a nuclear response, war is just bound to happen.

<comment><USER3> "Stalin was planning an all-out nuclear war"

It seems unlikely that Stalin would have planned a war which would have been so completely one-sided. The Soviets didn't really achieve any kind of parity with US strategic weapons until well into the 1970s.

Starting an "all out" war with the US with LeMay in command of SAC would have been national suicide - and the Soviets knew they were at a huge disadvantage. Stalin was lots of things but I don't think he could ever be accused of being stupid.

Edit: Mind you I suppose it was possible that the Soviets thought they could invade Western Europe and survive the inevitable US and UK attack - but the US would have been untouched in such a scenario which probably wouldn't be a good idea...

<comment><USER2> I think the point was rather that Stalin was happy to use nuclear weapons casually, as just another weapon in the arsenal.

We tend to forget that all sides in WW2 happily carpet bombed cities and civilians. Using nuclear weapons to achieve the same result more efficiently would have been only a logical evolution.

In a way we are lucky that nuclear weapons only arrived late in the game and that after the war all sides preferred a status quo.

<comment><USER4> During the Korean war Douglas MacArthur lobbied to use tactical nukes on the Chinese forces over the border.

</comment></comment></comment></comment><comment><USER5> I'm glad the author says "one starts to wonder if it really is plain dumb luck". Another way to answer the question:

> Why Hasn't the World Been Destroyed in a Nuclear War Yet?

Because in an alternative universe where there was a nuclear war, this has already happened, and there was no one left to ask the question. Or if there was, they certainly had better things to do.

See also: most questions and statements about real estate in 2007, or on Long Term Capital Management and their scientifically proven methods before their demise.

Survivorship bias is a PITA.

EDIT: Someone doesn't understand probability. Possible worlds is the only rigorous way of reasoning about counterfactuals.

<comment><USER6> The trouble with the alternate worlds (and the very similar quantum suicide) idea, is that there are lots of ways not to be killed by a nuclear war (even for the majority of the population). Why haven't we seen any of those paths?

<comment><USER7> _> there are lots of ways not to be killed by a nuclear war (even for the majority of the population)_

Not with modern thermonuclear weapons, there isn't. There's no hole you can dig deep enough to save you from one of those going off right next to you.

<comment><USER8> Most people wouldn't be right next to one going off, though.

Even at the peak of the cold war, pushing The Button wouldn't have killed everybody. Probably not even a majority of humanity. It would have been righteously apocalyptic, and wrecked a good chunk of civilization, and made all other wars before it look puny and laughable, but there would be plenty of survivors, especially outside the countries involved in the war.

<comment><USER7> The _bombs_ wouldn't have killed everybody, sure.

But the fallout, and the famines due to agricultural productivity collapse, and the reduced disease resistance due to malnutrition, and...

<comment><USER8> Certainly many more would die. But many more would live. There are lots of low-tech, poor farmers out there who wouldn't be _too_ affected.

<comment><USER7> As is probably obvious by now, I don't share your optimism on that score. Even peasants using Stone Age farming techniques would be affected if a radioactive dust cloud blows over their fields, or if soot thrown into the atmosphere causes a nuclear winter ([https://en.wikipedia.org/wiki/Nuclear_winter](https://en.wikipedia.org/wiki/Nuclear_winter)) that prevents their crops from getting the sunlight they need to grow. Livestock can unknowingly eat contaminated feed or water and produce contaminated meat and milk. Diseases that run rampant through the weakened immune systems of populations closer to the blasts can mutate more quickly into strains that threaten anyone. Etc. So even if you're on the other side of the world when the bombs fall, peacefully farming with a stone plow, there's lots of ways those bombs can ruin your day too.

There's a great novel from the '80s called _Warday_ ([https://en.wikipedia.org/wiki/Warday](https://en.wikipedia.org/wiki/Warday)) that explores these themes in more detail. It's set in the aftermath of a "limited" nuclear war -- limited meaning, in the case of the US, that the only targets struck by Russian missiles are New York City, San Antonio, and the Midwestern missile fields. (Some of the missiles aimed at New York even miss, exploding out at sea.) Most Americans never see a mushroom cloud and come through the one-day war without a scratch. But the nuclear exchange, "limited" as it is, sets off a chain of ecological and technological consequences that after five years have killed many more people than the bombs did.

<comment><USER8> I'm a big fan of that book. Not only is it really well written, but as far as I can tell it's pretty accurate as well.

The reason for my "optimism" (if you can call it that... everything is relative, I suppose) is that it gets harder and harder to kill people as the numbers increase. Maybe some disease arises which replicates the Spanish Flu or Black Death, and among a weakened population it kills off 50% of them. Well, you still have 50% left. As the population declines and civilization collapses, diseases will have a much harder time spreading, so it becomes self-limiting. Contamination will _mostly_ not affect your day-to-day life outside of certain areas. It'll definitely affect your ability to die of old age, and have healthy children, but people as a whole will survive.

I imagine there would not be a particularly large number of survivors in the US after an all-out nuclear strike. But people in places like South America wouldn't be affected all that greatly aside from the instantaneous collapse of global trade and communications.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Simple really. Rational nations led by rational leaders have had access to nuclear weapons. Both sides had one goal, to live, which means never really wanting to use them

the danger this day and age is that are some very irrational powers, possibly including leaders and the countries they represent, that, well, don't think the same.

Even India and Pakistan get along because neither side is governed by fanatical leadership. Likely the real danger comes from one of the more intolerant sects of Islam

<comment><USER10> I wonder, why are nuclear weapons so hard to build? is it possible that in a near future an average terrorist is able to build one?

<comment><USER11> They are hard to build because once the chain raction starts in the nuclear material, the resulting reaction tends to break up and disperse the nuclear material before the chain reaction progresses very far. It's called a fizzle. Fission bombs are designed with a wrap-around concave shaped charge of conventional explosive around the nuclear material. This is detonated as the critical mass of nuclear material is slammed together, and the compression wave from the conventional explosion holds the fissioning mass of nuclear material together long enough for the chain reaction explosion to complete. The engineering for this and the precise timing and controll of the detonation sequence is extremely hard.

<comment><USER12> My understanding is that the engineering for this can be done by someone who has studied the stuff, and uses publicly available materials. He or she does need to be competent but does not need to be Einstein. See John Aristotle Phillips. [0]

The main challenge is simply the industrial process required to collect the fissionable material. That is why Iranians have centrifuges and why Stuxnet attacked those centrifuges. [1]

[0] [http://en.wikipedia.org/wiki/John_Aristotle_Phillips](http://en.wikipedia.org/wiki/John_Aristotle_Phillips)

[1] [http://en.wikipedia.org/wiki/Stuxnet](http://en.wikipedia.org/wiki/Stuxnet)

<comment><USER13> For a fission bomb yes, not s fusion (thermonuclear/hydrogen) bomb.

Fire bombing can (and has done) more damage to a city than a fission bomb.

<comment><USER14> But a terrorist can't fire bomb a city, but they can potentially build a fusion bomb.

<comment><USER12> A terrorist can't really build a fusion bomb, because you need a government to support the infrastructure. But the fear is not entirely unjustified because a government would be able to give the bomb to a terrorist who then uses it. Or perhaps a government employee might steal it (for bribes) and give to a terrorist. So I can imagine terrorist having a small fission bomb. But I cannot imagine an arrangement where a terrorist would acquire a fleet of B-29's that could be used to fire-bomb a city.

<comment><USER14> To build it from scratch yes, it's possible to build a primitive bomb from stolen refined plutonium. After the collapse of the soviet union, a lot of it went missing and there a dozen cases of people getting caught trying to sell it on the black market (and those are just the people that've been caught.)

Mass arson is possible, though not on the scale of firebombing. The US in WWII developed the idea of strapping incendiary bombs on bats and releasing them in a city, where they would roost in random buildings and start hundreds of small fires.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER15> In the book "The Stragegy of Conflict" Thomas Schelling proposes accidental launches as a form of "randomised threats" which let you position yourself in between "I certainly won't launch" (not a threat) and "I certainly will launch" (not a credible threat, as not rational due to MAD)

A Washington Post article [1] describes it like so:

 _So you 're standing at the edge of a cliff, chained by the ankle to someone else. You'll be released, and one of you will get a large prize, as soon as the other gives in. How do you persuade the other guy to give in, when the only method at your disposal -- threatening to push him off the cliff -- would doom you both?

Answer: You start dancing, closer and closer to the edge. That way, you don't have to convince him that you would do something totally irrational: plunge him and yourself off the cliff. You just have to convince him that you are prepared to take a higher risk than he is of accidentally falling off the cliff. If you can do that, you win._

So in the Cuban missile crisis accidental launches, not intentional launches, are what the Russians are threatened with. And when designing a nuclear deterrent, it's actually useful if the failsafes aren't 100% reliable - if a rogue general sets your nuclear launch code to all zeros [2] and they make sure the Russians find out about it, that's actually a good thing.

[1] [http://www.washingtonpost.com/wp- dyn/content/article/2005/10...](http://www.washingtonpost.com/wp- dyn/content/article/2005/10/11/AR2005101101336.html) [2] [https://nakedsecurity.sophos.com/2013/12/11/for- nearly-20-ye...](https://nakedsecurity.sophos.com/2013/12/11/for- nearly-20-years-the-launch-code-for-us-nuclear-missiles-was-00000000/)

</comment><comment><USER16> > (In the Cold War satire Dr. Strangelove, the Soviet Union deployed a similar > "doomsday device" and also neglected to tell the world about it. In the > film, Dr. Strangelove points out that not telling anyone obviates the > deterrence of any deterrent device; the real-life Soviets seem to have > missed the point.)

When I first read about the system, it was clearly explained that the idea was to put high-ranking Soviet generals at peace. If they know the system is there, they will not go paranoid and launch a nuclear war on their own (Dr Strangelove is one of the best movies ever). Yet, several times after that I have seen this "silly Soviets" way of telling the story, where authors completely seriously imply that the Soviets designed such a thing and then just, presumably out of pure stupidity (?), forgot to tell everyone. How can anyone find such an explanation acceptable?

Makes you wonder how much stupid shit we read every day, and accept it without noticing.

<comment><USER17> From what i recall, there is a exchange in the movie where it is mentioned that the Soviet president (premier?) was planning to unveil the system on May 1th.

<comment><USER16> Yeah, they wanted it to be a surprise for the party congress or something :D

</comment></comment></comment><comment><USER18> One answer that is possible though not a popular idea is 'The UN.' More broadly it's the international governance that the UN is a part of. The UN's goal is/was largely preventing a nuclear WWIII, so it's at least worth considering.

It's easy to discount the UN. It's ineffective, self righteous without introspection, a paper tiger, a cynical dealmaking forum, undemocratic, etc. etc..

But… There are two influential UN agendas that have been to some extent, effective: Non Aggression and Non Proliferation.

Nonproliferation was a limited success. Only Pakistan, India, Israel & North Korea went nuclear despite it. Those are worrying, but do not amount to inevitable nuclear war.

If nuclear weapons were sold in the arms markets like ICBMs, fighter jets, cutting edge anti missile/aircraft defense systems, etc. then the list of nuclear powers would be much bigger than it is today. Sadaam's Iraq, Iran, Syria, Egypt & Saudi Arabia would have them (they have everything else). That's just one neighborhood. Non-State nuclear powers would be far more likely. 911 might have been a nuclear attack.

Non aggression is the second principle/agenda. Boiled down it means 'No Wars of Conquest'. If you conquer territory that is "rightfully" yours because ancestors or whatnot, no country will recognize your territorial gains ever.

Non Aggression has also been a limited success. Israel in 1967 is the high profile counter example. Russia in Ukraine is the bigger and more recent one. There have been other violations, but compared to the pre-UN period it is a different paradigm.

Instead, we have a paradigm of "intervention" and occupation instead of conquest or colonialism. It's not ideal but it does change the whole incentive-dynamic. No country's political discourse is dominated by the idea of expanding. That is uniquely true of the last 3 generations and no other period.

In that sense, the UN Non Aggression principle has successfully taken the spoils out of war and prevented the cyclical warfare which created the two Great Wars.

Ukraine is the counterexample and may be the end of the era. Who knows.

TLDR: The UN lowered incidence of wars between major powers via the "non aggression rule" and the proliferation of nuclear weapons to minor powers and non state actors via non proliferation initiatives. These two have been working together to keep the chances of nuclear war down, but it's a shaky system.

<comment><USER17> Meh. I find the whole intervention thing very similar to the gradual English/British takeover of India.

You start out with a trading company that to protect their interests start training soldiers.

Then effectively take over administrative control of the place by propping up regional rulers.

But then gets in over its head and gets bailed out by the government.

Never mind the Banana Wars that USA was involved with in South America to protect United Fruit interests etc.

</comment></comment><comment><USER19> In the recent discussion about the article "Almost everything in Dr. Strangelove was true" [0], mikeash posted a link to a captivating alternate- history story about the Cuban Missile Crisis going horribly bad:

[http://www.alternatehistory.com/discussion/showthread.php?t=...](http://www.alternatehistory.com/discussion/showthread.php?t=65071)

[0]: [https://news.ycombinator.com/item?id=7109345](https://news.ycombinator.com/item?id=7109345)

<comment><USER3> A novel based in the aftermath of a "Cuban War":

[http://en.wikipedia.org/wiki/Resurrection_Day](http://en.wikipedia.org/wiki/Resurrection_Day)

</comment></comment><comment><USER20> I think people miss point of Dead Hand.

It's not to prevent US from launching a pre-emptive strike, it exists to prevent USSR from launching a pre-emptive strike.

<comment><USER15> There was a time when people wondered if it would be possible to have a limited nuclear war. Hypothetically, if Russian land forces invaded France, could we launch a few small nukes at military targets only, to scare them off? They'll see it's a small scale attack and decide not to retaliate because they don't want to trigger MAD any more than we do. Right? And that way we can save money on conventional forces, as nukes are all we need.

By creating a fully automated doomsday device which will trigger MAD even in the event of a limited nuclear war the possibility of a limited nuclear war is taken off the table - and with it, the possibility of cutting back on conventional forces.

</comment></comment><comment><USER21> Basically, MAD plus level-headed ... sub captains equals stability. The number of near-misses was vanishingly small.

In a sense, nukes were more peaceful - the practical effect was to replace large armies with nukes for cost reasons. Using nukes destroys them, so there's a disincentive to actually use them. They're only any good if you _don 't_ use them. That's some catch, that Catch-22.

The Cold War is oh-so-much not nearly even close to WWI. Bismarck pretty much predicted WWI - down to the Balkan character of the spark that ignited it - not long after he was forced out of power in Germany. [http://en.wikipedia.org/wiki/Otto_von_Bismarck#Last_warning_...](http://en.wikipedia.org/wiki/Otto_von_Bismarck#Last_warning_and_prediction)

" According to Albert Ballin, the year before he died Bismarck told him:

        "One day the great European War will come out of some
     damned foolish thing in the Balkans".[81]

"

</comment><comment><USER22> Submitting for opinions:

If any nation were to 'go nuclear' either preemptively or through natural escalation, they would in one stroke become the new Nazis and hold this title for the rest of recorded history; no societies with direct or indirect recollection of the event would ever forgive or forget the decision. Given that no nation on this planet is truly ruled by one person, the Collective in Charge would have to make the decision to out-Hitler Hitler. Therefore, i believe that even if [Russia were to use a 'Nuc after its initial thrust into Europe failed/ the US were to use a 'Nuc after Russia's initial thrust succeeded/ China were to use a 'Nuc after the Asian Pacific joined together in opposition/etc], no rational state actors would respond in kind.

<comment><USER22> Also, in line with the above thought, there is no guarantee of global cataclysm if there is a Nuclear exchange. How big was the explosion from the Yucatan impact? Life was changed dramatically, but it was not extinguished.

</comment></comment><comment><USER23> Another explanation offered by Schelling is that nuclear is generically different, basically ickier than other explosives.

[http://www.nobelprize.org/nobel_prizes/economic- sciences/lau...](http://www.nobelprize.org/nobel_prizes/economic- sciences/laureates/2005/schelling-lecture.pdf)

Fukushima is kind of reinforcing that sense of ickiness to the long-term detriment of nuclear as an alternative energy source, which is unfortunate because to me at least it appears to be the most viable.

</comment><comment><USER24> Give it time. We've only had nuclear weapons for a few decades.

<comment><USER20> Actually, for more than half of century.

<comment><USER25> Actually, for less than 600000 hours.

</comment></comment></comment><comment><USER26> Because in this neighborhood of the superimposed wave function that comprises the multiverse that didn't happen. There are also an infinite number of neighborhoods where the ability to ask that question doesn't exist because of the event.

To ask why it didn't happen in this particular neighborhood is to ask why the lack of that event is possible. In a Q.M. multiverse "why" questions get real tricky.

</comment><comment><USER27> Because we're still here to write about it !

Sorry for this silly recursive joke. However it has a point : For some philosophers (e.g : Gerard Dupuy) theorizing the self realizing prophecies, in order to prevent a catastrophy, you need to think about it as if it already happened in the future. It is the only way to act on it to counteract the curse of determinism... Enjoy the paradox !

</comment><comment><USER28> Reminds me of that situation in The Dark Knight (Batman 2), where both sides couldn't bring themselves to kill so many people although they were sure that would mean their own death.

I wonder if we people really are like that, because at the same time there are many examples of people having threats to their own life or a loved one's life trigger them to kill another person.

<comment><USER29> People donate organs knowing it could reduce their life span.

<comment><USER28> Well, we talk about immediate, final threats to ones life, not something that might kill you one day in the future. If you hold a gun to one head and tell him to kill another person there is a certain assumption that he will do so.

If you count possible long term threats then of course people don't care. I just think about normal things like smoking, drinking, eating, couchpotatoing.

</comment></comment></comment><comment><USER30> Because a nuclear war with human weapons can not destroy the world nor even the life in the planet. Life is simply tougher than this.

A nuclear accident or weapon excels in one sigle matter, to wipe the human race. Humans are efficiently banned at least in some places of Ukranie and Japan now so... yes, is happening.

</comment><comment><USER29> Humanity might get wiped but the world will stay where it is. What amount of energy is necessary to actually destroy the world?

<comment> saiya-jin If by world you mean earth, and by destroying you mean something like splitting planet open, then I presume way more than current arsenal of usable nukes.

Destruction of mankind would be relatively easy, we've become frail and our society severely depends on easily disruptible things like electricity. If you mean destruction of life itself, anything short of black hole/sun going supernova is not enough.

<comment><USER8> The gravitational binding energy (what it would take to turn the Earth into a collection of floating, unbound gravel) is equivalent to about a week's worth of the Sun's total output. (Not a week of what the Earth receives, but a week of the entire output. Quite a lot.)

The energy required merely to sterilize the crust of all life is vastly lower, of course. But still many orders of magnitude greater than the world's nuclear arsenals.

Even destroying mankind would be pretty tough. Destroying modern civilization is probably doable, but people would endure. Lots of people get by with subsistence farming now, and their lives wouldn't change so much.</comment></comment></comment>