skysight-inc/HackerNews huggingface dataset:
> "My code is so good it doesn't need comments" is usually untrue.

I still don't see this as a convincing argument.

Our greatest constraint is time. So the question becomes do I spend my time writing comments or do I re-factor the code I wrote to make it more readable?

I always opt for re-factoring my code.

Have you read some of the comments most developers leave? They either explain the most obvious inane functionality or use it as their personal todo list. And sometimes they do both. That is not helpful.

In instances where I know my code will be a critical component which will be utilized by many others, I opt to write documentation rather than comments. And there is, of course, a difference.

Comments are inline, documentation is frequently split out. Comments are frequently inane explaining the obvious, while documentation goes in-depth into not only how the code works, but what it is trying to accomplish and why. Documentation also provides examples of use, which is far more useful than anything else. When I reach for the documentation option, I almost always include a separate markdown file with the same name as the original file. There are then a ton of options in terms of software that aggregate those files into a searchable, indexed collection.

Focus on code quality and if some sort of annotation is necessary, write documentation, but don't leave comments.
McAfee CTO Phyllis Schneck to be named next DHS deputy cyber undersecretary
Previous to Carl Lange’s post, this was described in "How to Increase Your Luck Surface Area" - http://www.codusoperandi.com/posts/increasing-your-luck-surf...

Apparently, Carl was unaware of it as well despite the post and subsequent discussion receiving a fair amount of attention on HN at different times.

Disclaimer: I wrote it.
I've been blogging about my chosen field for about a year now and I've seen similar rewards from it.

Most recently:
- I was asked to provide an article to go into a sidebar of someone's book.
- Someone I met for the first time at a meetup mentioned that they knew who I was as my articles kept appearing at the top of their Google searches for particular topics.
- Microsoft suggested a resolution to a problem ticket I had raised with them by copying and pasting my own blog into a Word document and sending it to me - complete with Screenshots.

I've also learnt a lot by researching "that extra little bit" for the blog content and from other people leaving really great comments.
Update for anyone following this:
https://twitter.com/Guitaraholic/status/366945419751718913
the whole world becoming vegan might cause a huge shift to massive plant agriculture, with its attendant water usage shifts (some animals can eat scrub), and therefore contribute to severe climate change as many areas of the world become desertified.
OK, Fair enough -- to an extent. (Although I am not actually American).
I have a slightly different approach. I mostly find out about new software through GitHub. So rather than talk about it I put my stuff on GitHub and possibly NPM. If any of those repos generate enough traction on their own, I would work on them more/make them better etc. If they don't and the work is useless to others, there is no point in talking about them.
"And the farmers will continue to over fertilize."

The smart corporate farmers don't over fertilize, it costs real money. Research the technology that they use, satellites, GPS and automated tractors/spray rigs that adjust in real time for specific soil needs.
JCPenney passwords insensitive?
I've been reading articles over the last ten minutes about companies, including banks and credit card companies using case-insensitive passwords. Some articles were a year old but the reason I discovered this because i made the mistake of capitalizing one of the many letters in my password. i hit enter and realized my mistake. Before i could fix the error, it logged me in. I tested this with other letters and mixing it up but it still works.

The other articles I read said they allowed the first letter to be either as some mobile devices auto-capitalize words, and they allow reverse caps to allow for caps locked problems, which already seems dumb but that's beyond my argument. The issue is, with JCP, any combination of password capitalization works.

I have limited understanding of password encryption, but this would make me think two things: they either purposely did this, or they use some encryption that doesn't distinguish between upper and lower case such as LM.

My question is: why would they do this and what should I do? should i inform them or is this more of a "we understand your concern, sir/ma'am, but we have it under control" waste of my time? Also, is this a concern for anyone else?
Thank you! I loved your article on partially applied functions in C, by the way (that was you, right?)
Find Office Space...that you'll love.
I don't understand why the service provider needs to store or provide any keys. Let the customer generate a private and public key, store the private key anyway he/she chooses, and then broadcast an address/public-key combo to would-be contacts. You can communicate using a totally insecure file-sharing service -- e.g. usenet, anonymous FTP, or mailinator.
> I believe that the LavaBit fiasco just proves the need for a decentralized system with no central points of failure

