skysight-inc/HackerNews huggingface dataset:
I have three questions regarding self-hosted social networks: (1) Isn't it a huge advantage of social networks like Facebook that it's a central instance which can remove accidentally leaked data from the network and which prevents data scraping on a large scale? (2) Isn't it also a disadvantage of peer-to-peer networks that when your key leaks, all your data that is stored in the distributed network will be irreversibly accessible to everyone? (3) To which degree is it feasible to burden the average user with crypto key management without a locksmith?
Code that you don't write consumes zero clock cycles.

Learn your language well, so that you can use data structures and builtin functions as they are intended, and you can expect them to be pre-optimized for you. Learn in principle what is optimal, and write in that fashion.

Know the documentation, and follow best practices that the docs recommend - when the compiler/language gets updated, you'll get free optimizations.

Use semantic names, none of this i, j, x, y stuff (unless you're writing totally abstract math) and don't use nebulous names like "helper," when you can be more precise.
Better names help you think more precisely about your code and what you want it to do, so you can avoid unnecessary transformations, materializations, and calculations.

When you've finished the program (all the unittests and acceptance tests pass), then profile. Focus on the bottlenecks. In this way, you'll get your optimal Pareto performing code.
Space Shuttle Columbia Disaster – February 1st 2003
The mobile privacy model is broken. I should be able to install Facebook without giving permissions they don't need. Every 2-bit app doesn't need to access my contacts and all my messaging history.

Until then, will not install Facebook app, and will limit apps to companies I trust or apps I can't live without.

Facebook is a silly place too, but that's whole 'nother story.
You do understand this site sell Biodegradable Cups that are not authorized by Kuerig thus the need for the Freedom Clip
2014 Security News Review
There's an acquaintance of mine working as a freelance (ZZP) C# or Java developer for Bose in the Netherlands. I always try to encourage him to either switch jobs or negotiate a higher tariff. He currently earns only 35 EUR an hour (excl. VAT) but he thinks it's a decent income. I really think no developer in The Netherlands should ask anything below 50 EUR an hour (excl. VAT) and even that is quite low.

P.S.: I think one mistake many freelancers make is using the word 'wage' instead of 'tariff' - in my mind it has a very different meaning and to me I feel less powerful / in control if I would talk about e.g. a 'fair wage' with a prospective client.
I/O latency is usually a major "hidden" cost on programs that deal with large sets of data, not only when writing the solution to disk or loading the data, but memory access in particular. Bottlenecks on the memory hierarchy is something to pay a close attention to.
Did you read the blog the original commenter wrote ? I was responding to that blog.
Rust's error handling looks like the Maybe monad. That seems pretty reasonable in Haskell. I'm a little surprised by the criticism in the article — is the author saying there isn't enough syntactic sugar?
This is an interesting concept and a really old one to boot. Planet Money recently did a great podcast covering a similar measure (although it was specifically for mortgages) in Iceland:
http://www.npr.org/blogs/money/2014/12/05/368723679/episode-...

Interestingly, Saudi Arabia also did something similar (alongside many other measures) to boost public support for the new king:
http://www.arabnews.com/news/696661
I second that, but would add data-structures to it. They go hand in hand. Being familiar with whats available will let you choose the correct one.

Using the right data structure and algorithm for the job can your code significantly faster.
They used to track you via cookies even when you were logged out. http://www.businessinsider.com/heres-how-to-stop-facebook-fr... This lead to investigation by the FTC and a $15 billion class-action lawsuit.
I would pay for a service that respects my privacy and doesn't filter content out.
When I first heard of Ello, I thought, maybe this is it.

Something else needs to be built, with a beautiful interface so we get everyone off facebook. I want to help.
If the first condition is the slowest you can't get faster than that. But if the first is faster it might be the only one executed.
Think of the slacker next to you as having an independent relationship with the state and so do you.

I never understood why some people would happily drag down someone else, that's jealousy in disguise. Simply see this as a plus for society because that debt drags everybody down, including you.

I wouldn't sleep any worse if all the debt for people earning minimum wage or nothing at all were forgiven, that's a much better way to spend money than to enrich a small number of already insanely rich people.

Give it another 3 or 4 decades and a few more rounds of automation and who knows, you just might find yourself in the league of the 'slackers', quite a few of them are not slackers by nature but simply grew up in a time when their skills became surplus and their age forced them out of the productive cycle. Very few people consciously choose to be un-employed and this could happen to all of us.
Caching length doesn't really make sense for persistent lists, as you would have to have one field for each cons. That's a considerable overhead.
Well, you do need to know that there exists an item in the queue. Knowing that length > 0 is one way to go about it, but certainly it's enough to establish the existence of one item and then move on.

If one is unaware of the complexity of the .length() method, one might use it to find out if a dequeue is possible.
I can't really disagree with the basic point. Expecting a for-profit organization--even if they're Google--to reliably over a long period of time provide an archiving service that's mostly a money [EDIT] leak isn't a realistic hope. The fact that it's embroiled Google in a number of ongoing legal disputes doesn't make it any easier.

On the other hand, it's not as if anyone (other than the Internet Archive of course) has exactly been stepping up to the plate. There's also the question of what a library is for these purposes and what do they have the right to do with respect to archiving copyrighted digital text and media.
Your comment isn't wrong in itself. For any GC you can write some program that exploits its weaknesses

But you could deal with this bug in various different ways. For example, here you could be implementing erlang queues so that the length is stored, instead of checking the length. You could implement hibernation differently. You could implement popping differently. There are probably ideas from people who know more than nothing about erlang.

Anyways, I don't think this particular issue was really an issue with the concept of a GC'd language, more of a specific bug issue.
there's a constant factor hidden in all of those, and it's not free.

a tree can often be slower than a simple array for lookups, even if the tree is O(log n) and the array is O(n).
Code that you didn't write but that is being executed still consumes clock cycles. Standard library functions and data structures still have code that executes on the machine, you can't just handwave it away as consuming zero cycles just because you didn't write it.
Ed is right in that all these things matter as much or more than making performant code but at the same time your question suggests that performance is your main issue at the moment. If that's not the case then please take Ed's advice to heart and invest your time in all of the above, only concentrate on performance if you are 100% convinced that is what will give you the best return on time invested.
I totally understand your sentiment, but to me this reflects one of the biggest scams that has ever been pulled on the "average guy" - the notion that debt has moral weight.

I was taught by my parents, and by the books I read and TV shows I watched, that "paying your debts" made you a good person. If you don't pay your debts you're slacking. We've all heard the parables of the great person who went broke, but managed to pay his debtors later even though he legally didn't have to.

What hogwash. Lenders get paid interest in compensation for the risk that the loan might go bad. They deny credit to people if the risk is too high. That's their business. If you borrow to start a business and the business goes south, that's not a moral issue - it's built into the bank's models. Turning it into a moral issue, rather than "just bizness", is just a way for the lenders to shift the risk - that you're paying for - back to you. It's like buying insurance and then not collecting for your burnt house, because you didn't work hard enough to put out the fire.

OK, sucky analogy, but you can bet that people like Donald Trump don't worry about the morality of debt when one of their companies go broke. It's in the contract.
This seems like a pretty fundamental issue though. I'd feel like any systems programmer worth their weight in salt would know that yo can build an O(1) pop on a queue.
> "I've been pretty dismissive towards people who hesitate with privacy concerns."

It's this dismissiveness that hasn't helped innovation in social media privacy, but sent it backwards. Thanks for that.

> "Get your loved ones off Facebook".

And this hair-on-fire turnaround doesn't help either. Our "loved ones" have their own brains. They would tell me to bugger off if I tried to spoil their fun.

I don't think I believe that FB keeps shadow profiles. What would be the commercial usage of such data? I doubt they are sharing shadow profile data with ad partners. What would such data look like and how could anyone possibly verify it?

I never signed up to FB, it's not my thing, too much like a club, not open enough, terrible or non-existent open data approach. I prefer gardens without walls. FB puts barbed wire fencing up by not allowing such basic things as RSS or feeds from FB to a website. Even the person who admins the FB page can't get to its data. Instead you have to install their like button on your site, and get an ugly widget thing to stream the data in within this God-awful blue and white box thing that really looks ugly on a website, and is bloated and crap.

But I see other people enjoying FB, especially the group pages which is where the best action is I'm told. (my 20-something flatmate tells me as she looks at FB right now on the couch).

If you leave FB for whatever reason (or never sign up in first place) then just do it. You don't need to blog about why you left. Just leave.
Avoid sqrt (you can always use "x^2 < 2^2", instead of "sqrt(x^2) < 2")
> I would not contend that mastery of the more theoretical topics is a prerequisite to becoming a good programmer. There’s abundant evidence to the contrary. But it is a necessary step in absorbing the culture of computer science.

I personally don't care about my feelings about the culture of computer science. I care about computer science, and I think you have to participate in all of the worlds, to achieve a mature understanding of the computer and it's role in society. When I can separate my mathematical and logical mind from my emotional mind, I can focus enough to do work. When my emotional mind ramps up because I'm (rather unscientifically) comparing myself to a very selectively observational evaluation of the value of the achievements of others, I am not sure what gets done aside from the passage of time.
"The higher level your language the more place there is for bugs to hide and if you actually believed that higher level languages would isolate you from the machine sufficiently that you could ignore reality then you had it coming."

I think this is because the abstraction is leaking. For example, such things as linked lists are not abstract enough to forget about underlying implementation, as they translate to actual memory blocks actually allocated in physical memory, and the programmer has to consider caching problems. If the system could analyze caching problems on its own and decide when to use contiguous arrays, and when to use linked lists, it would be closer to actual high level programming.
This is my experience too. Most people are still on Facebook, but they are less and less active. And nothing gets me closing the page faster than seeing a bunch of advertising.
You always see this at the top of every list of this general ilk. For me, it's true. I do it and I love it. But when I look around the office at my co-workers, I honestly believe 70-80% of people would either just abhor it or be terrible at it. Even though they might complain about it, they love meetings. Love them so much. They get out of a meeting and genuinely feel like they did something productive. These people would be deeply unhappy if they were yanked out of the candyland where having meetings and opinions was what they were responsible for and suddenly were told "Now you have to do something tangible to earn a living." ... In the same way I would be deeply unhappy if I were told I had to go to meetings all day. The point is, this probably is the best job... but not for a lot of people. So it seems misplaced at the top of all these lists.
One thing is a rule where you know what happens, and there's a social safety net in place, and everyone knows how it works, and has voted on it, and so on.

One-off actions are kind of another thing, in my book.

Anyway: politics. Article flagged. I'll happy talk politics here in Padova with anyone who wants to stop by and have a drink.
if i were in the intelligence community i would introduce cyber defense code with some very obscure flaws. Not flaws in the code itself but flaws in the algorithm.

If the code happens to gain traction. I would would then use that flaw to my advantage.
It's similar. We don't have HKT, so we can't get fully generic monads, but you can implement specific instances, like we have with Option/Result.
Just because you can't see a reason, doesn't suddenly make it any less true. Just search for 'Facebook shadow profile' and find the stories for yourself.
Hi, Mithril author here.

> With IDE support being so good why would I ever subject myself to using non-html view code anymore

As others have mentioned, preference for angled brackets can be solved with tooling. insin's MSX exists precisely to address this very concern, and it's dead simple to setup. As you might have noticed, Mithril's syntax is designed to look like the other language of the web: CSS. In practical terms, what this meant to me was to replace the usage of Emmett CSS-to-HTML expansion macro shortcuts in my text editor w/ a macro shortcut that spits out `m("")` instead. Coupled with simple IDE features like automatic bracket matching, I think you can get a typing experience that is very close to what is familiar to users of productivity tools like Jade/Haml/etc users (and with no preprocessor step required).

The actual reasons for templates to be pure js are slightly more technical: it gives better error reporting, proper scope/closure/variable shadowing rules, turing completeness (for the purposes of refactoring/abstraction, etc), it's friendlier to transpiled language users, it's lintable, it's compressable, it's statically analizable, etc.

Also, in my experience, complex apps tend to get heavier on logic than actual markup (this was actually the first thing my previous boss noticed when I gave him a simple code example when I was showing him the framework)
The solution is really simple - have an (optional) monthly fee of $10 and the need to monetize (your) user data is gone. But how many people would take that deal? I somewhat doubt it would be a significant portion.
Which is normal on today's web, which as Bruce Schneier says, is a surveillance-based economy....
std::map and std::set are designed to support a large set of use cases, and as a result, cannot really be optimized.
In particular, the iterator invalidation semantics prevent implementers from using more cache-friendly data structures like B-trees.
Deep thoughts: Evolve your narrative by coding and writing (products, books)
If you don't think about the underlying implementation of erlang:length(), this seems to me like an easy mistake to make.

Lots of data structures keep a size field and access it in O(1), so it's not completely unreasonable to expect erlang:length to be O(1) without making sure.

At least that's how I understood the context of the problem, I may be wrong of course.
That could be easily done adapting FB business model, letting you choose between:

Free membership: No fee. FB uses your data to run targeted ads.

PRO membership: Monthly fee. Your data is only yours.
Deja News used to archive Usenet. They got bought by Google. It's now not possible[1] to specify a date range when searching Google Groups.

They took it, they broke it, and now we can't use it properly.

[1] http://webapps.stackexchange.com/questions/73179/how-do-i-sp...
Nobody ever said that. Memory and time are especially important for high-level languages, because they spend them in an uncontrollable way inside said languages.

For instance, the common approach of garbage collection is a huge topic in every high-level language. Because it takes a relatively simple operation (delete one item) and batches it up. So when it happens, it takes thousands or millions of times as long AND inevitably happens when you can least afford it.

You never stop thinking about memory (and cpu time) in any environment.
To be fair, for a lot of things, GC certainly does delay or obviate thinking too much about memory management. This lets you explore the problem space and get something built and then maybe later optimize where needs be, if it proves necessary.
While i applaud the motivation behind cancelling the debts of Croatia's poorest citizens, the way it was done is likely to hurt them more in the long run.

Forcing banks to absorb the losses of this write-off will likely make it harder for the poorest to access credit in the future. Banks are not social institutions - they're pathological profit making entities. They will have no qualms with raising interest rates or denying credit altogether to compensate for the increased risk of doing business with their poorest customers.

The poorest section of the population do not borrow money for no reason. Borrowing is often required for emergencies (i.e. medical) or short term liquidity (paying bills on time). Just as importantly, it's vital for people who want to improve their economic situation by starting new businesses.

My primary concern is that banks starting to shut/price them out. The least well off will end up resorting to informal lenders (i.e. loan sharks).
Few have said it since those foolish comments back in 1995. That pretty much is 'nobody'.
They don't say anything is illegal, they say it is 'prohibited'. They don't say who it is prohibited by, and since it's clearly not the federal government you have to assume it's just prohibited by the NFL itself. Of course nobody has to listen to a goddamn thing the NFL says, so why include the message? It's likely a CYA thing on their part, since it gives them the power to essentially disown any event or analysis that is related to their broadcast.
Also worth noting is how the NFL is obsessed with law enforcement culture. Lots of the league employees are former police and FBI, so there is a good chance they actually think they have some kind of authority over what a person does or says in relation to the NFL.
As I coincidentally just mentioned minutes ago in a different article's thread:

Firefox Alt-V Y N for no styles, renders in black and white, text flows within the browser's border.
Watch new Fantastic Four movie trailer
Respect CPU caches and locality. Keeping your data structures in cache or even packed together can result in a nice performance gain.

I've seen benchmarks where inserting into an array was significantly faster than inserting into a linked list. This can be surprising considering most algorithm texts I've seen say the complexity of the latter is better. From what I understand locality is part of the reason inserting into the array is faster.
> I'm outraged to know it is sometimes required by law (you can be fined, by a cop, if you car isn't insured for example).

