Guide to Logging - <AUTHOR> https://www.loggly.com/ultimate-guide/ <comment><USER2> I have a long rant about logging, but the TL;DR is: aggregated logging in general is useless don't bother, everything you need to know should be in your monitoring system. Basically, if something is broken and it's a problem, it will happen again, so you just start logging when something breaks. How do you know something breaks? Log your application metrics. Log your customer experience in the form of metrics and monitoring.

But don't aggregate every code exception and warning. If they aren't affecting your customer experience, who cares? And if they are affecting it, then it should be expressed as an application metric in your monitoring system.

Edit: To make my point a little clearer, I believe that central logging and aggregating should be available, just not turned on all the time.

<comment><USER3> Logging is for _events with identity_ , metrics are for events _without identity_. They are not the same thing.

Sometimes I care about the bulk behaviour of my application. I hit 2757 RPS and suddenly find a catastrophic gap in the performance landscape of my application -- that's useful. I don't care much about the particulars of the requests. What matters is the _statistical behaviour_.

But sometimes the application crashes when a _particular input_ is given. These are outliers, they don't show up clearly in _statistical behaviour_. In that case I care about the details.

Metrics are warnings that smokers die younger, on average, than non-smokers.

Logs are a biopsy showing which kind of lung cancer you have.

No sensible production system or PaaS treats them as identical, even if you can derive metrics from logs.

<comment><USER2> > But sometimes the application crashes when a particular input is given. > These are outliers, they don't show up clearly in statistical behaviour. In > that case I care about the details.

But my question is, why do you care about the outliers if the customer experience is not harmed by them? And if it is harmed, then it should should up in your 99th percentile metrics, even as an outlier, at which point you can turn on aggregated logging to look for that one thing. And if that one thing doesn't happen again, then did it really matter?

<comment><USER4> Imagine customer support where you really need a record of the individual transactions for that particular customer. A monitoring solution won't give you that level of detail.

<comment><USER2> Individual transactions aren't found in application logs, they are found in the data store. Also, again, it's important to stress that central logging should be available, just not on all the time. If it's a specific sequence of events that triggers a problem, turn on logging and then ask them to do the sequence again. If they don't need to do the sequence again, then it wasn't really of consequence. And if it happens for multiple users, then customer service should be able to turn on let the developers know to try and find the cause which they can do by adding more metrics or perhaps some temporary central logging.

<comment><USER5> A better compromise would be always having logging on but only retaining very recent logs. You need the infrastructure to support logging and correlation anyway and if you have a short enough retention period you don't have to worry about dealing with growing infrastructure just to support it.

<comment><USER4> Yeah I think most people store them for a limited time, such as a week or a month. Most issues that pop up will only be relevant that long. You can have permanent archives for individual data since storage is cheap, or even summary metrics. Better to start with ground truth because you often don't know what data you'll need in hindsight.

</comment></comment></comment></comment></comment></comment></comment><comment><USER4> Hey guys I'm one of the technical editors for the guide. We created it because logging is really valuable for troubleshooting and monitoring systems. However, it's a complex topic and so many resources today are spread around on different forums. We wanted to have a place to consolidate all that useful information into something much easier to read. If it helps a dev or ops person solve a problem faster or easier than we've done our job!

There is still a lot of content to be written for languages like python, ruby, and more. We'd love to have more contributors, or even just suggestions for the site. I can also get in touch with any of the authors if you have questions for them.

<comment><USER6> > many resources today are spread around on different forums

Centralizing the all the knowledge that's been written about a given topic isn't scalable in terms of contributions. It's far better to focus on enabling _contributions_ than it is to focus on building a solution in which to put the contributions. There's a reason products like StackExchange are more successful at providing features for encouraging contributions than topic specific sites.

> There is still a lot of content to be written for languages like python, > ruby, and more.. We'd love to have more contributors,

There is already a ton of contributions to logging solutions on the Internet. Why not build a solution categorizing those, instead of trying to build new content in a centralized (and I might add commercially curated) solution?

Also, where's the source to this "open source" project? I'm not seeing any links to code.

<comment><USER4> I think readability is a concern. Often when I'm learning a new technology I'd rather sit down with a good book on the topic rather than reading a bunch of forum posts. I can be pretty confident that it will cover the most important concepts, building up from basics to more advanced ones, and showing all the connections in between. A lot of times reading regular posts, you have to build all these connections yourself. We do link to really good resources and documentation where they are available though so if you have any to suggest please let me know!

I think the open source part of the title refers to the fact that we cover all different technologies from a variety of perspectives, not just a single vendor solution. Also, we allow contributions from anyone in the community. I couldn't find an easy way for WordPress to share or collaborate on source code, but if you think of a way, let me know. In the meantime, we're giving access to people who want to contribute.

<comment><USER6> I'd suggest building the content off a Github repo, rendering from markdown files. This solves the problem of contribution enablement. Rackspace has a docs/developer project that I was involved with for a very short time which has its source code available for use. Start there and get your content moved off Wordpress. Nothing against Wordpress, but it's not built for this. Also, code snippets.