That's probably the only thing e-mail actually does really well. Centralization is definitely not the problem with email. Lack of end-to-end encryption and meta-data leakage are the real problems.
Ruining your camera isn't especially fun either.
Two Critical Cloud Computing Battles Now Underway
So much process ... so little spirit. It is, indeed, a sad sight.
says the site with 17 sets of tracking code on the home page :-)
> to the point where politicians[3] and even pharmacists[4] want to ban birth control

If you want this problem to get better, it would help to blame the right thing, which is religion.
I write a technical blog so people only really come to my articles when they are looking for a solution to a problem. Until recently I did zero "audience building" and had about 80% new visitors with 500 visitors a day.

I just wrote articles to improve my writing skills and now people find them in Google.
I see no reason to assume that qualia cannot be measured, in principle.
ewwww those margins on the copy...
I must admit that last sentence certainly isn't without irony!

Seriously though, I wish you the best of luck. My advice would be to get yourself a good portfolio assembled and then maybe approach small- to medium-sized companies and just be open and frank with them. If you can demonstrate you have the skills there will be someone out there who is happy just to have someone sat coding up briefs, reporting only to them. Larger companies might find it more difficult to get around the mindset that meetings are universally important and everyone eventually wants to be a manager. A small business owner might see someone like you as a godsend if you help them understand that in return for being largely undisturbed (in a social, obv not work sense!) you will be loyal and productive.
Make Sure Postfix Never Sends Actual Emails From Your Development Machine
It is taken directly from the Lavabit "about us" pages* - I read them all a few weeks ago when I signed up and paid for pro! :)

* - the pages are gone now, which is why they needed to be mirrored somewhere.
I thought this was just another stupid HN comment. Had to read it several times for it to make sense. Its solid advice.
Here is a higher bandwidth link to the same video

http://www.nimbusvid.com/mega/#!xAEGXQiD!ez8HoC-LS4m2k2YYGZP...
Having been a bit of an 'Erlang is quite good enough' purist, I am becoming increasingly tempted to give Elixir a whirl.

I am a long term hater of Javascript (global state, aargh!) and I have been giving coffeescript a whirl (no global state, yay!).

One of the (unexpected) side effects is that I appreciate the readability of coffeescript vs javascript much more than I expected.

Jose Valim is also giving a talk at a conference I am organising next month (http://mostlyfunctional.com), so I am tilting heavily at the moment...
I'm not sure the site is updating though. cry.bz still shows up for sale and I bought it a few minutes before the comment above. Might need to update that feature
Now sure when you were at Microsoft, but Sinosfky and Nadella were division Presidents, not VPs. It is much easier for a VP to get away with being full of shit.
Smart bins: Official Message on Renew Orb from CEO, Kaveh Memari
Slick integration of ace editor and redactor !
I disagree.

The author talks about being "overtaken" by others if you are unwilling to withstand tedious boredom and pain in your work.

I think this is because he believes life is a race to the finish line. To make a career, to go up the ladder, all that stuff.

And then he dies, wondering why he spent his life doing so much things he didnt enjoy. He wasnt even forced by someone else to do them. He forced himself.

It all boils down to your perspective on life, and what the meaning of it is. :)

When the passion fades, I change my job and do something else. Then the passion is back. I guess its because my passion comes from learning new things in technology.

