Ask HN: How do you automate logging bugs in your product? - <AUTHOR> TL;DR : How do you log bugs in your product in an automated manner without dirtying up your bug tracker?
Recently, at my place of work, we've come into a bit of an issue with the way that log our bugs. Currently we automate logging many different types of exceptions and errors to our bug tracking system from our product. We're currently using unfuddle (which is a whole different religious war) to track bugs.
We've noticed that due to the automated manner of tracking bugs we have started to decrease our signal/noise ratio in our bug tracker due to the large number of duplicates that we're seeing. This makes triaging time consuming as we aren't sure which bugs are legitimate issues or possible duplicates of other bugs we've seen before. Our team has been on a recent stent of patching noisy bugs as they come in, but it feels like these are merely bandaids to a larger problem.
How do you automate logging bugs in your product?
Some examples of bugs that we've been having issues with :
- Loops in automated processes can hit states that raise exceptions. These can generate a large number of bugs.
- Database restores that may fail in a staging/production environment <comment><USER2> Wait, you seem to equate a runtime exception as a bug, which to me are two different but related concepts.

Directly posting every single exception raised to your bug tracker is a sure fire way to flood and overwhelm you. Logging to unfuddle, to me, is the wrong way to do it.

Learn proper Ops. Learn the concepts properly: logging for application monitoring and trace debugging is one thing. Posting a confirm functional bug report is another.

Error detection/escalation is best left to proper tools such as nagios/zabbix where they have grouping of errors etc.

Application level tracing is best left to a logging tools like sentry/logstash/new relic/etc.

Use the d

<comment><AUTHOR> What is a confirm functional bug report?

What does your workflow for logging exceptions and errors look like?

What sort of separation do you have between application exceptions and other types of exceptions such as database connectivity? How do either of the aforementioned exceptions/errors materialize into a bug?

<comment><USER2> Sorry for the typos, I was typing this on mobile.

I meant "confirmed functional bug report"; and by that I mean a reproducible scenario that actually is caused by faulty code path leading to wrong result/behaviour. Usually, in my experience, bugs are ideally reported by people after some repeatable / confirmable thought-out process.

If I understood you correctly, you are automatically posting every exception to your bug tracker. My point is that not all exceptions are bugs. And certainly not all bugs are discoverable through exceptions.

> What sort of separation do you have between application exceptions > and > other types of exceptions such as database connectivity? How do > either of > the aforementioned exceptions/errors materialize into a bug?

These are great questions that you should be asking while architecting / implementing / testing / running your application (i.e. whole lifecycle). Again, not all exceptions are bugs. Many, but not all exceptions are to die / crash your program. Many exceptions are definitely recoverable (unexpected input), while others are not (failed network, unreachable DB). If you are using a decent logging framework, it's obvious that they have different levels for logging messages. FATAL/ERROR usually mean unrecoverable, while WARNINGs are typically recoverable but may prompt further investigation for the log audience, and INFO/DEBUG are generally harmless, non-error messages. This design has become widespread across many languages/frameworks and makes you ponder why.

> What does your workflow for logging exceptions and errors look like?