Rackspace site on Github: [https://github.com/rackerlabs/developer.rackspace.com](https://github.com/rackerlabs/developer.rackspace.com)

I agree with the readability part. It's important to curate from the stance of educating the multitudes quickly. Having disparate content can be an issue in starting the education, but variety is the spice of life - and use cases as time goes on. I'd recommend content + reference as a solution here. Cookbook style, if you will.

Keep in mind I've spent a fair amount of clock cycles thinking about this than most people. I've rejected things like logging standards as well. That doesn't mean I'm right, but it is, at the least, a data point for you.

</comment></comment></comment></comment><comment><USER7> [https://www.loggly.com/ultimate- guide/?s=parse+WSGI+logs&pos...](https://www.loggly.com/ultimate- guide/?s=parse+WSGI+logs&post_type=post)

0 results

[https://www.loggly.com/ultimate- guide/?s=parse+python+logs&p...](https://www.loggly.com/ultimate- guide/?s=parse+python+logs&post_type=post)

Gives you a page on NodeJS

Ultimate ... not so much.

<comment><USER8> I've downvoted you because the world doesn't need yet another post about how some open source project that has the audacity to call themselves "the ultimate resource" for their initial release doesn't live up to some-random- person-on-the-internet's idea of "ultimate".

I'm guessing from the specifics of your example queries that you already have some knowledge about WSGI and Python that you could contribute to the guide. Why not do that instead?

<comment><USER7> And I commented, as it calls itself ultimate, and it has articles about Java, Node, Apache, Linux (including SystemD) and Windows.

If it was titled "We want to build the Ultimate Logging Resource" I would be OK with it.

I would have no problem contributing, and may well do so over the next while, but titles like this get my goat

Edit: Also, while I know this will be downvoted to hell - Open Source? It is by a commercial company, with -all- most of the examples being their product.

<comment><USER4> I think that's a fair point. It's really something we want and believe will become ultimate over time as more people contribute to it. It's got a good start but needs a lot more work. I think it's useful to show the vision of what we want to become, because logging is a complex topic and so many resources today are spread around on different forums. That's why we wanted to have a place to consolidate all that useful information into something much easier to read. I think it's probably worth a adjustment to the tagline and mission statement on the front page to make this more obvious. Thanks for the suggestion!

</comment></comment></comment></comment><comment><USER9> Your site's readability would be greatly improved if you darkened the text color. #444 or darker is good enough for a white background.

</comment><comment><USER10> 'Become a Contributor' seems to mean 'please give us your email address to be added to our mailing list.'

This seems moderately suspect.

</comment><comment><USER11> Loggly is crazy expensive for what they have on offer (at least given my use case which is aggregating syslog and Windows event logs). You're much better setting up Logstash or Graylog2 on-premises or in public cloud.

</comment><comment><USER12> Was I the only one who was really hoping this was going to be about best practices for cutting down trees?

</comment><comment><USER13> I find nothing on tor or lighttpd :(

</comment><comment><USER14> My four-year-old watches this show, whence I've learned all about logging: [http://www.amazon.com/Mighty-Machines-In-The- Forest/dp/B0000...](http://www.amazon.com/Mighty-Machines-In-The- Forest/dp/B00008YZ0E)

<comment><USER15> The subtext that I've just started to notice, as I watch with my four year old, is that Canada is awesome.

<comment><USER11> I'm going to take this even further off-topic but if you enjoy cheesy vintage Canadian children's television Hammy Hamster AKA Tales of the Riverbank is required viewing.</comment></comment></comment>


Is it true that "R is the easiest language to speak badly"? - <AUTHOR> http://www.r-bloggers.com/r-is-the-easiest-language-to-speak-badly/

<comment><USER2> I think there's an interesting parallel to be drawn between natural languages and programming languages:

"Work on sociolinguistic typology suggests that languages/varieties spoken by small, isolated communities tend to show a considerably higher degree of structural complexity than languages spoken by larger communities with more language and dialect contact (Nichols 1992, Trudgill 2004)."

[http://www.frias.uni- freiburg.de/lang_and_lit/veranstaltunge...](http://www.frias.uni- freiburg.de/lang_and_lit/veranstaltungen/workshop-complexity-and-isolation)

I think the same could be said of R -- having evolved naturally within an (initially) small community of statisticians, there hasn't been the pressure to standardize and simplify that comes with a wider and more diverse user base.

</comment><comment><USER3> R as a language is highly multi-paradigmatic, while remaining essentially a specialized tool for statistical analysis whose users, often scientists, are not first and foremost programmers. Also, the usefulness of R depends on a huge range of contributed packages, leading to duplication of effort and disparate approaches to the same problems.

Because the language is friendly and intuitive enough on the level of manipulating datasets, and template code is available for all of the popular tests and plot types, you can go very far in R without actually learning to program deeply. Considering all this, it is not surprising that a lot of user code is inelegant, inefficient, etc. Perhaps we should be more tolerant of this, compared to other languages, in light of R's status as a rough 'n ready tool for quick analysis, simulation and prototyping.

Of course, reference and contributed R code should show exemplary style. And R code that is aware of the intricacies of the language - the consequences of lexical scoping with lazy argument evaluation, S3, S4 + Reference classes, environment implementation, the possibilities of 'computing on the language' - can be a thing of beauty. I think it's a wonderful language, and I would like to see many of its features implemented in more general purpose languages for application development.

Often it's just the little things. As a very basic example, I am someone who has always disliked that the assignment operator in so many languages is the mathematical symbol for equality. I'm not entirely happy with prefix syntax for assignments either. While R supports "=" and assign() for assignment, it pleases me no end to use "<-" or "->" (and the corresponding nonlocal "<<-", "->>"), with their implicit directionality and action of a target "getting" a value.

</comment><comment><USER4> The combination of R as a statistics dsl, a derivative of the S language plus the majority of users who are not writing complicated software applications makes for a lot of diversity in syntax for better or worse.

There are also simple ways to do things i.e. qplot and then the regular way ggplot.</comment>


Sen Ron Wyden Wants Answers from DHS Over Domain Name Seizures - <AUTHOR> http://www.wired.com/threatlevel/2011/12/wyden-domain-seizure/

<comment><USER2> The most grim part of the article is the quote issued by the RIAA: "Apparently the RIAA is none too happy about the dajaz1.com site being given back [...] 'If the site continues to operate in an illegal manner,' the RIAA said in a statement, 'we will consider all our legal options to prevent further damage to the music community.'"

What a disgusting comment. The RIAA is a business that co-opts the "music community" as though it represented the interests of all music ever recorded to MP3. How is the music blog it took down not _part of the music community_?

<comment><USER3> Simple: if you're not a part of the RIAA, you aren't a part of the music community.</comment></comment>


Xobni: anyone using the beta? - <AUTHOR>

I'm dying to get at least a one-sentence description of this service [besides "email revolution"].
I was invited to the beta but it's PC/Outlook only.
IIRC this shouldn't break any of the "non-disclosure" terms of the beta...if so, I apologize.
Anyone? <comment><USER2> [http://www.xobni.com/blog/2007/09/17/xobni-will-launch-at- te...](http://www.xobni.com/blog/2007/09/17/xobni-will-launch-at- techcrunch-40/)

Apparently they're officially launching tomorrow, so you can check it out then.

<comment><USER3> That was a quick beta considering I just got my invite at 11PM last night.

</comment></comment><comment><USER4> I am using it..I am 50/50 on whether to buy a MAC or Windows PC for my next laptop, and this may end up being the tie breaker. I am of course assuming the software will keep getting more useful.

<comment><USER5> Why not buy a Mac and dual-boot? Even if you end up mostly using Windows, Apple laptops are nice hardware.

<comment><USER2> Parallels in Coherence mode is _great_ for running Windows apps. With Parallels you can run your mac and windows apps side-by-side. So you could just use your MacOS apps for most things but have Outlook running too. <http://www.youtube.com/watch?v=rN9jNNeEd98>

<comment><USER6> You can do the same with VMware Fusion... they call it Unity mode.

From my experience, VMware > Parallels.

<comment><USER2> VMware finally got around to releasing their damn MacOS port? Last I heard it was still vaporware, but a google search shows that it's finally released. Took long enough.

</comment></comment></comment></comment></comment><comment><USER7> Let me Guess, Xobni is some kind of AI application to deal with emails. It probably classifies emails nicely.

(My Guess is based on the fact that they want an AI person on their job postings)

<comment><USER8> Perhaps someone is finally doing a POPFile (<http://getpopfile.org/>) as an Outlook plug-in.

John.

</comment></comment><comment><USER9> I would but I'm in Linux and I can't boot into Windows...I'm afraid it'll blow up (my video card is messed up and I really do not want to deal with changing the video card drivers)

If there were Thunderbird support I'd be using it at this very moment.

</comment><comment><USER10> Why not just get outlook on a windows box, configure it to grab mail from some old account, and see what it does?

<comment><USER5> Outlook and Windows are both expensive. Piracy is an option, but it's still a pain.

<comment><USER10> Piracy is a pain? Universities sell $10 versions to students.

<comment><USER5> Setting up a Windows box is a pain. I generally don't do it unless I'm promised money, good food, good beer or sex. Also, not everyone here is a student.

</comment></comment></comment></comment><comment><USER11> I am installing it right now, but I think I'll remain on the safe side of xobni's NDA.

</comment><comment><USER12> Got a beta invite, but I use Linux and Evolution so...

<comment><USER13> Pass it on then buddy... heuristix at gmail.com!

<comment><USER12> I don't mind...except that the invite mail says - "Please do not share this link with anyone, post reviews, or take screenshots until it is publicly released."

:(

</comment></comment></comment><comment><USER14> got a beta invite too. but I'm on RailsConfEurope and have only my MacBook with me :(</comment>


Samsung to Launch 'Mini' Galaxy S III With 4-Inch Display - <AUTHOR> http://www.wired.com/gadgetlab/2012/10/samsung-galaxy-s-iii-mini-4-inch-screen/ <comment><USER2> The article states that the 4-inch display is the same size that apple uses in the iPhone5, but isn't that a huge assumption that Samsung would move to a similar aspect ratio?

Is there a better way to measure mobile screens then inches (or x/y pixel count)?</comment>


MySQL 8 vs. PostgreSQL 10: Deep dive - <AUTHOR> https://hackernoon.com/showdown-mysql-8-vs-postgresql-10-3fe23be5c19e <comment><USER2> For me it isn't even the background technology… it's the behavior of the SQL language itself. With MySQL, every single time I've used it, I've come across something that pisses me off as an unexpected default behavior… from the borked utf8, to the multiple string quote escape characters. Every time. PostgreSQL is far more rigid and consistent in it's SQL language and implementation. Plus plv8 ftw!</comment>


Using Google's prettify to add syntax highlighting to code snippets - <AUTHOR> http://danyalzia.com/post/105630079126/using-googles-prettify-to-add-syntax-highlighting <comment><USER2> That black color is very intense and IMHO not very pretty.

</comment><comment><USER3> Prism is a good light-weight alternative.

[http://prismjs.com/](http://prismjs.com/)

</comment><comment><USER4> Just as a note, the code is greyed out and hard to read when Javascript is disabled.</comment>


The dead of Autumn Radtke is not related to the Bitcoin - <AUTHOR> http://bestproductips.blogspot.com/2014/03/Autumn-Radtke-bitcoin.html

<comment><USER2> Horrible spelling, no content.

<comment><USER3> Agree that the blog post does seem to be written by a non-native English speaker.

But there is content; the post claims that First Meta was a trading site for virtual currency (e.g. gold in WoW) and not a bitcoin exchange as has been implied by most coverage of her suicide.</comment></comment>


Why I Voted to Sell .org - <AUTHOR> http://www.circleid.com/posts/20191127_why_i_voted_to_sell_org/ <comment><USER2> "if we take Ethos at their word, they should be just as good a steward for .org as the Internet Society has been"

Nothing to worry about here!</comment>


Quick list of videos about the top stories in Tech - <AUTHOR> http://techfiltered.com/feeds/index/tag:none/sortFlag:popular/filter:video

<comment><USER2> This is awesome.</comment>


When You're at the Crossroads of Should and Must - <AUTHOR> http://firstround.com/article/What-to-Do-at-the-Crossroads-of-Should-and-Must

<comment><USER2> This is such a well written and motivating piece. It literally made my heart beat at a faster pace.</comment>


Logitech lost $100MM on Google TV, will discontinue Revue - <AUTHOR> http://news.cnet.com/8301-1023_3-57322966-93/logitech-confesses-to-gigantic-mistake-with-google-tv/

<comment><USER2> I wonder if this means that the fabled Google TV 2.0 update for the Revue won't actually happen? It seemed odd that the Sony's came out first and there's been near-total radio silence about a timetable for the Revue's update, but with this out there I wonder if I should return the Revue I just bought in anticipation of the Google TV 2.0 update.

</comment><comment><USER3> Ouch, that is a lot of money.

I got a free Revue from Google, and we use it a lot to watch streaming Netflix movies in our living room. I would hope the next TV that I buy has Google TV built in.

</comment><comment><USER4> They're not the only company who lost money on Google TV.</comment>


Ask HN: What are the most inspiring books on leadership? - <AUTHOR>

After watching Jack Dorsey's Startup School video[1], I thought about what are some of good books to read on leadership.<p>What are some of the leadership books that inspired you or strongly suggest to read?<p>[1] http://www.youtube.com/watch?v=wEQawgkCMOU <comment><USER2> _How to Win Friends and Influence People_ (but buy an edition printed before Carnegie died; more recent versions have been rewritten by other people)

<comment><USER3> Great book. There's also a good BBC interview with Warren Buffett talking about the original Dale Carnegie courses.

</comment></comment><comment><USER4> "Bismarck: A Life" by J. Steinberg. An object lesson in overweening use of power and personality. But lessons for effective leadership nevertheless.

</comment><comment><USER5> "The Score takes Care of Itself" \- Bill Walsh

Jack Dorsey talked about it in Startup School and I highly recommend it as well.

</comment><comment><USER6> Herbert Simon's _Models of My Life_ is in general interesting and has some very good sections on leadership, mostly in the research and academic world. I don't know that I would call it inspiring.

</comment><comment><USER7> The Endurance: Shackleton's Legendary Antarctic Expedition

</comment><comment><USER8> Change by Design by Tim Brown</comment>


Show HN: We're writing a book about Meteor - <AUTHOR> http://themeteorbook.com

<comment><USER2> have you guys picked a platform yet for writing the book? using LaTeX? this looks like something that <http://pen.fm> might be useful for, especially since the founder of that is into node as well, might be doing meteor stuff too actually :)

e.g. [http://www.pen.fm/read/Returning-as-an-Engineer- PN1368383b7c...](http://www.pen.fm/read/Returning-as-an-Engineer- PN1368383b7cd66bfc)

<comment><USER3> What does Pen.fm do?

And we haven't really decided on this yet, I don't think we'll need to use LaTeX but we'll see. Any suggestions are welcome :)

<comment><USER4> If you do end up deciding to use LaTeX, please consider <http://SpanDeX.io>! Not sure when you intend to start writing but in the next month we plan to push out some really robust reviewing/editing features. I don't think we've had anyone write a book on our platform yet so it'd be interesting to see how that goes. Anyway, if you end up going this route feel free to reach out to me if you have any feedback!

</comment></comment></comment><comment><USER5> The only problem I could see is that the meteor api is still potentially subject to major changes which could make large parts of the book invalid in a short period of time.

<comment><USER6> yes. This is a curious decision.

<comment><USER3> Of course, we'll make sure the book is up to date with the latest version whenever it comes out. And we'll also provide updates if any major change come out in the months after the book's release.

</comment></comment></comment><comment><USER7> Those who like to build to Meteor-like apps while keeping Node's modularity and npm should check out Derbyjs, SocketStream, FlatItron, Express paired with Backbone/Amber/Angular and Airbnb's upcoming Rendr.

Most allow also to opt for a server-side rendering and mix it with real-time features which is good for SEO (check out Airbnb's new mobile site).

<comment><USER8> Jesus. Is it bad that I recognize exactly two of those proper nouns?

<comment><USER9> Single-page apps will be all the rage in the upcoming years, so I'd get familiar with one of them (I prefer Ember, has been renamed from Amber).

<comment><USER10> Do you happen to have any resources on them? I have been looking around for the past few days and it's hard to find something that seems to teach best practices and not 'hey let's copy the code for a todo app and not tell you what's going on'

</comment></comment></comment></comment><comment><USER11> Looks great! I'm really looking forward to seeing the finished book.

</comment><comment><USER12> Interested, but can't open in China, where's the hosting?

<comment><USER13> Good god. I don't know how you poor bastards put up with that ridiculous nanny state firewall. Living in China must be like living with really strict parents.

<comment><USER14> You're not very familiar with Chinese parents in general, are you...?

</comment></comment></comment><comment><USER15> Cool, but why not just use web sockets?

<comment><AUTHOR> Well, if you use websockets, you have to wire things together yourself. Sure, you might want to decide _exactly_ what data to send to each client, when to send it, how to propagate it between clients, how to deal with merging issues, etc at a message-by-message level, you want to get down to this level.

But there's probably a good chance that (unless you are doing something very specific) you'll just end up re-implementing the built in pub/sub mechanisms of meteor collections which usually give you exactly what you need with almost no work required.

To me, that's like asking "why use rails, why not just use HTTP?". We build on layers of abstraction.

<comment><USER7> Isn't that what Node.js is all about? Modularity? To get away from the monolithic, bloated, one-fits-all frameworks like Rails? And maybe there's something between "Rails" and "HTTP" (Sinatra => Express JS => modularity).

Building a new framework on top of Node but cutting out the fabulous npm and its huge ecosystem, instead unnecessarily introducing an own package manager/middleman in order to lock in developers and not following (or rather ignoring) Node's core principles is a brave step. Good luck guys, you'll need it.

<comment><AUTHOR> Definitely! There are things between meteor + websockets (socketstream and derby come to mind), and depending on your project, sometimes they are going to be the best choice. Just like sometimes Rails is the best choice and sometimes Sinatra is.

I was just saying that it's a rare case that going all the way down to the metal, and using websockets alone is going to be that best choice.

On the second point, I'll won't speak for the meteor team (which I'm not a part of), but here's what Geoff Schmidt recently had to say on the matter: [https://github.com/meteor/meteor/pull/516#issuecomment-12919...](https://github.com/meteor/meteor/pull/516#issuecomment-12919473).

<comment><USER7> Thanks for your thoughts but how can a walled garden like Meteor can be the best choice for anything?

Meteor tries to create an entire new ecosystem using Node's merits. The reference you posted lists pseudo reasons for choosing a new package system. I don't know if here is the right place to discuss them but some of them are heavily misleading and primarily business-driven and motivated by a developer's lock in. It's important to state that especially Node's npm is one of the most modern package managers around and already solving issues like repeatability, asset building and bundling (npm's concept is totally different though). Sure there's a need for package management on the client side but coupling everything together is not the answer.

I highly appreciate the talented team behind Meteor and their achievements up to now but it's sad and a deal breaker that they choose this non-npm route.

As a final point, I am aware that maybe it can be good to have competing JS on the server ecosystems and all JS users will benefit at the end from this competition.

<comment><AUTHOR> I don't think it's quite as bad as you make out / think.

As Geoff said, in the upcoming release, it'll be trivial for a meteor package to wrap a npm package and integrate it into the 'walled garden'. If and when a client side package manager appears that everyone is using, I'm sure they'll do the same.

So, I'd expect a situation to arise which is much like that of rails + gems; a ruby library that is not completely tied to rails is usually published as a stand-alone gem, with a X-rails gem which does the railties stuff.

Perhaps it's not as clean as it could be, but I think it's unavoidable when you consider some of meteor's design decisions (synchronous APIs being the biggest one) -- debating these is of course a separate issue.

</comment></comment></comment></comment></comment></comment><comment><USER16> ignorant marketer here:

Could Meteor be used to build a CMS with 90% static clean html + 10% live updating information (comments, chat, social, etc)?</comment>


Ask HN: Why do you read HN? - <AUTHOR> <comment><USER2> Typically I resort to HN as a forum of modern scientific knowledge and young chaps and old chaps trying to make cool stuff happen in the world. It's really not about venture capitalizing or even making tons of user conversions for me, I have no tech products that I sell and I have a huge skillset. I'm interested in the furthering of human knowledge and HN is pretty close to what slashdot used to be for that.

</comment><comment><USER3> For me, the biggest reason is the community and the people that hang out on HN. I mean how many places can you get Alan Kay to do an AMA of such high quality as this:

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

Other reasons are simplicity and speed of HN site that makes it a breeze to only focus on the content. No flashy stuff.

</comment><comment><USER4> I find myself coming here almost everyday because of the level of quality in the content. I always leave with something new. It's a great place full of smart minds, civil discussions, and lots of knowledge.

</comment><comment><USER5> I actually thought about this the other day. Whoishiring every month was the only real reason I could come up with.

</comment><comment><USER6> I like seeing what tech trends people are discussing and what people are working on (show HN)

</comment><comment><USER7> Interesting stuff on here. Also found my current job (which is awesome!) here via whoishiring :)

</comment><comment><USER8> For the comments, and ask HN.

The level of discourse at HN is, in my opinion, the best on the net. I value the contributions of the commenters here, and that's unusual for me anymore.

</comment><comment><USER9> Content. And no "modern" web UI bs with ads that bring a super computer to it's knees.

</comment><comment><USER10> Because reddit is blocked at work.

</comment><comment><USER11> ShowHN's that make it to the front page. Space news.

</comment><comment><USER12> Read? I'm just here for the pictures.

</comment><comment><USER13> To pass time during a long jenkins build...

</comment><comment><USER14> Mostly addiction</comment>


Facebook Is Now Worth $190 Billion - <AUTHOR> http://techcrunch.com/2014/07/24/facebook-is-now-worth-190-billion/

<comment><USER2> worth != valuation

a PE ratio of ~100 is just not right.</comment>


Regardless of what participants say, they exhibit a preference for negative news - <AUTHOR> https://journals.sagepub.com/doi/abs/10.1177/1940161214524832 <comment><AUTHOR> > regardless of what participants say, they exhibit a preference for negative > news content.

Some negative news :)</comment>


The internet's rising secret social code - <AUTHOR> http://www.bbc.com/future/story/20130701-the-internets-undercover-code <comment><USER2> This article never really manages to make a point. Many of the cited examples are anything but secret. The interesting point made about withholding meaning since there is no way to withhold content falls down when you realize it's predicated on out of band communication which is becoming less available generally. All in all, it is merely another example of people doing online, what they do offline, not some fundamental shift in human dynamics.

</comment><comment><USER3> Are there any methods available for a UK resident to view this article, other than going through a non-UK VPS?</comment>


Google is losing control of Android - <AUTHOR> http://betanews.com/2012/04/28/google-has-lost-control-of-android/

<comment><USER2> I completely disagree with the article author's premise that Google must "regain control" of Android.

The whole idea (according to the author) is that the strategy of open-sourcing Android would serve as a platform for offering other Google services around all these other devices in an effort to compete with Apple. I doubt that was Google's plan, but if it was, what a phenomenally bad plan.

My favorite statement: "Google could take full control of Android, by not releasing future versions to open source and changing licensing terms."

Yeah, that would be a great way to compete with iOS -- by restricting access to future versions of the software? What nonsense.

Any manufacturer building on Android was not doing so to become a lackey for Google services, plain and simple. Hence, Samsung and Amazon. The fact that those two companies are now dominating the distribution numbers for Android devices doesn't make Android less successful or endangered -- it only promotes it. And that's good for Google.

Again, I doubt Google is thinking about Android along these lines. However, I'd sure like to be in the room to hear the Android team respond to this author.

<comment><USER3> You must not be familiar with some of the history of Google's management of Android. It is documented beyond argument, including through leaked internal emails, that Google sets Android policies intended to control vendors. This is, for example, the reason for the "delayed open source" strategy.

</comment></comment><comment><USER4> I'll admit that I TL;DRd around the middle, but I have trouble believing that the Kindle's customized Android OS is the driving factor in its initial market success.

It's much more likely to be the fact that it is supported by Amazon's ecosystem (which is alluded to as a comparison to Apple) and the fact that it debuted at an unheard of price ($200) for quality tablets, and ended up really pushing the market price of tablets in general down.

<comment><USER5> Yeah, it's not the UI. It's not that great of a UI. It's the $200 price combined with good marketing and the promise that you have access to a lot of content on it, be it books, music or videos.

If someone would compare them rationally, they'd see that a "real" Android tablet that costs around the same would have almost no disadvantage and a lot of advantages compared to Kindle Fire: a lot more apps, higher flexibility for anything, better browsers, app sideloading, and on top of all that, they'd also have all of Amazon's services:books, music and videos. So a $200 Kindle Fire would have almost nothing over a $200 Android tablet.

The only problem is that so far none of the manufacturers did that great all- encompassing marketing for a single tablet that offers you a lot of "benefits" and not a list of specs. Amazon did that, and they saw success. I'd like to see at least Google do that with their upcoming (rumored) Nexus tablet.

Being the first to $200 for a tablet that was seemingly as high-quality (or close enough) to an iPad 2, was a big first mover advantage for Amazon, too. A Google tablet that is $200, or even $150, would help. But it might get the same level of impact only if Google is the first to a "quality" tablet that costs only $99. If Google would do that first and promote the heck out of it and what you can do with it, I think many millions of people would want one.

I doubt they could do it this year, but early next year with the 2nd generation it might be possible. But they better do it before Amazon. Because Amazon will definitely go that direction, since their intention is to only sell a massive amount of such devices, to get users to pay for their content.

<comment><USER6> The problem with that is, Amazon can sell hardware at a loss, fully expecting to make up the cost from people purchasing wares (books/music/anything on amazon) on their devices. While Google does make money from the Android ecosystem, I doubt it's enough/direct enough, to begin selling hardware at a loss.

</comment></comment></comment><comment><USER7> Before Android came out, each vendor had their own OS. Google doesn't care about the OS, they just want a platform that will allow users to consume their services.

In order to convince the manufacturers that they should switch from something they completely controlled to something that another company controlled, they needed to know that it would be cheaper and still allow them to generate a strong brand loyalty.

For example, HTC has the Sense UI which makes their Android phones look and feel a little different. You might think that this is a stupid waste of HTC's time, but in 2 years when you get a new phone, they want you to get an HTC, not an Android.

This is critical in understanding why Google cannot tightly control Android. If the phone manufacturers see that they're losing the ability to differentiate their own brand, they'll look at other options.

<comment><USER8> > Before Android came out, each vendor had their own OS.

... which was Symbian. Android in the new Symbian - omnipresent but much more capable.

</comment></comment><comment><USER9> It's refreshing to know that all it takes to develop a winning mobile OS strategy is a BA in journalism.

<comment><USER10> Thank you for that much necessary snark. It's tiring to read articles on tech sites by people who have never really worked in tech (reporting about tech is not working in tech, much like writing movie reviews does not make you a film maker) who think they know better than everyone else.

<comment><USER11> Me too! I hate it when those investigative journalists try and cover a serial murder investigation. I only want to hear from other serial murderers on the topic. Writing about serial murder is just not the same as having actually been one.

<comment><USER10> Covering a murder != saying "that's how the murderer should proceed for his next victim" :)

</comment></comment></comment></comment><comment><USER12> This article while citing some legitimate concerns fails to recognize that Google wins as the mobile platforms being used continue to support Google Advertising. From what I understand Google's biggest goal for Android is to keep one company from becoming an monopoly and as a result keeping Google out of the business of advertising to those consumers.

<comment><USER13> Indeed. Google was already "won". Anything more in the mobile space is just a cherry on top.

Even with tablets, Google is far better off with there being two players successful in this space, rather than it being just Apple and irrelevant "also rans" from Samsung, etc. Given the understandable lack of carrier interest in subsidizing tablet marketing, Amazon stepping up to the plate is probably the most cost effective win Google could hoped for.

</comment></comment><comment><USER14> Ok, so on the conclusion:

\- Nexus tablet is on the way, don't worry, Google will put it out.

\- Chrome is already on Android, and the codebases are being merged _right now_ in the chromium tree.

\- Chrome will _never_ be on iOS as long as Apple doesn't change the rules. Simply because it can interpret other programs via internet (with javascript) and this is forbidden by iTunes TOS.

\- we might see a preview of Android 5 at Google I/O, but will have to wait the end of the year to see it ship.

<comment><USER15> With respect to your third point, there are already a stack of other browsers on iOS. I don't see why Chrome would explicitly be excluded, compared to them.

<comment> X-Cubed I believe all the existing iOS browsers are just wrappers around a Safari web view. While Chrome and Safari do have a lot in common through their Webkit heritage, I doubt Google would bother shipping a build of Chrome for iOS, if it was limited to being a re-skin of Safari.

<comment><USER16> This is not the case for Opera.

<comment><USER14> Because, AFAIK, it's Opera _Mini_ , not Opera Mobile. Opera Mini doesn't do any JS client-side. I'm not even sure it does all the rendering client side (needs Opera's servers to work).

</comment></comment></comment></comment></comment><comment><USER17> [http://betanews.com/wp-content/uploads/2022/04/Tablet- foreca...](http://betanews.com/wp-content/uploads/2022/04/Tablet-forecast- Forrester.png)

This graph is apparently from the Forrester report quoted in the article. How does one come up with this? So in 2015, Windows8 (9?) will all of a sudden gain some good traction at the expense of Android market share but not iOS? How do you interpolate constant demand for iOS devices 4 years into the future when the first iPad is only 2 years old?

</comment><comment><USER18> I think the issue with Android is that without CyanogenMod, most android users would have no way to go to the stock experience that Google has designed

<comment><USER5> That's why I'm hoping that starting at least with 2013, _all_ of Motorola's devices will use stock Android. It would make no sense to have a separate division inside of Motorola that once the Android team develops a certain version of Android, then it runs through them so they add more modifications before they release it to market. They should just use it as it is from the Android team, and ship it to market fast.

It would even be a (pretty major) competitive advantage if you think about it, considering nobody does that, and there are quite a lot of people that want stock Android. The other manufacturers have no reason to complain, since they can always do the same, too. And if they were so against a stock version of the OS, they would have never used WP7. But they did, so that tells me that they wouldn't be _that_ upset about it.

<comment><USER13> To build on this point, once stock versions of Android are generally available, having a non-stock version of Android would only be an advantage to manufacturers if they were adding something of genuine value to consumers, or to a segment of consumers.

Of course, the carriers will still find it in their interest to shove bloatware onto people.

<comment><USER19> I think the last part hit it on the head. The average android phone buyer likely isn't savvy enough to know the difference while doing a quick run- through in the store, and the manufacturers know this. Bloatware increases their razor thin margins, so they're strongly incentivized to put it on there.

</comment></comment></comment></comment><comment><USER20> Google's inability to get new software into user's hands is definitely going to be a problem going forward. I'm actually surprised it hasn't burnt them worse already. Take ICS for example. It was a very good update for Android yet by the time it reaches even 25% marketshare iOS6 and Windows Phone 8 will probably be out. It's quite possible iOS7 will be released before ICS/JB comprise even 50% of the Android market. Is that really sustainable?

<comment><USER21> This I feel the meat of the problem. When it is easier to upgrade an IOS device over a Windows PC, and Apple supports the same devices for longer than Android (which being a tiny bit open source opens up easy backporting) it is strange that people wonder why no one likes classic Android as much.

Hint: When Siri came out, everyone with a Droid phone wanted it too. When the feature complete competitor comes out in full force, probably in Android 5? they will all be hilariously frustrated with how they can't use it because they have a 2 year old phone.

<comment><USER22> Any reason Google's Siri counterpart would be limited to new versions of the OS? Most (all?) of Google's core apps are available on older versions of the OS.

In fact I'm not sure I understand why Siri isn't available on the iPhone 4/iPad 2, etc.

</comment></comment></comment><comment><USER23> > _Google could take full control of Android, by not releasing future versions > to open source and changing licensing terms. The logic: Android is too big > to fail, that OEMs would have no other choice but align their customized > platforms with the broader Android ecosystem._

There is yet one more option for Google: instead of moving towards more copyright, move towards copyleft. At the _very least_ , requiring derivative source code to be published would allow the various Android derivatives to build off the work from each other, and allow work to be reintegrated back into the core. Taking it even further, prevention of hardware restrictions on software modification (GPLv3) would encourage modifying and swapping Android derivatives.

Again, Google has to worry about adoption if they make their license more restrictive (and GPLv3 is _definitely_ more restrictive for the makers of derivative works). But if they continue to release excellent software, and there continues to be a lack of viable alternatives, they might get away with it.

</comment><comment><USER24> I wish Google would add some of its apps to the Amazon App Store so I can have a nice gmail reader on my Kindle Fire.

<comment><USER25> You should be able to install g-apps from .apk - It's possible to do on other android devices and unless amazon did something curious to the Fire it shouldn't be any different. There are gmail, calendar and other google apks floating around that you could use.

<comment><USER26> Except you lose out on (semi-)automatic updates. If you want to get the Market (and thus, GApps), there's a handy little Windows utility to do just that: <http://forum.xda-developers.com/showthread.php?t=1399889>

</comment></comment></comment><comment><USER27> Losing control of android could be a boon to Google, they could focus on core development more and the android ecosystem would be even more scalable.

</comment><comment><USER28> You mean we wont have someone tracking us, watching us, recording us 24/7 anymore? What a shame.

Google is creepy. I think the web would be better off without their prying eyes. Specially since they are in bed with the US government just like everybody else in America.</comment>


Kill Math using Data Visualization - <AUTHOR> http://www.fastcodesign.com/1664508/could-this-ipad-interface-help-kill-math

<comment><USER2> I think this comment said it best:

 _I think it's important to maintain a distinction between the syntax needed to actively do math, and that needed to passively visualize it. Of course these types of visualizations are great, but people aren't going to be solving differential equations on their iPads anytime soon..._

It's a tall drink of water to say you're going to 'kill math' if really, all that is happening is a divergence from the so-called 'interface'. I think that interface is vastly more relevant than visualizations when it comes to understanding how to think an equation through, and just as importantly understand why arriving at a certain answer matters.

I'm not sure I'm too thrilled about this idea, but perhaps I'm misunderstanding it.

Also: From the ideator's own blog (<http://worrydream.com/KillMath/>):

 _analyzing a differential equation without exploring it in phase space was like analyzing a piece of sheet music without actually hearing it._

Terrible analogy, since most musicians do this _all the time_. It's called sight reading, and it's a very valuable skill to have. (citation: former concert trombone player)

<comment><AUTHOR> The vision behind this (I think) is to make math accessible to common man by taking away the abstract nature of teaching and understanding math theorems.

Human brain responds to associations that explain things using something you can relate to or easily visualize. The archaic nature of math doesn't lend itself to do that unfortunately. The variable 'x' is just a made up concept with no grounding in realism. Data visualization on the other hand triggers human brain to make association, therefore making it easier to understand math.

Math is of no use unless put in practice...

</comment></comment><comment><USER3> I think it's more like scaffolding. After a while you find the symbols are just fine but why have such a steep barrier to entry? Fell-man wasnt too happy with Feynman diagrams - he hated them for ,bringing computation to the masses,. I think learning maths visually would greatly increase the pool of future math-literates in the world. Not all of us want to be professors at a university

</comment><comment><USER4> This reminds me a bit of some of the "visual mathematics" ideas from the 70s, associated with mathematicans like <http://en.wikipedia.org/wiki/Ralph_Abraham> and with some computer artists</comment>


Semi-Critical Intel Atom C2000 SoC Flaw Discovered, Hardware Fix Required - <AUTHOR> http://www.anandtech.com/show/11110/semi-critical-intel-atom-c2000-flaw-discovered <comment><AUTHOR> An article in El Reg about this was previously discussed on HN [0], but this one has some more informative links and details. It's an interesting example of how even extremely simple, mostly legacy parts of core silicon (the Low Pin Count bus in this case) that shouldn't actually be strictly critical can sometimes in usage yield surprisingly serious failure modes. The impact this time may also be less generally obvious to the public vs issues like the 2011 series 6 chipset degradation, but result in more irritation for the HN crowd. Since the primary target usage is more infrastructure applications like routers/microservers/NAS just physically getting at everything could be aggravating depending on deployment.

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


JavaScript: Clarifying The Keyword 'this' - <AUTHOR> http://henrycode.tumblr.com/post/37627169791/javascript-clarifying-the-keyword-this <comment><USER2> JavaScript has a number of nice features that do make sense, and if you understand how prototype chains work and such the complexity is worthwhile. "This" hasn't been one of those features for me.

I'm sure "this" makes sense in some context, but it forces me to think about the implementation of the language way too much without any benefit that I consider it a misfeature. So I don't use it.

Instead, I capture it with another variable in a prototype declaration:

       var that = this;

and refer to "that" everywhere in the prototype. Tends to be a lot simpler, and usually for event handlers I'll create a closure to avoid the issue entirely.

</comment><comment><USER3> The fact that people are still writing clarifications for what something seemingly as simple as "this" actually _means_ is just another argument for avoiding it entirely.

It's a huge source of sneaky, little errors and you wont find any JS object I've written without the first line being "var self = this;".

Basically "this" considered harmful.

</comment><comment><USER4> The this keyword is confusing, it's good to see posts clarifying it. However, while the rule in the post will be right in many cases, this list is incomplete, even for some common usages of this, and might lull folks into a false sense of security:

1\. "To the left of the dot" should be "to the left of the dot or bracket". E.g. o["foo"]() also passes o as this.

2\. When you pass callbacks to built-ins like forEach, you can supply a thisArg, and if you don't, this will be bound to undefined (<http://es5.github.com/#x22.214.171.124>). (EDIT): Copying from cwmma below. Some callbacks, like setInterval and setTimeout, pass the global object rather than undefined. I suspect that DOM callbacks tend to use the global object and JS callbacks tend to use undefined, but that's not a blanket statement by any means.

3\. This isn't purely JS, but when interacting with the DOM, this is also implicitly bound as a DOM element in event listeners. E.g. document.addEventListener('click', function() { console.log(this); }) will print the document object when you click on the page. This is quite relevant for any JS web development; if it makes it easier to conceptualize, imagine that the browser is calling a method with the DOM element to the left of the dot.

4\. When the caller is strict mode code and the function is called without method-call syntax, undefined is passed as the this argument rather than the global object. You should always use strict mode to avoid accidentally handing the global object around (in strict mode, the "set to global" option is skipped in <http://es5.github.com/#x10.4.3>).

5\. When using this at the toplevel (which is allowed), it is bound to the global object even in strict mode (<http://es5.github.com/#x10.4.1.1>).

And a few more esoteric ones:

6\. In addition to call and apply, Function.prototype.bind() can also change the this parameter of a function, and violate the "left of the dot or bracket" rule (<http://es5.github.com/#x188.8.131.52>, see boundThis).

7\. Inside a with() {} block (which you should never use, but we're trying to cover our bases here), this is bound to the object passed to with in the parentheses.

8\. If a property is a getter or a setter, this is bound to the object to the left of the dot or bracket in the field access or assignment expression. This actually matches the rule in the post except for the fact that the "call time" is implicit; there are no () in the expression o.x, but it may call a getter function for x that passes o as this (<http://es5.github.com/#x8.12.3>).

(EDIT): One more doozy:

9\. The dot and bracket operators implicitly convert primitives like numbers, strings, and booleans to objects, so it's not exactly what's to the left of the dot:

        Number.prototype.identity = function() { return this; }
        var x = 5
        var x2 = x.identity()
        typeof x2 === 'object' (true!)
        typeof x2 === 'number' (false!)

You can get the raw primitive if you make the function strict:

        Number.prototype.identity2 = function() { "use strict"; return this; }
        var x = 5;
        var maybe_five = x.identity2();
        typeof maybe_five === 'object' (false)
        typeof maybe_five === 'number' (true)

Please correct me if I've forgotten any...

<comment><USER5> Do any of you just avoid 'this' and write your Javascript like infix Scheme? You can define objects via JSON literals with function values, and the result seems both simpler to think about and more pleasant to read. (JS engines are tuned for thissy code instead, I think unfortunately, but you can fall back to using prototypes where it makes a difference.)

<comment><USER6> Yes indeed. I don't bother with 'this' at all, except when forced to by some interface. I don't even bother to define objects most of the time, just top level functions that can easily be called from a REPL. That simple subset of JS is powerful enough to go a long way — long enough that I'm unconvinced one needs anything else, unless one believes one does — and programming this way feels liberating, like riding a bicycle instead of pushing a car.

<comment><USER7> Are you able to write large applications like this without things getting too messy? I'm interested because I usually write JavaScript in the complete opposite way than you just described (strictly OOP, almost like I'm writing Java). This also means that I use 'this' quite a lot. Do you come from a functional programming background? What do you think about languages like clojurescript?

<comment><USER6> My main work is on a complex application, but we write it in Parenscript, a Lisp that compiles to Javascript (so yes, I do like languages like Clojurescript). That gives us escape hatches for controlling complexity that raw Javascript doesn't have. On the other hand, I do still write some raw Javascript and I prefer the same style in both. As far as I can tell from various measurements, the Lisp I write is about half the size of what I would write in JS. That's a win, but not so big that it can be the only strategy for limiting complexity.

Do I come from a functional programming background? Not really. I use closures and lambdas a lot, but my code is rather imperative. My obsession when building systems is to keep the code as simple and small as I reasonably can. Mutable state and even global state don't scare me as long as they help with that. What scares me are architectural assumptions about how one "should" structure complex software.

This sort of thing is a bazillion times more fun to discuss in person, whilst drinking beer, than it is in the contactless format in which we find ourselves. I'd try to convince you that you might do well to drop your OO assumptions, but I'm afraid of coming across as shrill. There isn't enough context here to make one's claims nuancedly enough, and then also "nuancedly" is not a word.

</comment></comment></comment></comment></comment><comment><USER8> The ability to wrangle `this` via fat arrows is one of the nicest things about CoffeeScript.

</comment><comment><USER9> Please fix the indentation in the image. I was so confused by it until I noticed that "location" and "locate" are both properties of the person object. They should both be indented the same.

</comment><comment><USER10> Sadly, one last, unfortunate inconsistency:

All event handlers have the value of 'this' bound to the object that emitted the event:

      var div = document.createElement('div');
      div.addEventListener('click', function(e) {
        console.log(this); // prints

      });

<comment><USER11> That's not a JS inconsistency, that's just the browser calling yourhandler.call(yourobject, eventobject).

The underlying statement is that "event handler" is not a concept in JS, it's just a way of calling functions that some implementations use for some things (browsers for actions, node for I/O, etc...).

In fact, this didn't use to be true of old IE versions if I remember correctly, so it's not a matter of the language, but of what the browser does with your function during event firings.

<comment><USER10> You can get the current emitting object via e.currentTarget. Modifying 'this', while cute, just makes yet another thing that must be explained to people when you start talking about 'this'.

</comment></comment></comment><comment><USER12> You could probably factor exceptions 1) and 3) into the rule too!

             foo();

1) What's left of a bare function call is nothing - except for a blank line that leads to the top indentation level. In other words, what's left of it is the global scope. So, 'this' refers to the implicit global object in your environment. (Alternatively, in strict mode, since nothing is to the left of the call, 'this' is bound to nothing.)

        new Foo();

3) To the left of this function call is the 'new' keyword. So, 'this' refers to the _new_ object that was just created for the constructor.

</comment><comment><USER13> Another exception, functions invoked with setInterval have 'this' be window, even if they're invoked in context with it's own 'this'. This got me the other day. [https://developer.mozilla.org/en- US/docs/DOM/window.setInter...](https://developer.mozilla.org/en- US/docs/DOM/window.setInterval#The_.22this.22_problem)

<comment><USER14> A workaround that I like a little more: [http://javascriptisawesome.blogspot.com/2011/11/setinterval-...](http://javascriptisawesome.blogspot.com/2011/11/setinterval- with-context.html)

<comment><USER13> There are totally a bunch of workarounds, it's just another exception to this, I was using CoffeeScript so I was able to grossly simplify the MDN one [https://github.com/calvinmetcalf/communist/blob/master/src/s...](https://github.com/calvinmetcalf/communist/blob/master/src/socialist.coffee#L9-L16)

</comment></comment></comment><comment><USER15> One exception to the first exception: in a function with "use strict", "this" is _never_ the global object.

<comment><USER11> I don't see the "exception to the exception", he is saying that if strict mode is on, "this" isn't the global object when saying foo(), it's undefined. And that's true.

It's possible to both have "use strict" and "this" be the global object (i.e. it's not true that it's _never_ the global object), as simple as...

      "use strict"; // global scope
      var x = 1;

      (function() {
      "use strict";
      return this.x;
      }).call(this);

<comment><USER16> I am not sure that's quite what you want. Declaring x as a 'var' does not make it a property on the global object. Your example will return an 'undefined'.

I think this is what you want

      "use strict";
      this.x = 1;

      var ret = (function() {
        "use strict";
        return this.x;
      }).call(this);

      console.log(ret); //returns 1

<comment><USER11> I wrote "// global scope" beside the first statement to signify that that statement was run in global scope, same for the statement below it.

In global scope, the activation object is the global object, and so saying "var x = 1" will make the global object have a property x equal to 1.

</comment></comment></comment></comment><comment><USER17> var self = this; why do people bother with 'this'?

<comment><USER18> IMO the use of self as the name of the variable referencing to 'this' is a little dangerous, because in a function, if you miss the line var self = this, self is a valid reference to the window object, so you will not get an expected error for an undefined variable.

<comment><USER17> Better a little dangerous 'self' than a lot of dangerous 'this.'

<comment><USER19> There's no real danger difference. If you implicitly do:

        var self = this;

When you need to use `this`, you just end up proxying the problem behind a variable. If you don't understand what `this` is, it's not going to magically start correcting your misunderstanding.

The only possible value it might have is when nesting functions if you refer to `self` instead of `this` correctly, but this is the only case when I actually use this pattern, and when I first create a nested function that needs to use the parent's scope. Another option is to just `.bind(this)`.

In any case, I would disagree that one should try to avoid `this`. Instead, one should educate themselves to understand what things in the language they're using mean. And this subject is a great weeder question in Web Engineer position interviews. If a person can't implement `bind`, can't explain `call`/`apply`, what strict mode does, and what the `this` keyword means in most contexts, they probably aren't strong enough in JS. This is one of the most fundamental concepts in JS, it shouldn't be a source of confusion.

<comment><USER17> I understand 'this', that's why I avoid it. All languages have their quirks, and some programmers like to think they're 'smart' by taking advantage of those quirks. Then when you or your team members run into problems you blame the person and not the language, which you're right, but maybe you should of just kept your code simple in the first place.

<comment><USER20> I'm not sure I understand you.

Dereferencing things that aren't pointers leads to unexpected results in C. Should we avoid dereferencing any variable in C?

I think of `this` in the same way - it behaves normally if you use it the way it's intended to be used. In other words, don't try to read `this` in a callback without binding it first, and you'll be fine.

Or are there other pitfalls I'm unaware of?

</comment></comment></comment></comment></comment></comment><comment><USER21> Thanks, I love having simple one liners to remember complex concepts :)

</comment><comment><USER22> Articles like this become more and more important as more and more developers learn JS by way of frameworks like jQuery. If you want to understand "this". Understand call() and apply() first.

</comment><comment><USER23> Thanks Henry!

</comment><comment><USER24> Tltr; _this_ is a mistake.</comment>


The Origins of 'Horn OK Please,' India's Most Ubiquitous Phrase - <AUTHOR> http://www.atlasobscura.com/articles/the-origins-of-horn-ok-please-indias-most-ubiquitous-phrase?utm_source=facebook.com&utm_medium=atlas-page <comment><USER2> In India, we drive on the left. If you want to overtake from the left, please HONK(just to alert the driver). If you want to stay behind(not to overtake) its OK. If you want to overtake on the right, PLEASE overtake. This is what means "HORN(on the left), OK(at the center) and PLEASE(on the right).</comment>


3-D Fractals Offer Clues to Complex Systems - <AUTHOR> https://www.quantamagazine.org/20170103-fractal-dynamics-from-3d-julia-sets/ <comment><USER2> This seems kind of cool, but also feels a little hackish. There are two pieces they are 'gluing together':

> _"The Julia set is the base, like the southern hemisphere, and the cap is > like the top half," DeMarco said. "If you glue them together you get a shape > that's polyhedral."_

And the cap comes from:

> _To get the second, DeMarco and Lindsey wrote an algorithm. That algorithm > analyzes features of the original polynomial, like its degree (the highest > number that appears as an exponent) and its coefficients, and outputs > another fractal shape that DeMarco and Lindsey call the "planar cap."_

It may just be that the article doesn't present this aspect clearly enough—but from the description given, it just makes me wonder: why would it be interesting to glue these two pieces together?

I suppose if their geometry is perfectly complementary so that all the complex fractal whorls fit together like puzzle pieces, then that's pretty interesting and surprising, and a key point—but the article doesn't touch on it!

Also, (again, from the description given by the article), these '3-D fractals' arrived at by folding and gluing together planar fractals, seem fundamentally less interesting than the _other_ 3D fractals which are more deserving of the name, IMO (e.g. the Mandelbulb: [https://en.wikipedia.org/wiki/Mandelbulb](https://en.wikipedia.org/wiki/Mandelbulb)).

Then again, they're probably more interested in discovering deep properties about polynomials than making pretty things, unlike myself, so... go them.

<comment><USER3> It looks to me like actually implementing the algorithm and proving that it works is the innovation here.

Also don't forget that the researchers themselves originally didn't understand its significance when Thurston suggested the idea.

</comment></comment><comment><USER4> I didn't why they got hung up, but I'm not a mathematician.

Given the information they have, it seems they can, starting with the 2D Julia set, use an evolutionary procedure to fold the object into a 3D shape (potentially not unique) such that each point on the Julia set has the correct MME. i.e., you try a random fold and have a particle follow many random walks, and measure the MME at each point. If the MMEs are closer to their true values, you keep the fold. After this is all done, apply a smoothing algorithm that minimizes the number of folds.

<comment><USER2> I think that's a neat idea. More specifically, I think they could have used it to replace this step:

> _Today, the best strategy is often to make a best guess about where to fold > the polygon — and then to get out scissors and tape to see if the estimate > is right.

"Kathryn and I spent hours cutting out examples and gluing them ourselves," DeMarco said._

My understanding is that that was something they did to get some intuition on where these folds occur, which would hopefully aid in spotting a pattern of some sort.

It seems like the critical thing is that there _is_ some underlying pattern to where the folding lines occur, though—otherwise it's not really of theoretical interest. Something like this seems like their end goal:

> _"Certain polynomials might have similar bending laminations, and that would > tell us all these polynomials have something in common, even if on the > surface they don't look like they have anything in common," Lindsey said._

And it seems like they have made some headway on understanding the underlying 'pattern':

> _"Our working conjecture is that the folding lines, the bending laminations, > can be completely described in terms of certain dynamical properties,"_

But I bet if they'd taken your approach rather than manually cutting things out of paper, they'd have much better data for thinking about this.

(Although, looking closer at your proposed algorithm, I'm guessing it would need some modification: the folding shouldn't affect the MMEs—they have a curvature distribution derived from the MME already, but:

> _If given a two-dimensional polygon, and told exactly how its curvature > should be distributed, there's still no mathematical way to identify exactly > where you need to fold the polygon to end up with the right 3-D shape._

So I think the different folding schemes are independent of MME/curvature distribution.

Still, something along the lines of what you described might work...)

Edit: I should point out that I'm also not a mathematician :D

</comment></comment><comment><USER5> there are some nice fast computations of Julia sets in Python [https://www.ibm.com/developerworks/community/blogs/jfp/entry...](https://www.ibm.com/developerworks/community/blogs/jfp/entry/Fast_Computation_of_Julia_Set_in_Python?lang=en)

however one problem is always requires computing all the backwards iterates of the points. And there's _never_ getting around that.

these two ladies offer a means of approximating the Julia set using a polygon. I have no heard of this.

there is a nice result by William Thurston they are using "Shapes of polyhedra and triangulations of the sphere" [https://arxiv.org/abs/math/9801088](https://arxiv.org/abs/math/9801088)

The theorem is exactly what the article says. They cut out this shape and fold it along the correct lines and glue along the boundary, one obtains the boundary of a convex shape.</comment>


Yoshua Bengio: 'The dangers of abuse are real' - <AUTHOR> https://www.nature.com/articles/d41586-019-00505-2 <comment><USER3> AI is like a mountain. No matter what humanity does, someone will summit just because it's there. We can control businesses to an extent, but a curious person in the basement, no one has control over that.

And good luck holding the military back.

One way or another humanity is on its way to the inevitable, and it's our evolutionary destiny because we are basically hard-wired to pursue the curiosity that is AI.

<comment><USER4> The amount of resources and thus damage that an individual in a basement can do is rather limited.

We got treaties on nuclear and chemical weapons. It could happen for autonomous weapons and weaponized intelligent agents also. But it might require a serious case of abuse before we get there, as it did for chemical and nuclear...

<comment><USER5> Right. Currently in order to do state-of-the-art AI, you need a lot of _computers_ and a lot of _data_. Neither of these is easy to obtain by an individual in a basement.

We would need to consider, however, access to finished products (like trained models). In some cases in the future, having access to the appropriate model might be as dangerous as handing someone a nuke.

How hard would it be for someone to assemble a indiscriminate "killer drone," given the appropriate image recognition and flight control models?

<comment><USER4> Image recognition and flight control makes a drone, but probably not a _killer_ drone, as that would presumably require some sort of munitions - <USER2> a gun or explosives. So it might be efficient enough to just limit access to those parts?

<comment><USER6> People with low education levels can show you how to build all sorts of things that go bang. Someone with an engineering background could vastly improve on a lot of designs. If you could make a small, lightweight projectile weapon that can be 3d printed then you have what you need.

My background is an engineering role in the military and my current path is CS. I don't think it's unfeasible that an individual could build a crude drone that would kill a single person. Building an entire swarm of death robots is a different story.

</comment></comment></comment></comment></comment><comment><USER7> > You have expressed concern that corporations have 'stolen' talent from > academia.

Nobody is stealing anything. What they don't realize is that the free market will incentivize AI researchers to go to the private sector. It's just simple economics.

<comment><USER8> If private industry are using inflated (in the short term) valuations and low tax rates to fund a talent war, but publicly funded educational institutions can't compete by increasing funding (through governments raising taxes or printing money), then the playing field isn't exactly level, is it?

<comment><USER9> Publicly funded educational institutions can compete by reassigning some of their budget dedicated to sports and administrative roles to their researchers, for starters.

For instance, the public US university I attended for grad school has an endowment of about $1B, and spent ~$150M on athletics in the past year. A post doc salary there is about $40k a year.

Why would anyone take this over $200k a year (with lots of sweet perks) at eg Google? Because they are passionate about academic research (and potentially teaching), something that the university is very aware of and has no problem using to their advantage.

Talking about level playing fields here seems disingenuous.

<comment><USER8> _> Publicly funded educational institutions can compete by reassigning some of their budget dedicated to sports_

Athletics programs are a huge driver of both alumni donations and student enrollment. Unfortunately. Not to mention licensing revenue from apparel and the like.

 _> Because they are passionate about academic research (and potentially teaching), something that the university is very aware of and has no problem using to their advantage._

This was more effective when the pay disparity was smaller.

</comment></comment></comment></comment><comment><USER10> How will regulating AI be any more successful than the 1990s attempts by the US to regulate cryptography?

<comment><USER11> The accessibility story is nearly identical. So I'd say nope.

</comment></comment><comment><USER12> Not a secret that largest military companies are actively investing into AI. Enormous opportunities and dangers. And it's not just computer vision and robotics - almost every aspect of modern warfare will be AI-extended.

</comment><comment><USER13> > "has raised concerns about the possible risks from misuse of technology"

Isn't misuse possible in all (or, at least, almost all) technology?

Drugs can change humor, physical condition, hormones, and I think can be miused even as a long-term weapon over the population of some nation.

Nuclear. Explosives. Social medias. TV programs. Data processing with punch cards. Drones. Knifes. Herbicides. Small plastic rejects.

I understand the reasons Bengio tries to make, but it seems that it is the same problem with all technological stuff: someone, somewhere, will find a way to use it against others, and will cause minor or giant consequences.

<comment><USER4> Most of your examples are covered by rules and regulation in order to try to get the most out of the technology without too much adverse effects. The point here is that we should do the same for "AI", and that we should start thinking about this now.

</comment></comment><comment><USER12> AI arms race is real. Will outcomes be good for civilization like those of space race (Internet, Communication) nobody knows.

</comment><comment><USER14> Bengio is asked: What will be the next big thing in AI?

> "Deep learning, as it is now, has made huge progress in perception, but it > hasn't delivered yet on systems that can discover high-level representations > — the kind of concepts we use in language. Humans are able to use those > high-level concepts to generalize in powerful ways. That's something that > even babies can do, but machine learning is very bad at."

I read this as: "We have super-advanced skip-logic software that can produce specific results when provided a large enough data set, but "intelligence" as it is defined, does not exist."

AI is really just sophisticated software algorithms.

In my opinion, there is no true artificial intelligence, and it will be unlikely that we will ever create such a thing for quite some time, if at all. AI is being used as a buzzword to garner attention.

It seems much more likely that we will build a brain-computer interface before true AI, and it will prove more efficient than what we have today, which is effectively many computers churning through a super-long list of "if-then" statements.

<comment><USER15> This joke about "if-then" statements has gone too far, and when people cite it it's clear that they don't understand the basics of how ML works today.

</comment></comment><comment><USER16> It always seems like FUD to me when I read these articles. What is the specific concern? Can we get some examples? Sometimes people are like oh no AI is gonna take over! And I just think about how hard it is for humans to integrate two software systems and laugh. What are we afraid of it doing? If it gets out of control can't we just you know... cut the power?

<comment><USER17> Did you even open the article?

"Killer drones are a big concern....dangers of abuse, especially by authoritarian governments...AI can amplify discrimination and biases".

Bengio is specifically talking about malicious actors using AI. So saying "just unplug it" isn't really applicable, especially when it comes to governments.

<comment><USER16> you don't need AI to make killer drones

<comment><USER18> This is an example of 'whataboutism', and is used to derail a discussion without actually responding to the point.

<comment><USER16> my original point was already a response to your quote from the article, what is there to expound on? the problem isn't an AI problem it's a malicious actor problem

</comment></comment></comment></comment></comment><comment><USER19> They keep using the term 'AI' when they seem to mean 'software'. We have all these problems regardless of how 'intelligent' the artificial machine is.

</comment><comment><USER20> Meanwhile, Google has cancelled its AI ethics board in response to an internal employee petition complaining about a mainstream conservative being included in the 8-member committee.

[https://www.forbes.com/sites/jilliandonfro/2019/04/04/google...](https://www.forbes.com/sites/jilliandonfro/2019/04/04/google- cancels-its-ai-ethics-board-less-than-two-weeks-after-launch-in-the-wake-of- employee-protest/)

<comment><USER21> The heritage think tank is a known anti lgbt group. They spend significant resources in the US and abroad to fight against lgbt rights.

I for one and f __king sick and tired of my existence being subject to debate due in part to these groups.

<comment><USER22> What do LGBT issues have anything to do with AI discussions? I ask purely for information.

<comment><USER23> It means you can't assume the Heritage representative is going to participate in good faith. They are bringing a religious agenda to the table, which has (or at least should have) no place in the discussion.</comment></comment></comment></comment>