skysight-inc/HackerNews huggingface dataset:
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/#x15.4.4.18). (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/#x15.3.4.5, 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...
Which you can then use to recompile your OS easily (FreeBSD, some Linux based OS's) and tune it to a specific machine / configuration.

That's why people like Kernighan and Ritchie (RIP) are so well respected. They wrote C to the target language first (asm) then rewrote C in C once they had a good enough compiler. Considering that C is the cornerstone of UNIX and modern variants I'd say this is no small feat.

C will be around for a long time after many of the current languages, domain specific or not, become just another wikipedia entry.
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);
Mainland China would most definitely not be happy with this label. The government that was exiled to what we call Taiwan considers themselves to be the legitimate government of China. The mainland government considers them to be illegitimate. This tension still exists politically and culturally.

I have had many Taiwanese friends young and old and most of them prefer themselves and their culture to be referred to as Chinese.

I have also had some young (mainland) Chinese friends and they, too, are still very aware of the situation. Even though some of them have Taiwanese friends themselves, they still look with disdain on Taiwan/RoC as a political entity.
> How do you know the problem is with resolutions/goals and not with your process of setting them?

I did not go into depth about my process but the issue I have is with this concept of "once a year I will sit down and make of list of things I will try and do" and meanwhile it never gets done. Mainly as you have outlined because you lack real understanding of the underlying motivations and instead it ends up being the singular fact that it's 12/31/YYYY.

That said I did say: Short, mid, long.. Long doesn't mean 1 yr in my mind. :)

> ...you cannot ask yourself "where am I going", "what do I want from life" every day or every week..