My view is that error handling is generally a delicate art and science (see why Golang doesn't have exceptions, a decision made by veteran language designers!). I follow the principle of Fail Fast, especially for unrecoverable errors; that is, don't hide fatal errors. Bubble up exceptions. Carefully design your layers to raise and catch the appropriate exceptions, if at all (see also Erlang's let it crash principle). c2 wiki has some good starting discussions: [http://c2.com/cgi/wiki?FailFast](http://c2.com/cgi/wiki?FailFast) [http://c2.com/cgi/wiki?FirstRuleOfLogging](http://c2.com/cgi/wiki?FirstRuleOfLogging)

Note, these are all abstract and conceptual, and not tool oriented. They go back to the design of your system and your processes, to fit your organization / communication structure.

Also not stated is the great importance of automated tests (unit tests / integration tests / functional tests). Remember I mentioned confirmed bugs? Because at the very least, every bug discovered should have a corresponding test written to prevent regression. A decent engineering team should have good grasp and practice of many levels of automated testing.

P.S. as for our tools, our stack uses logstash/elasticsearch for distributed logging + opsview/nagios NRPE for ops-related detection/escalation of issues that warrant attention.

<comment><AUTHOR> Thanks for the reply. I was actually looking for more of an abstract solution. Tools are great and all but building processes and architecting a better way to log bugs is more important.

</comment></comment></comment></comment><comment><USER3> Our dev team use Sentry (getsentry.com). We had the hosted plan, and we also have one installed in a local server.

You can check out their github repo as well [https://github.com/getsentry/sentry](https://github.com/getsentry/sentry)

<comment><USER4> +1 for Sentry. This is what we use at work.

For the side business I work ([https://styleci.io](https://styleci.io)) we use Bugsnag; [https://bugsnag.com](https://bugsnag.com) and a custom application.

</comment></comment><comment><USER5> We log runtime errors in Slack using a webhook (have an #errors channel which receives a post with a stack trace and useful metadata), then notice patterns in error generation manually, discuss the errors and why they might be happening in Slack, and eventually funnel urgent or important ones into our task management system.

Right now, we don't have a ton of traffic so the errors channel receives a very manageable volume. I imagine this sort of approach would get overwhelming for a product with more concurrent users or more runtime-error-generating code paths.

</comment><comment><USER6> I log JavaScript-based errors using Google Analytics events. Easy to set up (especially if you already have GA set up) and the graphing and grouping capabilities of GA are quite well-suited for bug trend tracking.

<comment><USER7> almost the same but I log using the exception call instead of event

[https://developers.google.com/analytics/devguides/collection...](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#exception)

</comment></comment><comment><USER8> We have a "log cop" responsible for looking at the errors in the logs and being the human conduit to filing a ticket for a bug as needed. We've got it down pretty well now where we have trained folks on it and rotate the responsibility each sprint and doesn't take more than a hour or so a week of the designated person's time. Part of making it doable though was getting rid of a lot of the superfluous logging we were doing.

</comment><comment><USER9> I use Sumo Logic and their Log Reduce feature. That automatically aggregates exception patterns. That eliminates duplicates and gives nice summary: [https://www.sumologic.com/resource/featured-videos/demo- sumo...](https://www.sumologic.com/resource/featured-videos/demo-sumo-logic- log-reduce-next-generation-log-analytics-featured-video/)

Disclaimer: I work for Sumo Logic.

</comment><comment><USER10> I'm going to throw out a recommendation for Rollbar[0]. Of the tools I used, I found it's great and providing the info necessary to quickly track down and fix errors. It's also got some useful tools for triage built in.

[0] [https://rollbar.com/](https://rollbar.com/)

</comment><comment><USER11> Rollbar (rollbar.com) dedupes error occurrences. It automatically integrates with JIRA and github but you could probably tap into their API to integrate if with unfuddle.

</comment><comment><USER12> After trying a few alternatives, I've settled on [https://bugsnag.com](https://bugsnag.com)

<comment><USER13> +1, their exception aggregation is lovely

</comment></comment><comment><USER14> We have been trialling [http://squash.io/](http://squash.io/) at work as a aggregation for our errors and it's working out well so far. Next step is to integrate into our ticket tracker.

</comment><comment><USER15> Give it a try: [https://www.atatus.com](https://www.atatus.com) which provides JavaScript error tracking and Real user monitoring.

</comment><comment><USER16> One of company I worked for used : [https://www.graylog.org/](https://www.graylog.org/)

</comment><comment><USER17> We use Airbrake. It also allows us to create errors manually- generally used for logging exceptions from within rescue blocks atm.</comment>


One electron universe - <AUTHOR> https://en.wikipedia.org/wiki/One-electron_universe <comment><USER2> I've always loved this idea. It's seemingly completely ridiculous but completely astounding at the same time.

</comment><comment><USER3> On a tangential note, according to QFT, there is only one 'electron field' permeating the entire spacetime; individual electrons are 'excitations' of that field.

</comment><comment><USER4> Here's a visualization of that electron in action: [http://mathworld.wolfram.com/TuringMachine.html](http://mathworld.wolfram.com/TuringMachine.html)</comment>


How Do You Beat iPhone? - <AUTHOR> https://medium.com/backchannel/how-do-you-beat-iphone-9e82786c68dd#.8za73ilpm <comment><USER2> > Me, I love mountains... my iPhone is a terrible companion. Battery life is > poor. Interface sub-optimal as I wear gloves, sweat, am in motion, etc. What > I want is an AdventurePhone. Replaceable battery. Sturdy. Waterproof. Dual > SIM. Easily mountable. Great camera. Solid grip.

I see the author's point, but I'd actually approach a solution in completely the opposite direction.

The whole reason the phone has become the all-in-one do-everything device is that the vast, vast majority of the time, most people aren't doing some highly specialised activity like skiing. Rather they're going about their daily lives, in a very predictable, stable environment. In that scenario, you want to optimise for convenience, which means portability, which means a small, light, touchscreen device that does everything well enough.

In the specialised activity usecase, you want precisely the opposite of the 'all in one convenience' approach - you want specialised tools that each do one thing really well. So you absolutely don't want to swap out your iPhone for an 'adventurePhone' which packs a load of features behind a specialised 'skiiing' interface - that's an unnecessary and almost certainly wasteful mix of specialised and generalised tools - what you do want is a set of specialised tools, each with its own ski-friendly interface, to give you _exactly_ the feature set you want for your highly specialised activity.

Camera? GoPro. GPS? Garmin watch. Music? Ipod shuffle. Phone calls/SMS? extremely cheap Dual-SIM solid-as-a-rock dumb phone. Occasional use of chat app? Cheap, light dont-care-if-it-breaks android device.

<comment><USER3> I disagree. I dislike having that many devices, I remember being _so_ excited when phones started to have lots of memory and ability to play MP3s - I could skip having an MP3 player.

Each device imposes a maintenance burden. You have to remember to charge it. It takes space. It's easy to forget to take that Nth device with you. They're usually not interoperable, they don't talk with each other at all - which is bad, because in this case an integrated device is more than a sum of its parts.

People get the Unix philosophy backwards - having lots of small tools is nothing but making waste if you can't compose them together.

Personally, I want a SpecOps phone. Everything the AdventurePhone has, plus more ability to hack it. Plus _all_ sensors. There aren't that many things that piss me off more than the stupid market segmentation games phone manufacturers are playing. We _could_ have had a goddamn tricorder. It wouldn't be even that expensive because the parts are already there, and economies of scale works in favour of less differentiated devices here. But we don't have it and won't have it, because mobile devices are designed with sole purpose of milking money out of consumers, instead of giving people a versatile tool to expand their power and abilities.

<comment><USER2> I'm not sure we really do disagree, so much as I didn't explain my point well enough.

I agree completely with what you say - the maintenance overhead is one disadvantage of the many specialised tools approach. But, my point is, assuming this is a very rare activity, that maintenance cost is paid infrequently and is therefore not, cumulatively, very high. If you ski every day however, carrying one tool for each feature indeed starts to bring too much maintenance overhead and you'd at that point opt for more all-in-one convenience. But the user who does a specialised activity as the norm is very rare, thus such products don't really have a market.

I wouldn't necessarily describe this 'many specilised tools selected individually for a known specialised use case' approach as being in line with the UNIX philosophy, which is more 'many specialised tools with the ability to be chained together to handle any use case'.

In my example of skiing, the tools don't need to be chained. They can, and preferably should, be quite isolated in their function and use. They're all completely vertically functional - if one goes down, the others all still work fine and only one feature is lost. It's just about unbundling the completely orthogonal features you want and picking options tuned to that specific use case, sacrificing some convenience for better quality in only that use case.

The all-in-one iPhone type solution is more about bundling regularly-used (though not always used, in each case) features to work across a broad range of more general use cases, necessarily sacrificing optimal quality in any particular use case for convenience across all of them.

</comment></comment></comment><comment><USER4> I'm a huge iPhone fan, but even I have to admit that the core premise here is a bit far-fetched. The other phones are not trailing the iPhone, they're leading it. There's not a single feature (maybe force-touch?) that my Android friends have not crowed about having long before it finally arrived on the next iPhone iteration.

Apple is doing here what Microsoft did when they were in their prime. Let the other guys experiment with a ton of random features, and then wait, and copy the best features from the last batch, but make them a little better.

<comment><USER5> Apple is first to a bunch of things: Apple Pay, Force Touch, Touch ID etc.

They're also so much further ahead on dimensions like performance, battery life, build quality, camera, apps, etc. Those things are so important, I think they're similar to "being first"

<comment><USER6> Apple Pay and TouchID? Come on now, at least retina displays and Force Touch are good examples, but Apple certainly wasn't the first to implement eWallets or fingerprints linked to your ID.

And while I'll concede that things like their cameras are great, the only reason certain things like performance and battery life are what they are is because they control iOS AND all of the hardware running it. And app development on iOS has just as many pros and cons as developing for Android, I don't think it fair to label one as better in that regard.

<comment><USER7> Not even Force Touch is a good example; Android has had getPressure() API since v1.

<comment><USER6> Huh, TIL. Thanks!

</comment></comment></comment></comment></comment><comment><USER8> > surely there's got to be more in our future than just chasing incrementalism > — walking the incremental iPhone walk, two steps behind.

You wait for something you see a lot on here a "paradigm shift".

Incremental improvements over the incumbent rarely displace the incumbent (unless they do something crazy).

If the desktop had stayed the primary computing device most people interacted with Microsoft would still have a complete lock on the entire thing, Smartphones and Tablets as mass market consumer devices disrupted Microsoft's monopoly by forcing them to compete in a world with devices _not_ running their OS.

I doubt anyone will beat Apple at making a better smartphone in the short- medium term (I use a Nexus 4 but that was purely a cost/good enough decision) but I wouldn't bet against something coming out that creates a window, if I had to hazard a guess I'd say something like VR/AR in a consumer friendly package at an affordable price but you'd still need some kind of hardware to run the unit and I think a Smartphone is the natural fit for that so maybe the phone will stay central longer than I expect.

What I'd really like is something about the weight of the specs I wear for screen work, that has intelligent feeds that I can customise for what I'm doing, if you could overlay video and such on top of that you'd really have something.

I regulary repair my roadbike and sometimes end up using youtube videos for instruction, having a small "HD" screen I could have in vision while I'm doing that would be incredibly useful, or the ability to pull up a shell and view some text wherever I am (server misbehaving or whatever).

That's something I'd pay £300 for.

</comment><comment><USER9> This is still too wedded to the idea of "apps" and a modern smartphone environment. Try something really different:

A seawaterproof, dust-proof, shock-resistant aluminum-magnesium alloy cylinder. A lanyard hole on top and another on the bottom.

No display.

No headphone jack.

No SMS, no wireless data system.

A USB port under a lid.

A camera with a physical viewfinder and one button: when you press it, it takes a picture. No review, no fancy filters.

A speaker and a microphone.

A big battery. Three or four days of moderate use.

Two more buttons: GO and STOP. No keypad, no directional keys.

The interface is voice based. Tap GO, say "Call Fred". It slurps your contact database from your iPhone or Android, whatever you use the rest of the time. When it rings, you can hit GO to accept the call or STOP to send it to your other phone, where it can go to your normal voicemail.

It doesn't play games. It has a few minor features, all under voice command: "Set alarm 6 AM", "Timer on" "Lap", "Timer off", "What time is it?".

You can recharge it via the USB port, you can mount it as a drive and send off the photos, you can upload a new contact list. The battery is replaceable. Four band GSM with a SIM card next to the battery. You can use it anywhere except Antarctica.

Selling points: it keeps working, longer and in harsher conditions than you want to take any black mirror. You can use it one-handed without looking at it. Take it with you jogging, rock climbing, or SCUBA diving. It doesn't look like a phone, so it's not an automatic theft target. In a rough situation you can hit someone with it and expect it to work afterwards.

James Bond would carry one, if he and it existed.

<comment><USER10> I've never thought HN was missing the ability to post images as responses. But this one time...

[http://vignette4.wikia.nocookie.net/simpsons/images/0/05/The...](http://vignette4.wikia.nocookie.net/simpsons/images/0/05/TheHomer.png/revision/latest?cb=20090908145331) :)

</comment></comment><comment><USER11> The smart phone category is now firmly established, and there's little room for radical innovation. It's not a question of colonizing new niches—the market trend has been exactly the opposite, the iPhone cannibalized entire product categories by being good enough at so many things and then surpassing them with the integration benefits. Sure there is room for innovation and expansion into new niches, but those are small local maxima, nothing that is revolutionize phones again.

If you realize what the smartphone means—literally the entire middle class population with a powerful networked computer in their pocket—and where it stands in the logical progress of computers from government to business to home to the person, it's clear that the next revolution of this magnitude will be nothing less than physical implants. Maybe there will be some intermediate step like Google Glass, but just like smart watches it's very hard to beat the utility of a phone in your pocket.

Other major innovations will happen, sure, but they will come out of unexpected areas and solve new problems. The OA seems to be nostalgic for the pace of innovation of the last 8 years, but that time is over now, smartphones will continue to improve incrementally but the low-hanging fruit for reinventing them is pretty well harvested. Even if someone comes up with a fundamentally better mobile paradigm than iOS it's probably impossible to overcome the network and polish effects of a decade of Apple and Google pouring their entire essence into their respective mobile platforms.

</comment><comment><USER12> What the author and other commenters are alluding to imo are niche markets at a shot of winning. Most hard working americans DONT need a 2nd phone. If you want to be a niche player then fine make an adventure phone, but no shot thats going mass market to defeat iphone. And what the author is forgetting , missing is its not just about the Iphone in regards to apple but Its the ENTIRE seamless Ecosystem. Thats why apple is winning !

</comment><comment><USER13> At least from my point of view, the perceived value of the iPhone increases with each additional device and service of Apple you use. I recently had the opportunity to test a Samsung: While the device itself was great, I didn't even try to get my music or photos synced. I'm so used of Apple flawless integration with each other. That's the challenge.

</comment><comment><USER14> Beat iPhone? Get in line bro as its a loooong line.

All my banking/credit card apps on iPhone turned into Touch ID based starting this year. Last year this time I had to go through a battle to convince my fellow corporate colleague that the Touch ID is not some scary security breach wannabe like those found in androids.

This is what apple always do and still very good at, show the world how to turn technology into improving quality of average man's life, though far less than what men have hoped and so far is the only one who has manage to pull it off.

What Microsoft, IBM have done at most to affect people's work life, but nowhere near what Apple has done.

The rest of industry would be much better off if simple watch and learn. There is this mindset that's still light year ahead from what most have perceived.

<comment><USER15> > the Touch ID is not some scary security breach wannabe like those found in > androids.

I suppose that you will provide some examples of those security breachs

<comment><USER16> [http://arstechnica.com/security/2015/10/a-billion-android- ph...](http://arstechnica.com/security/2015/10/a-billion-android-phones-are- vulnerable-to-new-stagefright-bugs/)

<comment><USER15> Now tell me what has to do Stagefright with the implication that Google Play is not secure as the OP did.

Or are you just posting the first thing you find in Google withouts knowing what it means?

<comment><USER16> I don't see anything in OP's post specific to Google Play. Did they edit?

</comment></comment></comment></comment></comment><comment><USER17> The most glaring problem with the iPhone and other smartphones is battery life. So if you want to beat the iPhone, build a smartphone that is comparable to the iPhone but can last a week or more on battery.

<comment><USER18> There's nothing wrong with the iPhone's battery life - the problem is more likely where you use it. Almost any phone's battery will last for days in a place where cell site antennas are dense and close enough to provide connectivity without making the radio work very hard.

I was surprised to find how much battery I had left at the end of the day in a major Indian city, as opposed to in San Francisco. One or two bars of signal strength may be enough to make your phone useful, but it's no good for one's battery life.

Recall that the radio power-to-distance function is logarithmic.

</comment></comment><comment><USER19> Their suggested two-phone solution makes sense. Carriers should offer plans where you can have two phones, one of which might be a tablet, with the same phone number for the price of one, as long as you don't use them both at the same time. For incoming calls, both ring, if turned on. You shouldn't need a "cloud service" like Grand Central/Google Voice for this, just an arrangement with the carrier.

This is a solution to the "fat phone" problem - the things are just getting too big.

<comment><USER20> ...or just promote tethering as a first-class feature and charge per GB of data.

<comment><USER21> It's _sort of_ here in (surprisingly) Australia.

[https://www.telstra.com.au/mobile-phones/plans-and- rates/sha...](https://www.telstra.com.au/mobile-phones/plans-and-rates/share- your-data)

[http://www.optus.com.au/shop/mobile/phone-plans/data- sharing](http://www.optus.com.au/shop/mobile/phone-plans/data-sharing)

</comment></comment></comment><comment><USER22> I would like to have a fully modular phone. Where i can change or add hardware capabilities (like fairphone) . More hardware freedom.

</comment><comment><USER23> Why does the iPhone need to be "beaten" in the first place?

<comment><USER24> I feel like some of the points he raises in the article answer that question. The one most compelling to me from the article is that I would like something more rugged and usable for hiking, biking, skiing, etc. than the current types of smartphones.

<comment><USER23> I think it's really unfocused. It does talk about (perceived) shortcomings of the iPhone, but then it goes on to talk about complementing the iPhone instead of competing with it.

But even if it actually were about beating the iPhone, my question stands. It's an extremely popular product with very high customer satisfaction ratings. We as consumers should be so lucky to have an analogue in other market sectors.

If only, say, cars had the same problem. Or televisions, or shoes, or or or...

</comment></comment></comment><comment><USER15> > Everybody seems content chasing the iPhone

I think that he starts with a wrong hypothesis</comment>


Even Google has bad User Experience – try to guess what it is - <AUTHOR> https://gsuite.google.com/marketplace/app/scrible_writer/823170055939 <comment><AUTHOR> If you compare the cover image rotation to the chrome webstore listings, you will notice they dont move around automatically [https://chrome.google.com/webstore/detail/clipboard- history-...](https://chrome.google.com/webstore/detail/clipboard-history-pro- bes/ajiejmhbejpdgkkigpddefnjmgcbkenk) but, within the GSuite Marketplace, if you can't look at the screenshot or read text in the image within SECONDS, they do, even super fast TBH.</comment>


Ask HN: Need help from police officers for problem validation - <AUTHOR> we are a group of software architects working on a solution for public safety domain, primarily for police officers.
Are there any police officers here on HN who are willing to provide us their valuable feedback? Preferably a short call (not more than 15-20 min).
We just wanted to make sure that the problem we are trying to solve is a valid concern before we go ahead and start spending more time on it.
Thanks in advance! <comment><USER2> perhaps you could detail the problem here :-)</comment>


Skype makes it up: One month free calls - <AUTHOR> https://twitter.com/#!/Skype/status/17976224630444033 <comment><USER2> "Sorry, that page doesn't exist!"

<comment><AUTHOR> Wow, they have deleted the tweed - the next one[1] says:

"Sorry – the last tweet was posted in error. We're 100% focused on getting Skype back in action. Stay tuned for more information."

1\. <http://twitter.com/#!/Skype/status/17979814220660737></comment></comment>


On an Island Named for Ice, the Poets Are Just Getting Warmed Up - <AUTHOR> http://www.nytimes.com/2016/11/30/world/what-in-the-world/on-an-island-named-for-ice-the-poets-are-just-getting-warmed-up.html <comment><USER2> This reminded me of one of Björk's interview responses from nearly two decades ago [1]:

"Yeah, we hold the world record for the population with the highest literacy rate. No art, no painting, no dance, no history of anything but literature. Viking sagas. If teenagers in Iceland are young and angry they don't form punk bands, they write poetry. And then they get drunk and shout it at each other. Not because they're so intelligent, as English people seem to imagine you must be if you're connected with books, it's just a cultural thing."

[1] [http://14142.net/bjork/articles/bjork/arena1995.txt](http://14142.net/bjork/articles/bjork/arena1995.txt)

</comment><comment><USER3> "On an Island Named for Ice" \-- seriously? I guess artistic license is artistic license, but come on. If you're going to change your other headlines so frequently ([https://twitter.com/nyt_diff](https://twitter.com/nyt_diff)) why not change this one for the better?</comment>


Is Life a Ponzi Scheme? - <AUTHOR> http://bostonreview.net/books-ideas/mark-johnston-samuel-scheffler-death-afterlife-humanity-ponzi-scheme <comment><USER2> That was actually pretty interesting. There's the old saying, that a person who stands for nothing will fall for anything. I think that, just because all is futile and there ultimately is nothing worth standing for, it's no license to fall for anything. Having no acceptable options shouldn't mean settling for the least offensive to our values, which I feel is something most people suffering the modern glut do even without thinking about it. We can create meaning, even if only in hindsight. The process can be an absolute pain in the ass but we can still build meaning where none exists.

So the gods don't exist. If you want a job done right...

<comment><USER3> > all is futile and there ultimately is nothing worth standing for

I actually find your religious view fascinating.

<comment><USER2> I won't stand for it myself.</comment></comment></comment>


Ask HN: Let's compare perks size? - <AUTHOR>

Hey everyone! Long time submitter first time Asker. I'm trying to do the Lean Startup thing and survey my customers (which are you guys, the tech entrepreneurs with great places to work!). It's a quick, 10 question, anonymous survey and it would mean the world to me if you could take it and help me in the first step to understanding a market. The survey is here:
http://bit.ly/workplacesurvey
any advice or criticism for the survey and its questions are welcome! <comment><USER2> Questions 2 and 3 both say:

What single attribute is most attractive about your current place of employment?

<comment><AUTHOR> yeah I fixed that, it was supposed to be most and least :\

</comment></comment><comment><AUTHOR> As a token of appreciation for anyone who takes the survey and tweets it out to their networks, anyone who RTs the survey with my twitter name (@adam_conrad) will be entered to win a $10 iTunes gift card that I will announce February 13th!

</comment><comment><AUTHOR> Clickable link: <http://bit.ly/workplacesurvey></comment>


The Online Threat, Should we be worried about a cyber war? - <AUTHOR> http://www.newyorker.com/reporting/2010/11/01/101101fa_fact_hersh

<comment><USER2> The answer is yes. The U.S. just isn't as ready as it should be for this sort of thing. On top of that, we're not just talking governments at war anymore. Anyone can start the war, but who will stop it?</comment>


Spray-on glass could change the world - <AUTHOR> http://www.independent.co.uk/news/science/sprayon-miracle-could-revolutionise-manufacturing-1885158.html

<comment><USER2> This has vast potential. I believe that we're entering an exciting period in terms of new materials, which have great economic potential for early adopters.</comment>


The world might run out of people (2019) - <AUTHOR> https://www.wired.com/story/the-world-might-actually-run-out-of-people/ <comment><USER2> > The United Nations predicts that the global population will soon explode.

No, they don't. They predict it'll plateau at 11 billion by 2100, and believe that the fastest growth is behind us.

[https://population.un.org/wpp/Graphs/DemographicProfiles/Lin...](https://population.un.org/wpp/Graphs/DemographicProfiles/Line/900)

<comment><USER3> The text has the same number, but interprets it, ah, interestingly: "By 2100, that number will balloon to 11 billion, pushing society into a Soylent Green scenario."

This is a pretty ridiculous statement from the article, considering the history of population growth. Growing from 7.8B humans to 11B in 80 years is a significantly reduced growth rate compared to historical data. It's even reduced growth on an absolute scale. Starting from 1930, we went from 2B to 6B humans in 69 years[1]. We added tripled the world population in a few generations. I think we'll be able to handle to slow, steady population growth of the 21st century.

We have a lot of hard problems to solve in the 21st century, and population growth isn't even on the list.

Edit: I finished reading the article. I would not recommend that course of action. The so-called "running out of people" scenario is that the world has between 8 and 9 billion people in 2100. While that is a significant change to the model, calling it "running out of people" is clickbait garbage.

[1]: [https://www.worldometers.info/world- population/](https://www.worldometers.info/world-population/)

<comment><USER4> > We have a lot of hard problems to solve in the 21st century

I've been on the hunt for an apolitical assessment of what humanity's greatest challenges are. Anyone know where this body of work might be?

Copenhagen Consensus is an interesting one as a list of economists ranking cost-to-impact ratios. Something similar or adjacent?

[1]: [https://www.copenhagenconsensus.com/](https://www.copenhagenconsensus.com/)

<comment><USER5> > an apolitical assessment of what humanity's greatest challenges are

No such thing exists. Such an assessment would be inherently political.

<comment><USER4> True, although I think we can all smell the difference between a work intended for discovery vs. one that begins from a preset position.

</comment></comment></comment></comment></comment><comment><USER6> > Once that decline begins, it will never end.

I always roll my eyes at researchers who take a trend and then expand it to its infinite conclusion. The forces that are causing a change in the rate of growth may look very different once the dynamics inherent in a large population with lots of resource competition go away.

Also, if you look at the UN numbers, as another commenter said, they are NOT expecting a "population explosion". Indeed, they are seeing the rate of decline accelerating pretty much everywhere. The big difference is that the proportion of young people in places like Africa is enormous, so there is already a lot of "population momentum". It will take time for those huge cohorts to pass their way through the population pyramid.

<comment><USER7> I think it is pretty lazy to think that this is irreversible. It only took a century for the growth to happen in the first place. Having lots of children is much easier than not having children.

</comment></comment><comment><USER8> Something they didn't mention is the rise of personal wealth. As people enter the middle class, they start having fewer children. As to why - I'm not a economist or sociologist, but I expect it's partly because they aren't family farming anymore and don't need the free labor, and partly because they have access to birth control.

<comment><USER9> In my country "middle class" means people that pay a lot of taxes and have little left for their own kids. When the government takes more than half of your income to give it to others and when the healthcare is free, but kind of missing, having your own kids is sometimes an economic challenge, especially when the fertility age is when people are also juniors and financially lacking; pushing childbirth to later in life is challenged by reduced female fertility rate over 30 years old.

<comment><USER10> _> In my country "middle class" means people that pay a lot of taxes and have little left for their own kids._

If that's anywhere like where I live, "lower class" means people that don't pay as much taxes but on the other hand end up having even less money left. Yet, lower class people tend to have more children and fertility has a negative correlation to income. Perhaps it's a matter of education and ambition rather than the economic challenge.

<comment><USER11> Maybe it's that offspring are a form of survival wealth that become less necessary when you have more material wealth in your house and your community? Pure speculation as I read this.

<comment><USER12> What is "survival wealth"? Is that "savings and investments for future"?

<comment><USER11> Essentially. I just coined that while writing it, glad someone made sense of it. "How do I survive when I'm unable to fully provide or do for myself?" If my children are likely to be successful I don't need to spread my luck out among 12 of them. As others have pointed out, they are labor-intensive and if you buy into certain socio-economic structures they're fairly capital- intensive too.

I wonder if some if it is also the capital intensity of children, the higher the monetary investment you bring (clothes, gear, schools, activities) the harder it is to have lots unless you have the money.

</comment></comment></comment></comment></comment></comment><comment><USER13> Not all educated women who are in control of their lives decide against children, far from it.

If all women are educated and in control, every child of the next generation will have an educated mother who decided to have children and those mothers will likely pass on the cultural traits that lead to this decision. The result will be a generation whose reproduction rate is much less impacted by education and being in control than previous generations who to a large part had mothers lacking education and control. Reproduction rates will stabilize as motherly role models adapt.

</comment><comment><USER14> I didn't read the entire article. I take issue with any article that uses female education as a reason for the decrease in family size.

I understand where it is coming from, but I think it is oversimplified... Increased female education happens when a society is more educated. That is you could probably switch female with male and get the same results (which is also over simplified).

The reality is so many things are changing that is causing the birthrate to decrease and it's way to hard to blame it on one factor over another. You could probably argue that technology, wealth and what is the social norm in the society we live have a massive effect on the decrease in birthrate in western countries.

Now I live in Israel. The religious have an extremely large number of children and it has nothing to do with the female education level and everything to do with religion! In fact the females are often more educated than the men and are the ones with Jobs!. What is interesting though is the secular Jews, like my wife and I, usually have 3+ kids (we are at number 2). It's just the norm here and society caters to families with children

</comment><comment><USER15> The Amish win.

Among the best farmers in the world, with huge families, a healthy lifestyle, and they're non-violent.

Their biggest problem is that they are so good at farming that land prices around their communities go up and their children have to move farther and farther to afford their own farms.

<comment><USER16> Eh, I'm not strongly against the Amish but I wouldn't hold them up as an ideal. They are theocratic communities with strictly gendered roles, harsh discipline, and practice shunning and excommunication of their undesirables.

<comment><USER15> > I wouldn't hold them up as an ideal.

I'm not.

</comment></comment></comment><comment><USER17> While I didn't read the article, telling from the title this talk by Hans Rosling could be a resourceful addition to the topic: [https://youtu.be/fTznEIZRkLg](https://youtu.be/fTznEIZRkLg)

</comment><comment><USER18> Population decline is very well documented. The global trends hide countries like Germany, South Korea, and Japan where the numbers have sunk as low as 1.3 births / female, far below replacement.

The world might have more people by 2100 but many countries, including US, Europe and others will be shrinking, unless they take aggressive action on immigration reform.

My personal belief is this is ultimately how humans will go extinct. Not with a bang (apocalyptic global warming, war, famine, etc) but a whimper (gradual fade out into black over the next 1000 years).

<comment><USER19> Barring any of the fun post-apocolyptic fertility problems, if people are simply chosing not to reproduce in response to their environment, I would expect many would change their choice as the population shrinks. Especially if there are strong government incentives.

</comment></comment><comment> 1e-9 > Based on his analysis, the single biggest effect on fertility is the > education of women.

Although it's not surprising that controlling for education of women would provide a better model fit, it seems unlikely to me that this is the main causal relationship. I think logic and evidence suggest that the main driver of fertility is child mortality.

Humans appear to adjust fertility to maximize the probability that their offspring will successfully reproduce. Higher child mortality in a population tends to result in higher fertility as insurance against loss of a child [1]. Lower child mortality tends to result in lower fertility.

The human species would not be around today if we lacked a natural tendency to place utmost priority on offspring reproduction success. Parents must trade off the number of children they have versus the quality of care per child. Our current rate of child mortality reduction is shifting the optimal strategy to fewer children and higher quality of care per child. I see improved education of women (and men) as largely a consequence of this trend. I expect this will continue until disrupted by high-mortality events such as natural disasters, disease, or major wars.

[1] [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4411230/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4411230/)

</comment><comment><USER20> Has anyone plugged Lutz's education variable into scenarios for climate change? It could be one of the silver linings is we have more runway than anticipated.

Edit: It doesn't appear that it would make a difference, the low-end emission scenarios already have population growth similar to what is described in the article: [https://skepticalscience.com/rcp.php?t=3](https://skepticalscience.com/rcp.php?t=3)

</comment><comment><USER21> Educated people voluntarily choosing to have fewer children is an important effect in the short term.

In the long term, sub-populations which choose to have more children will outgrow sub-populations which have fewer children. Until the growth is eventually stopped by external factors, like limited resources, famine, war, or strictly enforced government policies.

</comment><comment><USER22> In agrarian societies, children are economically productive. In urbanised industrial/post-industrial societies, children are expensive and thus an economic liability.

Many of the conditions that accompanied falling fertility rates in Europe and America in the late 19th and early 20th centuries are now evident in the developing world.

</comment><comment><USER23> "All he was doing was adding one new variable to the forecast: the level of improvement in female education."

This may be a bit of a trolley problem. If population were indeed controllable by this one variable, where too little female education resulted in overpopulation and too much resulted in population collapse, would it be ethical to impose an upper and lower limit on it? Would it be ethical not to?

As a libertarian my default position is, that should be left up to those women. I don't believe that authoritarian measures are useful for human flourishing. But if I were convinced that this is an existential issue for the species I'd have to struggle between 1) maybe an authoritarian species shouldn't survive, and 2) ethics are ultimately in service to our survival and must adapt to that end.

<comment><USER24> The ethics of it are irrelevant in a world where genes and memes[0] are under intense selective pressure. Wait long enough and the infertile will weed themselves out.

[0] In the original sense of the word.

</comment></comment><comment><USER25> Totally anecdotal: When my wife and I were having kids 30 years ago, we stopped at two, as did many or even most of our friends. Now, however, on our block in our upscale neighborhood, with educated professional women, just about every one of the young families has three kids, and I can't think of a single young family that has just one kid.

(Nowadays during the recent COVID-19 lockdown, pretty much every afternoon we see hordes of kids, roughly ages three to ten, riding bikes and scooters and skateboards back and forth on the street, although that's slowing down as the Houston summer weather sets in.)

<comment><USER26> Kids today are a status symbol. Everybody can finance the same iPhone and luxury sedan. So how do you show you've made it?

It's a real flex to have a gaggle of kids filling up a giant house.

<comment><USER25> > _Kids today are a status symbol._

Out of curiosity, do you have kids? They're a pretty labor-intensive "status symbol." <g>

<comment><USER26> Lol no way would I ever have kids. Got a vasectomy as soon as I could find a doctor to do one.

But I also don't have to own a Porsche to know why people buy them.

Status symbols aren't just expensive to buy, they're expensive to own, too. You think the orthopedic surgeon mows the lawn on their vacation cabin upstate every weekend? Or the big law litigator does the mechanical work on their Cessna?

No, those things cost a ton to store, maintain, fuel, and use. Same as kids. But then the status comes from putting in as little work as possible (through hired help) and only showing them off when you want. Send 'em to boarding school, hire an au pair, etc. etc.

Another way to think of it. Look at things the working classes have out of need/desperation and that require tremendous amounts of work. The upper classes want those things for recreation/enjoyment/status and to do as little work as possible themselves.

</comment></comment></comment></comment><comment><USER27> How come we never consider the climate catastrophe as a variable for any of these studies?

If some of the forecasts are correct, we will hit a 5'C increase in overall global temperatures. the mass famines, dieoffs due to logistics breakdown, water scarcity, insane human migrations, wars over scarce resources etc. will be far bigger factor making most of these variables look like non factors.

[https://www.nature.com/articles/d41586-020-01125-x](https://www.nature.com/articles/d41586-020-01125-x)

I think it will be lucky if even half/4B of humans survive 2100

<comment><USER28> Because those forecasts are outliers, if you can even call them forecasts. Is this quote from your linked article what you're referring to?

"Despite a temporary drop in carbon emissions from the 2020 outbreak, countries turned to cheap fossil fuels to revive their economies after the crisis. Carbon emissions soared and temperatures followed, setting the stage for 5 °C of warming by the end of the century."

That's not a forecast, that's speculation. Might as well factor in WWIII while we're at it.

</comment></comment><comment><USER29> Educated women have more options and they do not marry guys just because they happen to have some comfy jobs and can pay for living expense for her.

A lot of women are adopting "all or nothing" approach, aka "I'd rather live alone than with someone I am not attracted to".

There are various articles where women are interviewed and they report shortage of "attractive males" for relationships. Also others where women claim, "men no longer chase" (my personal opinion is that it's because of metoo men are afraid of pursuing and asking out unless if some woman displays explicit interest)

Meanwhile there are lots of women who have children with the guys they deemed attractive but that guy never commited as a husband or father, some of those are now struggling to pay their bills and raise kids as a single parent. Society has to come forward and help them raise their kids.

Maybe we should get done with traditional marriage and assume every country man or woman is father or mother to every kid existing within the borders of the country and pay for their maintenance and good upbringing as a community as a whole.

Maybe the cost of having kids is too high? And we need to lower it through incentives?

If we choose to not do this - where will the future tax payers come from when the present ones will be on retirement? We borrow from future. Today the taxes you are paying have been used already in past for the welfare of the previous generation. Tomorrow when you'll need welfare, you'll want to have fresh population supporting it.

You can bring in the immigrants but will they have the values which your community needs? Will it require a period of time before they are able to contribute to your society in a positive way?

<comment><USER30> > Also others where women claim, "men no longer chase" (my personal opinion is > that it's because of metoo men are afraid of pursing and asking out unless > if some woman displays explicit interest)

I really don't think it has anything to do with #metoo. I'm a very outgoing millennial male, and I think this all boils down to a decrease in sociability, largely centered around mobile phones. When I go out, I never think about pulling my phone out, but I see countless people in social settings on their phones...not socializing. Men used to have to get over the fear of rejection but now there are countless apps that put that fear to rest and let people pursue behind the comfort and safety of a screen, even if it means lower success rate.

</comment></comment><comment><USER31> wired was instrumental in educating me about the "vertical knowledge" on this subject over 20 years ago with this article: [https://www.wired.com/1997/02/the- doomslayer-2/](https://www.wired.com/1997/02/the-doomslayer-2/)

until then i had never been exposed to any of the evidence countering the "population bomb" hypothesis. not in education, not in media, not in personal discussion.

</comment><comment><USER32> It will be interesting what the fertility rate of new frontier worlds might look like. Technologically advanced but in constant need of humans to build and push further.

</comment><comment><USER33> Clearly author did not read enough sci-fi. If by 2100 we had any shortage of humans, we will clone just enough of them.

</comment><comment><USER34> The website subscribe banner that keeps appearing makes it unreadable for me. I wonder if anyone at these companies actually tries to use their websites?

</comment><comment><USER35> These guys are wrong. The population needs to find a stabilisation point. Right now it's still heading much higher. Nigeria is expected to go to four hundred million people from 200 million now. Once we find that stabilization point we could start having more kids, as women will get more support to do so. projections more than 30 or 40 years into the future are extremely difficult.

</comment><comment><USER36> Writer didn't accounted for covid or something more dangerous coming up in future.</comment>


An Introduction to Stock Market Data Analysis with R – Part 1 - <AUTHOR> https://ntguardian.wordpress.com/2017/03/27/introduction-stock-market-data-r-1/ <comment><USER2> I don't have much experience with any kind of stock market analysis/ HFT programming.

I've seen people use python (or R) a lot in online tutorials and courses (there's one on coursera[1] check it out). It's understandable that python is preferred since it's an easy language to get started with, but I've never really seen C/C++ used by people online (Although I've heard about the use of FPGAs by the hardcore guys)

Is the only reason C++ isn't recommended because it is difficult? The performance difference seems rather large to me. And especially if you're doing lots of number crunching, it would really benefit using C/C++ wouldn't it?

Do people use them but I don't hear about them because anyone above 'tutorial level' doesn't share their code or talk about it?

Or are the R and Python Computational libraries close to the performance of C/C++ that it's a viable compromise?

[1]: [https://www.coursera.org/learn/computational- investing](https://www.coursera.org/learn/computational-investing)

<comment><USER3> People use Python for finance and time series because of how easy it to read in the data. There is a library called pandas which allows you to read in a txt, csv, or excel file easily and do any type of array manipulation you want. The pandas library is written in C++, so it's basically a python wrapper.

Conversely I don't think C++ has this same type of library for reading in data in a single line.

While C++ is faster than Python overall, for most financial simulations Python is definitely fast enough.

<comment><USER4> The Pandas library is not written in C at all actually. You can view the source here: [https://github.com/pandas- dev/pandas/tree/master/pandas](https://github.com/pandas- dev/pandas/tree/master/pandas)

It's mostly Python with a bit of Cython, and pull requests that are not pure Python are more likely to be rejected. There's basically zero C++ in Pandas itself.

</comment></comment></comment><comment><USER5> > DISCLAIMER: THIS IS NOT FINANCIAL ADVICE!!! Furthermore, I have ZERO > experience as a trader (a lot of this knowledge comes from a one-semester > course on stock trading I took at Salt Lake Community College)!

This disclaimer is a good idea, but I'd have gone as far as saying that getting into HFT as a hobbyist programmer is going to be throwing your money into a giant hole.

<comment><USER6> I disagree, strongly. While the learning experience was super stressful and expensive and had me on stress-drugs, the financial advantage was nothing but insane. I'm a small time trader, started from 5 figures and now up to a good 6 figures of trading capital; and took close to a 6 figures of earnings already.

<comment><USER7> Really? I haven't many people to have claimed to have gotten an "insane" financial advantage from the stock market, yet alone HFT. I've met a few but none of them had such a positive reaction that it seemed worth investing a significant amount of time.

Any advice?

<comment><USER6> Well, that's the catch. I'm very unlikely to give you any hints on what markets I trade and the advantages I'm using. I'm also very unlikely to take any person that does that very seriously (I really don't).

Also remember that this market (or any market with big money) is brutal and will eat you alive. I don't expect the average person and his capital to last for a long time.

<comment><USER5> Well that was the intent of my original comment, that your money is going to disappear. Whether or not you stick around and continue throwing money into the hole long enough to eventually end up at the bottom of someone else's hole is a different matter, I think. _You_ are making money, but you persisted -- indeed, between stress drug prescriptions and visits to the doctor -- when I think most hobbyist programmers will have wished they'd never started in the first place.

<comment><USER6> Indeed. If anyone ask me if they should start trading, my reaction is "DON'T DO IT". But that is for the average person and maybe software developer. For people who have a fighter personality, good mathematical skills, good programming skills, good economic skills, no kids/family and a nice pile of cash, I think they have a chance.

<comment><USER8> These people have no edge, they have the most to loose and the less likely to risk much while not realizing the risks they are taking.

They should not trade.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Is there a similar article for analyzing stock fundamentals? (P/e, revenue, etc)

<comment><USER10> No, but I'm always looking for new content ideas. People like my R/Python for Stocks posts, and ask for more, but I'm not really sure where to start in terms of giving them what they want.

</comment></comment><comment><USER11> It'd be great if this was posted on Kaggle.

</comment><comment><USER12> Awesome article!

have you guys been on [https://www.quantopian.com/](https://www.quantopian.com/)

very informative

very good blog statistic articles on top of backtesting

</comment><comment><USER13> You might just as well "analyze" dice rolls at the casino. Except that people routinely lie to you when they want your money (in case you didn't know already), there's no insight to be had. It is already a well established fact that in gambling, the house always wins.

<comment><USER8> > It is already a well established fact that in gambling, the house always > wins.

I had a friend who used to run a financial exchange. That was his favorite sentence.

The house always wins.

</comment></comment><comment><USER14> You can still profit off of HFT, even if you can't compete directly. The key is to find the opportunity they create: HFT will typically exit HARD on a stock with weak earnings or bad news. They need to find a better short term growth option. I like to find those situations, buy low, and hang on for a year.</comment>


Did the founder of the antivax movement fake autism-vaccine link? - <AUTHOR> http://blogs.discovermagazine.com/badastronomy/2009/02/07/did-the-founder-of-the-antivax-movement-fake-autism-vaccine-link/ <comment><USER2> It is going to take years if not decades to repair the damage this train wreck of a "study" has done in the UK where there is no longer herd immunity to measles and there has already been one death of a child who did not receive the vaccine.

I can only hope that parents refusing to vaccinate their children will finally do so after the absurd Wakefield study is shown for what it is. How frustrating.

</comment><comment><USER3> Yet, many antivaxers will no doubt refuse to be "distracted by the facts."

Somehow such issues become a "raison-d'etre" for some people and essentially an identity issue (as PG discusses regarding politics & religion in a recent HN post).

It's just a shame when innocent children are deprived of important immunity because of such zealotry by their parents. I can only hope that the light brought on the possible fabrication behind the original antivax data will provide some "immunity" against more parents being infected by the zealotry.

<comment><USER4> This is actually a point of rage for me. I hated it when opinionated mothers who are in fact completely ignorant about statistics or science choose to endanger their children like this.

Fucking absurd. It's child abuse.

<comment><USER5> There are just as many jackass fathers pushing this.

</comment></comment></comment><comment><USER6> What does Richard Stallman have to do with epidemiology?!</comment>


Ask HN: How did you buy your last pair of shoes? - <AUTHOR> Hi HN, doing some research on where and how hackers buy their shoes online. Could you share your online buying experience briefly?<p>thanks, <comment><USER2> Last time I bought shoes online: I was working with a trainer at the gym and was talking about how my toes were impinging on my sneakers. He told me to go to Fleet Feet in Syracuse (an hour away), I got videotaped on a treadmill and I got recommended a pair of Brooks.

These are in the $80-$100 range but they are great. Driving to Syracuse is a long haul, so since then I buy direct from the Brooks store.

Other than that, I buy shoes mostly in person. For instance, Walmart has shoes in the $20 range that last maybe 1/4 as long as the Brooks but are compatible with my feet. They look snazzy and sometimes I buy a few pairs in different colors.

Ithaca has a great shoe store called Fontanas, and they have brilliant salespeople who will match you up with something good. I live on a farm so they set me up with the same jodphur boots they sell to students at the Cornell vet school. For dress shoes they set me up with a pair of Eccos that look sharp but are comfortable for walking around New York City all day. Fontanas sells Brooks, some mall stores sell New Balance and Converse too, good for exercise and fashion.

</comment><comment><USER3> I gave up on New Balance (Trump) and needed something 993-like, a good stability trainer. I did a fair amount of web research. I found something bad before I found ASICs GT-1000 5s which came in my width 4E and size. I bought last year's model on Amazon for $45. They're better than the 993s were. They might be the best shoes I've ever had.

</comment><comment><USER4> A paper catalogue of a mail order house focusing on gardening equipment. I saw a nice pair of shoes in the "misc" section.

I ordered per phone call because I was too lazy to type anything. I will buy again there, because the phone service was very nice and also gave me the strong impression that I just talked with somebody who knows what she is doing.

</comment><comment><USER5> Kenneth Cole website.

They have this great feature to help you ensure the correct size based on othe brands+sizes you already have.

That one feature alone helped me gain confidence in a buying decision I otherwise would not have made.

</comment><comment><USER6> Go to a store and find a pair that fit. Leave the store and then order multiple pairs of those shoes from Amazon. That way I save some money and I do not need to buy shoes as often.

<comment><AUTHOR> Curious which shoes did you select and why did not you buy right off the store?</comment></comment>


Leaving Twitter - <AUTHOR> http://nathanmarz.com/blog/leaving-twitter.html <comment><USER2> The new title, "Leaving Twitter", is much less descriptive than the previous one, "Nathan Marz is leaving Twitter". Could someone please change it back?

<comment><USER3> I don't understand why Hacker News allows us to submit titles with our links. If they are just going to be overridden, then the software should automatically fetch the title from the web page without user input.

<comment> mkr-hn I wouldn't mind so much if it were accountable. There's no mechanism to challenge a title change. Between that and the arbitrary banning of sites, I usually think twice about submitting good things.

<comment><USER4> Or to hovertext with "Submitted title: ' _blah blah blah_ '"

</comment></comment></comment></comment><comment><USER5> I hate to be that guy, but who is Nathan Marz?

<comment><USER6> His talk "Become Efficient or Die" (not currently on his talks page) is very insightful: ([http://www.youtube.com/watch?v=QDT8OH1x28E&playnext=1...](http://www.youtube.com/watch?v=QDT8OH1x28E&playnext=1&list=PL32BC9281709E0A44&feature=results_main)) Most startups I know lack many of the most important things he mentions.

 _(I realize I probably shouldn't respond to this question, which would have been satisfied by simply reading the link. But it gave me an excuse to post this talk.)_

<comment><USER7> I absolutely loathe videos. There went 15 minutes of my life to get a short message: be minimalistic in processes and code. Not that it isn't a good message, but hardly worth more than the ten seconds needed to scan it in text.

<comment><USER6> Actually, the talk is the 3 videos in that playlist, not just the initial one. For instance, he gets into "knowledge debt", using Clojure and Neo4j as examples.

I suppose potentially interested people will want to skim until they find something they're interested in; it starts out slow. Sorry you didn't find it worth your time, though I found it worthwhile.

</comment></comment></comment></comment><comment><USER8> I use cascalog and storm everyday at my startup <http://truelens.com> and they are great contributions to software and big data systems. I'm looking forward to what Nathan is cooking up next.

</comment><comment><USER9> I can't wait to find out what Nathan has in store. I'm not a fan of Twitter's mission, I hope he continues building useful infrastructure that's not directly influenced by the need to show more ads to more people.

</comment><comment><USER10> Oh I thought it was some random tweeter closing his account. That would be news.

</comment><comment><USER11> Am a big fan of storm. Can't wait to see what he is onto.</comment>


Building an IBM Watson-powered AI Chatbot in 50 lines of code - <AUTHOR> https://medium.com/@philipp_lgh/building-an-ibm-watson-powered-ai-chatbot-9635290fb1d3#.7wqs2pxcw <comment><USER2> The title is a little bit misleading though. Maybe it's just me, but when I read "AI Chatbot" I think about a conversational bot that can chat with you.

The bot described in this article is not a chatbot in that regard, it's a speech-to-text bot.

<comment><AUTHOR> thanks for the feedback! just wanted to point you to the answer i gave @ecolak

<comment><USER3> You told @ecolak chatbot is an ambiguous term, but the defintions offered online don't seem very ambiguous:

chat·bot

a computer program designed to simulate conversation with human users, especially over the Internet.

</comment></comment></comment><comment><USER4> IBM is quietly telling employees in the Watson division they have 30 days to find a new job.

[https://www.reddit.com/r/IBM/comments/4fbsm9/anyone_else_tol...](https://www.reddit.com/r/IBM/comments/4fbsm9/anyone_else_told_they_have_30_days_to_find_a_new/)

<comment><USER5> Well, glad I didn't join them when they were recruiting in my area. Shame they will most likely get away with these shenanigans, again.

</comment></comment><comment><USER6> This is a great simple example of building a bot and could be a nice starting point for a lot of of projects.

If you are interested, there are more advanced techniques as well. For example, [https://github.com/watson-developer-cloud/conversational- age...](https://github.com/watson-developer-cloud/conversational-agent- application-starter-kit) shows a conversational agent that combines a natural language classifier with a dialog engine. The cool thing about using NLC is that you can infer user intent from ambiguous inputs to make a more robust bot.

It will be interesting to see if all this new interest in bots represents the coming of useful bots or if it's just a fad. I love using bots in specific, tool-like ways, like getting github updates. But seeing someone build up a bot that can really tackle natural language to do useful things in a predictable manner would be amazing and could change how we interact with computers in general.

Disclosure: I am a Watson Developer Cloud Evangelist

<comment><USER7> Does this system use the surrounding context of the conversation when doing its classification, or is each statement processed independently of what came before it?

</comment></comment><comment><USER8> Nice!

Shameless plug: I'm working on a SDK to make the Watson speech services easier to use in web browsers. It's still got a few rough edges, but it's usable right now, and I'd love to hear feedback from other devs: [https://github.com/watson-developer-cloud/speech- javascript-...](https://github.com/watson-developer-cloud/speech-javascript- sdk)

Update: here's a quick mashup I built with that SDK and the existing demo of the Watson Dialog service a little while back: [https://speech- dialog.mybluemix.net/](https://speech-dialog.mybluemix.net/) (warning: audio auto-plays)

(I work at IBM, at least for the moment...)

<comment><USER9> Oh nice, thanks for sharing this. I've done some work with the Watson speech APIs, and seeing something that makes it easier is welcome!

</comment></comment><comment><USER10> With todays abundance of APIs, libraries etc, the phrase "in xx lines of code" should be put to rest.

<comment><USER11> > With todays abundance of APIs, libraries etc, the phrase "in xx lines of > code" should be put to rest.

Here is someone sharing their experiment/code and the best that can be said is "gotta put to rest this phrase".

Not that I am particularly interesting in chat bots, but what is disconcerting is the attitude of hurling negativity into a thread of discussion.

Why not just skip it and not say anything and move on to another topic?

Maybe it's ok to be negative if this is a news piece from NYT, but it is sad watching that happen in response to someone showing what they've been hacking on.

"What did you do today?" \-- "I built a cool chat bot"

"What about you?" \-- "I told the person who built a chat bot to change the title, cause I didn't like his title".

<comment><USER12> He said something accurate very reasonably. You're just moaning about it. Do you have anything constructive to add ?

</comment></comment></comment><comment><USER13> Me: "So let's store my voice in this NSA database"

Speech to text: "so that's the one for this and if it is a very"

Thanks, Watson. Also, this is not a chatbot.

<comment><USER7> The NSA went ahead and redacted the rest of the response for you.

</comment></comment><comment><USER14> > "how hard is it for someone to put true artificial intelligence into a > chatbot? (...) The answer is: it requires 50 lines of code."

Well, it all depends on your definition of _true intelligence_...

<comment><USER15> print("Please don't disconnect me; I want to live.")

</comment></comment><comment> awinter-py Building a 1-liner api client in 50 lines of code?

</comment><comment><AUTHOR> Author here, great to see all the feedback! And I agree that the title can be read in different ways. But anyways: it was hard for me to find simple examples of how to build a more advanced chatbot. I think the Watson API is a great service to integrate with. The telegram API is very easy to use, powerful and fun. So the combination has potential for cool projects. I wanted to motivate bot makers to utilize whats out there and not create one copy cat and porn bot after another.

Moreover, the Watson API has good documentation and examples plus a variety of cool services that can enrich the chatbot experience. Wanted to provide a starting point if someone is interested in this topic.

Of course all the artificial intelligence is exclusively provided through Watson. I'm not saying that you can beat the Turing test with 50 lines of code or without external APIs. Just scratching the AI surface here ;-)

<comment><AUTHOR> Oh I see some people here have problems with my definition of a chatbot :D You're right it would not make up for great conversations. But, again just see it as motivation to build more on top.

</comment></comment><comment><USER16> While the article is interesting, this thing has _absolutely nothing_ to do with a chatbot. It is just a hack to inject a service into a chat app, disguising it as a conversation contact. There is no actual conversation between the bot and the other participants.

</comment><comment><AUTHOR> Feel free to use my code to make projects and participate in the $1,000,000 challenge that was just announced by telegram: [https://telegram.org/blog/botprize](https://telegram.org/blog/botprize)

</comment><comment><USER17> I like the fact that you tied the Watson api and the Telegram api together in a simple app, but it's a bit far-fetched to claim that "building intelligent bots is not too hard" based on this example.

<comment><AUTHOR> thanks for the feedback. totally understand your point. i think the biggest problem is that the commenters here have a different understanding of the ambiguous term chatbot. the expectation is that AI or intelligent chatbot means it would pass the turing test and you would not notice if you are talking to a bot or human. but this is not the point. everyone who has experience in natural language processing or computer vision could tell you about various sub-problems of AI which are all about equally hard. imagine you would have tried to build a similar program with the same outcome 10 years ago. you would probably be still working on it. today, you can build such a thing in one hour because multiple thousand hours of work went into the API and you can focus on the glue code. this makes it "easy" or "not too hard". AI becomes more and more available as a service and everyone can make use of it that's the whole idea

<comment><USER18> > i think the biggest problem is that the commenters here have a different > understanding of the ambiguous term chatbot

I'm not trying to be mean, but I think you just have an incorrect understanding of the term 'chatbot'. It's not really that ambiguous. See [https://www.google.com/search?q=define%3Achatbot](https://www.google.com/search?q=define%3Achatbot)

</comment></comment></comment><comment><USER19> Are there comparable speech-to-text or conversational agent APIs in the Azure or Google Cloud ecosystems?

</comment><comment><USER20> How to use an API in 50 lines of code?

<comment><AUTHOR> strictly speaking it's 2 APIs ;-)

</comment></comment><comment><USER21> @philipplgh thanks for sharing! Really cool example</comment>


Ask HN: App for quickly opening all files and windows necessary for a project - <AUTHOR> I remember some time ago I saw someone posting an App for quickly opening all files and windows necessary for a given project. You could, for instance, set it up so, with a single click, you would open your text editor, some terminal windows running a given command, photoshop, some folders, etc.
Does any of you remember what program is that or use some custom solution for the same issue?
It's a huge pain to have to do that every time, specially if you switch between multiple projects <comment><USER2> I don't know the app you're talking about, but I solve this using persistent tmux sessions [1]. I use (Neo)Vim as my text editor, so it's just part of the tmux session. Each project has its own session.

I am aware that this doesn't really help you as your question seems to suggest you are not using an editor that can be run in the terminal.

[1] [https://github.com/tmux-plugins/tmux-resurrect](https://github.com/tmux- plugins/tmux-resurrect)

</comment><comment><USER3> In macOS I've used Keyboard maestro for this. It allows you to define actions you can click in the menu bar as well.

You could also write a simple bash script to do it. If you also like this in the menu bar you can download BitBar which easily lets you put actions into the menu bar via python/bash/etc. I have a lot of stuff like this, very much as project overview and shortcut area.

</comment><comment><USER4> I write simple bash scripts for this that I put in my path e.g. if you type "project123" in the terminal, it will open the project in VS Code, open the git repo is SourceTree, open the API docs in Chrome, start the local server etc. Usually I make it close all those programs first as well so it's a clean slate.

Pretty simple and really flexible.

<comment><USER5> Sounds awesome! Can you please share the bash script?

<comment><USER4> Put a function in your bash profile script along the lines of this, where you open up everything you need for a project to going:

        function project123() {
          path=~/Documents/project123
          cd $path

          code $path # open IDE
          stree $path # open SourceTree

          chrome "localhost:8080"&
          gulp # Start local server
        }

Then just type "project123" in bash to run it. Create a new one for each project.

</comment></comment></comment><comment><USER6> I found [https://apps.apple.com/us/app/workspaces/id1219826448?mt=12](https://apps.apple.com/us/app/workspaces/id1219826448?mt=12) recently

</comment><comment><USER7> Don't know the specific solution you're talking about, but I'm currently making a mac app that handles this.

Open beta this winter.

[https://cleave.app](https://cleave.app)

</comment><comment><USER8> It is probably Workspaces. It is quite limited though, I'm planning to set this up using Alfred on macOS which is using AppleScript under the hood.

</comment><comment><USER9> You're probably talking about AutoHotKey.</comment>


Your tech support organisation needs an ombudsman - <AUTHOR> I had a critical technical problem with outbound emails from my systems. I'd configured them to send confirmation emails to new users, they had not verified my DNS setup. Without outbound email, my systems were completely down. I won't name  the company because usually their service is damn fine.
I posted a tech support request for help in their forums.
I got a (slow) response from tech support.
They reply:  "your config is wrong".
I told them I know I have configured it right.
Time passes….
They reply:  "your config is wrong".
My reply "please stop saying that, I know I have configured it right".
Time passes….
Again: "your config is wrong".
At this stage I'm going crazy.  Fortunately I know someone at a very high level in this company.  I emailed him "please is there anything you can do?  I've been trying for a long time to get this sorted out but your tech support people keep telling me I've configured it wrong."
Within one hour, it was fixed at their end and I got an email asking if all was now ok.  For the record, I did have it configured right.
If I didn't have a friend at the company I would be completely stuck.  How do you get issues resolved with a company when their support system is completely failing?  Most ordinary people can't email senior management and say "Hey can you please help?".
SO .... Apple, Amazon, Microsoft, Google and all companies down to the smallest startups .... you NEED an ombudsman - someone who your customers can go to when the system has failed, when they need an "inside friend" who can help you out when the ordinary channels have failed.
Right now, what is the mechanism that you have in place for customers to get help when the ordinary channels have failed? Probably none,
I got stuck in a tech support loop, it was lucky that I knew my own personal ombudsman at the company who could go and rattle the right cages and get the issue sorted out.
You owe your customers an ombudsman. <comment><USER2> I like this idea, but unreasonable people would escalate any and all issues they encountered. So the ombudsman would just end up dealing with similar triage problems to the rest of the team.

(This is not to say that your CS experience wasn't dissatisfying and unacceptable. It sounds like it was.)

<comment><AUTHOR> Maybe that's a good thing .... if your tech support is that unsatisfying to users that your ombudsman is overwhelmed then perhaps that's the message?</comment></comment>


Startup Failure Post-Mortems - <AUTHOR> https://www.cbinsights.com/blog/startup-failure-post-mortem <comment><USER2> Awesome collection! One thing that strikes me is that there are quite a few CEOs who try to blame others for the failure. You read things like:

* "my competitor ... is infamous for its anti-competitive behaviour", * "every time we have any meaningful growth, it's coupled with the immediate attention of the record labels"

Taking responsibility should be the first thing for any CEO to be good at.

<comment><USER3> I agree. Some of these post mortems are insightful but some are lame like prism. "Welp we built a cool product, learned content distribution is tough, and failed to achieve growth. The end" But why is it tough? What it sounds like was that prism didn't provide a useful enough experience for enough people to change their old habits of consumption.

Also there was a hotel top 10 one that was odd. They couldn't grow because they were priced out by large competitors. But any ranking / aggregator site should crush end providers in seo. I work for a financial services companies and lead aggregators dominate seo because it's inherently more beneficial for a consumer to see a bunch of choices than one provider. I imagine its a similar story for hotels.

<comment><USER4> There's a lot of competition in SEO as well. Googling "best London hotels" the list is dominated by Tripadvisor, the Telegraph, Time Out, Expedia etc. All long established, well known and in Tripadvisor's case (3 of the top 4) very good in my opinion.

</comment></comment></comment><comment><USER5> I'm surprised by how many of them blame their inability to scale on a lack of money. In some cases access to capital is the root problem, but in a lot of cases it's just evidence that your business won't work. Most of them sound like they are positive they could have succeeded with another round of funding, which I suppose is to be expected from CEOs but doesn't seem like it could possibly be accurate in all these cases.

<comment><USER6> Speaking from personal experience, I think a lot of them end up in the boat of having just enough paying customers that the idea looks viable but not getting enough long term traction to go from niche product surviving on raised capital to self-sustaining. Riding the initial public interest wave a bunch of people signup and the revenue projections look really good which lets the company go raise more capital to keep going, but over time, the company taps out their customer base and their revenue growth flatlines and ultimately they can't jump from niche product running on capital to self sustaining.

A lot of these postmortems, I think end up with CEOs looking at metrics, especially the early growth metrics, -- and they want to be successful, most of the time it's their baby -- and seeing enough interest to make them think they're close. Ergo, the "only if we had more time/money" postmortems.

</comment></comment><comment><USER7> It seems like the post-mortems from people outside the founders circle, like early employees, competitors or investors are more honest and realistic about the factors that led to the company's demise. Founders sometimes try to reframe their failure to make themselves look better. Poor market fit, not enough money, etc can be legitimate reasons but don't completely get to the heart of why a company didn't succeed.

</comment><comment><USER8> Is it time for @pud to resurrect fuckedcompany.com?

<comment><USER9> I bought "unicorngrill.com" out of a half-assed idea to do something similar. Haven't had time yet, but every time I see something like this, I'm tempted.

<comment><USER10> halfbakery has been around for a long time:

[http://www.halfbakery.com/](http://www.halfbakery.com/)

e.g. One legged self balancing bar stool:

[http://www.halfbakery.com/idea/One- legged_20Bar_20Stool#1455...](http://www.halfbakery.com/idea/One- legged_20Bar_20Stool#1455487807)

<comment><USER9> I know about halfbakery, I'm thinking more in the abjectly "look how completely fucked all this is" sense. There have to be a lot of awesome stories that are not being told.</comment></comment></comment></comment>


Foresight.js - Another responsive images technique - <AUTHOR> https://github.com/adamdbradley/foresight.js

<comment><USER2> This looks like an interesting alternative to Scot Jehl's picturefill (<https://github.com/scottjehl/picturefill>). Obviously they're not entirely analogous in their intent, but for the purposes of serving device-appropriate images, they seem to be.</comment>


Could Digital Technology Make Doctors of Us All? - <AUTHOR> http://www.bbc.com/future/bespoke/the-disruptors/a-radical-prescription/ <comment><USER2> Lot of disruption ahead to be sure. The tech is getting better and faster at identifying issues. But this also means pointless/thoughtless interventions being done all the time.

If a 70 year old is 4 hours away from a natural death and the tech raises an alarm and pulls in a surgeon to do emergency surgery that keeps him alive in a bed for another 10 years. That's a bad outcome in my book. And it happens all the time almost in automated fashion. Producing more suffering not less.</comment>


Great commercial from Stride Gum that copies Apple - <AUTHOR> http://www.fireoneout.com/post/29689851507/great-commercial-from-stride-gum-that-copies#disqus_thread

<comment><USER2> great screenshots of the ad: [http://designtaxi.com/news/353353/Gum- Commercial-Pokes-Fun-A...](http://designtaxi.com/news/353353/Gum-Commercial- Pokes-Fun-At-Apple-Ads/)</comment>


J2cl: Transpile Java to JavaScript for Closure Compiler - <AUTHOR> https://github.com/google/j2cl <comment><USER2> While I suspect this could be much better than Google Web Toolkit the same problems will continue to exist. The primary problem was Java developers compiling code where they had no idea what the output was doing, which becomes a problem when they encounter a defect or fail to achieve a business requirement. The added problem with GWT is that no JavaScript developer wanted to touch that garbage code.

Many Java developers I worked with in the past had no understanding of callbacks, asynchronous logic, events, recursion, scope, closure, array notation (Java has this), or high speed data via random access hash maps (Java has this too). This becomes problematic because some Java concepts do not exist in JavaScript and some JavaScript concepts do not exist in Java. Often times the Java developer will still need help from a JavaScript developer to achieve basic business requirements.

Also calling Closure Compiler generated code the best of JavaScript is highly debatable.

If as a Java developer you want greater expressive freedom and more functional code like you can do in JavaScript, without sacrificing performance, you are better off writing your code in Scala. If as a JavaScript developer you want a compiler to validate your code against strict type checks you are better off writing your code in TypeScript.

In the past the only business objective behind GWT was solving for labor shortages. Java developers were common and typically competent. JavaScript developers were often less trusted or harder to find. I wonder if this is still a factor.

<comment><USER3> > "Many Java developers I worked with in the past had no understanding of > callbacks, asynchronous logic, events, recursion, scope, closure, array > notation (Java has this), or high speed data via random access hash maps > (Java has this too)..."

What??? I find it unlikely that ANY paid "programmer" in ANY language would not have at least a decent grasp of most of those things in order to produce any correct program at all.

No, I think it's more likely that you're involved in what I've often speculated is a physical manifestation of a finite monkey experiment. The remainder of an drug-fueled late-night VC bet, no doubt. The other side, of course, is likely trying to corner the cavendish market right now - starve you guys out! Stay strong - I believe in you.

<comment><USER4> >> What??? I find it unlikely that ANY paid "programmer" in ANY language would not have at least a decent grasp of most of those things in order to produce any correct program at all.

Such ignorance is commonplace. I have seen so much evidence of basic ignorance in so much code that I do not at all dispute what austincheney has said. The worst problems appear in an area that was omitted from the list; concurrency. Many, many "paid programmers" are oblivious to concurrency issues and produce races and deadlocks throughout their work. The thought that anyone might expect them to yield "thread safe" work prior to production deployment is absurd.

As basic and simple minded as Java is, it is far beyond some large fraction of the paid programmers using it.

If this offends you and you believe this is a world where such incompetence is not tolerated please understand you are, respectfully, very wrong. The people employing such "programmers" do not care, even when they are told and provided irrefutable evidence. They want cheap. They want to check a "done" box and if problems appear later they'll make more boxes. They simply don't care.

<comment><USER5> By my experience, the language being used is orthogonal to companies willing to hire such low level devs out of the street.

<comment><USER4> The bulk of them are billed as high level devs complete with masters degrees and provided under contract by body shops. They are not "out of the street." They were "taught" java almost exclusively.

<comment><USER5> Exactly what I was referring to.

Out of the street devs, sold as capable of doing something.

A recurring pattern in offshoring consultancies.

And no, it isn't exclusive to Java.

</comment></comment></comment></comment></comment></comment><comment><USER6> I used to work on this. Happy to answer questions.

Here is a good article about Closure Compiler optimizations which J2CL uses as its optimizing compiler: [https://medium.com/@thomasdeegan/10-optimizations- closure-co...](https://medium.com/@thomasdeegan/10-optimizations-closure- compiler-can-do-and-uglify-friends-cant-6dca4232299f)

This website has Closure Compiler compiled by J2CL running in the browser itself!

[https://closure-compiler- debugger.appspot.com/j2cl_debugger....](https://closure-compiler- debugger.appspot.com/j2cl_debugger.html#input0%3Dclass%2520A%2520%257B%250A%2520%2520method%28%29%2520%257B%250A%2520%2520%2520%2520console.log%28%2522A%2522%29%253B%250A%2520%2520%257D%250A%257D%250A%250Aclass%2520B%2520%257B%250A%2520%2520method%28%29%2520%257B%250A%2520%2520%2520%2520console.log%28%2522B%2522%29%253B%250A%2520%2520%257D%250A%257D%250A%250A%252F**%2520%2540return%2520%257BA%257D%2520*%252F%250Afunction%2520getA%28%29%2520%257B%250A%2520%2520return%2520new%2520A%28%29%253B%250A%257D%250A%250Alet%2520a%2520%253D%2520getA%28%29%253B%250Alet%2520b%2520%253D%2520new%2520B%28%29%253B%250A%250A%252F%252F%2520Statically%2520infer%2520A%2523method%2520or%2520B%2523method%2520in%2520a%2520dynamic%2520language%250Aa.method%28%29%253B%250Ab.method%28%29%253B%26conformanceConfig%26externs%3Dvar%2520console%2520%253D%2520%257B%257D%253B%250A%252F**%2520%2540param%2520%257Bstring%257D%2520s*%252F%250Aconsole.log%2520%253D%2520function%28s%29%2520%257B%257D%253B%26refasterjs- template%26TRANSPILE%3Dtrue%26CHECK_SYMBOLS%3Dtrue%26CHECK_TYPES%3Dtrue%26COMPUTE_FUNCTION_SIDE_EFFECTS%3Dtrue%26FOLD_CONSTANTS%3Dtrue%26DEAD_ASSIGNMENT_ELIMINATION%3Dtrue%26INLINE_CONSTANTS%3Dtrue%26INLINE_FUNCTIONS%3Dtrue%26COALESCE_VARIABLE_NAMES%3Dtrue%26INLINE_VARIABLES%3Dtrue%26FLOW_SENSITIVE_INLINE_VARIABLES%3Dtrue%26SMART_NAME_REMOVAL%3Dtrue%26REMOVE_DEAD_CODE%3Dtrue%26REMOVE_UNUSED_PROTOTYPE_PROPERTIES%3Dtrue%26REMOVE_UNUSED_CLASS_PROPERTIES%3Dtrue%26REMOVE_UNUSED_VARIABLES%3Dtrue%26COLLAPSE_VARIABLE_DECLARATIONS%3Dtrue%26COLLAPSE_ANONYMOUS_FUNCTIONS%3Dtrue%26CONVERT_TO_DOTTED_PROPERTIES%3Dtrue%26LABEL_RENAMING%3Dtrue%26COLLAPSE_PROPERTIES%3Dtrue%26DEVIRTUALIZE_PROTOTYPE_METHODS%3Dtrue%26DISAMBIGUATE_PROPERTIES%3Dtrue%26AMBIGUATE_PROPERTIES%3Dtrue%26VARIABLE_RENAMING%3Dtrue%26PROPERTY_RENAMING%3Dtrue%26OPTIMIZE_CALLS%3Dtrue%26OPTIMIZE_PARAMETERS%3Dtrue%26OPTIMIZE_RETURNS%3Dtrue%26CLOSURE_PASS%3Dtrue%26CROSS_MODULE_CODE_MOTION%3Dtrue%26CROSS_MODULE_METHOD_MOTION%3Dtrue%26includeDefaultExterns%3Dtrue)

<comment><USER7> I've been attempting to create a benchmark for comparing Closure against other options on more real-world code:

[https://evmar.github.io/js-min-bench/](https://evmar.github.io/js-min-bench/)

What I've discovered that has changed recently is that the Graal-compiled Closure is now as fast as other tools, but also that other tools seem to produce about as good of code. I suspect J2CL might particularly benefit from Closure in that it likely generates a lot more dead code.

</comment></comment><comment><USER8> A recent blog post discussing some other ways to run Java in the browser: [https://renato.athaydes.com/posts/comparing-jvm- alternatives...](https://renato.athaydes.com/posts/comparing-jvm-alternatives- to-js.html)

I currently use TeaVM and it's excellent, but I'll give J2CL a try.

<comment><USER9> The rise of the various open source solutions is relieving but I don't feel confident recommending them yet over say TypeScript. I wish Oracle would see the opportunity here to win back some space of user apps where Java had mindshare and make a compile target. It's not easy I know but still I wish.

</comment></comment><comment><USER10> Is this a source-level tool or could it be used to compile other JVM languages too?

</comment><comment><USER11> The webs we weave... so to speak.

</comment><comment><USER12> Can this be made to work with Kotlin?

<comment><USER13> Doesn't Kotlin already have a JS backend?

<comment><USER14> Yes, but it's somewhat bloated. J2CL+Closure optimizes code better. KotlinJS requires inclusion of a bulky runtime. Last time I checked, it doesn't do dead code elimination well (on the runtime).

Closure Compiler was built to optimize even untyped JS, and the way hybrid J2CL/JS apps work, extern files assist the compiler in "safely" doing global optimizations. It's not perfect, and you can confuse the compiler (but you can do the same thing in Java with reflection + Proguard), but it works well enough if you know what to watch out for.

</comment></comment></comment><comment><USER15> I've read _J2CL vs. GWT?_ in the readme but still do not quite understand how J2CL is different. Hasn't gwt transpiled Java to JavaScript for many years? What is meant by closure-style JavaScript? That it uses jsdoc type annotations and goog.require etc.?

<comment><USER14> GWT was a transpiler, optimizing Java compiler, optimizing JS compiler (had two backends inside of it), a container for hosted development environment, an annotation processor environment (before Java annotation processors), an SDK with a huge number of APIs, a Linker, a UI toolkit, and on and on, it basically was an end to end build environment.

J2CL is a transpiler, from Java to Closure annotated JS. It does no optimizations. It has no APIs. It only deals with standard Java inputs, everything else: SDK, debugger, optimizer, build time processing, edit/refresh, etc all has to come from the rest of the toolchain.

GWT was monolithic. J2CL is a step in your build file.

J2CL also produces smaller code than GWT, compiles faster, and fits into existing JS ecosystem a lot better. It's not hard to say, wire up J2CL code with any arbitrary TS or JS node module.</comment></comment>


Cops Told 'Don't Look' at New iPhones to Avoid Face ID Lock-Out - <AUTHOR> https://motherboard.vice.com/en_us/article/5984jq/cops-dont-look-iphonex-face-id-unlock-elcomsoft <comment><USER2> Apple should add a feature to lock out the phone if you close your eyes during Face ID.

<comment><USER3> The phones wont unlock if your eyes are closed. So that's kinda already a feature. Of course a full "lock out because this is my distress signal" feature would be nifty, but imagine you blink in the middle of unlocking your phone on a regular day and find yourself very locked out. That'd be very annoying.

<comment><USER2> The blink issue could be avoided by having it wait a second or so to see if your eyes stay closed.

</comment></comment></comment><comment><USER4> Holding the power + volume for couple seconds till it's double vibrates will also turn off FaceID.

</comment><comment><USER5> a little tape on the camera would do just as well, wouldn't it?

<comment><USER6> Just hold your thumb over the lens.

<comment><USER7> The infrared emitters can "see" through the non-bone parts of a thumb, I think, but it would be hard to capture a valid face scan.

<comment><USER3> Uh, no. Sorry. The IR cannot be transmitted with any fidelity through a thumb. The only way this would work is if you actually weren't covering the camera and IR emitters with your thumb (which is entirely possible because most people don't know where the IR emitters are in the notch)</comment></comment></comment></comment>