But if the author wants to sit on his ass and think there is no point in doing anything but grind, grind, grind, its his choice. The beauty of life is that we all have free choice to do what we want, and we should take full advantage of it since its the only thing we really do control. :)
Related, for sure. I think for it to be considered testable comments it would have to 1) be inline, 2) be brief enough to be easily readable in the context of a comment, and 3) be aimed at documenting the kinds of things good comments are aimed at documenting. All of these are occasionally aspects of unit tests, but there are plenty of things that are unit tests and are probably a good idea that are not all three of these.
Maybe something like my grid solver[1] would do. Thumb sizes must be chosen beforehand, but you could specify just 2 classes: one for portrait, one for landscape.

I haven't touched this code in almost 6 years now, so don't expect too much :)

[1] http://phoboslab.org/files/grid-solver/demo/
> * How do you backup and restore your system?

> All critical servers use RAID 5.

Unfortunately RAID 5 (or any other flavor) is not a backup solution. It doesn't account for user error, RAID controller failure and numerous other scenarios.

It seems LavaBit had an interesting product, but this seems like a pretty critical design failure.
City of London halts recycling bins tracking phones of passers-by – Quartz
Can we not persecute a kid please? Also persecuting persecutors is a tad ironic. But I'm sure you want to know his name for completely benevolent rehabilitatory reasons.
Unless you're shipping the customer a persistent component that doesn't automatically update itself every time they connect to the service, you might as well just store the keys, because (as LavaBit apparently discovered) if a court decides you need to cough up your users info, they'll probably just get you to install whatever code is needed to make that happen.
What we haven’t told them is that nothing of any worth is obtained by any means except for good old honest hard work.

Whenever I'm given life advice, I try to I imagine it being given to a group of trust fund kids on a corporate retreat (they will soon be starting as VPs at their fathers companies). Then I imagine the same advice being given to coal miners in Virginia or sweat shop workers in the Chinese countryside.

I like advice that can get through both those scenarios without making me laugh or cry.
You moved the goalposts - I said they're uncommon in general. Though even most servers are single socket these days. Most high performance parallelized code runs in game engines, media codecs, and things like that.

I can believe you can see speed increases like you cite with bandwidth-bound code, but would doubt this kind of optimization is good bang for the buck for most perf critical code.
Just how big are the differences between Ruby 1.7.3 (the topic of this hacking guide) and the current version?

Has anything fundamental changed in how Ruby manages objects or does garbage collection?
I had to go ahead and add ubuntu restricted extras from the software center, but after that everything worked. I didn't have to add any drivers for this distro to get sound, vid, mic, etc working properly. That's not surprising because the last few Ubuntu releases have gotten a lot better at out of the box hardware support. That's probably from Debian, but I don't actually know.
What checks does the machine have on it (let alone the Chinese machine that is presumed to exist) its already broken free of 100% human control.
Usage of server-side programming languages for websites
The drive to try to solve the problem with tech is simply more emblematic of the actual problem: nobody's willing to do the hard and undesirable work of pushing for policy change, or even becoming policy makers themselves.

It's a pity that even while we watch our grandest creation crumble at the hands of overeager, underqualified career politicians, we can't be persuaded to kill the beast from the inside.

Any of us is educated enough and capable of working in congress. I mean, Christ, Michelle Bachmann was a running mate for president.
Steam IS DRM
Best online resources to learn to program. 
What/Where are the best online resources to learn to program? I want to learn for free on my own, and am seeking advice as to the best sites.

Thanks.
Not from a devops viewpoint. Just deploying a new binary is way simpler than dealing with pip/easy_install/gems/cpan/etc.... and all the headaches those involve.

Hell even the stated "just update the library you link to" advantage of compiled programs tends to be overstated as you end up with some software that works and some that doesn't. So statically linking in dependencies and library dependencies by my mind is less of a issue now.
I disagree. And I'm not sure you caught the tiny part at the beginning when the author talked about how why comments are good, but what and how comments are mostly useless. Yes, there was only a tiny mention in the post, but it was there.

I think that what and how comments are useless because they're literally the code itself. Comments like 'increment by two' are useless, because the next line literally says `x += 2`.