And rightly so. Or are you able to pay out-of-pocket for any car or truck with cargo that gets totaled because you cause an accident? What about damage to individuals causing them to spend a life bedridden or in a wheelchair?

Or are you 100% sure that you will never ever cause an accident?

I'm pretty sure that of all the people that will have car accidents today in France quite a few of them got up in the morning thinking exactly like you and the majority of those (assuming they survived) will have a change of heart by 12 O'clock tonight.
A similar method of helping the impoverished, one which has strong support among at least some economists (and maybe more widely), is cash transfers directly to the people who need it. That is, don't fund a service for those in need, fund the people directly and they can buy what they need. GiveDirectly is a leading implementation of this idea:

https://www.givedirectly.org/

It was founded by economists, and their blog has a lot of interesting discussion and analysis of the idea: http://blog.givewell.org/category/givedirectly/

One way to approach this idea: Why not do it this way?
I believe the intention was more Zen -- don't write code that isn't really necessary -- and the "use standard libraries" code was separate. (If you are using a language where the standard libraries are so poorly implemented that you can easily write better versions, you might want to consider using a different language.)

I would also add the cargo cult suggestion of "precompute and cache everything you can". Whatever can be done in an indexing process instead of a search process should be; whatever doesn't need to happen at serving time shouldn't.
Ask HN: Who is hiring? (February 2015)
Please lead with the location of the position and include the keywords INTERN, REMOTE, or VISA if the corresponding sort of candidate is welcome. Feel free to post any job that may interest HN readers from executive assistant to machine learning expert to CTO.