Why not rephrase that "Am I doing what I want with my life." and yes I can ask myself that every single day of the week, because I can compare it to my "core goals" (the 9 you talk about, I keep 4 but if 9 works for you that's fine). The answer should be yes against your "core goals" if not either your goals have shifted and you didn't notice or you've shifted off the path and didn't notice.

If you measure only once a year and set goals once a year you're going to have a very random life experience. :-)

If you measure often and make small course corrections often you'll have a more directed experience.

All that said they're just goals and reality has a tendency to happen (S* happens as they say).
OT, but I love your work. I've learnt a lot of what I know from free resources, which inspired me to start http://hackershelf.com. Just out of curiosity, why do you do it?
ugh, here they come again, the idealistic free software guys who couldn't get their own kernel together. nobody gives a shit whether it's called GNU/Linux or just Linux and whether a kernel gives the operating system its name or whether its name is derived from a combination of underlying tools + kernel. The rise of Linux is a fantastic testament for the power of open source operating systems and let's leave it at that.
oh, i agree completely and basically know the results. business class allows you to work in the plane, as you have power outlets and more importantly, space. once the guy in front of you leans their seat back in coach, you can't work on that presentation any more.

stepping off a 12h flight and working the next day is possible in coach though. your body doesn't like it, but it is manageable, however super inconvenient.
It is really tiring when the answer to emergent large scale economic insecurity in developed nations is "be the best" or "be in one particular field". Not everyone is cut out to be an engineer, and there is a tipping point for economic insecurity where civil unrest threatens the established order. The best and the brightest can't exist in isolation, harvesting the rewards of a larger than ever economy while the middle and lower classes slide into destitution. At some point they will simply revolt and demand redistribution of the automated, capital intensive economy.
If the $5 is to keep out spam, doesn't the fact that he has already confirmed that he is not a spammer by paying the $25 from before for the android thing? Why keep asking for money and bounce him around like this? This is what you expect from a crappy company with outsourced customer support , not google.
You should add a demo.
While I disagree with a lot of the negative sentiment found in the other threads, I find myself agreeing with you.

I don't know why, but there's something rather uncomfortable about people selling books/courses telling you "how to make more money doing X" and then 6 months later writing a blog post saying "how I made $Y selling a book/course on how to make more money doing X".
I suspect if you had lived though a significant war you would probably think history was overly focused on social changes and should spend more time on technology and tactics.
Great stuff guys, keep it up! There's nothing out there for product people. Actually starting a 180 day blog series on every day in th life of building my team's latest product. We should chat sometime!
Any plans to add an API? I know it's a work-in-progress but it could still be quite useful in some cases.
Sorry in advance for the rant but i think it is fucking stupid to charge developers at all. Yes, it is nothing, but the principal itself leaves a sour taste. I am improving your platform, you are going to take 30% of anything made, and you want me to pay you for that privilege.

I know this applies to others too (worse at times) and that there is some rationale behind this (reduce hoards of crap), but it just stinks, to me, in principle, and i'm sure there would be better ways of going about it.
> This is what you expect from a crappy companies with outsourced customer support , not google.

I'd expect you to expect algorithmic customer support from Google.
> Big companies are not going to take care of you

This is the best takeaway IMHO. I think the way he characterizes liberal arts isn't quite hitting the mark, however. My experience is that there's less wrong with liberal arts schools/degrees as there is with the legions of young people who wander into university with no real plan, and expect to get a job when they graduate with and English degree (which they decided on in their third year).

Gone are the days where everyone should try and go to college after high school, even if they don't know what they want from it. It's too expensive now, and a BA doesn't serve you well if you have no plan for how to use it. Many would be better just starting working and see where that takes them; college can come later. Many more would do better to just take up a trade, go to a school for that. We'll need plumbers, electricians, and other service-oriented specialists for a long time to come. But so many "office jobs" that required no real skill have been and are being replaced by computers; there isn't the previous cushion for the aimless recent BA graduate to fall on any more.
Unfortunate? Would you prefer to bind that yourself?
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.
Well, a strip club will have prices based on what the local economy can bear. So a strip club in LA will be more expensive per tit than a strip club in rural Bulgaria.

Stuff that can be expressed as bytes does not always have the same sort of price discrimination, so in some geographies people will pirate things that they could have no realistic possibility of ever affording.

Plus it's not all entertainment, a lot of the stuff mentioned is educational resources. Not to mention that watching foreign entertainment shows can give you a good education about culture.
Brilliant , PHP source code will need a loads of cleaning one day or another anyway , could help making changes to the language ...
A shame too, because AppleTV 3 is a beautiful piece of hardware. Would be the ideal tiny ARM server if only I could get Linux to run on it.
I think in my case it's more of a "I tried the consulting thing for 6+ years, I learned a lot, I'm ready to move on — but there's a lot of valuable info I've captured over the years that could be very valuable to others."
For 6), a question, is .bind not just returning a new function, which will .call your provided one with the supplied "this"? That is, I think it's better to reason about it not as an exception to the usual semantics, but as something that can already be done by any coder in the language itself, using the usual semantics.

And thank you for 5), I didn't know it! :)
I don't know what strip clubs you go to, but most of them are only full friday/saturday nights. The venue is sized to handle those big crowds, but during the work week there is just a slow stream of regulars. Someone sneaking in for free on a Wednesday isn't taking a spot away from anyone. Heck, he might even buy a beer!
I recently found a pretty simple one on https://accounts.google.com/, which is arguably Google's most valued domain. I believe XSS is the most common vulnerability these days. One doesn't even have to be able to inject javascript per se. Only a CSS style is enough in many cases.
Does this apply if the strip club is not full? What if you only sneak in during slow times?
The Architecture of High-Performance Parallel I/O [pdf]
No one is saying entertainment has to be for free. You made up.

Who said its just entertainment? Again, you made that up.

Culture is not the same as entertainment at all.

I find it depressing that you think every one, including say culturally oppressed Saudis and isolated women, have to think like you do with your presumably culturally and politically free society. Culture is available to you and what ever you try to say, you are part of it and absorb it. Maybe you have had your fill of conscious absorption, but I notice you have had the luxury of it in past years. Not so for many, many other people.