If that comment was expanded to be something like 'increment by two because ...', explaining why x is being incremented by two, it becomes useful, and I think the author agrees.

I think the reason these posts get as much traction as they do every time they're posted is because people tend to write bad comments. In my experience as a CS tutor at my college, most new programmers either write useless what/how comments or no comments at all.

The problem I see with these posts are that they don't talk about how there are good kinds of comments, but that everyone should just make their code cleaner and everything will be great. If more time was spent talking about how to write better, more informative, and relevant comments I'd like these posts more.
So what worries you is that the rest of the world may not have to give up its life of luxury? Because that is essentially what you are saying.
Do you know the way to find out how many people decided not to commit a specific crime due to implemented countermeasures? Or you suspect that the number of people trying to commit visa fraud stayed the same after fingerprinting had beed implemented?
This was exactly on the money.

All of the hard-libertarian types that want everyone to use Linux and 'Tor all the things' and etc really don't seem to get that by always saying that democracy doesn't work anymore they keep fulfilling their own prophecy.

What gets me is that everyone talks about the government like its a giant that lives in the hills. Its a real thing that people do...Get a job in the intelligence community! Get a job as a congressional staffer! Run for office! Get involved.

If you keep saying that the republic is lost and the only thing you are going to do about is RUN TOR...You are a coward.

Get off your ass. Stop being a bitch. Move to Washington and apply for jobs in the security and intel sectors until you get one. Apply for a job as a senate staffer. Volunteer. Join the military and get a job in intel or signals. Do whatever it takes to get involved in the actual game and then make it better!

I'm not saying that TOR isn't a good thing...because it is. It helps real people all over the world evade censorship. That's awesome. Evading a third world regime is one thing. Evading the US Government is another...It won't work and the tiny population of you hard-lib-tards basically just give the government more ammunition. The "solution" here is to get involved and do something to help your country that you think is in such dire straits.

I say "solution" because most people don't really see this as the big deal that you hard-lib-tard types do...they ask questions like why didn't the FBI have any idea that there were radicals posting violent information on Facebook before the Boston bombing. And while I may not like John Roberts' politics, I have no doubt that people appointed to the FISA courts are real American's who love their country and are trying to do the right thing. Just like the people at the NSA. Maybe they have gone to far...that's entirely possible...hell, its very likely. But accusing them and the people in government that are tasked with security and intelligence of being fascist or tyrannical is fucking stupid. It makes you sound like a tinfoil haberdasher...get over yourself.
Why My Company Will Fail
Drupal 7.23 Release
why not combine telling the people about it and linking to your github / npm projects? It will definitely gain much more attraction and you can showcase already the effects of said code with a neat demo.
Yeah, let's burn our bras, I mean smartphones.

Or donate money to whatever -- so far that hasn't worked. I doubt EFF with a 10x increase in budget could accomplish 10x objectives. Even if they could, that wouldn't give us 10x freedom.

But I'm often wrong about these things.

Once, in the murky past, I used to tell people "changing the world" isn't the point of activism -- it's "changing ourselves."
I don't know what you mean by "special" (nor do I understand which "claims" you have issue with), but these are true lightweight threads. We use runtime bytecode transformation to create continuation, so that we can suspend and later resume a call-stack. These continuations are then scheduled on a thread-pool. It works exactly like it does in any other lightweight thread implementation AFAIK, except that in languages such as Erlang or Haskell, these continuations are created by the compiler or by the runtime, while in Quasar they're created with bytecode transformation. The JVM doesn't support continuations out of the box, but its instrumentation mechanism allows you to implement them in a library. It isn't any more, or less, special than lightweight threads in Erlang or Haskell.
From an acquisition perspective, the "price" is Market Cap + Debt - Cash. The total cost comes to just over $2B. At that price, I see it as a no brainer for Microsoft. They just need to ship a windows phone that is compatible with all the BB enterprise stuff, and IT departments will force it on the employees.
Turning the Apple //e into a lisp machine, part 1
IIO Engine looks great. http://iioengine.com/
When I buy a bus ticket at the counter with cash to go from here to there it's no one's business to know that I'm even on that bus. But even then they ask for a drivers license.

