skysight-inc/HackerNews huggingface dataset:
This piece originally appeared on Rolling Stone's online section but was pulled.
> I'm ultimately envisioning a future where people could host their own Facebooks...

If we had "bandwidth equality" from our homes the paradigm would be quicker to shift, i.e. upload/download speeds the same. That way we could easily host/transfer/share to and from our home located devices/servers.
Lies Investors Tell Themselves
OTP makes good sense to me because I built something along the same lines (in C, blasphemy) two years ago.

Erlang the language has me tearing my hair out on occasion. That's not Erlangs fault, it's clearly mine, I grew up with 'BASIC' and moved on Assembler and from there to 'C' and a whole bunch of other imperative languages besides so functional languages are always harder for me to learn.

That said I'm making good progress and Freds book was instrumental in that.
Agreed. This will happen again, as it has happened before. I pretty much had the same thought process as you on how to implement it, technology wise. It might be instructive to look at how AOL lost out to the larger web in order to envision how it might play out. Maybe there needs to be a web technology similar to the browser that displaced AOL, a standalone app acting as a front-end to the stack you described. Who knows, maybe snapchat or a similar highly-adopted app could evolve into this.
>Interesting bug

its not a bug, its hidden optimization during GC (hibernation). You would want that optimization if you intend to touch values. Its something Erlang devs decided upon after analysing use cases.
I was just reading something that's related and yet totally different- about the US Army grappling with whether or not to use kill counts as a public metric. The answer tends to be "it depends". Interesting read that makes it very clear how metrics can have messy implications: http://www.wsj.com/articles/SB124380078921270039
> Facebook's blocks posts based on political content it doesn't like. They blocked posts about Fergusson and other political protests.

Did Facebook literally do that or is it really about users deleting/blocking posts on some Facebook groups or on they walls?
That was not the point he was making -- he was making the point that "even with facebook's amount of traffic, you could host it on a dozen servers". That is just so far detached from reality I cannot take that seriously.

I agree that p2p social networks are an interesting alternative, but they are a whole different kind of product and a kind of apples / oranges comparison in terms of cost of operation.
I had this exact conversation with a friend over beers last week. It basically went like this, "You're only charging X per hour? I make that now as a full time dev with health insurance, a 401k and the expectation that I will have a job next month. You're under pricing your risk." He then asked me to buy the next round. Cheeky bastard.
Then maybe it's time to expand your horizon a bit, he also has another book about Erlang that's a bit more beginner level: http://learnyousomeerlang.com/ , I promise you that if you stick to it for a couple of weeks that you will not regret investing your time even if you never use Erlang professionally. Some of the philosophy behind it and the methodical way of attacking a problem will rub off and will make you a better programmer in the longer term.
The solution you posted is just a stupid joke made by a bored guy.. it is still unsolved
Git: ignore file lines
http://en.wikipedia.org/wiki/Copyfraud
> the expectation that I will have a job next month

That's an assumption on your side. Likely it will pan out for the near future but be careful about relying too much on that assumption.

> He then asked me to buy the next round. Cheeky bastard.