I'm glad you have those freedoms. Im glad I too have those freedoms. Shame neither of us don't represent the situations of every one else on this planet. Perhaps one day we will. But not now by any stretch. But right now, for millions, sites like TPB allow our cultures to infiltrate the rest of the planet. Given that it seems the primary purpose of the US is to promote US or Western style freedom and democracy across the world, what better propaganda machine is there than BitTorrent and sites like TPB?

And get this, people choose, hear that, choose to absorb Western culture. No guns, none of your 18% spending on a war machine. No bombing back to the stone age, no drones or wire taps. No James Bond, Jack Bauer or Jason Bourne, although they love them too. Just ordinary people sucking up Western culture and there for, values. Every time an Arab or Chinese watches a copy of Fringe, or what ever, they are one micro step closer to us. And they get to survive it!!!

Its the spread of ideas, not stupid entertainment. I find that reduction quite ignorant.
Its also expensive to produce a cheap TV show runs 1/2 M per 45 minute show - I rember on slashdot where some commentators where incensed about how the lead actors on a show are over paid (and the scale rate for a featured player is about 1/2 the starting salary for the average programmer in SV)

And for actors getting a lead on a show is maybe the top 1% or 2% of there profession.
I've actually had the same issue with Google for over a year. I can't use Google Wallet to pay for anything (including Android apps on the phone)! I've tried removing and adding my card back. It gives me the same error. I've resorted to asking family members to use their accounts to purchase items on my devices. This error is really frustrating!
True, but even Google need some real thinking people in customer support. Algorithms are not enough for all your customer interactions, at least not for now anyway.
So as long as the strip club is not (expected to be) packed, it's ok to sneak in? I'd love to move in your area.

"When you copy the bits that comprise a movie or a song, you are not denying anybody else that copy of the movie or song."
Terrible, terrible argument. Taken to an extreme, there should never be more than one paying customer for every piece of digital (or convertible to digital) content ever created. Hogwash.
With the Chrome extensions you can't actually charge any money yet, so I'm just doing it pro bono to help the users of the crappy website.
I had this same kind of experience.

I taught myself Rails in about a month and then joined a Startup Weekend event. It made me realize just how much I _could_ do.

I too went the "freelance" route. I didn't have the experience of taking it on as a "side project". I was fired from my job and, rather than do the job search grind, I found it easier and better to do contract work on a "freelance" basis.

I'm still figuring it all out, but the important part is that I've learned just how valuable and capable I am. All it took was making that leap and pushing myself outside my comfort zone.

Unlike most people, it seems, I actually do suggest quitting your job. Get a handful of months of savings (if possible) first, and then make the jump. It's hard work, but it's worth it.
Combine sort and uniq is useless since sort has already -u flag.
Xfce of course. I personally hate KDE.
Ubuntu, Gentoo, BackTrack
Can't he (or couldn't he) dispute the charge with the credit card company?
That would be because it has a long, long history that's traditionally divided into many periods.

So it makes sense :-)
To counter some of the negative sentiment around "selling to developers" I'd like to share a bit of what Brennan's advice has done for my consultancy business. One of my partners took Brennan's Consultancy Masterclass and here are some of the outcomes:

* Took two of our "do work once a year" clients into a monthly retainer relationships which will bring in an additional $20,000+ revenue annually.

* Changed our estimating process to value-based, fixed bids. Projects previously estimated at $5,000ish are now closer to $8,000ish, and prospect clients are biting just as hard... harder actually.

* Hard data: two new clients are in the door grossing an additional $6,200 above what we originally would have grossed... and are both interested in ongoing retainers :)

Brennan knows his stuff. His advice has moved the needle on my business. And we've only implemented a fraction of that advice.
> TPB helps distributes culture so is a public good

What does it matter if it is right or not? It is a paradigm change and there's nothing moral or immoral about it. Was it moral that humans started using fire and weapons against animals? Is it moral that we control the vegetation of this planet to our interests? Was it moral for the copyists to be replaced by printing press? The cart and buggy businesses to go under after the apparition of the car?