I find it strange to see people on Hacker News post-Snowden defend the nothing-to-hide mindset.
If you want to ask thing you do not know very much, you should be more humble.
1.etcd is not a key-value store like redis or memcached, whose aim is to provide high performance. etcd is aim at providing high reliable storage for small amount consistent data across multiple machines.

2.1 We have cmdclt tool, which will not return redundant information.
2.2 I do not think you know exactly what index is.

3.raft is a distributed consensus protocol, which help with fault tolerance and consistency. For sharing configuration using etcd, we can assume the conf server will be robust. The essential goal is to remove spof.

4.It is not. It is hard for our usage. Because it is HTTPS, .
I have written an app for the Firefox OS too, the experience was good but at the end of the day, the hardware feels too cheap and the OS isn't responsive enough.

If there is anyone in London looking for a phone, send me a mail.
This is not reddit. Please stick to facts.
Disconnect, The Anti-Ad Tracking Startup, Now Has A Privacy App For Children
You must be doing comments wrong. If they explain the why, they should still be relevant. Or people should rewrite them when they adjust the code...
I would expect in software companies being extrovert isn't a requirement. It's not a requirement were I work.

Developers don't deal with customers directly, we got support and to lesser degree management doing that. So I don't see why being an introvert would be bad.

I guess in a web-agency you will work directly with customers, so it makes sense to hire people who are better at dealing with people (Office Space flashback).
Don't worry Jason - I was pimping luck surface area last month: http://mdswanson.com/blog/2013/07/19/getting-traction-for-yo... ;-)
This such a disappointing article it borders on journalistic dishonesty. They make out Belarus to be some Terra Incognita being discovered by some brave Nokia volunteer(?) explorers. It is simply not the case, Nokia's competitors in mapping space, Google and OpenStreetMap already have excellent maps. Just compare maps of Zhodzina, a provincial Belarusian town I chose at random between Bing (Nokia)[1] , Google [2], and OpenStreetMap [3]. Nokia's map is hole, whereas Google and OSM have streets and names associates with them. This pattern follows from Minsk to the provinces.

The details offered by the article may be of some interest, but their veracity simply can not be trusted due to glaring omissions, half truths, and down right falsehoods in the article on the broad level. Shame, shame, shame on NY Times.

[1] http://binged.it/14p2lTY
[2] https://www.google.com/maps?q=Zhodzina,+Minsk+Province,+Bela...
[3] http://www.openstreetmap.org/#map=15/54.1038/28.3231
Federal sales and ECC encryption patents are alone worth the purchase.
Rust looks very interesting to me, but seems to be in in a state of high flux. Does anyone have experience with sustained work in the language? How often are you hurt by the rate of change?
London's Bins are stalking your smartphones
It makes me happy to see Schneier get more mainstream press these days. As someone who has followed his blog for years it's about freaking time he got more attention.
The problem is that you can't effectively enforce legislation against it. Even if we were to crack down on the surveillance apparatus that we can see, unlike analogous physical action electronic interception is practical with a tiny amount of equipment. Until you're ready to hand inspect every foot of communication line (which are almost always underground or undersea), and evaluate every switch on them down to the silicon, there's no point in attacking the problem with laws. A law can stop a large government program, but every 18 months the problem gets twice as easy for a smaller group to tackle.

You can't legislate that people be nice to each other, and you can't legislate that people not copy bits.
It s also about how many people commited the crime vs how many of them were caught. As a example 1000/100 ratio is still worse than 100/50, even if you caught only half a many people as before you still did a better job at it, and at preventing the crime as well.
This sounds a bit like netkernel to me http://www.1060research.com/netkernel/

Arcitechture and code seperated and only requests and representations gets passed around by a microkernel.