Deconstructing K&R C Is Dead (2015) - rebekah-aimee http://c.learncodethehardway.org/book/krcritique.html <comment><AUTHOR> Low level languages are tough. Gaining a mastery of C does require knowing quite a few strange rules and quirks and it's certainly a bit harder than learning Python. The C FAQ does a good job of illustrating some of the more confusing parts. Sure, I wish I could write Go instead, but that isn't going to happen on the many embedded systems I work on.

This is a rather strange and insulting article. I'm not sure why Zed can't help "old programmers" nor do I understand why he's angered that individuals know about undefined behavior in C. Is there any background to this or did he have the misfortune of being insulted on IRC?

Edit -- I googled for a bit and discovered this was in response to someone doing a pretty good job technically reviewing the book for free! [http://hentenaar.com/dont-learn-c-the-wrong-way](http://hentenaar.com/dont- learn-c-the-wrong-way) Perhaps the title was a bit inflammatory.

Zed's rebuttal is at [https://zedshaw.com/2015/09/28/taking-down-tim- hentenaar/](https://zedshaw.com/2015/09/28/taking-down-tim-hentenaar/) and is a great example of how not to react to constructive criticism. My favorite part is his safercopy function and the lack of size_t.

And finally, to leave us all with a quote from Zed's rebuttal:

"Over this next week I'm going to systematically take down more of my detractors as I've collected a large amount of information on them, their actual skill levels, and how they treat beginners. Stay tuned for more."

Wow.

<comment><USER2> > Low level languages are tough

I disagree. Low level languages, especially C, are the easiest to master. K&R book is the only book you need to read to know everything about C. All you need after you understand the fundamentals is a bit of discipline.

C++ on the other hand is extremely difficult to master. Just have a look at the rules for Rvalue references and you will see what I mean.

It may be easier for a complete novice to write some code that doesn't crash in C++ than it is in C, but not mastering it, or even be good at it.

<comment><USER3> > K&R book is the only book you need to read to know everything about C. All > you need after you understand the fundamentals is a bit of discipline.

I am a huge C fan but this is not true at all. C has tons of pitfalls, especially with modern UB-aggressive optimizing compilers. There are a lot of rules you need to be aware of that are not naturally-occurring results of the fundamentals.

<comment><USER4> > especially with modern UB-aggressive optimizing compilers.

You put your finger on the problem: "modern UB-aggressive optimising compilers". C, the language, is actually quite simple (if not easy). The crazy stuff that compiler writers have been doing recently while aggressively mis- reading the C standard is the problem and does make things very complicated.

Why "misreading"?

From 1.1:

"The X3J11 charter clearly mandates the Committee to _codify common existing practice_."

 _Their_ emphasis, not mine. So is there a mandate to use the definitions of the standard to _invalidate_ common existing practice? Clearly not. Yet that is what is happening.

More from the standard (defining _UB_ ):

" _Undefined behavior_ gives the implementor license not to catch certain program errors that are difficult to diagnose. It also identifies areas of possible conforming language extension: the implementor may augment the language by providing a definition of the officially undefined behaviour."

Does it say "Undefined behaviour gives implementors license to add new optimisations that break existing programs"? Clearly and unambiguously not.

See [http://port70.net/~nsz/c/c89/rationale/a.html#1](http://port70.net/~nsz/c/c89/rationale/a.html#1)

<comment><USER5> Your interpretation of "codify common existing practice" would imply that _no_ new compiler optimizations could be implemented since 1990 (when the first version of the standard was published), as any optimization could potentially change the observable execution behavior of an erroneous program that contains UB.

> More from the standard (defining UB):

Your quote is not from the normative text of the standard, but from the non- normative rationale. Note however that it explicitly says that programs that contain undefined behaviors are erroneous, and that the implementation is not required to emit diagnostics for the UB. Pretty clearly this allows implementations to optimize erroneous programs into whatever they think is funny this week.

The normative text of the standard is pretty unambiguous:

        undefined behavior
        behavior, upon use of a nonportable or erroneous program construct or of erroneous data,
        for which this International Standard imposes no requirements

[http://www.iso-9899.info/n1570.html#3.4.3](http://www.iso-9899.info/n1570.html#3.4.3)

<comment><USER4> > Your interpretation of "codify common existing practice" would imply that no > new compiler optimizations could be implemented since 1990

Utter nonsense. I use that word carefully, but in this case it is absolutely appropriate.

Compiler optimisations per an old but very useful definition aren't allowed to change the visible behaviour of programs (in terms of output, obviously they are allowed to change execution times).

For example, even just a couple of years ago the compilers I used would execute a loop that sums the first _n_ integers. Nowadays compilers detect this and replace the loop with the result. While this isn't particularly useful, because probably the only reason you're summing the first _n_ integers in a loop is to do some measurements, it is (a) a perfectly legal optimisation and (b) happened after 1990.

Unsurprisingly, you left out the second part of the (later) definition:

       NOTE Possible undefined behavior ranges from ignoring the situation completely with unpredictable
        results, to behaving during translation or program execution in a documented manner characteristic of the
        environment (with or without the issuance of a diagnostic message), to terminating a translation or
        execution (with the issuance of a diagnostic message).

Notably absent is "use the undefined behaviour to shave another 0.2% off my favourite benchmark".

<comment><USER5> > Unsurprisingly, you left out the second part of the (later) definition:

It is _not_ part of the normative definition, which says "for which this International Standard imposes no requirements". In ISO standards, notes are without exception non-normative.

Although I think they really should add your proposed text as an additional example, as their current set of examples is evidently confusingly incomplete :-)

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> I can't really speak for Zed's expertise and/or value to the programming community. From what I gather, a few of his projects are widely used (Mongrel comes to mind), and he seems to know his stuff pretty well. I also identify strongly with his Programming Motherfucker[0] rant.

But man, the guy is insecure to the point of requiring therapy or something. He seems obsessed with his image and status, and the slightest criticism will cause him to lash out in an immature and ridiculous manner. Past rants have him making lewd comments about penis-sizes and challenging others to a physical fight[1].

It's a shame, because if he just relaxed a bit and took criticism gracefully, he'd probably find himself to be a bit more valuable to the community and employers, and would actually be a pretty decent dude. Instead, his writing seems to reek of a constant need to validate and defend himself.

This is probably an unfair comparison, but I can't help but think of Terry Davis: a brilliant programmer hindered by mental issues. Schizophrenia is obviously not the same as insecurity, but I think the situation here is somewhat similar.

[0] [http://programming-motherfucker.com/](http://programming- motherfucker.com/)

[1] [http://harmful.cat-v.org/software/ruby/rails/is-a- ghetto](http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto)

<comment><USER7> Despite having a veneer of a good comment, well written, sourced with links, and starting with some (faint) praise - it's actually just an ad hominem, and not appropriate here.

<comment><USER8> It's not really ad hominem. More like constructive criticism of his rhetorical style.

<comment><USER9> > It's not really ad hominem. More like constructive criticism of his > rhetorical style.

No, it's a blatant ad hominem.

The guy invested his time and effort trying to improve the world by writing a technical book, which he then proceeded to give it away for free, and to this we see people like barbs replying with personal attacks accusing the author of being mentally disturbed to the point of requiring therapy.

This is a personal attack at its worst.

Perhaps the issue here is the C programming language and how teaching it can be improved, not what insults and personal attacks a random user online is able to throw at the author of a technical book.

People have more to lean from writing on undefined behavior than puerile complains regarding comments on penis sizes and ironic accusations of immaturity.

<comment><USER6> The term "ad hominem" is typically used to describe the fallacy of attacking the person making an argument, rather than the argument itself. Sure, I'm discussing his character, but I'm not trying to win any argument here - he may be correct in what he's saying.

> _The guy invested his time and effort trying to improve the world by writing > a technical book, which he then proceeded to give it away for free_

And I think this is certainly laudable, especially since they seem to have helped so many people. But he also called the Rails community "pricks, morons, assholes, and arrogant fucks who didn't care about the art or the craft." and I think he should be held accountable for that, amongst other things.

I wrote a comment about the author's behaviour in public forums and in blogs, something I think he should be held accountable for, and something which I believe hurts both him and the communities he participates in. I believe this is relevant, and I'm entitled to discuss this here.

<comment><USER9> > The term "ad hominem" is typically used to describe the fallacy of attacking > the person making an argument,

This is a discussion on a book on the C programming language written by someone, and here you are going full throttle on your personal vendetta against the author while saying absolutely nothing regarding the book or the programming language.

> Sure, I'm discussing his character

Precisely.

Go vent your frustrations somewhere else.

<comment><USER6> Please stop dictating what this discussion is about, and what people can and cannot discuss here. This is perfectly relevant.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> This is obviously a bitter rant, and devolves into uncomfortably ageist territory about halfway through.

I do agree that we should be moving away from C and C++, though. It's pretty simple, really: C was a pretty good language in 1978. We didn't know a lot of things in 1978 that we do now in 2016. It now makes sense to revisit those decisions in light of nearly 40 years of practice. The so-called "PL Renaissance" has given us a whole host of new languages which have steadily chipped away at the dominance of C and C++, and I think this is a healthy trend that ought to continue.

<comment><USER11> I'm ready for the hate, so here we go... C was not a well-designed language in 1978.

The fact that C arrays decay to pointers without any bounds is single-handedly responsible for a huge chunk, possibly even the majority, of all RCEs, worms, malware, and exploits. Ever. In the history of computing.

It was a bad design.

It was a bad design in 1978.

It was known to be a bad design in 1978.

Other languages knew that checking array bounds was important, including for security. The internet made the impact of using C much more devastating but people were exploiting buffer overflows in the 80s to great effect. Some of C's predecessors/contemporaries passed a length as the first part of an array so bounds-checking was possible, though that has the downside of not being able to pass slices of an array without copying.

C could have included an arrayref type that was a length + base pointer, and let array l-values decay to an arrayref instead of a pointer. Then taking a slice of an array would not require copying elements. You could still take the address of an individual element. This would not have required much work to implement, even in 1978! Maybe the first compilers didn't insert array bounds checks, but at least the entire design wouldn't preclude them. Let's say you even spell arrayref as []. It would mean sizeof() works on arrays passed to functions. __

void wat(int[] values) { for(int i = 0; i < sizeof(values); i++) { printf("look ma, no buffer overflows! %d", values[i]); } }

(Yes, I know this is not K&R syntax)

Maybe you can forgive C for the stupid header compilation model (why let the compiler do what you can make the programmer do by hand?). You can understand why they might not have foreseen the need for namespaces. D&R didn't invent the macro system so that's not even their fault.

What is unforgivable is the horribly stupid design of C's arrays.

 __I actually think it would be beneficial if the standards committee added arrayref now. It won 't fix all the busted C code but at least you could start improving the #1 problem. Compilers could eventually adopt a flag to prohibit arrays from decaying directly to pointers. You'd probably have to introduce lengthof() to avoid confusion and use some other syntax to declare one, maybe array(int) or something.

<comment><USER12> I suspect this has a -lot- to do with performance.

When C was designed, and even today, there are systems without pipelining, where it is expensive (in time) to de-reference a memory address and follow that pointer.

I do not argue that the design you suggest would be safer, and even have advantages for slicing; but that's really not the kind of program that C was intended to service writing.

Also, C is supposed to scale down to //really// simple systems. Systems that lack indirect addressing modes, caches, MMUs, etc. It is literally intended to be a thin veneer over actual assembly for those systems, and why so many operations are specified in terms of /minimum standard unit size/ (for portability of that almost machine code between systems).

What you advocate is more like what C++ actually /should/ have been; a reason to use something more than C to gain advances in safety and ease of design.

<comment><USER13> _> I suspect this has a -lot- to do with performance._

It's questionable whether people wanted that performance though, at least when it resulted in less security. About bounds checking in ALGOL 60: [https://en.wikipedia.org/wiki/Bounds_checking](https://en.wikipedia.org/wiki/Bounds_checking)

 _A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interest of efficiency on production runs. Unanimously, they urged us not to—they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous._

<comment><USER14> "The block structure of ALGOL 60 induced a stack allocation discipline. It had limited dynamic arrays, but no general heap allocation. The substantially redesigned ALGOL 68 had both heap and stack allocation. It also had something like the modern pointer type, and required garbage collection for the heap. The new language was complex and difficult to implement, and it was never as successful as its predecessor."

\-- [http://www.memorymanagement.org/mmref/lang.html](http://www.memorymanagement.org/mmref/lang.html)

Adding runtime bounds checking of automatic storage arrays (i.e. arrays on the stack) is relatively easy in C, at least until the compiler runs into illegal type punning. The real problem in implementing these compiler safeguards comes with crossing translation units, or with heap blocks. There's a reason languages like Rust and Go rely heavily on static linking and stack allocation; it's more difficult or more costly to implement those safeguards when the compiler can't see all the source code, or pointers pass through an opaque layer. Nothing in C precludes automatic bounds checking of all array access, via fat pointers or lookup tables. Fabrice Bellard's Tiny C compiler implemented precise bounds checking for both automatic and dynamic storage- allocated objects a decade before UBSan and ASan. Even deriving an invalid pointer crashed the app at the precise point where it happened. That widely- used C compilers don't do that is a strong hint there are other, real-world constraints in place.

Also, in language like Java it's not uncommon to see people reinventing dynamic heap allocation using char arrays, susceptible to all the same overflow problems. When you see people doing that, that should be a hint that a language like C might work well.

I don't understand all the C hate. Then again, I have no problem employing various languages according to the task, or creating DSLs. I suppose if I was wedded to a single language or to the idea of a single language, C would look much worse to me.

<comment><USER15> _> There's a reason languages like Rust and Go rely heavily on static linking and stack allocation_

This is untrue: Rust certainly does not do any optimisations linking statically by default, nor is there a difference between putting an array on the stack or on the heap. While it is true that code can benefit from whole- program optimisation, it isn't the default in either language, just like it isn't the default in C.

<comment><USER14> Languages which bake in automatic bounds checking at every access rely on optimization to recover the performance hit. Without static linking, automatic GC, and other constructs that's very difficult.

LTO notwithstanding, once you add those more sophisticated constructs, iterating the language becomes more difficult. You don't hit upon the best method for implementing various types the first time, or the second time, or even the third time. glibc is backwards compatible for programs compiled over 15 years ago (GCC's fixinclude hacks notwithstanding). You'll never see that with Rust's or Go's standard library, just like you never saw that with C++.

My point wasn't that static linking was necessary. My point was that static linking is indicative of other tradeoffs that most people don't understand. Static linking isn't just about making packaging easier. It's also about making it easier to write and implement the compiler and standard environment.

My more abstract point is that people who think C is on its last legs don't understand the whole picture. There's nothing intrinsic to C that makes it unsafe. Febrice's compiler was perfectly capable of implementing the C standard to the letter. What makes C unsafe are the requirements found in the niches where C exists, and those requirements don't magically disappear because the name of the language changes.

Rust supports unsafe code, but implementing code in Rust which is rigorously robust in the face of OOM situations, or where you need to implement use-case memory management strategies requires relying almost exclusively on unsafe code. (Try using Rust without boxing, for example, as is necessary if you want to catch OOM.) If you don't need those things, you probably don't need a low- level language, either. I love C, but I also love language like Lua with lexical closures and stackless coroutines. To me, languages like Rust and even C++ exist at a middle ground that is very unappealing to me.

C isn't standing still, either. Strategies like SafeStack (see [http://dslab.epfl.ch/proj/cpi/](http://dslab.epfl.ch/proj/cpi/)) can provide substantially the same safety guarantees as Rust in terms of real-world attack vectors, without having to modify any existing C software, and without giving up performance.

None of this is to say languages like Rust are useless. Just that the harms and inevitable demise of C per se are, IMHO, greatly exaggerated. And if and when a language like Rust grows in usage, I doubt it will supplant C so much as open and populate virgin territory.

<comment><USER10> > C isn't standing still, either. Strategies like SafeStack (see > [http://dslab.epfl.ch/proj/cpi/](http://dslab.epfl.ch/proj/cpi/)) can > provide substantially the same safety guarantees as Rust in terms of real- > world attack vectors, without having to modify any existing C software, and > without giving up performance.

That paper indicates that you do in fact give up performance, and the performance is comparable to existing SFI techniques. SafeStack itself is insufficient to prevent UAF problems with the heap. CPI prevents them, but with significant overhead. And you still don't get full memory safety.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> I am one of the many stalwarts whose bookshelf contains a prominent copy of K&R C. But over the last 10 years or so I find myself referring to it less and less often. It's a huge problem that it stopped at the second edition. The 2nd ed was great in 1999. It is not great in 2016, it is only good.

> "You're right, but you're wrong that their code is bad." I cannot fathom how > a group of people who are supposedly so intelligent and geared toward > rational thought can hold in their head the idea that I can be wrong, and > also right at the same time.

Zed, you're right, period. But I think you probably just hurt people's feelings because they revere Kernighan and Ritchie and this is _one_ prominent item of their legacy.

> But C? C's dead. It's the language for old programmers who want to debate > section A.6.2 paragraph 4 of the undefined behavior of pointers. Good > riddance. I'm going to go learn Go (or Rust, or Swift, or anything else).

Amen. The union of those three are likely to address all use cases that C handled in the past.

BTW the blog post would be clearer if titled: " 'Deconstructing K&R C' is dead". Gotta love mixing up C with natural language operator precedence ambiguity. :)

<comment><USER10> The thing is, I think you can simultaneously have all of these opinions: (a) K&R were/are top-notch computer scientists; (b) K&R was a fantastically written book; (c) C was a great language in 1978; (d) we should be moving away from C in 2016. The fact that we didn't know as much about programming languages in 1978 as we do now in no way diminishes the significance of the work.

I think that C should rapidly be moving toward obsolescence, _and_ I hold K&R in great esteem.

<comment><USER16> Agreed on all accounts.

</comment></comment></comment><comment><USER17> Maybe this made Zed feel better, but communicates almost nothing to any outside reader.

Not a single actual quote from any of his detractors, for the reader to judge for him or her self if their criticisms have any validity.

The categorical declaration of "I cannot help old programmers," without providing the evidence he has for this claim. Lots of name calling, though.

No link to the original content, to determine for ourselves whether or not it was fair to K&R's work.

I suppose Zed just meant this to be personally cathartic, and didn't realize he posted it on a public web site where other people can read it?

<comment><USER18> _Maybe this made Zed feel better, but communicates almost nothing to any outside reader._

Yes. I can't figure out exactly what he's ranting about. He writes "I will make it clear that my version of C is limited and odd on purpose because it makes my code safe." Does this mean he defined a safer subset of C? (There are lots of those. I've taken a crack at that myself [1], but it's politically hopeless. Rust is the way forward.)

Why would anyone want to write K&R C today? It's awful. It didn't even check function parameter types. Struct fields were just offsets; you could use one on a pointer of the wrong type and the compiler wouldn't complain. (Considering that Pascal predated C by some years, and had a sane type system, this was kind of lame. But they were trying to compile in 64K of 16 bit words in one pass. That was an adequate excuse in the 1970s.) The first ANSI C at least had a sane type system.

[1] [http://www.animats.com/papers/languages/safearraysforc43.pdf](http://www.animats.com/papers/languages/safearraysforc43.pdf)

</comment></comment><comment><USER19> I looked at Zed's books but didn't find them either containing much of useful material, or written well enough to be worth reading. Granted, I'm not a novice to subjects he writes about. But still, I find it peculiar that his high opinion of his works seems to be rather detached from reality. The books are written in a simplistic and sometimes demeaning style and it's obvious that many people will not like it. But when someone writes an honest review, he seems to get too upset about it. While he obviously likes to critique other peoples' works (such as K&R), he's very sensitive to critique of his own books. Zed thinks that it's acceptable to insult the reviewer (Tim Hentenaar) in response. Reading his response made me cringe. Insulting reviewers is just not what respectable authors do.

</comment><comment> mark-r I went to the Internet Archive just to see what all the fuss was about. Hate to say it, but I agree with the detractors. He seems to be completely missing the concept of _preconditions_. If the preconditions are met, the code is good; if the preconditions aren't met, undefined behavior occurs. Most people programming C or C++ for more than 10 minutes learn to pay attention to these things. The chapter would have been much better if it would have stuck to the importance of validating preconditions, rather than simply pretending they don't exist.

Good riddance.

</comment><comment><USER20> To be perfectly blunt, C does not need Zed Shaw "saving" it. He can go ahead and ignore it or end his book or rewrite the chapter or spout his vitriol over how stupid C programmers are; nothing he does will make an impact.

<comment><USER21> We have CVE for that.

</comment></comment><comment><USER22> FYI, this rant is from January 2015. Surprised to see it showing on HN today.

If anyone is interested in what he removed, you can find it here: [https://web.archive.org/web/20150101224641/http://c.learncod...](https://web.archive.org/web/20150101224641/http://c.learncodethehardway.org/book/krcritique.html)

<comment><USER23> It wasn't obvious when this dates from, but we'll take your word for it and add 2015 to the title.

<comment><USER22> Thanks. Archive has the 'dead' article first indexed Jan 6th, 2015.

[https://web.archive.org/web/20150106191636/http://c.learncod...](https://web.archive.org/web/20150106191636/http://c.learncodethehardway.org/book/krcritique.html)

</comment></comment></comment><comment><USER24> > I cannot help old programmers.

Unfortunate he uses this categorization. The problem is a mindset that can exist in any generation.

</comment><comment><USER25> Oh Zed. Really?

There is nothing wrong with carefully crafted C code for applications were it is the best suited tool. Sure, there are sharp edges. True you can write crappy, security nightmare code.

You do make some good points. I agree Go is fantastic. Rust is coming along as well. However, C still runs the world. That's not changing anytime soon. Not with the explosion of IoT and GPU type devices. And, hello Linux kernel and all the glorious command line tools on nix.

Try using Go or Rust (love both, x2 for Go) to allocate say a hundred GB of memory for some huge/fast in-memory data processing. Let me know how far you get.

Your rant is as polarizing as those who are blind to C's flaws (yes, there are a few). Stop saying "don't write C", that's just childish. Rather, what about "let's write better, less security flaw prone C."

As an engineer, one ought to choose wisely when choosing tools. This means pros and cons and balanced unemotional decision making. Not a holy war against a given tool.

And I am a professional programmer.

Let's do C where C makes sense.

(Edit: fixed typos)

<comment><USER26> > Try using Go or Rust (love both, x2 for Go) to allocate say a hundred GB of > memory for some huge/fast in-memory data processing. Let me know how far you > get.

There is no fundamental reason why this should be slower or harder in Rust. Rust generally compiles down to more or less the same code C does.

There _are_ reasons why this could be slower in Go, but it really depends on what program you're writing, so it might even just work fine. If you don't hit the GC, for example (and Go gives you ample opportunities to not hit the GC), data processing should be quite fast. But it depends.

I'd love to hear real-world experiences with such systems in Go.

<comment><USER27> We have a few Go processes with high memory usage. For one in particular, while it's been higher in the past (~150GB), we're sitting at 40-80GB per node right now.

The busiest node traffic-wise had average GC time over the past 20min of 3.4ms every 54.5s. 95th percentile on GC time is 6.82ms.

That node is sitting at 36GB in-use right now, and has allocated (and freed) an additional 661GB over the past 20min.

Can't really speak to how fast this is vs other environments, but it's smooth sailing overall. /shrug

<comment><USER26> That sounds much better than the Java stories I've heard, which makes sense since Go is better at avoiding the heap.

No idea how it compares with others; and not sure if it is representative, but to me that sounds pretty decent.

</comment></comment></comment></comment><comment><USER28> Damnit, I was tricked into reading something by professional troll Zed Shaw. The hypocrisy of him complaining about "the dark side of programming" is hilarious consdering he is a very good example of that. His style of debate is to insult and call people names who have offered non-judgemental and constructive criticism and I'm sure nothing I'm saying is news to anyone who has a passing familiarty with him.

</comment><comment><USER29> I've read/maybe even briefly participated in a discussion about Zed's book a couple years ago, and the technical debate went like this:

Z: K&R's strcpy is broken, e.g., you can forget to null-terminate the string. Mine is safer.

Ohters: It's not broken, of course it'll do something unpredictable if you break its preconditions.

Z: strcpy is still broken.

Others: Your function will break too if you pass it the wrong length.

Z: This cannot happen, K&R strcpy is broken, mine is safe.

</comment><comment><USER30> The specific section of his 'Learn C the Hard Way' book that he's referring to was mostly, as I recall, complaining that the C string functions defined in K&R will fail when you don't pass them valid data, and therefore, they're fundamentally broken.

Make of that what you will, but it seems to me that given all of the other ways that C can blow up due to programmer error, it seems reasonable to expect programmers to pass a valid string to a string function.

<comment><USER31> I'm with Zed on this one. Giving the programmer fewer things to have to remember, by design, is a de facto improvement. Forcing a human to repeatedly do a task which could have been designed out is evidence of a bad design.

Mind you, we're talking about the stdlib here. You can swap this stuff out. Some people do: djb is a fairly well-known example.

</comment></comment><comment><USER32> K&R C was my introduction to real programming. I treated it ever since as a book, not a reference. Does that make sense? For me it was a glance into the mind of the creator of the language. Yes, some of the ways of programming were flawed in a way that results in today in many terrible things, not the least in which is death. But I was able to outgrow K&R, to learn better things, with its succinct language reference as my wings. I was fine not learning security oriented programming immediately. And I certainly enjoyed learning it with minimal snark and curse words. Maybe my method was harder, really? Learning things without you telling them to me? Maybe, don't really care. Maybe people don't like your essay because it's essentially shitting on a reference to a language. That is what K&R was in the beginning. It morphed into something else by your demands not the authors. Let my hero rest in peace. Learn to breathe. C is as dead as Latin is.

<comment><USER2> > C is as dead as Latin is

I wish that was true, but you will be surprised how many things you use everyday are written in C. Even the ones you would never imagine.

Node.js for example, a large part is in C. Redis, C. Memcached, C. PHP itself is written in C.

<comment><USER32> I'm sorry this wasn't clear; I was subconsciously waxing poetic. I meant to say that C's presence is constantly fading but its influence is widespread.

<comment><USER14> There's a difference between fading away and the universe expanding.

Once upon a time most Unix software was written in C, shell, and awk. Then Perl came along. Did that diminish C? No. Then Java. Did Java diminish C? No. Then Python. Did Python diminish C? No. (You can throw C++ somewhere in there; not sure where. Though IME C++ use really seemed to explode with Windows developers migrating to Linux.)

In each case the universe of software expanded, but C was never diminished. People who think Rust, Go, or whatever will diminish C are ignorant of history. Of course, maybe the predictions will bare out. But I seriously doubt it, and it will be despite their underlying premises, not because of them. Rather, much more likely is an expanded ecosystem.

As I explained else thread, there's nothing intrinsic to the C standard which makes it unsafe. Compilers are free to add bounds checking at every point in the program; in most cases it would be just as cheap as in C++ or even Rust. It would require much rebuilding and retooling, but not much rewriting existing software. (Relying on undefined behavior is dangerous not only because of optimizations, but because undefined behavior can also preclude automatic bounds checking.)

That C compilers don't do that is a function of 1) baggage and 2) other functional constraints, like strong ABI compatibility. But neither of those are set in stone. People who think C is hopelessly unsafe make the same mistake every C newbie (and some die-hard C-is-just-assembly people) do: conflating the language semantics with implementation and machine details.

People assumed that clang would quickly overcome GCC because it was so new and nimble. But clang still hasn't unequivocally really overtaken GCC, and certainly hasn't obsoleted GCC. Rather, the competition merely spurred GCC to evolve faster. I see much the same happening with C.

In the future, look to systems like OpenBSD, FreeBSD, and Alpine Linux, which are more free to upgrade their toolchain and runtime environments with backwards-incompatible changes, to field enhanced C environments with better bounds checking and mitigations. Approaches like stack canaries and ASLR are only the tip of the iceberg for what's possible.

<comment><USER33>
      > Compilers are free to add bounds checking at every
      > point in the program; in most cases it would be just as
      > cheap as in C++ or even Rust.

It would not be as cheap as in Rust because Rust uses an explicit standard library feature (iterators) to obviate the need for bounds checks in the vast majority of loops to begin with. But in C indexing is pervasive within loops, so you'd need to come up with much cleverer compilers that could manage to prove that bounds checks were unnecessary (compilers can already do this in some cases, for C/C++/Rust, but it's not perfect).

Likewise, one _could_ make integer overflow in C well-defined, but this would also make C slower than Rust because the use of iterators means that Rust doesn't need to check for overflow on each loop iteration. Via language (or rather, library) features, Rust reclaims the performance that it otherwise would have lost to C by dint of being free of undefined behavior. I think you'd have a hard time doing this in C without rewriting every `for` loop in existence.

</comment></comment></comment></comment></comment><comment><USER34> I have mixed feelings about this, but I cannot disagree with it.

a. I haven't written a program in C in over 10 years. I wrote software 5 days a week for those 10 years.

b. I wouldn't want to write a program in C now.

c. The first "high level" programming language I learned was C, from a book (not K&R C), while travelling in Asia, without a computer. It taught me well, but I immediately went on to other languages.

e. I can't shake the idea that there is some value to knowing that low level stuff, even though I don't use it much myself.

Maybe linux kernel hackers will keep it alive. I know game programmers use it a lot as well. But for the majority of us, it's kind of an arcane skill now.

<comment><USER35> I use it all the time in embedded systems. It's very common. Basically there is no good alternatives until you get to much bigger chipsets. However in the embedded world you tend to go with a limited subset of C. Especially no use of dynamic memory.

</comment></comment><comment><USER36> I'm sensing a huge incomprehension in a great amount of posts. The key is to know the purpouse of tools. C is a "close-to-the-metal" type language. You can control a low-level things, execution time, "number of hops" when writing data, etc. If you want a friendly language with "no segfaults, no memory leaks" then go higher level (which in many cases is a better choice, i.e. a GUI desktop application with no performance constraint). If you have a problems wrigint in C then you simply still can't C and using the wrong tool for the task.

"But C? C's dead. It's the language for old programmers who want to debate section A.6.2 paragraph 4 of the undefined behavior of pointers"

Someone has to build the low-level stuff. Dear boys in too-tight pants and a hippie mustache: your high-level things and gluten-free snacks does not grow on trees.

<comment><USER21> > Someone has to build the low-level stuff.

Some of us where already doing it in much better languages, before C had any meaning outside AT&T walls.

</comment></comment><comment><USER37> joke? the author is self-important in precisely the way that K&R weren't.

</comment><comment><USER2> You had my sympathy until I read the "error prone _shitty_ language like C".

Next time before getting pissed off about the response you get, think what could it be that you have said or done that may have triggered it.

</comment><comment><USER38> To me, C is like PHP (ignoring for a moment that PHP was written in C).

You can document its shortcomings, its dangers and all the headache-inducing choices. But while you're doing that, people all over the world are building wonderful and terrible things with it.

So you've moving on to Go or Rust? Great! Good choices! But remember that there are people who may disagree _and be wrong_ and also do something interesting with that wrongness.

<comment><USER39> No language makes it the least bit difficult to write bad code. This is not an argument in favour or against _any_ language.

</comment></comment><comment><USER40> K&R taught fundamentals and a good style. It is timeless classic, because the principles doesn't change within successions of mass hysteria.

Plan9 dialect of C is another example. There is portable mk package, with includes core libs (libbio, libutf, etc. which also served as core libs for earlier versions of Golang) to appreciate what C supposed to be.

I would paraphrase - attention seeking by attacking classics is a poor style.

<comment><USER31> Part of his point is that K&R _isn 't_ good style. It's a clear, consistent, and well-demonstrated style, which made it popular, but that doesn't make it _good_.

</comment></comment><comment><USER41> Do remember that this guy wrote:

"I've more or less kept my mouth shut about some of the dumb and plain evil stuff that goes on in the Rails community. As things would happen though I'd take notes, collect logs, and started writing this little essay. As soon as I was stable and didn't need Ruby on Rails to survive I told myself I'd revamp my blog and expose these fucks."

and:

"After Mongrel I couldn't get a gang of monkeys to rape me, so forget any jobs. Sure people would contact me for their tiny little start-ups, but I'd eventually catch on that they just want to use me to implement their ideas. Their ideas were horrendously lame. I swear if someone says they're starting a social network I'm gonna beat them with the heel of my shoe."

So that is very much his style of writing.

<comment><USER23> I don't think bringing out a list of generically outrageous things someone said in the past rises to the level of discourse we're trying for here.

We detached this subthread from [https://news.ycombinator.com/item?id=11727718](https://news.ycombinator.com/item?id=11727718) and marked it off-topic.

<comment><USER41> The man has a long history of writing angry rants. You don't think that would influence how people might read his current rant? You don't think the readers of Hacker News might like to know about his past history of similar behavior? You don't think it helps interpret the level of anger in his current rant?

<comment><USER23> I do think all those things. But the cost of moving in the direction of personal vendettas or witch hunts is higher than the benefits you listed (if benefits they are).

I don't mean that's what you intended, but that's the direction it points in, which it isn't in the long-term interests of HN to allow.

</comment></comment></comment></comment><comment><USER42> Punctuation seems to be dead. It took me a while to understand the title.

</comment><comment><USER43> Lots of insecure butthurt and resentment in this article, and not much substance.

</comment><comment><USER44> I can't see how you could say C is dead when there isn't really anything that can replace it.

I'll take it as dead when the Linux kernel, or it's futuristic replacement, is written in something other then C.

If you are talking about at the user-space level, then yes I can see that. But you shouldn't assume your single use case, higher level user space apps, is the only use case.

<comment><USER10> In what way, specifically, is Rust unsuitable for building a kernel?

There's no argument that the Linux kernel is currently written in C. But that doesn't prove that nothing exists that _can_ replace C.

<comment><USER45> We can't say if Rust is a suitable replacement unless a a team tries to write a kernel in Rust, and then comes up with a comparative result.

Right now C is only the tried and true solution. The rest are possibilities only.

<comment><USER10> There are two ways to interpret your post. The first is "there's no kernel written in Rust that is as complete as Linux". The second is "Rust is unsuitable for a kernel". The first interpretation is obvious and completely uninteresting; the second is something you haven't supported at all.

</comment></comment></comment></comment><comment><USER46> This childish rant is embarrassing. With millions and millions of lines of C code basically running the internet and of vital importance to countless devices, calling it a s __*y language is beyond ridiculous.

<comment><USER10> Asbestos was also used in millions of buildings and was vitally important as insulation. It was also something that was a bad idea and something that we needed to move away from.

<comment><USER47> I agree with where you're coming from. Another analogy that comes to mind is knob-and-tube wiring ([https://en.wikipedia.org/wiki/Knob-and- tube_wiring](https://en.wikipedia.org/wiki/Knob-and-tube_wiring)).

It's an older home wiring technology that works fine for years if undisturbed, is still present and working OK in homes all over, was invented in the early days of electrified homes, requires considerable skill to install properly, tends to be unsafe if not handled skillfully, is expensive and delicate to modify, has no hidden components, allows interesting wiring layouts because conductors are separated, ...

One could go on with the obvious parallels. (I learned on a PDP-11.)

<comment><USER10> Yeah. The weird thing is that in other industries, people have no trouble admitting that the old stuff is often problematic and needs to be replaced. In the supposedly forward-looking tech industry, though, we stick with our tools from 1978 and stubbornly resist admitting that we have learned anything since then. It's strange.

<comment><USER48> I don't buy that at all. There are huge amounts of path-dependent cruft throughout all human endeavors:

      - A base ten number system
      - Lack of useful structure in the symbols and names for numerals, and lots of weird inconsistencies in number names
      - Inconsistent, confusing, and arbitrary names/notation for basic mathematical operators and functions
      - Use of inferior Gibbs/Heaviside vector algebra instead of Clifford/geometric algebra
      - Very poor notational conventions in many advanced math/physics fields
      - A highly irregular calendar
      - Poorly designed measurement systems
      - English spelling
      - Very distorted dominant world map projections
      - Most nutrition "science", including federal dietary guidelines
      - Bogus forensic "science" used to imprison innocent people
      - The methodology and writing style used in political science
      - Many essentially debunked economic models which continue to be taught
      - A legal system chock full of incidental complexity and inconsistencies
      - Inadequate species taxonomies
      - Poor color models used in art/design
      - Even worse, specification of colors using proprietary, arbitrary Pantone chips
      - Lots of poor/obsolete metrics used for evaluating lighting
      - Audio mastering with heavy-handed dynamic range compression
      - Lectures as primary pedagogy in high school/college
      - Grammar drills as a method for teaching foreign languages
      - Modern zoning requirements in many countries
      - Many unsafe and inefficient street design requirements
      - The rigid design of modern shoes (let's not even start on heels)
      - Terrible user interfaces for most household appliances
      - Mediocre user interfaces for many musical instruments
      - An inefficient and dangerous typewriter / computer keyboard (which persists on tiny phone screens!?)
      - Unhealthy design of office furniture, car/airplane seats, child strollers, etc.
      - .....

Some of this stuff is decades old. Some is thousands of years old.</comment></comment></comment></comment></comment>


DataStax stops distributing Brisk as open source - <AUTHOR> http://www.datastax.com/2011/09/committing-hive-driver-into-apache-cassandra

<comment><USER2> Not so sad I skipped the Brisk talk at strange loop now.</comment>


Microsoft: Defenestration - <AUTHOR> http://www.economist.com/blogs/schumpeter/2012/11/microsoft?fsrc=scn/tw/te/bl/defenestration <comment><AUTHOR> Why Steven Sinofsky is out at Microsoft: <http://news.ycombinator.com/item?id=4780721></comment>


Lawless.tech – All About the Regulation of Innovative Tech - <AUTHOR> https://lawless.tech/ <comment><AUTHOR> lawless.tech is an online magazine devoted to covering the ongoing regulatory attempts to oversee and control the newest technologies. The project is aimed at bridging the conceptual gap between innovators and lawmakers.

The editorial board of lawless.tech upholds the principles of an unbiased approach towards covering their stories, regardless of their format. The editorial board ensures full independence of the materials published on lawless.tech from any third-party influence. We avoid boring red-tape wording and suit speak so that our features and articles would be accessible to anyone.</comment>


Why Did Google Erase Cooper's Beloved Literary Blog? - <AUTHOR> http://www.newyorker.com/culture/culture-desk/why-did-google-erase-dennis-coopers-beloved-literary-blog <comment><USER2> This comment ([https://news.ycombinator.com/item?id=12102056](https://news.ycombinator.com/item?id=12102056)) from the previous discussion is interesting:

> From Reddit: "I've read a few of Cooper's books and the short answer is yes, > pedophilia is a common theme in his writing (as is incest and necrophilia)." > [1]

> I'm calling it now. It was child porn. Google doesn't like to go around > deleting people's stuff. When this has happened in the past it's been child > porn, which Google is obligated by governments everywhere to delete with > extreme prejudice. And of course they're not going to go around publicly > accusing the guy of having child porn, even if he did, so they will remain > silent. Neither will they tell someone who had child porn which exact piece > of child porn tripped their child porn detector, for obvious reasons. This > is not a Google issue; this is a law enforcement issue.

> [1] > [https://www.reddit.com/r/books/comments/4sx9aa/dennis_cooper...](https://www.reddit.com/r/books/comments/4sx9aa/dennis_cooper..).

<comment><USER3> Pedophilia and necrophilia in writing is protected as freedom of speech. If google is now censoring literature (as opposed to pictures/media) -- that's pretty bad..

I thought we'd finally (already) won this fight in the US with Howl/Naked Lunch, but maybe not?

<comment><USER4> Freedom of speech protects you from Government prosecution for expressing your opinions. Google is a private company.

<comment><USER5> My guess is that the reason why freedom of speech only protects you from being made to shut up by govt through prosecution, and not being made to shut up by a private company due to the space it occupies in the world's technology and information zeitgeist, is because when the freedom of speech laws were formulated, the govt threat to your speech is the only major threat that existed. A Google kind of threat to freedom of speech didn't exist.

The question then becomes, is Google stifling freedom of speech? Can their impact on your freedom of speech by deleting your blog or posts be compared to the govt's impact on your freedom of speech through prosecution?

I say yes. Freedom of speech and similar laws seek to give you an immunity against govt, not because govt is evil, but because govt is powerful, and you are not. Google is powerful, and they were alive to just how powerful they were going to be when they came out with that don't be evil admonition.

Whereas Google took it upon themselves to not be evil, the writers of freedom of speech and similar laws tool it upon themselves to tell govt to not be evil. Should our societies protect individuals against entities who have power beyond some kind of threshhold? I'd say yes.

<comment><USER6> If you make the argument that a private company, by shutting down a user's account, is like government restriction on free speech, then how do you determine the balance between the right of free speech and the right of free association?

Remember, freedom of speech is only one part of the First Amendment. Those same writers also included the freedom of association. An organization like Google, Fox News, Amazon, or the Wall Street Journal is not obligated to associate with everyone.

We can change things. We can pass laws which mandate that certain things are public spaces. For example, the rise of the malls means that the migration from public shopping streets to private shopping areas, where mall owners like the Mall of the Americas can shut down protest much more readily than the police could do in a truly public area. We can pass laws which force malls to be public areas. The Supreme Court decided that in Pruneyard v. Robins. But only a handful of states have done so.

We can similarly pass laws which say that any content hosting site must be content neutral. Eg, if you want to use Stack Overflow to post your diatribes against whale hunting, SO cannot shut you down.

That doesn't make sense. Okay, so we only require that of "powerful" sites, which you suggest. Which is defined as .... what? Who gets to decide? Who gets to challenge that? If Yahoo was once powerful but is no longer so, who gets to decide when the transition occurs?

One possibility is to set up a common carrier status, where a company offers its services without discrimination to the general public. This is how the phone system works. But why would a company want to do this?

<comment><USER5> Does using Google products qualify my relationship with them as an association? In the same way that me buying you a cup of coffee is association?

I realize that I'm suggesting calls that are difficult to make, but my wider contention is that the current status quo, legal and valid as it is, is missing something that we are going to have to address at some point.

<comment><USER6> Yes. Though they are different associations. They are subject to federal and state laws which don't affect personal transactions.

For example, they are available to the general public so are not allowed to discriminate on the basis of sex, race, and several other protected classes. California and other states place even more restrictions on their ability to discriminate.

On the other hand, you are free to discriminate as you wish. (Though not without risk of criticism; such is free speech.)

There's another difference in your example. Google provides services to the general public. You use their services. However, I do not provide a drinking- coffee service. I don't even like the taste of coffee. There is no reason I need to accept your offer to give me a cup of coffee any more than I need to accept a flyer from someone in the street. But if I were a company which provided coffee consumption services, then I would have less ability to turn you down than I do as a private person.

 _My_ wider contention is that we have plenty of historical examples of public/private space which help us understand what's going on. For example, can a company town prevent someone from coming to town to distribute religious materials? Decided in Marsh v. Alabama. Are AOL email addresses "public", so AOL cannot block spammers? Decided in Cyber Promotions v. America Online.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Article reminded me how much I use my Gmail account for, and what a colossal inconvenience it would be were it to be deleted. Just off the bat:

\- E-mail

\- Calendar

\- Android account, and all purchased apps, games, etc.

\- Drive storage (Somewhere around 1TB, although I don't even use 1/10th that)

\- Google Keep note-taking app

\- Blogspot blog

\- Domain host

\- Secondary phone number via Google Voice

\- Two-factor authentication device

\- Cloud music storage player via Google Play Music

It's really, really unsettling how entangled that singular account is with my everyday workflow.

I've begun trying to compile a list of how each of these components could be migrated to something self-controlled ala OwnCloud. Perhaps I'll make it into a website when I'm done.

I am not sure what would happen to any of the Android apps I had downloaded, however. Do we as consumers get any more legal redress if the account is attached to things we actually paid for?

<comment><USER8> Some friends of mine have similar concerns, and it surprises me. I have multiple Exchange 360 accounts and multiple Gmail accounts, and OneDrive. I use offline .PST files in Outlook to copy everything older than 3 months into. Everything on my OneDrive is on my local hard drive. To be fair I don't do cloud music - my entire 80Gb collection is on my hard drive and duplicated on my phone. Do you just have so much stuff that something like what I described isn't feasible?

<comment><USER9> Are you serious? Nevermind all the complexity your solution introduces, how is someone supposed to keep track of it?

When we're able to identify problems and come up with solutions that only help people with tons of experience and obviously too much time on their hands, we do others a disservice.

<comment> chao- I have a different, but effectively similar, setup to Spearchucker for managing and backing up my data, identity, etc.

 _> how is someone supposed to keep track of it?_

Very carefully. No sarcasm intended. Same as one's personal finances, for example.

 _> and come up with solutions... we do others a disservice._

I can't speak for Spearchucker, but I devised my particular solution for my own sake, and "doing others a service" didn't factor into that process.

Nor do I feel it necessarily should. If someone without experience asks how I navigate our messy digital world (and they have), I give them my honest answer and describe my system. Sometimes I propose a few less-effective, consumer- friendly alternatives, along with their drawbacks. Yes, my solution involves a lot of cobbled-together, semi-automated and semi-manual systems. That's because these systems change so frequently that it was the best I could do to get my own system working in the first place. It seems you are implying some obligation exists to do someone else the "service" of managing their personal digital hygiene, at some arbitrary ease of use that fits their level of expertise.

It is not because I'm some blackhearted bastard with no regard for my fellow man that I don't feel that obligation. It is because that, even if I have crafted a solution that adds resilience to the failure of services X, Y and Z, which I use, I don't know what I could/would do when the other person begins to rely on service W, where W is a service I do not use and do not understand the intricacies of.

In short, I find it strange that you frame someone having shared what works for them on a service-vs-disservice axis for the broader world. I'm happy that Spearchucker has a system for, and the discipline to, maintain his digital hygiene.

<comment><USER10> > Very carefully. No sarcasm intended. Same as one's personal finances, for > example.

That is a very interesting comparison. I wonder how long it will take before people start taking their digital footprint as seriously as they take personal finance? Before digital maturity is seen as a mark of adulthood the way finance savvy is seen today?

Your analogy is apt because they are both areas that the average person doesn't understand, but is still forced to wade their way through. I look forward to the day when there are digital security self-help books and blogs like the personal finance and investing material we have now.

</comment></comment></comment></comment></comment><comment><USER11> Yep, definitely child pornography and solicitation thereof.

[https://web.archive.org/web/20091003234700/http://denniscoop...](https://web.archive.org/web/20091003234700/http://denniscooper- theweaklings.blogspot.com/2009/09/greet-dcs-topnotch-international-male.html)

EDIT:

DC has also been untruthful in interviews about the blog's removal, claiming

       "I never used pornographic imagery and most didn't even show the escort's genitals. "

From the above link, that is clearly not true.

<comment><USER12> These escort site ad reviews are mentioned in the article as being the exception in terms of erotic content. Regardless of sexual explicitness though, all the men appear to be of legal age. How are you concluding 'child pornography and solicitation thereof'?

<comment><USER11> It is possible that Google or some governmental entity believed that one of the many naked "18 year olds" was not actually 18 when the posted photos were taken. The comments on the linked post suggest that at least one reader of the blog believed that at least one escort was not 18.

That seems like adequate evidence for scrutiny, and it is possible that Google plays it safe in cases like these (I have no idea what their official policy is).

<comment><USER13> Something somewhere went horrible wrong when simply deleting a person's artistic life is how you play it safe.

</comment></comment></comment></comment><comment><USER14> I don't understand why Google won't just explain what the problem was and give him a way to extract his data, even if they won't let him use Blogger anymore. Would the precedent really be so bad? They're getting some not-great PR — I feel like most companies would try to work something out.

<comment><USER15> Perhaps because they then have to accuse him of something, which could make matters worse.

<comment><USER16> This seems most likely maybe it's not worth the hassle for them but legally releasing any illegal material back to him cannot happen so they're stuck doing essentially nothing.

</comment></comment></comment><comment><USER17> > "saw something on the blog they interpreted as out-of-bounds from Google > policy and took it down." The disastrous consequences probably stemmed from > "just a stupid mistake," she said.

So it is a bit like when the cat trips, falls down the stairs in some undignified way, then immediately stands up keeps walking like nothing happens, looking like "Yeah I totally planned to do that, it was not an accident"

Perhaps after so much time has passed and so much stonewalling, it is just too late to admit that they made a mistake apologize and restore content. (Well and compounded by the fact that there is probably no content left to restore). It seems in their best interest to keep quiet and stonewall the issue until it goes away.

But on the other side, given that content there -- which included slightly edited explicit ads, it is probably not surprising Google did what they did. I imagine for every site with content like that, Google employees would go out of their way to see maybe the user is a known artist or writer and this is just art. That's understandable, however what is not understandable is not having a way to restore, warn before, or explain what happened afterwards and have a way to revert the action.

I imagine at this point Google is pretty much a monopoly. If it decided to charge to use GMail, or force me to listen to a 5 minute ad every, I don't know if there is an alternative that has email, docs, calendar, and others at the same level of quality.

<comment><USER18> >(Well and compounded by the fact that there is probably no content left to restore).

Google never deletes anything. Ever. The "deletion" is just another data point for them. The content is certainly retained.

<comment><USER19> Can you please cite this or is this just BS speculation.

<comment><USER20> It's BS speculation from the tin-hat wing, frequently cut-and-pasted on this site. At Google there is a finite time between when you delete something and when it has to become unreachable through all frontends and APIs, and when it later has to cease to exist, and then finally when the last backup of the data must have been wiped. Source: I personally had to implement the monitoring and alerting that ensures this is the case for a major, privacy-sensitive Google product.

However you should note that if you used a managed Google account, such as educational or corporate account, your ability to truly delete anything may be curtailed by your domain's administration.

<comment><USER21> It's not a totally insane belief to have. Facebook infamously held onto a "deleted" picture belonging to an Ars Technica writer for well over three years. [1]

Hanlon's Razor would just dismiss that as "CDN's are hard", but it doesn't explain why the one picture owned by the author that they emailed Facebook about finally went away, but others they had the URLs for did not.

Whether it be malice or stupidity, I think the sane default belief is that "delete" doesn't actually remove the bits in most cases, and that goes double for PII brokers like Facebook and Google. Act accordingly.

[1]: [http://arstechnica.com/business/2012/02/nearly-3-years- later...](http://arstechnica.com/business/2012/02/nearly-3-years-later- deleted-facebook-photos-are-still-online/)

</comment></comment></comment></comment></comment><comment><USER18> Interview with Dennis Cooper about the whole affair: [https://frieze.com/article/unfriendly- hosts](https://frieze.com/article/unfriendly-hosts)

<comment><USER22> Just a little warning: there are some NSFW images in this link.

</comment></comment><comment><USER23> We see these stories over and over.

The lesson is obvious: host your most important content on your own server that you control; and make backups.

Some people will say that self-hosting isn't a practical solution. But when the alternative is the potential for devastating data loss, it seems eminently reasonable.

<comment><USER24> More practically, _or_ instead of _and_ will suffice. That is, if you lack the expertise to set up your own server, it's okay to use someone else's provided you also keep local backups of all your work. For most people, keeping local backups is far more practical than running your own server.

<comment><USER13> There's one problem with that. If your hosting provider throws you out, you may not lose your work, but your followership will still be dispersed.

<comment><USER25> Emotionaly I think I'd care more for my creations :/

</comment></comment></comment></comment><comment><USER26> Previous discussion: [https://news.ycombinator.com/item?id=12099757](https://news.ycombinator.com/item?id=12099757) (of the fusion.net version of the same story)

</comment><comment><USER27> Slightly off topic: I think someday may be, once our Internet connection are fast enough, we will go a full circle and have our own server and the Cloud will be a dump storage or backup.

Think iCloud for example. My Router; Airport Server / Time Capsule Server. Will have all my iOS / macOS backup, as well as Photos, video, game saves etc. All iOS update and macOS update, App update are done through this proxy / cache. I will have all my documents inside this little server. And a Backup of these files will be done in the Cloud. So in the worst possible scenario, You can cut off my Cloud backup and wipe it. I will still have all the info inside my Router / Server.

You can provide me a Blog platform on my little server, and insert ads on it all you want when it reaches your cache/proxy/CDN. But when you take down my blog, all the content i spend my time writing is still on my server. In my procession.

Sometimes with Cloud, i just get the feeling my precious data are being held as hostage.

<comment><USER28> > Internet connection are fast enough

And if our storage options are more reliable we might not need the could at all!

</comment></comment><comment><USER29> The only thing that stands out for me here, and I think directly applies to Google's business overall, is the lack of a human factor. Google wants to move into the enterprise, enterprises generally like talking to people -- especially when dealing with support -- that isn't a strong suit.

I will take some time and read the other links someone posted below, but the story and the lack of human response parallels many other postings around Google support.

</comment><comment><USER30> As an EU resident he can simply fire off a subject access request (referencing the local Data Protection Acts) to Google and they have to tell him everything they have on file about him.

</comment><comment><USER31> Why don't they just send him a backup of his data and be done with it?

</comment><comment><USER32> Will Hacker News ban you if you post the kind of material that Mr Cooper hosted on his "beloved literary blog"?

</comment><comment><USER33> Brings up the question of what are some good tools to manage this kind of risk.

You need your contacts, email archive, another credible email address to re- establish contact, alternate credentials for SSO sites, and it needs to be somewhere outside the political sphere that could cause this.

What does a resilient online identity look like? These companies own the primary media of your relationships, which are the things people need to survive.

<comment><USER34> The solution probably lies in a decentralized/distributed platform such as Ethereum or Maidsafe.

<comment><USER33> a blockchain social network?

Someone has to have done this already and then abandoned it because it failed to thrive.

<comment> vertex-four Not really. All the low-level pieces simply don't exist as usable code yet - yes, you can pay money in a convoluted way (compared to buying almost anything else) to have a piece of data added to a globally distributed ordered list, but it doesn't make a lot of sense to build every piece of interaction on the network on top of that system. "Pay 5 cents to send a tweet!"

You also need a decentralized publish/subscribe system and a useful decentralized search system, both resistant to attacks. The former has some good solutions buried in people's PhDs, the latter not so much. Then you need a _lot_ of UX research and people working on the low-level protocol, high- level domain logic, and the UI.

It'd be a project on the scale of one of the largest open-source projects currently in existence, IMHO.

</comment></comment></comment></comment><comment><USER32> Imagine the headlines if Google did not remove the blog :

"Google hosting child porn site."

</comment><comment><USER35> Change.org petition to restore his blog and email: [https://www.change.org/p/google-restore-dennis-cooper-s- blog...](https://www.change.org/p/google-restore-dennis-cooper-s-blog-and- email)

</comment><comment><USER36> Another example in the long, sad history of algorithm-driven companies having no respect for art or creativity or culture. It's not really something out of spite or distaste, but eventually you end up leaving a trail of bodies in your wake because you can only solve so many problems by having people watch over the algorithms, and your revenue takes priority over protecting culture.

Google ends up catching a lot of heat for this (rightfully so) if only because so many people use their services. High-traffic youtube videos filled with racial slurs and abuse staying up for 2 months before the abuse department finally takes action, or important pieces of cultural history getting nuked without explanation or recourse, or people's gmail accounts getting utterly destroyed with no ability to transfer the address or take a backup. In the end nothing can be done about this stuff because in many cases, nobody actually knows what happened.

The youtube case was especially troublesome because I went to great lengths to get it dealt with, and in the end it was a result of policy issues combined with bad technology - the human oversight was prevented from doing anything about the problem, and as a result vulnerable kids were exposed to torrents of hate and the uploaders reaped the ad revenue all while stealing another person's work.

<comment><USER19> Did you even read the previous comments from the earlier submission of this article? People likely complained about the nature of his content in addition to it being against their TOS.

<comment><USER36> I did not, no. Can you link to the dupe?

<comment><USER37> This comment has a great summary of the multiple discussions going on about it: [https://news.ycombinator.com/item?id=12100891](https://news.ycombinator.com/item?id=12100891)</comment></comment></comment></comment>


Geometri, by Mustafa Kemal Atatürk - <AUTHOR> https://books.google.com.tr/books/about/Geometri.html?id=wEpIcgAACAAJ&redir_esc=y <comment><AUTHOR> Here in Türkiye there's a lot of frightening nationalism, most of it centered around the first president, Atatürk. Some of it is valid and inspiring, a lot of it is very effective PR.

I could care less about the nationalism, but Atatürk gets some props for reforming the education system through replacing the Arabic script with a phonetic Roman alphabet to reduce illiteracy, and personally translating scientific/mathematic terms/concepts into the new language, and even translating a German geometry textbook.

Imagine if we followed-suit and hired education-oriented mathematicians for our leaders, instead of lawyers and businessmen.</comment>


Ask HN: What are the best light-weight CSS frameworks? - <AUTHOR>

<comment><USER2> If you're looking for light-weight Sass frameworks, you might like Thoughtbot's mixins and libraries.

\- Bourbon (bourbon.io, like Compass but lighter)

\- Neat (neat.bourbon.io, grid framework via mixins)

\- Bitters (bitters.bourbon.io, scaffold styles and file structure)

\- Refills (refills.bourbon.io, example components built with all of the above)

I've used these in multiple projects and I wouldn't switch back to Bootstrap or Foundation, which end up adding tons of unused styles to projects, and IMO, get in the way. The advantage to Bourbon, etc... is that you have much more control over the structure of your Sass and what specifically you need. If you're looking for out of the box UI, Refills gives you something to work with, but honestly, I think it's tailored towards developers that are building custom interfaces.

</comment><comment><USER3> Bootstrap and Zurb foundation are probably the most popular these days.

If you're looking for something super light weight and responsive you might also want to check out getSkeleton.com

PureCss.io is also nice if you're looking for modular options.

<comment><USER4> He said "Lightweight"

<comment><USER3> ah...

[cowers in shame]

...my bad.

</comment></comment></comment><comment><USER5> I like simple grid. Just a simple grid system as the name suggests. Less than 1kb minified.

[http://thisisdallas.github.com/Simple- Grid/](http://thisisdallas.github.com/Simple-Grid/)

</comment><comment><USER6> UIKit ([http://getuikit.com/](http://getuikit.com/)) is my personal favourite. Pure ([http://purecss.io/](http://purecss.io/)) is nice too.

</comment><comment><USER7> Yahoo Pure.

Most of the time I don't need those fancy features of Twitter Bootstrap and Pure has been my go to default.</comment>


HeartForth: An Emoji-Based Stack Language - <AUTHOR> http://neilk.net/blog/2015/02/14/heartforth/

<comment><USER3> It might be fun to do something like this with Chinese characters - <USER2> compact, but less visually noisy, more obvious to a Chinese or Japanese speaker, and more expressive due to having many more characters to serve as variable names.

0替始写1减写1同迄替倍採0同迄替落

</comment><comment><USER4> > Disadvantages: None.

Well, I'm convinced.

</comment><comment><USER5> Neat. Any reason not to use 0⃣1⃣2⃣3⃣4⃣5⃣6⃣7⃣8⃣9⃣?

<comment><USER6> wtf are those

>ef b8 8f e2 83 a3 bs

<comment><USER7> Emoji. [http://imgur.com/KG23JnK](http://imgur.com/KG23JnK)

</comment></comment></comment><comment><USER8> In order to avoid aving to put ugly digits in the middle of the code, I suggest removing their support and using instead a single instruction to put 1 on the stack. By using numerical operators, it becomes easy to have any number (1 1 + 1 - would be one, 1 1 + would be two, 1 1 + 1 + would be three).

Also, the multiplication operator appears blank here.

<comment><USER7> I'm confused as to why they use 'real' digits rather than the emoji keycaps like 1⃣2⃣9⃣. Bonus points for representing 🔟 in a single character.

</comment></comment><comment><USER9> There's also EmojiLisp: [http://emojilisp.com/](http://emojilisp.com/)

</comment><comment><USER10> I wonder if there's a programming language that makes a program look like a poem or a regular article?

<comment><USER11> Shakespeare might interest you:

[http://en.wikipedia.org/wiki/Shakespeare_%28programming_lang...](http://en.wikipedia.org/wiki/Shakespeare_%28programming_language%29)

Sample:

[Enter Juliet]

Hamlet:

Thou art as sweet as the sum of the sum of Romeo and his horse and his black cat! Speak thy mind!

[Exit Juliet]

<comment><USER10> lol. This is awesome. Thank you!</comment></comment></comment>


The Neo4j BI Connector: live graph datasets for analysis with popular BI tools - <AUTHOR> https://neo4j.com/bi-connector/?ref=pr- <comment><AUTHOR> The Neo4j BI Connector presents live graph datasets for analysis within popular BI technologies such as Tableau, Looker, TIBCO Spotfire, Oracle Analytics Cloud, MicroStrategy and more.</comment>


Can We Reverse The Stanford Prison Experiment? - <AUTHOR> http://blogs.hbr.org/cs/2012/06/can_we_reverse_the_stanford_pr.html <comment><USER2> The Stanford Prison Experiment still gets a lot of ink, but unfortunately the criticisms of it do not. I recommend this article: <http://www.swans.com/library/art17/barker82.html>

"""over the past forty-plus years, the Stanford Prison Experiment has had a strong, and arguably detrimental impact upon both scholarly and popular conceptions of social psychology. Contrary to Zimbardo's misleading conclusions, ordinary people do not mindlessly and helplessly succumb to brutality; instead the evidence (even from his own experiment) seems to suggest that individuals tend to engage in brutality only when they truly believe that such actions are warranted -- acting upon ideas that are condoned by equally brutal group ideologies. The guards in Zimbardo's experiment were thus coerced by Zimbardo and his researchers to brutalize the prisoners; while the prisoners did not simply submit to the guards' brutality, but instead, actively resisted their oppression, both collectively and individually. This resistance was considered intolerable to Zimbardo, and as this article has shown, he utilized his system power to intervene to increase guard brutality and undermine the prisoners' collective will to resist their abusers."""

<comment><USER3> I've spent over 400 days in a closed environment with "special" group dynamics - the armed forces of Switzerland. Service is mandatory. I was made a NCO against my will.

I've made some valuable unscientific, personal observations during this time. One is, that most people (I'd say 80%) do not speak up for themselves or others when it matters in groups with strict hierarchies.

Not only that, I think that most people don't have any basic moral convictions. Group punishment is highly effective.

I've learnt that sadistic, manipulative and narcissistic people thrive in such environments and if left uncontrolled, alike to a malign tumor that spreads rapidly to other parts of the body, they can impact the entire organization quickly.

<comment><USER4> > I've learnt that sadistic, manipulative and narcissistic people thrive in > such environments and if left uncontrolled, alike to a malign tumor that > spreads rapidly to other parts of the body, they can impact the entire > organization quickly.

Aye. The phrase "One bad apple (spoils the bunch)" is often misunderstood but applies dreadfully well to human organizations.

</comment></comment></comment><comment><USER5> It's hard to encapsulate the entirety of a TV show season in a comment, so I'm going to use a quotation instead. This is from _The Wire_ , Season 4, Major Bunny Colvin:

"This drug thing, this ain't police work. No, it ain't. I mean, I can send any fool with a badge and a gun up on them corners and jack a crew and grab vials. But policing? I mean, you call something a war and pretty soon everybody gonna be running around acting like warriors. They gonna be running around on a damn crusade, storming corners, slapping on cuffs, racking up body counts. And when you at war, you need a fucking enemy. And pretty soon, damn near everybody on every corner is your fucking enemy. And soon the neighborhood that you're supposed to be policing, that's just occupied territory."

 _The Wire_ has been acclaimed specifically for its close representation (still obviously dramatized) with the reality of Baltimore. If you haven't watched all five seasons, you should do so.

<comment><USER6> I was always fascinated with the idea that "the game" has a certain way of being played -- I think Bodie says something of the sort when they're trying to set up Hamsterdam --

I walk by a pretty busy drug corner on my way to work and it always fascinates me how organized it all is. One of the most interesting things I ever saw was two homeless guys fighting over some money when several of the drug dealers came over and broke it up. Self-policing to keep the police away.

</comment></comment><comment><USER7> I tried to get one company I worked with to give people a small token of appreciation when they did something of significant value to the company. I recall more valuable time spent on the process of deciding who got them than the tokens were worth.

People can forget that people who care about what they are doing innovate a lot more than people who just follow processes. If management cares most about following processes, so will everybody else.

</comment><comment><USER8> _Zimbardo, who by an almost unimaginable coincidence went to high school with Stanley Milgram_

Wow. Like Neil Diamond and Barbara Streisand.

<comment><USER9> Not totally on topic, but how is that an "almost unimaginable coincidence"? Given the number of people who are involved in similar things, and the number of people at your average high school, it pretty much goes without saying that some people who go to high school together will later do similar things.

Journalists have weird ideas about probability.

<comment><USER10> Also clustering around time, opportunity are common. "Outliers" talks about this.

</comment></comment></comment><comment><USER11> It contradicts the story of that old and wise guy who decided to give money to the children who were harassing him. Each time they spotted him and cursed him they would earn one dollar. In the end they stopped because it became "work".

My experience in the education system is that bad behaviour is punished in very public way and good behaviour is never publicised and rarely get any recognition except when to cast a light on bad behaviour.

Edit: the article makes a poor job of explaining that _losada line_ and so does wikipedia.

<comment><USER12> * > It contradicts the story of that old and wise guy who decided to give money to the children who were harassing him.*

Source? I never heard of that.

<comment><USER13> The version I heard went something like this:

A man was tired of the local youths <doing negative behavior>, so he offered them a small amount of money ($2-3) when they'd <do negative behavior>.

The next week he came to them and told them "sorry, business was slow, all I can give you this week is $1/time." They weren't happy, but agreed.

The next week he went back and said "sorry, even slower, I can only afford $0.25/time now." The youths said "we're not doing this for $0.25!" and stopped <negative behavior> altogether.

</comment></comment></comment><comment><USER14> What would it take to see this class of approach applied to policing elsewhere?

<comment><USER15> A complete re-evaluation of police hiring practices would be a good start.

</comment></comment><comment><USER16> _Their approach was to try to catch youth doing the right things and give them a Positive Ticket. The ticket granted the recipient free entry to the movies or to a local youth center. ... According to Clapham, youth recidivism was reduced from 60% to 8%. Overall crime was reduced by 40%. Youth crime was cut in half._

Really? I mean, _really_? I'm gonna have to see some extraordinary evidence for this extraordinary claim before I believe that having police go round giving out free movie tickets for _not_ -littering is sufficient to reduce recidivism by an astonishing factor of seven. And I've never heard of it before.

<comment><USER17> I was quite skeptical, but I just realized- you know what they are _not_ doing when they are at the movies with friends? Committing crimes.

<comment><USER16> They're probably talking during the movie though. Frankly I think I'd rather have 'em out stealing cars.

<comment><USER18> They're going to burn in a very special level of hell. <http://youtu.be/wNs21BiFA4Y?t=34s></comment></comment></comment></comment>


Poetry v1.0 - <AUTHOR> https://github.com/python-poetry/poetry/releases/tag/1.0.0 <comment><USER2> Earlier post here - [https://news.ycombinator.com/item?id=21779191](https://news.ycombinator.com/item?id=21779191)

<comment><USER3> Comments moved thither.</comment></comment>


Anonymous hacks Vatican website - <AUTHOR> http://www.zdnet.com/blog/security/anonymous-hacks-vatican-website/10567 <comment><USER2> Using the term "hacktivist" for Anonymous is a little much. They are nothing more than a digital terrorist group. Power corrupts and we can see it has been corrupting Anonymous for awhile now. Anyone that pisses them off in the slightest they take offline using D.o.S attacks (which btw takes very little skill). Any script kiddy can find the tools to do this and it's pretty easy to hide it in a file and get unsuspecting users to install it.

It reminds me of when I was 13 or 14 and I used to use the old win nuke/smurf attacks on people that pissed me off. The only difference is that these guys are adults and they still think that this is going to solve anything.</comment>


The Author as Agent of Change - <AUTHOR> http://online.wsj.com/article/SB10001424052748703730804576319101005595020.html?mod=WSJ_Opinion_LEFTTopOpinion

<comment><USER2> The trouble, of course, with Cory Doctorow's experiments in alternative publishing methods is that his fanbase is largely a bunch of copyright geeks who _want_ this kind of thing to work, so the fact that it works for him (and I have no doubt that it will) doesn't really tell you anything about the broader world, and whether Jane Q. Romancenovellist can get by with a similar system.

<comment><USER3> It's not that hard to find more conventional success stories, typically selling exclusively through Amazon.com (not completely independent, but good enough for most purposes).

I have no doubt that this model can fail, but it doesn't take Doctorow to pull it off.

<comment><USER4> Free Culture comes to mind, along with the author.

[https://secure.wikimedia.org/wikipedia/en/wiki/Free_Culture_...](https://secure.wikimedia.org/wikipedia/en/wiki/Free_Culture_%28book%29)

<comment><USER5> But that's _exactly_ the same issue: not only are people who read Lessig predisposed to these kinds of publishing ventures, that very book is _about_ issues related with that. Doctorow or Lessig succeeding at this is somewhat of a self-fulfilling prophecy.

<comment><USER4> sure.

When Lessig "accuses" societies of x-financing themselves with high journal prices, he actually does the same, using his secured tenure. I'm almost certain, that he couldn't care less about the Free Culture's contributions to his pension plan's bottom line. Or of other's, for that matter -- I guess.

Then again, cross-financing i.e. investigative journalism didn't serve power well, and in the end of the day, it was obvious to almost completely replace it with PR for the publishers. Cory also knows this: there is far less overhead to write fiction than to track down and uncover i.e. the broadcast flag. He can achieve the former, but could not kindle and leverage social pressure to prevent HDMI from happening. Kudos to him, that he tried.

OTOH, nothing really stops publishers to degenerate into parasites, either. They can be useful, and some are, but on the whole, the economics can be completely changed -- not unlike when movable type came in. Moreover, one can cite examples, when publishers/media are downright harmful, only to maximise private profit. Lessig and Doctorow raise this issue: publishers seem to be doing their part of fulfilling the prophecy too.

</comment></comment></comment></comment></comment><comment><USER6> The reason self-publishing works for Doctorow is not because his audience wants it to. It works because he works extremely hard, is prolific, and smartly leverages technology as well as his massive audience at BoingBoing. He is not an overnight sensation. There's no trick here.

Yes, he's taken some risks with technology, but he's also worked hard promoting himself to mitigate that risk.

I am not a fan of his writing, but I admire his dogged determination to get up every day and be a writer, in an age when anyone else you asked would tell you to give up and get a job with a future.

</comment><comment><USER7> Since I'm planning to read this short story collection, I was a little irritated to read about the _ending_ of one of the stories in this article. Be warned, there's mild spoilers here.</comment>


Modelling game economy with Neo4j - <AUTHOR> http://theburningmonk.com/2015/04/modelling-game-economy-with-neo4j/

<comment><USER2> There will be a Neo4j hackathon for beginners in Berlin, Germany later today: [http://www.meetup.com/graphdb- berlin/events/222114664/](http://www.meetup.com/graphdb- berlin/events/222114664/)

</comment><comment><USER3> This looks like something that could be done with Prolog, - can anyone enlighten me as to the difference between Neo4j and Prolog?

<comment><USER4> Neo4j is a graph database suited for link analysis and for data that is naturally expressed as a graph, e.g. social or dependency networks. Cipher is one of the languages that can be used to query Neo4j and generally design queries for graph data; perhaps it is Cipher's syntax and it's declarative style that looks similar to Prolog to you.

</comment></comment><comment><USER5> Considering OrientDB does everything and more, is Neo4j withering away?

<comment><USER6> I was rather interested in OrientDB but the lack of any quality ruby drivers was a roadblock.

I have just checked again - There are currently 3, which is much better than I remember.

* One uses the Java driver via JRuby only.

* One hasn't been updated since 2012

* One is HTTP which isn't the end of the world but it is not an official driver which doesn't inspire a lot of confidence.</comment></comment>


Show HN: List of domain names moved away from GoDaddy in response to SOPA - <AUTHOR> http://stopsopa.mattbearman.co.uk/

<comment><USER2> im a small guy, not very good at web stuffs, but i refuse to support anyone that supports SOPA. i appreciate the guide for switching from GoDaddy, luckily i can get domains through my host and they are not on that list :) i added my domain to this list, and i plan on doing the switch tomorrow. a small price to pay for me...</comment>


Securityheaders.io – Analyse your HTTP response headers - <AUTHOR> https://securityheaders.io/ <comment><USER2> Thanks. I didn't know about X-Content-Type-Options! It is getting harder and harder to know all these headers nowadays. I am big fan of these checking tools with scores, it makes web developing entertaining. (A+! [https://securityheaders.io/?q=https%3A%2F%2Fsatoshicrypt.com...](https://securityheaders.io/?q=https%3A%2F%2Fsatoshicrypt.com%2F) )

<comment><USER3> I agree, I love these sorts of things because they make it easy to learn what you don't know. On the other hand, assigning an order based on an analysis like this can be interpreted wrongly, which I find annoying.

<comment><USER4> I agree, hopefully the majority will see benefit in it. It's intended as more of a way to educate rather than a definitive security assessment.

</comment></comment></comment><comment><USER5> What I fear about HPKP is how easy it is to kill domain. You have to lose your keys once and it's lost domain for your users, because it's really hard for users to circumvent that protection. It's better to have a really good understanding of what's going on and have good key backups before you configure it.

<comment><USER4> You can also pin the public keys of certificate authorities to limit which ones can issue for your domain and not have to worry about key backups. GitHub do this as you can see here: [https://report- uri.io/home/pkp_analyse/https%3A%2F%2Fgithub....](https://report- uri.io/home/pkp_analyse/https%3A%2F%2Fgithub.com)

I also have a blog on the various places you can pin like the leaf, intermediate and root: [https://scotthel.me/k2h](https://scotthel.me/k2h)

</comment></comment><comment><USER6> I don't think `X-XSS-Protection` is a worthwhile header to have. Every browser with XSS protection has it on by default. OWASP says this only exists to turn it on when a user may have turned it off (I have no idea why they would).

`Content-Security-Policy` is an awesome header, but in truth, it's very easy to misconfigure and even when correctly configured is usually fairly easy to bypass on any non-trivially complex website (for example, JSONP is an effective bypass for CSP). It's still worth looking into.

<comment><USER7> JSONP only allows CSP bypass if you return anything other than JSON objects from an API. As long as you don't do that, CSP is fine.

<comment><USER6> Since JSONP allows you to have a callback, you can load this in script tags on the same domain and make calls to that / those functions.

</comment></comment></comment><comment><USER8> First of all, thanks for sharing, I didn't know about many of these headers!

From recent scans I see that www.google.com got an E with missing headers:

        Strict-Transport-Security
        Content-Security-Policy
        Public-Key-Pins
        X-Content-Type-Options

Is this negligence on Google's part or ...?

<comment><USER9> [https://securityheaders.io/?q=https%3A%2F%2Faccounts.google....](https://securityheaders.io/?q=https%3A%2F%2Faccounts.google.com%2FServiceLogin%3Fservice%3Dmail%26passive%3Dtrue%26rm%3Dfalse%26continue%3Dhttps%3A%2F%2Fmail.google.com%2Fmail%2F%26ss%3D1%26scc%3D1%26ltmpl%3Ddefault%26ltmplcache%3D2%26emr%3D1%26osid%3D1)

Looks like they just need a Content-Security-Policy and Public-Key-Pins.

</comment></comment><comment><USER10> Looking at Github's A+, can someone explain what's the point of pinning public keys for _300 seconds_ max?

[https://securityheaders.io/?q=https%3A%2F%2Fgithub.com%2F](https://securityheaders.io/?q=https%3A%2F%2Fgithub.com%2F)

<comment><USER4> A lot of advice online, including my own, recommends that once you start enforcing a policy you keep the max-age quite short for a period of time. The report-only mode is helpful in identifying issues but given the nature of what HPKP is and does, jumping straight to a high max-age value when you start enforcing the policy isn't wise.

<comment><USER10> They don't use reporting.

<comment><USER11> When we first deployed our policy there was no support for reporting in browsers. I think that Firefox still lacks support and chrome only added support recently (I'd have to double check, or I'm sure Scott knows).

<comment><USER4> Exactly right. The only browser that will send HPKP reports right now is Chrome and that was very recent.

</comment></comment></comment></comment></comment><comment><USER12> Are there any good standalone, linux commandline tools of this kind (for ssl and mail config too)?

</comment><comment><USER13> What other/similar analyzers are out there?

<comment><USER14> HTTPSecurityReport - [https://httpsecurityreport.com](https://httpsecurityreport.com) \- Disclaimer: I'm the creator.

Site Scan from MS - [https://dev.windows.com/en-us/microsoft- edge/tools/staticsca...](https://dev.windows.com/en-us/microsoft- edge/tools/staticscan/)

Subresource Integrity scanner - [https://sritest.io/](https://sritest.io/)

<comment><USER15> Thanks for these! I like that yours covered a lot more than the one OP posted.

<comment><USER14> Thanks, glad to hear it!

</comment></comment></comment></comment><comment><USER9> Kind of ironic (Firefox): [http://i.imgur.com/p6RDBb4.png](http://i.imgur.com/p6RDBb4.png)

This is also keeping the CSS from loading. (Chrome, however, displays beautifully.)

<comment><USER16> Strange, I get the same thing too despite the domain being among those whitelisted. I don't know how 'self' cannot equal securityheaders.io for a request to that domain.

I remember a while back when I was first using this I had a really difficult time getting it to work for a site I was doing. In the end, I had to remove all references to 'self' as a source and use the domain instead (even though these should be one and the same).

<comment><USER9> It's probably a Firefox bug.

</comment></comment></comment><comment><USER3> HPKP will accept if _any_ of the fingerprints match -- I was wondering how I could transition certificates when using it, and hadn't noticed that fact. So to transition to a new certificate, specify the fingerprint of the old AND new certificates, for at least as long as the max-age. You can also specify the fingerprint of any certificate in the trust chain. I plan on pinning the let's encrypt certificate, instead of the specific certificates let's encrypt issues, and trusting let's encrypt to implement the domain validation correctly.

<comment><USER4> HPKP is HTTP Public Key Pinning, you aren't pinning certificates, you're pinning the public key. This means that you don't necessarily need to change any pins when you renew certificates as the certificate can use the same key pair. The only time you need to consume a backup pin when renewing the certificate is if you have a new public key signed. I think it's important to understand the difference before you try to deploy HPKP.

As for pinning the CA instead of your own public key, you can see my other comments in this thread with links about how GitHub pin their CA and a backup CA. I also have a link with information on the various levels in a chain you can pin at like the leaf, intermediate and root. Each has its own benefits and drawbacks.

<comment><USER3> I see, I hadn't made that obvious connection -- it's right in the name! (been awake for ~28 hours) That's much nicer. This is the first I've seen that header, it's good to know it exists -- I've implemented it in other ad-hoc protocols.

</comment></comment></comment><comment><USER17> This site is awesome! That's why I've included on my OWASP Project. I'm just starting this project but it's going to have a lot information about security headers.

[https://www.owasp.org/index.php/OWASP_Secure_Headers_Project](https://www.owasp.org/index.php/OWASP_Secure_Headers_Project)

</comment><comment><USER18> Hacker News gets a solid D.

[https://securityheaders.io/?q=https%3A%2F%2Fnews.ycombinator...](https://securityheaders.io/?q=https%3A%2F%2Fnews.ycombinator.com%2F)

</comment><comment><USER19> It seems it doesn't support server:port - the report I got is for port 80.</comment>


New Touchscreen Creates Physical Buttons That Appear and Disappear - <AUTHOR> http://www.tgdaily.com/mobility-features/63829-mobile-tactile-tech-gets-physical

<comment><USER2> This is a bit old (June 2012). Here is a more recent CES '14 video: [https://www.youtube.com/watch?v=9iFvq6826mg](https://www.youtube.com/watch?v=9iFvq6826mg)</comment>