It's just change. It is what it is, a transformation beyond the control of a few. This transition phase will be over sooner or later and the new settled order will emerge. Until then, we are in flux. And it's not for any one group or person to decide if they find it convenient and block it - they can't. If they tried, they'd blown to pieces by history.
If you want to be even more picky, try submitting the same content to http://afterthedeadline.com
Acer: Critics ‘Unfair’ to Windows 8
Yes, but 99% of music, games, and movies are not culturally significant works.

I do believe we should go back to a shorter copyright duration. Going back to the original 14+14 year copyright duration would put e.g. much of the Beatles' work in the public domain.
What was won, exactly

Consider a world without Android, in which the new, dominant computing platform is an Apple monoculture far more locked down and exclusionary than Microsoft ever dreamed of being in their desktop heyday.

Maybe Android is not ideal, but life tends to involve a lot of messy choices. The fact that they are messy doesn't mean that there aren't still important distinctions to be made.
That is why whenever I paste text now I almost always use Cmd+Shift+V.
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...
Watch Bengals vs Ravens,Ravens vs Bengals Live Streaming NFL free espn
Further annoyance with the alt search box thingie: you can clear it, and when you reboot it comes back again. So reconfigure it to something you'll never use like Rshift, l-alt, r-alt, super.

You can fix a lot of these problems with compiz-settings. For example - you can get a better alt+tab switcher and disable the default one.

> How do I switch to another instance of the same app?

Yup, you need compiz settings. Some of the plugins are very deliberate hacks around the shortfalls of unity. You could start here:
http://askubuntu.com/questions/43875/how-do-i-adjust-the-alt...

If you don't find what you need, have a look through package management to see if there are any other compiz packages - these might give you more plugins.
I could but I really can't be bothered. The fact that I can't publish my extension does bother me.
Thanks to AWS for the full disclosure here... I always jump at the chance to read the post-mortems. However, I don't understand why this took Netflix down. This affected ELB only in us-east-1, but surely Netflix is multi-region, at least for their frontend?
I never said baseline jpegs display instantly after file download. They render as I describe several times, top to bottom or "chop chop chop." It's progressive jpegs that display instantly after file download IF the browser does not support progressive rendering of progressive jpegs.

The difference between the rendering of the two file types is not subtle.
Algorithm Puzzle: Triplets in Array
Discovery of offers for fashion retail just got local 
Stay on top of local offers from your favorite brands and gain access to a range of select FashionClyp exclusive offers, on the go. We help you discover limited-time offers of up to 70% off from your favorite brands and nearby stores.
It's a difficult concept to really define or understand. I'm just about to pop down to the shop to buy a pack of cigarettes, but equally I could make a decision right not to never smoke again. Environment no-doubt played a role in my becoming a smoker in the first place, but am I not exercising free will by choosing to buy them today? And if not, how can you hold any person responsible for any action?
Ask HN: Advices on HuaaS Business models
In my opinion it's best time for HuaaS (Human as a Service) business model startups. Cloud computing makes it possible easily implement traditional business models online. With the help of internet we can do our marketing cheaper, faster; easier and faster payment; organize the whole business model online and then do the service; more and structured info about our service for costumers; and go global very easy. Best examples for HuaaS are:

- Airbnb

- Uber

- Amazon mechanical turk

- Exec.

- Cherry

What do you think about this business model? Do you have any new ideas? Advices on this business model? (e.x. Cherry)
> It's also using most of the standard GNU tools - bash, etc.

Actually, I'm pretty sure it uses Busybox tools with ash, not GNU with bash.

http://www.gnu.org/philosophy/android-and-users-freedom.html
There are three kinds of people in this world- those who can count, and those who can't.

I may trust a retailer with my money to make a purchase, but I won't trust that retailer with my e-mail address to get the receipt. Customers are more comfortable with the paper receipt because it's fast and requires no further time commitment associated with the purchase. If that makes their purchase 10% more expensive it's worth it to them.

Perhaps you might use what you've learned to make a different (or improved) product that appeals to a wider audience.
Math Puzzle: Pile Puzzle
JLOUIS Ramblings: Hacking the brains of other people with API design.
Math Problem: Digit Permutation Puzzle