Hehe. That should remind you not to brag ;) I hope he got something useful out of it.
So, if you don't use the android app and don't use it's private messaging system for actually private stuff, you are just as "safe" as a non-user (since they can track you over websites with like buttons just as fine).
Taking Your Startup Public Is Fraught with Negatives
Use hash tables, hash maps, dictionaries, JavaScript objects, etc. (whatever it's called in your language of choice) for indexing.

This gives you constant time access to data by whatever properties you want to index on (usually by id).

Also, use libraries and reuse your own code/routines. If you find a faster way to do something, all the code that used those routines will benefit immediately.
Use the correct algorithms. O(log n) beats O(n) beats O(n log n) beats O(n^2) almost every time. A common mistake is e.g. using the `in` operator with lists in Python, instead of converting the list to a set first.
"online identity"?

Just because Google wants "one account ALL of Google", and Facebook wants your real name and Mastercard details, doesn't mean you have to drink their kool-aid and live their grand ONE ID registered member internet life.

Live the way you want to. Go crazy and get a name such as zAy0LfpBZLC8mAC, and suddenly this proxy gets you new powers of expression that can't be tied to your Mastercard or advertising partners of companies you don't even like.
Yes, I agree that this is a peculiar case and it is worth reading and keeping in mind that such things can happen.

I am just saying that I think it would be more correct to consider this as a 9-fold performance increase gained from caching, as no one should rely on caching when dealing with linked lists.
I would heed that advice if I used Facebook purely to over-share pointless random personal information.

Unfortunately, Facebook is where people I want to communicate with can, and generally do see what I post, and engage with it at higher rates than on Google+.

Back when Google+ was new and very Google-oriented, I was able to build a community of a large number of followers for my personal account and a page for one of my books. But the Google+ user base is now larger, more diffuse, and less engaged. That's not very useful.

Lately, LinkedIn has been a good alternative. LinkedIn has improved their update stream. I read it, and I post to it. But LinkedIn does despicable things with your calendar information.

I'm pretty sure the people at Facebook have figured this out: Either you need it, and will put up with the privacy issues, or it's an entertainment medium for you and you don't care.

I've deleted Facebook and LinkedIn apps from my mobile devices, but I still use them via their Web UIs.
That's nice of our corporate overlords. They will even, after due hassle and harassment, allow our data to be transmitted free of intentional modification.

Clearly we need less regulation to make sure this sane business thrives.
Using common table expressions to solve the “eight queens” problem in SQL
I suggest you to read a book about algorithms. This one is pretty good: "Introduction to Algorithms" by Cormen and Rivest.
Not if you've stuffed it full of information that is in no way representative of yourself, is the notion the parent poster is describing.

This is actually an old tactic for maintaining privacy while participating on the internet: avatar, persona, handle, multiple names for it. It's the origin of the notion that "On the Internet, nobody knows you're a dog." The social networks hypothetically ban this in their terms of service, but because Facebook has become the market-dominant entity now and can trust the average user to not intentionally falsify all their data, they no longer actively police this aspect of their ToS.

Facebook "Like" buttons on the web will still track your activity and link it to your profile, but you can take measures to ameliorate that (clear cookies, block the "Like" button origin URLs, and---for the most paranoid among us---use Tor so that not even the IP addresses are easily correlated to your activity).
Unfortunately it isn't.. the solution about "They throw granades etc..." was just a joke
A 9:1 performance drop after hibernation is a bug in my book but of course one mans bug is another mans feature.

Especially since hibernation is something you don't control (it kicks in by default in OTP when a process is idle for a while).

http://www.erlang.org/doc/man/gen_server.html

Does not contain any caveats about performance being substantially worse for some use cases after waking up a hibernated process.
Cuckoo is an automated malware analysis system
Reduce round trips.

That might be round trips to a database, round trips to a caching layer, or round trips from client to server.

Generally speaking, grab as much data as you'll need (but not more).
7 Landing Page Tools for Better Conversions
I didn't name the factions.
#pragma omp parallel
There is also a lot of great material on Coursera, MIT OpenCourseWare, etc. on algorithms.
I wish I knew whose quote this was: "Use your intuition to ASK questions, not to answer them."

Specific to this topic:

Use a profiler to determine where you're spending your time. Don't guess; measure.

When you find a candidate area to work on, determine whether caching or a fundamental algorithm change could work. Those will usually get you far greater gains than optimizing code as-is.
Dwave Systems will be releasing a 1152 qubit quantum annealing system in March
That's what it looks like for me too. Contrast is so low that it's essentially unreadable for me. It is very pretty though. Elegant.

On Firefox, Alt-V Y N (for no style) is in muscle memory by now, and renders in glorious 1990s black and white, and the text flows within the browser borders (another problem on many sites today).
What does this do, that pip already can't?
Profile and identify bottleneck?
When writing if-statements that have an AND, always put the quickest executing condition first.

Don't use ORM's naively.

Be careful about what you call in a loop.

Those three alone account for most of the execution speed issues I've encountered. And they're all low-hanging fruit.
I liked the article, but I didn't understand the meaning of this paragraph:

> The string map< occurs 588 times in the WED code base. set< occurs 822 times! Approximately 100% of this code is running a lot slower than it could be. This performance problem is the cumulative result of using slow-constant-time coding techniques for years.

Why does 100% of this code run slower than it could? Maps and sets give you quick inserts and lookups, which arrays don't. Without knowing the context in which these 1400-odd structures are used, how can we really know that they're not the proper choice?
It's not a myth. For example, if you tag someone in a photo who doesn't have a FB account, they'll do facial recognition and point them out in other photos you upload. They'll also create "Pages" for companies without their permission. I remember Jake von Slatt had to go to a lot of trouble to make them take down his Page.
All privacy concerns aside, Facebook has had declining utility to me (and my loved ones) over the last few years, which has translated into less and less use by everyone in my network. My news feed from three to five years ago was much more diverse in terms of content and number of people posting. Today, every other post is an ad, and in between are the posts of the remaining power users in my network.
I'm not sure if anyone else has had this experience, but I would label the power users as the least common denominators in my network. Thus, my news feed has come to resemble a trashy tabloid magazine more so than a collection of the goings-ons of my network of friends.
In my mind's eye, the Facebook ecosystem is like a corrupt, dangerous, almost comic book-like city: A lot of good people may still live there but they only occasionally peak out of the blinds from the protection of their homes and they rarely participate in the community. The streets are filled with trash, and the people running freely on the streets are lunatics and crooked cops.
But maybe that's just my wild, childish imagination. I'm a much heavier user of instagram these days, which is probably just like a movie set with sunny skies built within this corrupt ecosystem of Facebook.
Facebook should be prohibited from looking into the data that I send to friends. Rationale: telephone companies are not allowed to listen in on my conversations, so why should facebook be allowed to do essentially the same? IMHO, facebook and other social networks (with say >100k users) should be regulated much like telecom companies, and I am surprised that they aren't yet.

Also note that telecom companies are required to interoperate with other telecom companies.
The Selling of the Avocado
I think it was mainly about th trending topics section. People were complaining it wasn't showing up there, but I'm pretty sure that is algorithmically driven based on your interests. So if you don't post about politics and news much on Facebook, or Like politics or news posts, it's not considered your interest.
I'm immensely jealous of anyone who has that much free time. I guess as a show-hn, I'm all for this. Someone wants to do this, then it's their art or stress relief and they're doing it for fun. But as a news submission, I don't feel this adds anything other than it's association with a popular movie. BrainFudge however, I really like.
>always put the quickest executing condition first.

isn't it put the most probably true condition first?
I doubt they really sell your data. The only way advertisers can get info about you is if you click through an ad.

Edit: So downvoters, how do I buy data about Facebook users?
I don't have a source for this right now, but I remember reading that the vast majority of disk space used by Facebook is taken up by users' photos. They are probably saving hundreds of uploaded photos per person (on average) and while they do compress them quite a bit this still has to take up a lot of storage space.

Of course they do also collect a lot of behavioral data, but I imagine all the data Facebook has collected on me probably uses up less storage than my profile pictures alone...
The part you find troubling is likely the most exciting part---once harnessed and turned to an individual's utility. "Something that knows more about me than myself" was the dream of the 'personal digital assistant' craze in the '90s, but the technology wasn't there yet. It's here now, but it leverages network advantages and scalability to work its magic.

I imagine the synthesis of these forces in the future is technologies that aggregate, but that the indivudal can buy into. Do you want help deciding what to wear based on the weather or time of day, beyond what your assistant can do for you? Then there's a collective data channel you can opt-in to joining, and you'll trade some of your personal private information for access to a digital "collective unconscious" of aggregate data. I liken it to the 23andme approach of collecting genetic profiles.
I hear this a lot, that people move platforms "all the time", but it's not really true as it relates to Facebook. Before Facebook, the vast majority of users on social media (MySpace), were teenagers and young adults. Social media only exploded to your parents and grand parents and everyone else with Facebook. It's much harder getting those folks to switch, and the network effect is that much stronger with the ~30x larger user base. Switching off something like Alta Vista to Google isn't even comparable - there are basically no switching costs in that case.

I'm not saying it's impossible, but the stickiness and network effects of Facebook are pretty much unprecedented.
News Feed is bad and Facebook should feel bad
The article says the government "convinced" banks and other companies to cancel the debts, but the lenders will not be compensated. It's left as an exercise to imagine how the lenders were convinced.

I can see the benefits of getting a large number of people out of what must be a terrible situation - the numbers suggest most of the people affected probably didn't have enough income to even service their debt.

But I wonder how this will affect the ability of non-elites to borrow in the future. Although we all like to hate our financial institutions, they really have been an incredible force against class structures over the last 100 years or so, allowing the middle class to own property, start businesses, etc, by gradually extending credit to more and more people. (I recognize it's not been perfect <coughsubprime>.) Reverting to a situation where only the rich and connected can get loans would be a negative consequence. I hope the government of Croatia can counter that.
> A common mistake is e.g. using the `in` operator with lists in Python, instead of converting the list to a set first.

Is this true even for small lists without many duplicates?
I'm kind of speechless that "popping a message from the queue" requires knowing the length of the queue, which requires traversing the entire queue, a linked list of as many as 90,000 elements. Even the "fast" time of about half a millisecond is crazy slow for dequeuing an item.

If a linked list is a built-in Erlang data structure, why doesn't it keep a length count? If it's common knowledge that this operation is O(N), why does RabbitMQ call it on dequeue, and why doesn't it keep its own length count (and why isn't that the obvious fix)?

I can't think of any JavaScript built-in (the language where I spend my days) with a name like "length" that internally dereferences N pointers, but I would not be shocked to discover that dereferencing tens of thousands of pointers was taking a few milliseconds, and I would not write my data structure that way.
Nah, applying these cargo cult recommendations is obviously a better idea.
Use the correct data structure !

Don't use an array when you really need a Set. Store your data un hash maps is possible. etc
Also don't upload photos, don't put demographically-targetable keywords in any posts, don't let anyone tag you in photos, don't use Facebook to RSVP to events, and basically don't use the site at all, then yes.
I wonder how many email servers are running today? Probably comparable within an order of magnitude. Yet those server are not owned by one corporation, they're multiple corporations cooperating to move data between each other.

It's too bad Facebook and Twitter are businesses, instead of multiple protocols and multiple businesses. Or in other words, it's too bad The Old Ones didn't think cat pictures and what they had for breakfast was important. https://en.wikipedia.org/wiki/List_of_Internet_pioneers

EDIT: Changed to intended link.
If debts are under 35 000 kunas, monthly income is under half of minimum salary ( you know what sucks? Many workers are on minumum salary, yet don't receive salaries for months, whilst company owners drive luxury cars for a salary 3-4x the average one, so those workers are not eligible) and the citizen doesn't own any land or savings.

One of the main problems is that about 10% of our citizens have their accounts frozen. They could change laws to help it, but that would hit their budget. It's absurd that you can get sued by the government for tons of money just for not paying a monthly TV subscription payment, that you are subscribed to by having more than 1 radio frequency receiver, no matter be it a radio, phone or a TV. Or even having an screen in your home.
This is like focusing on fighting acne, when your patient is dying of cancer.

Yes, it will help a lot of families, and that's great, but elections are coming up and this is mostly a political points move, since the "right wing" won the presidential elections, the political "left" is now worried.
In part, I love this idea. However, as someone who struggles with debt, I've worked to the point of causing serious health issues just to keep my head above water, so if Canada were to do this, I'd be more than ticked. The slacker next to me gets a clean slate, and I get an early grave.
"Of course there are other concerns in doing this, such as testing, maintenance, etc but from a performance point of view the idea that "you couldn't write a better version than the expert's implementation in the standard library" is not really true."

Perhaps, but the bigger problem is that usually in order to know you've written the better version, you need to have actually used the library in a use case as close to the real one as possible and MEASURED.
You probably mean to put the probably false condition first, since if the first condition is false, the others are not tested anymore.
Converting to a set in Python is extremely beneficial when you will be doing many `in` queries on the collection.
But it isn't necessarily good in all cases, because converting the list to a set is itself O(n) and slower than `in`.

Example:

In [1]: xs = range(10000)

In [2]: %timeit 5000 in xs
100000 loops, best of 3: 77.8 µs per loop

In [3]: %timeit 5000 in set(xs)
1000 loops, best of 3: 235 µs per loop

In [4]: xs_set = set(xs)

In [5]: %timeit 5000 in xs_set
10000000 loops, best of 3: 70.7 ns per loop
The collar of the cat => The cat's collar. The collar of it => its collar. Possessives usually are formed with 's.
Good list(s) https://www.quora.com/What-are-the-best-productivity-tools-f...
For once I want to read an article from someone who's a true insider in the alleged "market" selling and re-selling user data.

(Edit: I'm not suggesting such a market doesn't exist -- I'd just like to know what's actually going on. I'd like to know what's "de facto" practice in the industry.)
Stop worrying about how well your code performs and focus on more important things.

Seriously.

I'm not saying that code performance isn't important; of course it is. It's just that if you're already fairly competent, then code performance is probably not your biggest problem. You're looking for a magic bullet that may not be there.

I'd be more concerned with:

- How easily can another programmer maintain your code? We all tend to believe that our programs will be just right when we finish, but the sad truth is that others will probably change them significantly over the years. Your wish to "squeeze a little more performance" out of your code may actually be counterproductive; no one will understand your clever optimizations and your code will become maintainable. Remember, you're writing for the next programmer as much as for the machine.

- How well are your databases designed? Do this well and you won't have to worry about optimizing your code as much. Take care of the microseconds so that you won't have to worry about the nanoseconds.

- How well are your variables named? Again, this doesn't affect performance, but boy does it ever help maintenance.

- DRY (Don't repeat yourself.) For many reasons, including performance.

- How precise is your definition of "what" to build? Building the wrong thing to run very fast is much less important than building the right thing to run fairly fast.

- Are you doing the right things on the client and the right things on the server? For example, if you're validating data on the client and building the UI on the server (under some conditions), then it really doesn't matter how fast it runs. You're probably doing it wrong.

- Are you especially careful about recursions, early exits, sorting, filtering, parsing, and other fairly standard stuff? Do these things right so you won't have to worry about performance. Do them wrong and all the fine tuning in the world won't help.

- When all else fails, find a peer reviewer whose opinion your respect. They'll probably find the stupid things your blind eye misses. You'll remember their feedback and probably never make that mistake again.

Have fun doing the important things well and stop worrying about fine tuning: a philosophy that has worked very well for me for years. Hope this thinking helps you too.