Please do not post recruiting firms or job boards.
I think software architects are a company anti-pattern. It seems like such a good idea, one or two big brains putting the whole system together, then a pile of cheaper code monkeys doing the implementation.

On my experience, what you actually get is your one or two "big brains" doing little to no work. They go to lots of conferences, are in a lot of meetings, derail almost all useful conversation, and maybe occasionally produce a UML diagram. The plebes responsible for actually building the system typically throw away the architect's design immediately, because while it's a beautiful, pure design, it doesn't take into account being deployed, running and being supported in the real world. The code monkeys then build a deeply flawed system, but it ships and works.

But at least the architect is great to have beers with during the Friday happy hour.

Skip the architects, make the monkeys do the design. Have them vet it with each other, preferably in a formal setting with your entire engineering team. Everyone codes, and everyone architects.
s/strives/thrives
> the common approach of garbage collection

Erlang actually doesn't take the common approach, which is part of the reason it usually does "soft" real time pretty well. This is the first thing I found in Google when searching for a description of how it works:

http://prog21.dadgum.com/16.html
I suspect your data's worth more than that to them.
If you need to know if it's not empty, shoudn't it be easier to just test if the pointer to the first item is not-null ?
How would you like Facebook to use this data? Perhaps it should report miscreants to their local school, church or police force?

Google tracks everyone everywhere as well. Should it do the same?