Source Sans Pro: Adobe's first open source font family - <AUTHOR> http://blogs.adobe.com/typblography/2012/08/source-sans-pro.html <comment><USER2> The license for those interested:

SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007

The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.

[http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&...](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)

<comment><USER3> This comes close to dancing around the Open Source Definition (<http://opensource.org/osd.html/>) I think. The restriction on "not sold by themselves" would seem to be a violation of the "No Restriction on Fields of Endeavor" requirement. But it's close.

It seems like a silly restriction anyway. What advantage would someone gain over Adobe by selling freely available fonts "by themselves" with no added value?

<comment><USER4> I think its designed to keep someone from taking the work, and selling it as their own. If you look at fonts, there are hundreds of thousands of unique fonts being sold individually.

<comment><USER3> Well, sure. But _these_ fonts are already open source. So who would buy it when they can get it for free from Adobe? This is like the resellers of free software on ebay. Sure, you can sell to a few dummies. And it's a little annoying. But it's not something that's going to hurt Adobe or its image meaningfully. Why bother polluting your license with this restriction?

<comment><USER5> If it's only going to affect people selling free stuff to ignorant people, why complain about the restriction? Wouldn't reducing people essentially scamming be a worthy reason for having that clause?

<comment><USER3> One good reason to complain about the restriction would be that it's a potential violation of the open source definition and a GPL-incompatible "additional restriction" on redistribution. And because it's just dumb.

<comment><USER6> FWIW, OFL is an FSF-approved license <http://www.gnu.org/licenses/license- list.html#SILOFL>. Also it was not written by Adobe, Adobe here just picked the most widely used free software font license.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Because it's unclear with all the preamble, this is a release of 6 weights of the 'SourceSansPro' font in upright and italic styles. A monospace variant is a 'work in progress' that's not yet in the download package.

</comment><comment><USER8> A new type family, without a prominently-featured specimen? A strange omission.

The TypeKit page is a decent substitute, anyway: <https://typekit.com/fonts/source-sans-pro>

Not a bad News Gothic descendent at all. It takes News Gothic's structural personality and adds a bit of Frutiger's humanism.

<comment><USER9> The PDF specimen is on the Adobe site (793K):

<http://store1.adobe.com/type/browser/pdfs/1959.pdf>

</comment></comment><comment><USER10> Can I ask why this is such a big deal. I mean besides the point that adobe is opening something up for "open source". Is there a lack of fonts?

<comment><USER11> A lack of fonts? No. A lack of high-quality, relatively-complete, free fonts? Absolutely.

Free fonts usually come in one width, two weights (regular and bold) and two styles (roman and italic), for a total of four variations, and usually cover the Latin alphabet plus a few relatively-common variants (accented characters for western European languages, and maybe a couple of additional characters like the the German eszett or the Icelandic eth).

Professional fonts will often come with perhaps five weights (light through black), three widths (condensed, normal, wide), and two styles, for a total of thirty variants. Some will also come in different optical sizes, or have other variable properties. Additionally, they'll have much larger character coverage (perhaps including Cyrillic or Greek), and have multiple stylistic variations of individual characters (stylistic alternates, swashes, old-style figures, etc.), as well as ligatures of commonly-colliding pairs of characters like "fi." Professional fonts can thus have literally thousands of times more glyphs, are very labor-intensive to produce, and are fairly expensive.

This font is certainly less rich than most of Adobe's "Pro" line of fonts, but still looks much better than a lot of what's out there in terms of open source type.

<comment><USER10> Thank you for your response. This makes much more sense. Never realized how intense fonts were.

<comment><USER12> Plus, while there are a lot of 'free' fonts online most of them are licensed such that you can't embed them in your app. From my understanding (IANAL) the SIL open font licence DOES allow you to embed and redistribute.

</comment></comment></comment></comment><comment><USER13> Arch Linux packages I just created/added to AUR:

otf-source-sans-pro: <https://aur.archlinux.org/packages.php?ID=61403>

ttf-source-sans-pro: <https://aur.archlinux.org/packages.php?ID=61404>

<comment><USER14> Thank you very much! I was already a bit sad when I didn't find a Source Sans Pro package yesterday.

</comment></comment><comment><USER15> Good for them. I'm not really digging the tail on the lowercase L next to the simple bar I. Otherwise I might give it a shot for my own site instead of Quattrocento Sans or Open Sans.

<comment><USER9> There's an alternate l available via OpenType features.

<comment><USER16> Thanks for these! :) Can't wait for monospaced.

</comment></comment></comment><comment><USER17> Beautiful fonts. Thanks for the tip! :)

Here's the download link: [http://sourceforge.net/projects/sourcesans.adobe/files/Sourc...](http://sourceforge.net/projects/sourcesans.adobe/files/SourceSansPro_FontsOnly.zip/download)

<comment><USER18> For those wondering, the monospace variant is sadly not included, as it is currently under development.

<comment><USER17> I think the monospace will worth the wait. But the current fonts already hit a sweet spot, UI development for mobile apps. They will look amazing on the retina screens of iOS devices.

</comment></comment></comment><comment><USER19> The monospace version looks brilliant. Looks like something that could one day become my coding font. It's quite hard to find a nice monospace font and I think the choice does in fact matter (for coding obviously)

</comment><comment><USER20> Monospace is beautiful! Sad to see it's not included

</comment><comment><USER21> Im no font nerd, but this looks great

</comment><comment><USER22> There's so much work to be done in advancing the state of readability on the web. Widely available, properly drawn fonts do a lot to help.

With only a quick look this looks like a really helpful contribution. I wonder if the name is a play on Open Sans.

</comment><comment><USER23> That's a really nice monospace.

</comment><comment><USER24> Source Sans Pro is a dead ringer for Microsoft's beautiful Segoe UI. This is a great move by Adobe. The Open Source world now has an equivalent for Segoe UI. Web designers rejoice!

<comment><USER9> Not a dead ringer, but in the same category of sans serifs, for sure.

</comment></comment><comment><USER25> Is there a font that supports both European and Asian languages available for free anywhere?

</comment><comment><USER26> Can this font be self-hosted rather than use Typekit or other externally hosted services?

<comment><USER9> Yes, it can be.

</comment></comment><comment><USER27> This is really good, and great gift to the Open Source community.

</comment><comment><USER28> So can anyone send me in a direction to use this with LaTeX?

</comment><comment><USER29> I await Gruber's lengthy analysis of this font.

(and the monospaced version)

<comment><USER30> It'll run something like "It's not the default font on the iPhone, therefore it's unreadable".

</comment></comment><comment><USER31> They should atleast release the monospace as beta.

<comment><USER9> It most likely will be in the next month or so, if you know where to look (hint: pay attention to Brackets).

</comment></comment><comment><USER32> Looks like brand marketing to me.

</comment><comment><USER33> Finally a new monospaced font!:)

<comment><USER11> Looks like they haven't released the monospace variant yet.

<comment><USER9> No, not yet.

<comment><USER34> Is there a plan to put a dot in the center (or something like this[1]) of the zero to differentiate it from capital o?

I ask because I didn't notice any zeros in the code example.

[1]: <https://en.wikipedia.org/wiki/FE-Schrift>

<comment><USER9> Yes, the zero is dotted.

<comment><USER34> Great! Can't wait for it. :)

</comment></comment></comment></comment></comment></comment><comment><USER35> Wow...its beautiful!

</comment><comment><USER36> I don't do enough design to care about fonts, but I'll always take a chance at a new monospace font. Especially this one. Looks gorgeous. (The regular face looks good too, don't get me wrong, I just don't have good uses for it).

[[On an aside, I love this thread. A post about the license, geeking out about the font and even more specifically the monospaced fonts. No where else would I see this conversation. :)]]

edit: sorry to burst bubbles, the release/source doesn't include the monospaced variant yet.

<comment><USER37> You don't have to design to care about fonts. I'm not a painter nor artist but I read about new paintings and artists. I don't play Starcraft 2 much but I still watch a bunch of Youtube replays.

</comment></comment><comment><USER38> Uh, sourceforge? When I hear "making these files available" I think github or a simple website. Not something with a download.com-style "Wait 5 seconds while we force this ad down your throat and try to find a mirror because Route 53 / load-balancing is a foreign concept to us programmers still hanging out in the '90s."

<comment><USER39> SourceForge has more bandwidth (IIRC) and has mirrors all over the world. I download from SF daily.

<comment><USER40> God bless sourceforge; they were there at the beginning in our time of need.

At this point, however, GitHub is a far larger organization. They host an order of magnitude more projects.

<comment><USER39> GitHub is more popular for code management of underpinnings (think jquerry, twitter backend stuff, etc) but SourceForge is far more popular for actual apps. Nearly all the most popular GitHub projects, if you click downloads, you're met with "There aren't any downloads yet. But don't worry! You can download the source code as a zip or tarball above." SourceForge, on the other hand, is all about apps, usually cross-platform, that users can download and use (VLC, Pidgin, GIMP-Windows+Mac, OpenOffice, Inkscape, KeePass, etc). So, I think GitHub is more popular with coders, but SourceForge is far more popular with users and app makers.</comment></comment></comment></comment>


Ask HN: Best way to learn modern C++? - <AUTHOR> Do you have some good advice or know any useful resources to learn in a proper way how to code in C++? For the context, I know some C, but C++ seems a different kind of beast, and it's easy to get lost in the huge variety of features and libraries it offers. <comment><USER2> \- Tour of C++ ([http://www.stroustrup.com/Tour.html](http://www.stroustrup.com/Tour.html))

\- Principles and Practice Using C++ ([http://www.stroustrup.com/programming.html](http://www.stroustrup.com/programming.html))

\- From Mathematics to Generic Programming ([http://www.fm2gp.com/](http://www.fm2gp.com/))

\- The Scott Meyers books

Some of the Bjarne Stroustrup videos,

"Learning and Teaching Modern C++" \- [https://www.youtube.com/watch?v=fX2W3nNjJIo](https://www.youtube.com/watch?v=fX2W3nNjJIo)

Some of the Herb Sutter videos,

"Writing Good C++14... By Default" \- [https://www.youtube.com/watch?v=hEx5DNLWGgA](https://www.youtube.com/watch?v=hEx5DNLWGgA)

"Back to the Basics! Essentials of Modern C++ Style" \- [https://www.youtube.com/watch?v=xnqTKD8uD64](https://www.youtube.com/watch?v=xnqTKD8uD64)

Some of the Kate Gregory videos,

"Stop Teaching C" \- [https://www.youtube.com/watch?v=YnWhqhNdYyk](https://www.youtube.com/watch?v=YnWhqhNdYyk)

"10 Core Guidelines You Need to Start Using Now" \- [https://www.youtube.com/watch?v=XkDEzfpdcSg](https://www.youtube.com/watch?v=XkDEzfpdcSg)

"It's Complicated" \- [https://www.youtube.com/watch?v=tTexD26jIN4](https://www.youtube.com/watch?v=tTexD26jIN4)

<comment><USER3> I agree with this completely :)

I would also like to add that it helps to read "The Design and Evolution of C++".

I found that I plateaued early in my C++ journey. However, I was always reading from the experts and it really helped to read material from Dr. Stroustrup. Once I began to see the common thread behind what he was saying and understood why some things were the way they were, it helped understand when it's a good time to use/not-use certain things. This helped break past that barrier and to improve my skill further.

Also, it helped to write a _lot_ of c++ code and think about how that could be better.

I'm afraid I didn't read a tonne of good C++ code in that period but somehow, I managed to keep growing and at some point, it became my "go to" language and I really started to like it.

Long story, short: Read books from the experts, esp. Dr. Stroustrup.

<comment><USER4> > I would also like to add that it helps to read "The Design and Evolution of > C++".

I think that book is worth reading even to people who have no intention of going anywhere near C++, as long as they are interested in programming language design and evolution. I wish there were more books like this one to explain the kind of thinking that went into the design of a language and to tell its history.

<comment><USER5> Agreed.

I had commented on the book on HN about a month ago:

[https://news.ycombinator.com/item?id=16275341](https://news.ycombinator.com/item?id=16275341)

Excerpt from it:

"I found that book very interesting in many regards. I had bought and read it several years ago (out of interest, though I have not worked on C++ professionally).

Stroustrup goes into a lot of details about the reasons for many design decisions in the language."

That's one of the reasons that make the book interesting. He even goes into human and cultural aspects of programming.

<comment><USER6> Agreed on D&E, but I think it really does need an update now.

<comment><USER7> I would love a book similar to _C# In Depth_ but for C++. The book takes you on an evolutionary tour of C#s features, version-by-version. One of my favorite programming books of all time and a good read even for someone who doesn't program in C#.

<comment><USER4> I have been using C# at work for a little while now, and I am starting to like it. Thanks for the suggestion!

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> One of the trickier things about C++ for me (in terms of "getting lost") when I first started was that there's no standard C++ project structure. It varies based on the build system you use, whether what you're building is just an API or something else, and personal preference. I recommend looking at some open source C++ projects like Tensorflow (Google), LevelDB (also Google), folly (Facebook), MongoDB, and Thrill (a Spark clone in C++, [https://github.com/thrill/thrill](https://github.com/thrill/thrill)). Also pick your own projects you're interested in. Take a look at basic tutorials for build systems like make, CMake, and Bazel. Hopefully that'll give you an idea of what a modern C++ project actually looks like, and will help you start your own.

For books I'd like to add to the current top comment (may go away) API Design for C++. It's a great reference on exactly what it sounds like.

<comment><USER9> 100% agree - the code quality in some of these projects (e.g. folly) is outstanding.

</comment></comment><comment><USER10> If you want fun miniproject may I suggest Peter Shirley's excellent mini- raytracing bookseries: Ray Tracing In One Weekend, Ray tracing the next week, and Ray Tracing, the Rest of Your Life: [https://www.amazon.com/Ray-Tracing- Weekend-Minibooks-Book-eb...](https://www.amazon.com/Ray-Tracing-Weekend- Minibooks-Book-ebook/dp/B01B5AODD8)

If you get interested on rendering Matt Pharr & Co's Oscar winning "Physically based rendering" is a didactic masterpiece. [https://www.amazon.com/Physically-Based-Rendering-Third- Impl...](https://www.amazon.com/Physically-Based-Rendering-Third- Implementation/dp/0128006455)

The book is one of the best examples of how to combine high quality code and academic exposition together.

<comment><USER11> Indeed this is a good project. And a great set of books. I second this!!!!

</comment></comment><comment><USER12> Once you've got the basics down from a tutorial (old C++ or modern C++), move on to internalizing all the lessons here:

[https://isocpp.org/faq](https://isocpp.org/faq) (what Marshall Cline's excellent C++ FAQ has become)

and here:

[https://herbsutter.com/gotw/](https://herbsutter.com/gotw/) (Not as organized, but Herb Sutter wrestles with the essential questions of how to deal with the tricky bits of C++)

If you've got the cash, read Effective Modern C++ by Scott Meyers.

Finally, if you're ready to snark at all you've learned, read the C++ FQA:

[http://yosefk.com/c++fqa/](http://yosefk.com/c++fqa/)

<comment><USER13> I would like to point out that yosefk fqa is a bit old now, and while some problems mentioned are still relevant, tools and conformity across up to date compilers are magnitudes better now.

</comment></comment><comment><USER14> Also in case anyone is going to suggest something project-like please something in the direction of HFT/OS/Systems related as opposed to game programming? There are loads of stuff out there for C++ related to game programming.

For OP: [https://stackoverflow.com/questions/388242/the- definitive-c-...](https://stackoverflow.com/questions/388242/the-definitive-c- book-guide-and-list/388282#388282)

Also some C++ related YT channels such as TheChernoProject, CppCon etc

Following the respective reddit and slack communities is also extremely helpful.

Also get your hands dirty with this: [https://github.com/vitalets/github- trending-repos](https://github.com/vitalets/github-trending-repos)

or [https://github.com/fffaraz/awesome- cpp](https://github.com/fffaraz/awesome-cpp) There is more but this should do.

Oh I almost forgot: [https://ishansharma.github.io/twitter- mentors/](https://ishansharma.github.io/twitter-mentors/) [http://stephaniehurlburt.com/blog/2016/11/14/list-of- enginee...](http://stephaniehurlburt.com/blog/2016/11/14/list-of-engineers- willing-to-mentor-you) [https://twitter.com/sehurlburt/status/889004724669661184](https://twitter.com/sehurlburt/status/889004724669661184)

Good Luck! :-)

</comment><comment><USER15> Use it.

Not being a smart@$$ here. Any language you want to learn will only become natural when you've used it for a significant project or set of exercises. Either clone or port something non trivial, or use it for your latest pet project, or get permission to use it at work.

<comment><USER16> I'd still argue that there's a lot of value in some form of teaching (via book or video or whatever). If left to their own devices, novices will often come up with messy, non-idiomatic ways to do things.

<comment><USER17> I find using both in combination is usually the best way to go. If you're just reading a book and doing exercises in it, you wont learn as well. Making something you want to make and using books as reference while developing makes you learn a lot quicker.

Also, the answer to this question depends a lot on your previous experience with other languages. If you're well-versed in another C-like language, jumping right in and starting to make something will probably teach you a lot, really quickly. If you're more of a beginner in programming generally, you need a book or a teacher.

</comment></comment></comment><comment><USER18> IMO, the classic C++ book/author is still the best: Effective C++. Don't forget about the sequels, including the mostly overlooked Effective STL (which I happen to like better than the first two books). And to address the modern part of this question, I'll add that Scott Meyers has written Effective Modern C++ as well, but I'd read that last after getting the hang of C++03. No matter what people say, I tend to believe C++11 and on is not really a different language as much as it is syntactic sugar to cover up the ugliest parts of C++.

<comment><USER19> As someone who programmed in "classic C++" for decades, I feel like modern C++ is pretty different, and that it's not just syntactic sugar to make some ugly things easier. The biggest example is that my natural inclination to use raw pointers everywhere and manage all memory myself, while idiomatic modern C++ is full of unique_ptrs and shared_ptrs everywhere, and raw pointers seem to be regarded as a code smell. Converting to this style is not an automatic process.

For people who are coming from a classic C++ background, I find Bancila's Modern C++ Programming Cookbook to be a good first stop for discovering modern C++ idioms.

<comment><USER18> OK from that perspective I can relate. Even before using C++11 I was using a lot of the new STL through Boost. If you use Boost, the only fundamental differences are syntax like auto, variadic macros, constexpr, noexcept, and lambdas all of which are familiar enough to get by. The only practical differences that have no equivalent in C++03 is move operations and maybe the threading/chrono stuff. Effective Modern C++ covers that so that's all I needed to "upgrade."

</comment></comment></comment><comment><USER20> If you know C, C++ Common Knowledge ([https://www.amazon.com/Common-Knowledge- Essential-Intermedia...](https://www.amazon.com/Common-Knowledge-Essential- Intermediate-Programming/dp/0321321928)) will give you a quick run of the gotchas you're to avoid. From there, move to Scott Meyer's books, which will give you some good foundational knowledge on how features of the language work together. In particular I like that each concept is presented in a bite-sized chapter that you can read in a couple of hours and think about for the rest of the day. Even though the first two are about "classic C++" I wouldn't skip them. For a glimpse of the true power of modern C++, check the Boost Hana library docs, hopefully this will serve you as motivation to keep on going. Above all, don't do this alone. The compiler errors that you get once you start applying modern (template) techniques can be a bit of a rabbit hole and takes a bit to get an eye for deciphering them. Lean on coworkers, local user groups and/or the C++ slack group which is pretty supportive. Best of luck.

</comment><comment><USER21> I'm on my phone so I don't have links, but the last few CPPCons have had talks by very prominent C++ luminaries talking about how to properly teach C++. They may be of interest.

The biggest message seems to be "don't treat C++ as C with extra stuff, it's its own language."

</comment><comment><USER22> Google's C++ course at [https://developers.google.com/edu/c++/](https://developers.google.com/edu/c++/) looks useful to start with.

<comment><USER23> Don't forget SFINAE. It's what most of the modern type traits rely on and something you'd have to understand, at least conceptually, to fully understand how to effectively use things like std::enable_if.

<comment><USER24> For those unfamiliar with C++, SFINAE is "Substitution Failure Is Not An Error". The short of it is how the language deals with overload selection with templates. If you want a more detailed explanation and example, see [1].

[1] [https://en.wikipedia.org/wiki/Substitution_failure_is_not_an...](https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error)

</comment></comment></comment><comment><USER25> As others mentioned, Effective Modern C++ by Scott Meyers is a solid modern C++ book with nice tips and tricks. Other than that, check out the official C++ Guidelines by Bjarne and co. [http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines)

Good luck!

</comment><comment><USER26> Others have talked about how to learn the language but many people often find that hardest thing to do is to even compile their first C++ file. This is the "build system escalation policy" that I personally use, depending on what I need:

1: Experimental, throw-away code: online IDEs or Godbolt if I care about compiler output. You would be surprised how much mileage you can get out of a simple online IDE when you are just learning or exploring a new thing and don't care about preserving your work.

2: Single-file code or small multi-file projects with no dependencies (like exercises or code samples from a book): direct calls to clang++/g++ in the command prompt or a simple build.sh shell script when I have to build multiple files. Make is a fantastic tool for this so you can learn and use that instead. I would actually encourage beginners to play directly with the compiler and learn the basic flags though, but this is personal preference.

3a: Personal projects that pull in other dependencies (either system wide or libraries from github or other sources): Make or cmake would probably work here equally well. I actually prefer cmake for its find_package and external project functionality. Notice the jump in complexity from 2 to 3, this is something you have to deal with and eventually you will have to pick a build tool and learn it.

3b: After learning to use Bazel I have mostly migrated to it for all my personal projects, but there was an initial learning curve for sure (not worse than cmake though).

4: At work: Whatever your company/team/group uses, you will most likely have little input on this if the codebase is old and established.

If you are in Windows you can use vanilla Visual Studio C++ (Community edition is free and has all the bells and whistles) for 1-3, or use Visual Studio + cmake (you can generate VS solution files from cmake).

</comment><comment><USER27> I found "C++ Primer" by Lippman et al very well written and comprehensive. It includes C++11 features and every chapter has exercises to make sure you understand the content.

[https://www.amazon.com/Primer-5th-Stanley-B- Lippman/dp/03217...](https://www.amazon.com/Primer-5th-Stanley-B- Lippman/dp/0321714113)

<comment><USER28> Already outdated by 6+ years though.

<comment><USER27> What would you say are important features missing in C++11 that are in the current standard? I ask because I'm trying to get back into C++ development after many years and even C++11 seems like a new language to me.

</comment></comment></comment><comment><USER29> I have a question on this topic which is - is it possible or practical to only learn "modern" C++?

Isn't it necessary to be able to understand pre-modern C++ in legacy code bases or to work alongside a co-worker who might code using an older style? Or even to be able to understand documentation and texts about C++ from an earlier era?

<comment><USER30> I share your concern. Even if one isn't (knowingly) dealing with older C++ code, _all_ of the language rules apply to every line of C++ being compiled.

Just one typo, or misguided use of syntax, and a person might be using some "older" revision of the language without knowing it. And I'm not aware of any tool that will warn the programmer that he/she has done that.

So I'm concerned that programmers schooled only in "modern" C++ will fail to understand that this has occurred, and will either (a) get error messages that don't understand, or (b) get program behavior that they don't anticipate.

I'm curious if people have found this to be a problem in practice.

<comment><USER29> >"I'm curious if people have found this to be a problem in practice."

Same. And I think you articulated the specific concerns I have about just learning the "modern" version.

It would certainly lower the barrier to entry in learning C++ if this was an unfounded concern.

C++ has some 35 year of history and changes at this point. This point alone adds(for me anyway) to the perceived cognitive load of learning it. C also has a similar length of history but it is a much smaller language.

<comment><USER31> > It would certainly lower the barrier to entry in learning C++ if this was an > unfounded concern.

If the Javascript community, which is as fragmented as C++, if not more, could introduce "strict" mode and enforce it basically everywhere, then maybe C++ could do the same thing.

Have C++20 recommend a certain subset of C++, have C++24 warn as deprecated features not in this subset, have C++30 error out on everything outside this subset, unless the compiler is set to compatibility mode and finally have C++40 refuse to compile the old code.

<comment><USER30> I'll take your word for it regarding JS, but I was thinking along the same lines w.r.t. C++ deprecation.

Alternatively, one could take a page from CMake's playbook with "policies" [0].

[0] [https://cmake.org/cmake/help/v3.7/manual/cmake- policies.7.ht...](https://cmake.org/cmake/help/v3.7/manual/cmake- policies.7.html#cmake-policies-7)

<comment><USER31> ECMAScript 6 modules are in strict mode only: [https://stackoverflow.com/a/31685340/1320143](https://stackoverflow.com/a/31685340/1320143)

I think C++ is getting modules, maybe they could do the same thing?

</comment></comment></comment></comment></comment></comment><comment><USER32> Piggybacking of this post, if anyone has any similar resources for best practices in modern C I'd be interested. There don't seem to be any moocs that go beyond introductory material and K&R obviously doesn't cover modern tools and methods.

<comment><USER33> "C Interfaces and Implementations" by David R. Hanson is what I used when I had a similar concern a few years ago. It's from 1997, so no, it doesn't cover the newest C standards, which I understand is your main concern. Though C11 didn't add too much semantically, for what it's worth. That said, the book provides great design patterns for writing C in an object-oriented sort of manner, more idiomatic to OOP.

Peter Hintjens was writing "Scalable C" a couple years ago, but recently died, and never got very far unfortunately.

</comment></comment><comment><USER34> It's a bit of an evergreen question.

[https://hn.algolia.com/?query=learn%20c%2B%2B&sort=byPopular...](https://hn.algolia.com/?query=learn%20c%2B%2B&sort=byPopularity&prefix&page=0&dateRange=all&type=story)

For even more stuff - if you do the same search for C, especially 'modern C', you'll find those threads often also contain a parallel set of recommendation for C++ resources.

</comment><comment><USER35> Coincidentally, Pearson just announced a 40% off sale for all their C/C++ books (in honor of Stroustrup receiving the Draper Prize).

[http://www.informit.com/promotions/programming-with-c- and-c-...](http://www.informit.com/promotions/programming-with-c-and-c-plus- plus-tutorials-and-references-138989)

</comment><comment><USER36> Writing a piece of software in C++.

Sizing the softare to fit your schedule: i.e., if you want to be at the level of BJS, write a C++ compiler; if you want to be as good as Google employee, uses the common Google c++ libraries Protobuf ABSL etc. to write a simple webserver with a few APIs. The list goes on and on.

</comment><comment><USER37> I look for projects on github with good quality source code and start hacking on them.

here is a vulkan renderer [https://github.com/pumexx/pumex](https://github.com/pumexx/pumex)

You'll pick up the good habits working with good code.

</comment><comment><USER38> I would recommend the following websites for practice:

[http://exercism.io/](http://exercism.io/)

[http://rosalind.info/problems/locations/](http://rosalind.info/problems/locations/)

[https://projecteuler.net/](https://projecteuler.net/)

[https://www.hackerrank.com/](https://www.hackerrank.com/)

</comment><comment><USER39> Do you mind asking 'Why C++'?

I know that doesn't answer your question and to be honest, I am curious about the resources which come up here too, but C++ can be so painful to learn that I wanted to know what drives you into that direction. I mean, there are alternatives like Rust. Do you have a specific project in mind, need it to fulfill some résumé requirements or something completely different?

<comment><USER40> Not OP, but good question.

I find Rust is a much better language, but there are very few mature libraries right now if you do something outside the scope of what Mozilla is doing. Also very few companies that are working in Rust (AFAIK, if you know some let me know) looking for devs.

If you want to work in a company that is doing any kind of low level code you will either need C or C++ as a foundation. At least to understand existing code. Most companies won't just rewrite everything in Rust, no matter how good the language is.

I really hope Rust replaces C++ for new projects, but it's just too new to tell whether that will happen. I find there's a bit more momentum (and good ideas) than in D, but nobody can predict the future from 2-3 years of language history.

<comment><USER21> > if you know some let me know

"This Week in Rust" lists explicit job postings. One of the latest companies looking for Rust programmers is a little company you may have heard of: Facebook.

That said, many places are hiring _good programmers_ and putting them on Rust projects, rather than hiring Rust programmers explicitly. There aren't many pure Rust shops yet, so they need a broader skill set.

<comment><USER40> I'm pretty good in C as well (less C++). I just would like to know beforehand if I could grow into a Rust role there.

<comment><USER21> Yeah, that's the issue with these kinds of roles. You'd have to ask each company, of course.

</comment></comment></comment></comment></comment><comment><USER41> The question assumes that there is a single "proper" way to code in C++ that everyone agrees on. But that's just not the case. For example, Google bans exceptions, operator overloading, and most uses of Boost in their C++ code. Facebook embraces all those things. QT re-invents most of the standard library.

A lot of the C++ language is sort of experimental. Sometimes features get thrown in and then deprecated and/or taken out, like the "export" keyword for templates, or throw specifications. Most programmers have strong opinions about which C++ features are bad. But that's all they are-- opinions. The C++ standard supports pretty much any way of doing things you could imagine-- async, sync, multiple inheritance, functional, you name it.

If you're a novice, my advice is to learn C really well. Then choose a C++ style guide and follow its recommendations closely.

</comment><comment><USER42> If you haven't already I'd suggest learning a functional language first, then coming back to modern C++, because much of the new features are borrowed from other languages.

Personally I started doing this then never went back. Seems most of the jobs out there for C++ really aren't that interesting.

<comment><USER33> Absolutely unnecessary. Modern C++ borrowed some paradigms of functional programming, but learning a functional language isn't remotely close to being a prerequisite to learning those features.

In terms of jobs, C++ is used heavily, if not the majority of the time in: AAA game development, high performance computing, high frequency trading and quantitative finance, embedded software, image processing and computer vision... honestly, I focused on C++ out of school years ago BECAUSE of how interesting many of the jobs are. They're also generally more stable and thus competitive over time compared to e.g. web dev, enterprise software, and so on, because the domain knowledge required means you're a lot more valuable than knowing X and Y design pattern or framework Z.

</comment></comment><comment><USER43> As others noted best way to learn is to use it. Pick any open source you like, compile and test it, learn it's code, try to fix some bugs or implement features, ask questions from other developers, get feedback on your code. That way you'll learn all caveats of practical C++ development and tools.

Additionally while traditional and more detailed books already posted here I'll just add one I personally liked: Discovering Modern C++ by Peter Gottschling. It's had exactly information I would expect be needed for person who already have reasonable experience in programming, but want short introduction into C++.

Disclaimer: I'm certainly not someone you can call experienced C++ programmer since I just developing and manage open source project for 3+ years. So take my opinion with a grain of salt.

</comment><comment><USER44> Best way to learn anything new, is just pick a pet project you've been thinking about, and implement it in that language/database/system/whatever. That's how I've always done it over the years. You end up constantly building upon the last projects knowledge.

</comment><comment><USER45> I would recommend the book C++ Primer, by Stanley Lippman. Also [http://www.learncpp.com/](http://www.learncpp.com/). Both are great resources IMHO. You might have to skim over certain topics as you already know C.

</comment><comment><USER46> Read the Core Guidelines. [https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)

</comment><comment><USER47> Read Stroustrup's blue book (The C++ Programming Language 4th edition); chapter 1 will teach you a LOT.

Then read Meyer's Effective modern C++.

And then have a local copy of cppreference.com (they provide a zip you can download) and set yourself some projects.

</comment><comment><USER48> Build simple command line programs with it and use first a simple editor like Code::Blocks. Best thing to stop you learning C++ is using one of this beasts like VisualStudio and start with Windows programming ;)

</comment><comment><USER49> Take a look at how the standard library does things, and particularly anything for which it is not clear to you how one might implement it, or the use of anything whose purpose you don't really understand.

<comment> Const-me Large parts of the standard library are designed badly. E.g. io streams are horrible, allocators are questionable.

<comment><USER30> > Large parts of the standard library are designed badly.

That's true, but IMO it's useful to study the standard library to understand _what it offers_ , as opposed to examples of well-designed C++ code.

<comment> Const-me People who spent many years developing C++ already understand what the standard library offers, regardless on whether they studied that deliberately.

People coming to the language lack the expertise to tell well-designed code from bad-designed. It's tempting to treat the whole standard library as an example of the former.

Maybe that's a personal thing but I remember doing that when I just started my career back in 2000. STL wasn't quite there but MFC was already in wide use. Because I lacked the experience I considered whatever's there is good, and ended up using not so good parts such as C++ exceptions and macro-driven dynamic serialization.

<comment><USER30> > People who spent many years developing C++ already understand what the > standard library offers

That statement isn't true for (at least) me. The main reason is that I'm usually working on code that must be compile-able as C++11, and/or may require an old-ish version of gcc's standard C++ library.

So in my daily work I usually have little/no reason to interact with the newer parts of the standard library.

</comment></comment></comment></comment></comment><comment><USER50> Before diving into smart pointers, move semantics and other (mostly) recent additions, I would recommend getting well acquainted with the basics: RAII and common patterns such as passing by constant reference. Effective C++ by Scott Meyers, as others have noted, is an excellent entry point.

</comment><comment><USER51> I would recommend to start with C++ integration with Jupyter notebook [https://blog.jupyter.org/interactive-workflows-for-c-with- ju...](https://blog.jupyter.org/interactive-workflows-for-c-with-jupyter- fe9b54227d92).

</comment><comment><USER52> Check this out. [https://unacademy.com/course/c-programming- essentials-994/BM...](https://unacademy.com/course/c-programming- essentials-994/BMFTV2O4)

Definitely a good kick start.

</comment><comment><USER53> Anyone aware of good, thorough, (online) material to learn C++ template programming?

<comment><USER18> For this, I can't point to any one source, but I highly suggest looking at the implementations of the C++11 type_traits header. Building off of that would be a great second step.

</comment></comment><comment><USER54> I usually get bogged down by the syntax of very many complex things that gets me lose the focus on the motive of the code. I wish we had an efficient way to learn what a declaration means. (On the lines of cdecl)

</comment><comment><USER55> What's the best way to teach modern C++ as a first programming language?

I'm at CU Boulder and their curriculum is outdated (90s) and backwards. What resources could I point the professors towards?

</comment><comment><USER56> Related: Any good websites to practice C++ with challenges? I've heard some things about CodeWars, but are there any other?

<comment><AUTHOR> I think you can use C++ in code challenges in all major coding riddles practice sites eg. Hackerrank, Leetcode and TopCoder.

</comment></comment><comment><USER57> I don't see openFrameworks mentioned here: [http://openframeworks.cc/](http://openframeworks.cc/)

Probably the most comprehensive open-source creative coding framework. Maybe most helpful for familiarity with graphics programming / OpenGL, but it really extends to all types of possible interactions. Maintained by an awesome group of people.

<comment><USER58> OpenFrameworks has nothing to do with _modern_ C++. It's a framework for laymen artists that happens to be written in C++. It won't teach you about move semantics, lambdas, unique_ptr, for-in loops, etc.

</comment></comment><comment><USER59> This is great information, thanks.

</comment><comment><USER60> I would say watch C++ primer

</comment><comment><USER61> I wonder if at some point it will be possible to discuss C++ on HN without the majority of the conversation becoming side tracked into discussing Rust.

</comment><comment><USER62> May I ask why do you want to learn modern C++?

You should check out Rust, it aims to replace C++ and do a better job in memory management, and developer experience in general (cross-platform compatibility, package management, etc)

<comment><USER2> Rust still needs to catch up with C++ in a few domains.

SIMD, GPGPU, GUI, embedded platforms, iOS, Android, UWP, COM, certified compilers, ...

<comment><USER21> Incidentally, SIMD is just waiting on stabilization now; it's RFC was accepted and the implementation landed. Soon!

<comment><USER63> Will Rust have idioms for really doing SIMD _in Rust_? If I understand correctly, C++ has to drop into assembly to do SIMD (at least so far).

<comment><USER2> C++ doesn't need Assembly for SIMD.

Most compilers do a reasonable job with auto-vectorization, and if more is needed, there are instrisics.

No need to write straight Assembly.

<comment><USER63> OK. (The one time I encountered SIMD in C++ was a decade ago; we had to use assembly then. And even then, we weren't playing with an up-to-the-minute compiler. (In my experience, your comments elsewhere on this article about embedded toolchains were accurate.)

Are the intrinsics standard? If so, what version of the standard were they in? How good is compiler support for them?

<comment><USER28> Not standard, unless you count "supported with the same semantics in multiple compilers" as good enough.

They are not portable between CPU architectures either way

For reference, C got real alignment support in C11 and C++ in C++17. Without this, even starting on SIMD is risky.

That said, you can go really far with a good C++ math library like Eigen which has singe vectorization in the operations themselves.

</comment></comment></comment></comment></comment></comment></comment><comment><USER64> This is undoubtedly the best c++ resource available [http://shop.oreilly.com/product/0636920040385.do](http://shop.oreilly.com/product/0636920040385.do)

</comment><comment><USER65> C++ is just C with extra notation for easy modeling of Classes and Objects. While C still remains valuable, C++ is in my opinion questionable and there are many excellent alternatives like Java or C# for doing similar things and much more. I have programmed in C++ for many years and honestly would not suggest it to any one but anyway here are some excellent resources.

ftp://bitsavers.informatik.uni- stuttgart.de/pdf/borland/borland_C++/Borland_C++_Version_2.0_Getting_Started_1991.pdf (Read chapter 4 C++Primer. The hole folder is a rare jewel)

[https://docs.microsoft.com/en-us/cpp/cpp/cpp-language- refere...](https://docs.microsoft.com/en-us/cpp/cpp/cpp-language-reference) Probably the best documentation of C++ by far.

P.S. If you are desperate on learning C++ I could give short course saving you time and money.

<comment><USER66> > C++ is just C with extra notation for easy modeling of Classes and Objects.

That's far from true today, and I'd even argue it hasn't been true since very early on. Simple example to prove my point: RAII.

<comment><USER65> So you know [https://en.wikipedia.org/wiki/Resource_acquisition_is_initia...](https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization) Good for you.

"Object Oriented Programming puts the Nouns first and foremost. Why would you go to such lengths to put one part of speech on a pedestal? Why should one kind of concept take precedence over another? It's not as if OOP has suddenly made verbs less important in the way we actually think. It's a strangely skewed perspective." from [https://en.wikipedia.org/wiki/Object- oriented_programming](https://en.wikipedia.org/wiki/Object- oriented_programming) criticisms says a lot.

<comment><USER66> That's quite irrelevant to the conversation though, we weren't talking about whether OOP is good or not. C++ is very far from "C with classes" today.

<comment><USER65> Ok but still OOP is the central idea and also there is this trend the most annoying one to always try modeling everything as classes and objects.

<comment><USER67> plenty of c++ is just functions wrapped in namespaces. namespaces alone are a significant advantage over c.</comment></comment></comment></comment></comment></comment>


The real utility of Chrome's Speed Dial extension - <AUTHOR> http://img.photobucket.com/albums/v624/adlaiff6/2010-04-26-174632_1110x658_scrot.png

<comment><AUTHOR> Made with love, [https://chrome.google.com/extensions/detail/dgpdioedihjhncja...](https://chrome.google.com/extensions/detail/dgpdioedihjhncjafcpgbbjdpbbkikmi) and bulbapedia.</comment>


Beginner's Guide to Email CTA - <AUTHOR> https://www.saasemailmarketing.net/guides/email-cta/ <comment><USER2> Agreed, retention is a crucial part of the business and when you do it well and effectively, it can increase your revenue tremendously. It's a handy infographic</comment>


Shelling Out: The Origins of Money (2002) - <AUTHOR> http://nakamotoinstitute.org/shelling-out/ <comment><USER2> A rigorous and ideologically alternative viewpoint is expounded in Debt: The first 5000 years by David Graeber, a professor of anthropology with a leftist bent. PDF freely available here [1]. It is longer, being a book and all, and emphasizes anthropological evidence and models, being written by an anthropologist and all.

[1] [https://libcom.org/files/__Debt__The_First_5_000_Years.pdf](https://libcom.org/files/__Debt__The_First_5_000_Years.pdf)

<comment><USER3> In addition — In Defense of David Graeber's Debt:

[https://www.jacobinmag.com/2012/09/in-defense-of-david- graeb...](https://www.jacobinmag.com/2012/09/in-defense-of-david-graebers- debt/)

<comment><USER4> A summary of the book from the above article:

 _" Reading Debt is no substitute for serious study of economics... But if you do get your economics from Debt, you will at least come away with a few important ideas. First, that money contracts come before, and are about more than, the exchange of goods. Second, that some monetary systems are based on commodity money and some are based on credit, and the two behave quite differently. Third, and most urgently, that decisions about the money supply are not "too important and technical" for democracy. On the contrary, they are too important and inherently political to be made any way except democratically._

 _" Debt's economic arguments are not always presented as clearly as they could be. But none of them are present at all in the typical economics textbook. They are, on the other hand, found in some form or another in the thought of a great many rebels, heretics and reformers within the economics profession."_

<comment><USER5> > Reading Debt is no substitute for serious study of economics

The thing about studying economics is that unless you do it to considerable depth, you'll come away with the wrong conclusions.

Undergraduate economics textbooks teach that central banks try to control the supply of money as an explicit target, and that commercial banks lend out their reserves - both of which are objectively false.

 _Debt_ has its flaws, but it at least gets the basic mechanics correct.

<comment><USER2> Which textbooks get the basics right? Can be technical and/or aimed at a non- beginner level.

<comment><USER5> I'm don't know of a good textbook that explains it well. But for an example of a textbook that gets it wrong, see Mankiw's introductory macro book. Mankiw alludes to the important brake on credit creation (capital constraints), but dismisses them as 'arcane', then goes on to describe a fractional reserve system that doesn't really exist anymore.

I've pieced together what I can from reading blogs (Frances Coppola [0] is very informative in this regard). The Bank of England wrote a document explaining their view of the process of money creation [1], which is widely accepted as correct.

Edit: actually, this might do: [http://neweconomicperspectives.org/money- banking](http://neweconomicperspectives.org/money-banking)

[0] [http://www.coppolacomment.com/](http://www.coppolacomment.com/)

[1] [http://www.bankofengland.co.uk/publications/Documents/quarte...](http://www.bankofengland.co.uk/publications/Documents/quarterlybulletin/2014/qb14q102.pdf)

</comment></comment></comment></comment></comment></comment><comment><USER6> For a look at today's money, see _Modern Money Mechanics_ :

[https://docs.google.com/file/d/0B5c4DinvHeF2eEpKbFZTOU5CUWs/...](https://docs.google.com/file/d/0B5c4DinvHeF2eEpKbFZTOU5CUWs/edit)

</comment><comment><USER7> The author implies that the idiom 'shelling out' has its origins in shell money, I'm pretty skeptical of that claim:

[https://wordhistories.net/2016/09/21/shell- out/](https://wordhistories.net/2016/09/21/shell-out/)</comment>


Using emacs with org-mode to keep yourself organized - <AUTHOR> http://www.deepakg.com/prog/2011/11/emacs-org-mode-todo-list-nirvana/

<comment><USER2> Interesting. I am a recent emacs convert, so I hadn't seen it used to run applications rather than as just a text editor. For this particular application I think an OSX app is a better solution, but I'm still intrigued by this approach. Anyone know of other examples?</comment>


Learn to speak vim - verbs, nouns, and modifiers - <AUTHOR> http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/ <comment><USER2> I am ashamed to say that this made me giggle like a girl.

I guess I'm the kind of guy that understands and learns in this way better than seeing visual cheatsheets or long-winded reference pages. Up until now I've just been remembering particular sets of vim commands but this will really make me a lot more productive I'm sure. :)

<comment><USER3> I am not fully vim fluent, but I found this presenting angle confusing at best.

Perhaps it helps to remember more easily if one already knows and uses all the basic commands. Personaly I don't use vim all the time and have trouble keeping a good mental model of the different commands behaviour depending on the state of the document.

Telling me "hey, y is not some command acting against a state, it is a verb, just use it with nouns like you use verbs!" is just counterproductive.

completely off-topic, but I had a hard time to visualize how it is to "giggle like a girl". Even googling and youtubing left me puzzling at the exact way to giggle you wanted to express. It is kind of fun and curious.

PS: responded to this post for the OT bit. not that it was a direct reply.

</comment></comment><comment><USER4> If this gets people into vim and helps them understand some of its craziness, that's awesome. However, like previous commenters have pointed out, most of these examples are actually wrong (not by a mile, but it pays to be precise in vim). Also, even though I love browsing through dotfiles and plugins on code repository sites, I tend to think that beginners to vim should learn slowly, gradually, and build up their knowledge over time, like anything else. Diving into plugins and custom mappings right away is going to be a lot more painful and less productive. And that's the antithesis of vim.

<comment><AUTHOR> sorry, made some mistakes late at night. but "most" examples wrong? I think I only screwed up on the $ examples. if you see anything else wrong can you please point it out, so that I can fix em and not mislead people, thanks!

</comment></comment><comment><USER5> This is similar to the post _Your problem with Vim is that you don't grok vi_ at [http://stackoverflow.com/questions/1218390/what-is-your- most...](http://stackoverflow.com/questions/1218390/what-is-your-most- productive-shortcut-with-vim/1220118#1220118) (also on HN somewhere).

</comment><comment><USER6> I'd been familiar with the concept of verbs and nouns in vim but this really simplifies it all. I wish there was a more comprehensive list of everything in a readable format. Man pages just don't do it for me :(

<comment><USER7> Have you see [https://github.com/LevelbossMike/vim_shortcut_wallpaper/raw/...](https://github.com/LevelbossMike/vim_shortcut_wallpaper/raw/master/vim- shortcuts_1280x800.png)? It's pretty much instinctive for me now, but if I was starting out, this would have been invaluable.

<comment><USER8> I have that wallpaper with a green background on my wall. I think the author posted it here a few months ago.

</comment></comment></comment><comment><USER9> This has some mistakes. yt$ is not equivalent to yy - yt$ yanks from the cursor to the end, yy is equivalent to 0yt$

<comment><USER10> Actually it's even bigger than that. yt$ does not include the newline, yy does. So p after a yt$ will not change lines, it will insert the content directly on this one after your cursor, while p after a yy will reproduce the entire line as a new line below the current one.

<comment><USER11> Are you sure that yt$ will do anything if there is not a dollar-sign character on the line? Neither that or ct$ seem to do what the post advertises.

<comment><USER4> y$ will yank till the end of line (characterwise). Y is actually the same as yy, unless you n(no)remap Y to be the same as y$, which most people do. This makes make more sense, because C is the same as c$ (change till end of line). ':h change.txt' explains all of this and more a lot better than I could.

<comment><AUTHOR> thanks guys, I wrote the post at 3am and that was a bad time to be writing about vim as it turns out :) I've removed the bad examples for now and will go back to the post and add more as I think of them. The general idea was to explain that vim is not voodoo, but is very mnemonic and conversational.

</comment></comment></comment></comment></comment><comment><USER12> These kinds of blog posts always forget the 's/S' (substitute) operator. I find it super-useful.

<comment><AUTHOR> it feels like the substitute operator doesn't follow the sentence conventions. you can't saw (substitute around word) or anything like that. it feels like a standalone bit of functionality. I was trying to express reusable bits in my post, things you can build on and expand. am I wrong?

</comment></comment><comment><USER13> Useful - I found that mapping keys to actual verbs in my head as I'm using vim really helps the memorization process.

This doesn't exactly work for everything though... I'm still having trouble remembering movement keys (still using the arrow keys instead of hjkl...).

<comment><USER14> For what it's worth vim has been my main editor now for 2+ years and I still don't use hjkl. I know I should, but I can't seem to get over the hump that I can easily find arrow keys by feel, but not hjkl.

As for remembering them, left and right are on the outside, and 'j' kind of looks like a down arrow (that's how I distinguish j from k)

<comment><USER15> I've been using Vim for something like a decade, and I only recently started toying with hjkl. At first, I ignored it because I was already pretty good with the arrow keys and hjkl are annoyingly not _quite_ the home keys; then I ignored it because I switched to Dvorak and hjkl are scattered across the keyboard.

Strangely, it was Google+ that got me interested in hjkl, or at least J and K for moving up and down. In the Dvorak layout, J and K are where C and V are in QWERTY, so they're still pretty convenient to reach for.

</comment></comment></comment><comment><USER9> Is there any way to use a / search as the target object with these sorts of commands? I'd like for instance to be able to type ct/foo<cr> and have it delete to the next instance of foo and put me in insert mode. Or something along those lines.

<comment><USER16> Simply c/foo should work, if I understand you correctly.

<comment><USER9> Oh thanks, for some reason I thought I tried that before and it didn't work. Awesome.</comment></comment></comment>


Statisticians want to abandon science's standard measure of 'significance' - <AUTHOR> https://www.sciencenews.org/article/statisticians-standard-measure-significance-p-values <comment><USER2> The problem isn't p-values, the problem is a binary distinction between p=0.049 and p=0.051. The problem would go away if everyone understood p-values, or we replaced use of the term "statistically significant" with "3% probability we're just seeing a pattern by accident". Renaming the term to something that sounds just as binary isn't any different.

<comment><USER3> We use hard cutoffs for a bunch of things, they aren't perfect but they are fine.

The problem is that we are imbuing the words "statistical significance" with a whole bunch of math. This would be fine, except for the inconvenient fact that people also want to use the word "significance" as it is defined in English.

It is not only possible, but _likely_ that people will be producing results that are insignificant but statistically significant. I mean seriously, if I tell my boss that the results are statistically significant, how do I expect him to understand that the results might reasonably be insignificant? How do I expect anyone non-technical to take that sentence seriously? You lose all credibility pretty quickly when people start saying that the result is significant except it doesn't matter.

This is even more stupid than calling complex numbers "imaginary" and "complex". Those names are just arbitrary. Statistical significance is overloading words that are likely to come up with meanings other than what they are expected to mean.

Anyway, this is the problem that things like this article are going to. People are treating significance values _as though they are significant_. They aren't significant, they are statistically significant. It means something different to significance.

For example; if I run an experiment 20 times and get a p value consistent with a 5% chance in one experiment, it is statistically significant but the result is obviously not significant in the English-language meaning of the word.

<comment><USER4> This is an excellent point. In my work, the interpretation error I see the most among people around be is to confuse significance with the magnitude of the predicted effect. I.e. if you use OLS to create a model, it is possible to have a statistically significant beta, with essentially no magnitude.

If you look at research on carcinogens, it is frequent to see something like "it is statistically significant that eating chemical X increases your risk of cancer" but when you read on, the magnitude of the effect is "increases risk by .0023%, for a cancer that already has a .6% incidence in the population".

My point is that people who are not statisticians (or people who use statistics), tend to be concerned with the magnitude of an effect, and frequently misconstrue the statistical significance for that magnitude.

</comment></comment></comment><comment><USER5> This is a very old argument. I got my bachelor's degree in psychology at Harvard in 1993, and was told repeatedly that p-tests are abused, overused, and not terribly useful.

To my mind, the most hackable flaw is that the number of subjects in the study is a term in the denominator of the p-value calculation. Any study with a sufficiently large sample will find "significance" with p<.05, but it won't be meaningful.

We were taught that "effect size" measures were crucial to understanding and interpreting results. If you have p<.05 but a tiny effect size, you're likely not seeing a meaningful difference.

<comment><USER6> Odd that in some ways psychology seems to be more informed, as a field, of these nuances and pitfalls and yet they have failed as a field to adequately police themselves. The problem isn't on the statistics end of things, it's the labor market and gatekeeping end of things. Another aspect of the inability to scale higher ed in the stupid way that many think is optimal.

</comment></comment><comment><USER7> The paper "Frequentist and Bayesian inference: A conceptual primer" has some great things to say about the p-value and why a bayesian approach might solve some of the conceptual problems : [https://www.researchgate.net/publication/326112369_Frequenti...](https://www.researchgate.net/publication/326112369_Frequentist_and_Bayesian_inference_A_conceptual_primer)

(Premise) If Tracy is an American then it is very unlikely that she is a US congresswoman; (Premise) Tracy is a US congresswoman; (Conclusion) It is very likely that Tracy is not an American

(Premise) If the H0 is true, then is it very unlikely that I will observe result X (Premise) I observe result X (Conclusion) Therefore, it is very likely that the H0 is not true

</comment><comment><USER8> Most comments here point to cherry picking and "p hacking" as being the primary problems with p values. Certainly those are major issues, but I think they miss the real point of the article, which is that null hypothesis testing is fundamentally broken, or at the very least doesn't do what most people think.

A simple example of this can be shown with the following pair of tests:

Testing for a fair coin:

      - Null hypothesis is you have a fair coin
      - You observe 100 heads in a row
      - Given a fair coin, it's extremely unlikely to observe 100 heads
      - Therefore it's not a fair coin

Okay, that makes sense, but this is logically the same as:

Testing whether a person "Bill" is an American:

      - Null hypothesis is Bill is an American
      - You observe *Bill is a US congressman*
      - Given Bill is an American, it's extremely unlikely to be a congressman
      - Therefore he's not an American

Obviously that's some broken logic, but it's a perfectly valid way to get p < .05

<comment><USER9> The problem in the second case is not null-hypothesis testing, it's sample size.

<comment><USER10> What about the fact that the probability of a non-American getting elected to congress being rather low?

</comment></comment></comment><comment><USER11> If you're looking for a replacement you don't understand the problem.

The problem isn't that P=.05 is an arbitrary measure of significance. The problem is that _only publishing significant results is a bias against the null hypothesis_.

Let's say you're doing a study of flipping coins. The null hypothesis is that the coin is evenly weighted. If the null hypothesis is true, when you flip a coin once, it will come up heads with P=.5. If you flip the coin twice, the null hypothesis is that _both_ flips come up heads with P=.25. The probability of all coins coming up heads is P=0.125 for 3 flips, P=0.0625 for 4 flips, and P=.03125 for 5 flips. So if we flip a coin 5 times, and get heads all 5 times, we can conclude that the coin is weighted in some way with P=0.03125.

Let's say all the major journals of coin flipping only publish results with the high significance of P<0.05. Alice flips a quarter 5 times and gets 3 heads and 2 tails, and nobody will publish her study because it has P=.3125 (see [1] for an intuitive explanation of how this was calculated). Bob flips a quarter 5 times and gets 2 heads and 3 tails--again, no journal will publish him. Catherine, David, Ellen, Frank, and Geri all perform the same experiment, most of them getting groupings 3:2 result ratios, some getting 4:1 result ratios, but nobody getting all heads or all tails, just as one would expect given the null hypothesis. And the journal editors tirelessly send out rejection letters to all their studies.

Now somewhere down the line, Robert flips a coin 5 times and gets 5 heads. This result has P=.03125, which meets the requirement of P<.05! He sends it to the American Journal of Coin Flipping Studies (AJCFS), and they are very excited to publish his results! _Nature_ and _Science_ magazines do front page pieces with headlines "Quarters Found Heavy-headed" and "Washington Shows His Face" respectively. A casino hires Robert as a consultant for the design of their coin-flipping games. His quarter-flipping study is cited in the abstracts of two dime-flipping studies and a half-dollar flipping study. During the trial of a murderer who placed quarters tails-side up on his victims, Robert is called as an expert witness to say that the coins were placed there, not flipped there.

A week later Sally flips a quarter 5 times and gets 2 heads and 3 tails. She sends the results of her study to the AJCFS noting a failure to reproduce Robert's result, but her study is rejected because it has P=.3125.

Now, if you survey the AJCFS and all the other academic journals on coin flipping, you'd conclude that quarters are significantly weighted towards heads. But in fact, the null hypothesis is true: quarters are pretty evenly weighted. Robert's low-P result is exactly what you'd expect to happen eventually if you have enough people perform the 5-quarter-flip experiment--in fact, if a lot of people are studying coin flips, the P of getting a low-P result approaches P=1. But because the AJCFS has a P=.05 requirement, they've created a bias against the null hypothesis, which deceives the public into thinking that flipped quarters are more likely to come up heads than tails.

This is likely the reason why so many fields, most notably psychology[2], are having a replication crisis[3] and a similar effect can be used in P-hacking[4] to bolster results that are essentially fake.

Unlike coin-flipping, fields with replication crises like psychology and medicine have real affects on real people's lives. It's irresponsible and unethical for journals to publish with a bias against the null hypothesis, and adjusting the P-value requirements to another significance requirement, even a less arbitrary one, doesn't fix the issue.

The solution, I think, is for journals to commit to publish studies _before_ the study has been performed, based on the methodology, previous studies on the subject, and qualifications of the researcher. This would mean that many, many studies would be published with null results, and _that would be a good thing_.

[1] There are 32 possible outcomes for flipping a coin 5 times. If we group them by how many heads and tails, we can calculate a probability for each outcome:

        HHHHH 1 result of 5 heads       ->      P  = 1/32 = .03125

        HHHHT
        HHHTH
        HHTHH 5 results of 4 heads, 1 tails  -> P  = 5/32 = .15625
        HTHHH
        THHHH

        HHHTT
        HHTHT
        HHTTH
        HTHHT
        HTHTH
        HTTHH 10 results of 3 heads, 2 tails -> P = 10/32 = .3125
        THHHT
        THHTH
        THTHH
        TTHHH

        HHTTT
        HTHTT
        HTTHT
        HTTTH
        THHTT 10 results of 2 heads, 3 tails -> P = 10/32 = .3125
        THTHT
        THTTH
        TTHHT
        TTHTH
        TTTHH

        HTTTT
        THTTT
        TTHTT 5 results of 1 heads, 4 tails  -> P  = 5/32 = .15625
        TTTHT
        TTTTH

        TTTTT 1 result of 5 tails       ->      P  = 1/32 = .03125

[2] [https://thepsychologist.bps.org.uk/what-crisis- reproducibili...](https://thepsychologist.bps.org.uk/what-crisis- reproducibility-crisis)

[3] [https://en.wikipedia.org/wiki/Replication_crisis](https://en.wikipedia.org/wiki/Replication_crisis)

[4] [https://journals.plos.org/plosbiology/article?id=10.1371/jou...](https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1002106)

EDIT: Also see roenxi's excellent post on how "significant" means different things in statistics and colloquial English: [https://news.ycombinator.com/item?id=20895893](https://news.ycombinator.com/item?id=20895893)

<comment><USER12> This is actually a much better explanation of the problem than the main article.

The main article kept saying that p values were not meant to be definitive, but without explaining what was wrong with them. At least, not very clearly.

This comment is a much clearer explanation -- imho -- as to what goes wrong in the industry. I also think it is right to focus the attention away from a particular statistical measure.

<comment><USER11> It seems clear to me that the author just didn't understand the problem with P values. It's part of a larger problem of science journalism being done by journalists without scientific backgrounds. It's not their fault--even if you have natural ability and interest in both communication and discovery, it's hard to get an education in both.

I have the opposite problem: my abilities lie more in the statistics/science than the communication--I suspect the only reason that this explanation is being received so well is that I happened across an effective example by pure luck. The probability of me communicating effectively is probably P < .5. ;)

<comment><USER13> Let me check if I get it right: can this be said to be a case of incorrectly aggregating experiments? We're in a sense taking min(p) over all p-values, or any(significant) over all results, when we should use an aggregation method that takes into account the total number of studies aggregated?

<comment><USER11> Yes.

For example, if you dig, you'll find that a lot of the evidence for a correlation between telomere shortening (associated with aging) and processed meat consumption comes from a 2008 study in the American Journal of Clinical Nutrition[1]. They found a P=.006 correlation between processed meat consumption and telomere shortening. But when you look into the study further, they collected data on _47 different food groups_.

Let's calculate how unlikely a P=.006 event is if you try 47 times to find it:

A. If you have a probability of something happening once P_1, then the probability of that happening x times in a row, P_x, is P_x = P_1^x. For example, the probability of flipping a coin once and getting heads is P_1=.5, so the probability of that happening twice in a row is P_2=.5^2=.25, which you can verify by enumerating the possibilities (1 in 4 of the following combinations is 2 heads in a row: HH, HT, TH, TT). The probability of flipping 3 heads in a row is P_3=.5^3=.125 (only 1 of these 8 possibilities is all heads: HHH, HHT, HTH, HTT, THH, THT, TTH, TTT).[2]

B. The chances of a P=.006 event NOT happening P' are P'=1-P=.994 (the rule of 1).

C. Combining facts A and B, the chances of a P_1=.006 event NOT happening (P'_1) 47 times in a row P'_47' is P'_47=.994^47=.754 (this is rounded to the 3 significant digits).

D. Applying the rule of 1 again, the probability of finding a P=.006 result if you try 47 times is P'_47' = 1-P'_47 = .246.

So basically, the actual confidence value on that study is P=.246: there's about a 1 in 4 chance they would find a P=.006 result for one of the 47 food groups tested if the null hypothesis is true. The null hypothesis in this case being "diet doesn't affect telomere length".

The paper doesn't seem to list their hypothesis, but they say things like "all others were P>.05", which indicates that they were hypothesizing a P<.05 result. Doing the same math again for the probability of a P=.05 result occurring if you try 47 times, P'_47' = 1 - (1 - .05)^47 = 0.91025516807. That's over a 90% chance! In other words, by doing the test on 47 food groups, they nearly _guaranteed_ that they would find a result within their definition of significance. This is _very_ bad science, and a study with this bad of a statistical design never should have been funded in the first place.

This study has not been replicated as far as I know, but is often cited in pop science[3][4][5].

[1] [https://academic.oup.com/ajcn/article/88/5/1405/4649028](https://academic.oup.com/ajcn/article/88/5/1405/4649028)

[2] Note that this rule only applies to _independent probabilities_ ; the result of coin flip does not affect the result of the next coin flip, and the result of telomere correlation to one food group does not affect the result of telomere correlation to another food group. This rule won't work when applied to _dependent probabilities_ , where the earlier tries affects later tries. For example if you draw an ace from a deck of cards (P=4/52) and don't place the ace back in the deck, the probability of drawing another ace is lower (P=3/51).

[3] [https://www.livestrong.com/article/506649-foods-that- boost-t...](https://www.livestrong.com/article/506649-foods-that-boost- telomeres-telomerase/)

[4] [https://resources.teloyears.com/diet-and- telomeres/processed...](https://resources.teloyears.com/diet-and- telomeres/processed-meat-not-unprocessed-red-meat-inversely-associated- leukocyte-telomere-length-strong-heart-family-study)

[5] [https://siimland.com/how-to-increase-telomere- length/](https://siimland.com/how-to-increase-telomere-length/)

</comment></comment></comment></comment></comment><comment><USER14> I have a degree in statistics and I've never understood p-values. Even if it's unlikely that you'll get the result you expect with 5% likelihood, there are enough people doing enough tests that you're going to have 5% wrong answers. And that philosophical problem doesn't go away by choosing a different percentage.

Likewise, we're supposed to assume that there is something magical about our prior assumptions? Why? Where is it written that our null and alternative hypothesis should conform to what is true, when our best ability to predict the future (as people) is based on our past experience? The world doesn't always behave predictably, and yet that seems to be baked into the assumption of every regression test ever run. Completely bonkers if you ask me.

<comment><USER15> > Likewise, we're supposed to assume that there is something magical about our > prior assumptions? Why?

Because that's how the math works. It isn't possible to compute a posterior without first having a prior, so you have to decide on a prior _somehow_.

You can dress it up and try to hide it, but you can't avoid Bayes' theorem forever.

<comment><USER16> Well, you can report odds ratios (or their log).

<comment><USER15> That's good advice in general, but doesn't really answer the question of "How likely is it?".

<comment><USER16> Right, because you can't answer that without prior information. Log-odds is a step towards giving a function of prior information (but it is limited to the actual class of hypotheses investigated).

</comment></comment></comment></comment></comment><comment><USER17> I am pretty surprised to see no discussion of statistical power in the article and very little mention in the comments here. To me, having more statistical power solves many of the issues mentioned in the article. Many of the rest can be handled with use of Bayesian priors, context-specific p-values thresholds (.01, .1, etc.), and replication.

There's decent working guidelines for statistical power, but a lot of the issues (especially around replication) I see are mainly due to sample sizes being too small to adequately detect effects, especially if those effects are small.

<comment><USER18> Can you recommend any texts, videos, or websites to learn more about statistical power? The term is quite overloaded in google.

<comment><USER19> A quick 101: [https://www.statisticsdonewrong.com/power.html](https://www.statisticsdonewrong.com/power.html)

<comment><USER17> See also this, for more specifics on the math involved: [https://effectsizefaq.com/2010/05/31/what-is-statistical- pow...](https://effectsizefaq.com/2010/05/31/what-is-statistical-power/)

The basic idea is: Get more data, especially if you're measuring something subtle.

</comment></comment></comment></comment><comment><USER20> Finally! If only we could really get rid of this largely meaningless 0.05 parameter.

Though I would have personally used _statistically_ instead of strictly in the sentence: >Strictly speaking, he says, "there's no difference between a P value of 0.049 and a P value of 0.051."

</comment><comment><USER21> P-values are just a symptom of a much larger problem--the incentives of being an honest researcher don't exist, and the incentives for appearing to generate results are massive. Picking on p-values is like attacking Toyota for contributing to pollution. The problem goes beyond one company and one country.

</comment><comment><USER22> At the very least, Romain Brette suggests to change the wording to "statistically detectable".

I 'm not sure if abandoning tests altogether is good though. What does it mean "it's detectable but not clear" for communication? How do you e.g. communicate global warming like that?

<comment><USER23> I usually don't see climate science being communicated with p-values and poor significance cutoffs. The place where you usually see this used is for communicating single study results (which often enough are things that you probably shouldn't communicate at all).

To get an idea how climate science is trying to communicate look at the summary for policymakers of the SR15 report: [https://report.ipcc.ch/sr15/pdf/sr15_spm_final.pdf](https://report.ipcc.ch/sr15/pdf/sr15_spm_final.pdf)

They have different confidence levels they indicate instead of a single cutoff.

<comment><USER22> That's not different than communicating significance with p < 0.05 , p < 0.01, p < 0.001 etc as is usually done in paper. There is again a cutoff.

<comment><USER24> Cutoffs aren't the problem. They are inevitable; the logic is virtually identical to the question "Why can you drink at 21 and vote at 18?" Of course the Responsibility Fairy doesn't visit you that night and make you suddenly able to handle it when you weren't the day before, it's just that at scale, you don't have much choice but to operate that way because everything else is just too expensive.

The problem with p-values is that the shape of the resulting cutoff just isn't what we're looking for. We want something along the lines of "What is the probability that this hypothesis is true, and how true is it?", and "What is the probability that this result could have happened even if the hypothesis is false?" is only an approximation at the best of times, and at worst, downright misleading. That's true even before we consider some of the other issues that my English kind of elides over, but the math contains; one of my problems with significance testing as it is commonly done is that there are actually ranges of hypotheses, and it _really_ overprivileges "the" "null" hypothesis; I could write a decently-sized HN post just criticizing those two quoted words.

There is no rigid process that can produce the answer we really want, but I think we can provide a selection of better default tools. An example of one that has already been deployed to some extent is "power analysis", which is not a direct answer but lets people crafting studies analyze how big their studies will have to be before running them. We can build more tools like that.

<comment><USER22> > "What is the probability that this hypothesis is true, and how true is it?", > and "What is the probability that this result could have happened even if > the hypothesis is false?

The first is impossible to calculate by definition. The second can be derived from p value. Virtually all journals require rigorous reporting of p values along with averages, and the justification of the statistical test used.

<comment><USER24> You've mangled my sentence in your quote. The rest matters. It may not be a masterpiece of the English language, but I already said the first is not directly possible and I wrote the second as a description of p-values quite on purpose.

"Virtually all journals require rigorous reporting of p values along with averages, and the justification of the statistical test used."

That's begging the question. The entire topic of conversation is whether or not the standards of justification are adequate.

<comment><USER22> ah yes i agree with those. As you said, the selection of hypothesis is the actual problem, and statistical power doesnt solve that one either.

There are some scientists thinking over this though. This is an idea from a neuroscience lab: [https://www.researchmaps.org/](https://www.researchmaps.org/)

The idea was to create causal directed graphs for biology from the literature , which would be used identify what experiments are missing and thus inform future science.

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> I think the best term would have been statistically surprising, because it strongly hint at the fact that the result would be surprising under the null hypothesis, witch really is all that "statistically significant" really means. Sometimes surprising results happen, but all other things being equal they might hint at the null hypothesis being false. I could also live with "statistically interesting". "Detectable", suggested in another comment, seems to have some of the same issues as significant, it is too strong and seems to imply that now we know something is really there.

<comment><USER26> By the reasoning behind significance, "surprising" would be a great drop-in. However, in most studies, it would be more surprising if the null hypothesis were true. Statistically significant results are pretty much a given.

</comment></comment><comment><USER27> There's no way to guard against all false positives. And while changing the P value cutoff would reduce them, it would also increase false negatives.

The answer doesn't lie in hard-line stances for or against P values or with an alternative that will have its own set of problems. It lies with greater education of those who run experiments & those who consumer the literature about proper interpretation and other methods of analysis that should be used along side it.

<comment><USER28> Other small things could help, like publishing failures, incentivizing duplication of experiments, increasing access to results.

<comment><USER27> I think duplication and access to raw data would be two huge steps forward. It's actually a bit mystifying that researchers are able to present their own final conclusions & interpretations without making the actual data available.

</comment></comment></comment><comment><USER29> The problem is not with using statistical significance as a mean to accept or reject a hypothesis (ie. the scientific method). The problem is P-hacking (effectively, choosing your results then customizing analysis to obtain them).

It's not the statistical analysis that's the problem, it's the bad "science" and irresponsible journalism.

</comment><comment><USER30> Although well written, this article misses the main point why statistical significance leads us astray and needs to be deemphasized. It is because "reproducibility" needs to be the new gold standard that displaces "significance testing". There are too many highly significant results that are totally unreproducible.

</comment><comment><USER31> There's a reason particle physicists want to see a five sigma effect before they believe a detection is real.

<comment><USER32> Start funding psychology etc like we fund physics and the problems would be much smaller. Most studies are underpowered. It's not because scientists are lazy, it's because they're busy.

</comment></comment><comment><USER33> "More than 800 statisticians and scientists are calling for an end to judging studies by statistical significance in a March 20 comment published in Nature."

While their sources are supporting this statement, I'm getting mixed signals.

[https://www.nature.com/magazine- assets/d41586-019-00857-9/da...](https://www.nature.com/magazine- assets/d41586-019-00857-9/data-and-list-of-co-signatories)

This is their primary source, of the statisticians calling to retire statistical significance. However, their primary reasoning is because statistics is misused to make erroneous conclusions. It seems like there is a lack of understanding about the philosophy and mathematics behind statistics that's the problem by its practitioners, not statistics itself.

</comment><comment><USER34> Major problem with "significance" is that in some areas of research (say psychology), it's possible to gather lots of data(let 1000 people fill complex questionnaire) and from that data to fish for theory that's significant (in your sample Republicans might have been dumber than Democrats). But given the size of the sample and number of theories you test, you are bound to find something significant even if that isn't true.

Tightening significance threshold just makes this fishing more difficult, Bayesian reasoning doesn't help much either, because you have to guestimate reasonable priors. What does really help against fishing like this is requirement to preregister your studies.

<comment><USER35> Many people talk about preregistration, but I'm not sure it would result in the hoped benefits.

What I predict would happen: \- either lots of studies are allowed to preregister, most of which cannot reject the null hypothesis. You end up with a lot of "boring" null-result papers in those high-profile journals that nobody gets excited about and nobody gets promoted for and no media coverage happens, bad marketing for universities and research centers.

\- or there would be a strict filter for the pre-registration, so that researchers cannot chase their gut intuitions, some authority would need to approve the study even before it's done. This hinders research and hinders the dissemination of truly unexpected discoveries.

The human incentives are way deeper than any one solution could touch on. The whole science funding structure requires flashy and sexy results that are just not possible to produce on that scale.

<comment><USER36> > or there would be a strict filter for the pre-registration, so that > researchers cannot chase their gut intuitions, some authority would need to > approve the study even before it's done

I see two things going on here.

Having additional 'oversight' for the scientific validity of a planned experiment, is presumably a good thing.

I don't see that it would be necessary to set out to prevent researchers investigating their intuitions.

</comment></comment></comment><comment><USER37> I'm not a statistician, just a biologist. But I have seen some pretty low P-values indicating two distribution have a differing mean while the plot right on top of each other. This is when there are a lot of measurements (in my case there were over 100.000). I prefer to make ROC curves or simple just to look at the plotted distributions. ROC curves give a nice idea about the mixed-ness of positive and negative measurements.

</comment><comment><USER38> This gets at the heart of fake science. Everyone today thinks surveys or studies are science.

The purpose of a paper is supposed to be to contribute something new to a field, not just perform a statistical study.

But you or I cant say that now as so many organisations use "studys" as the basis for their field while maintaining that they are scientific.

For me, the fact this is even being discussed really is good news.

</comment><comment><USER39> Here is a related article on NOVA. [https://www.pbs.org/wgbh/nova/article/rethinking-sciences- ma...](https://www.pbs.org/wgbh/nova/article/rethinking-sciences-magic- number/)

</comment><comment><USER40> p=0.05 is an absurdly low bar even with an extremely well-defined hypothesis. Once you open things to p-value hacking (i.e. trying a bunch of hypotheses until one seems significant), p=0.05 is almost guaranteed for one of your hypotheses and is hence meaningless.

The physics community is pretty good about dealing with both of these shortcomings. You often need a lower p-value of around p=0.003 (3 sigma) or lower to say something was significant, and a few more sigmas to claim an actual discovery. And in addition to this, you're expected to include a trials factor to correct for multiple hypotheses. It's not perfect, but it makes claims of statistical significance more meaningful.

</comment><comment><USER41> I tried convincing people of this ten years ago. Others have been trying for something like half a century.

I am very happy to see it in Nature.

</comment><comment><USER42> Can someone help me understand the concern about p-value hacking?

One of the comments below references this XKCD comic [0], which IIUC is an example of p-hacking.

But in that comic, the only difference I notice between the original hypothesis (jelly beans cause acne) and the p-hacked hypothesis ( _green_ jelly beans cause acne) is whether or not the hypothesis occurred to the researcher at the _beginning_ of the study. And I don't understand why that would bear on the importance of each hypothesis.

[0] [https://xkcd.com/882/](https://xkcd.com/882/)

<comment><USER43> We already expect data to sometimes indicate significant evidence against the null hypothesis when the null hypothesis is actually correct. That's just the nature of the way we structure our statistics practices. But for each additional set of variables you have and could test for relationships, you increase your chances of finding a strong relationship that appears to be significant due to random chance, but was in fact not. (You may notice that this is just a different flavor of the issues that arise from the way researchers use significance tests).

The reason you need to pick your hypothesis ahead of time is because otherwise you may use intuition or just your eyeballs to find relationships in the data that are only there due to random chance. This will supposedly increase the probability of detecting spurious relationships and erroneously rejecting the null.

<comment><USER42> Thanks, although I must admit I'm having some trouble following your logic.

IIUC, you're pointing out that when examining the empirical data gathered during an experiment, it's often possible to find some identifiable subset of the data that are consistent with a _refined version of_ the original hypothesis. E.g., maybe jellybeans in general don't correlate with acne, but _green_ ones do.

Assuming that the experiment is part of a larger effort to build or refine some model, I don't see the problem.

Suppose that someone refrained from p-hacking during the first run of that experiment. IIUC, they'd look at the experimental results, and wonder if they had missed some "X" factor. So they might conject that jellybean color was relevant, and rerun the experiment with the hypothesis, "consumption of jellybeans, but only of a particular color, correlates with acne." And (assuming sample sizes were big enough), the data gathered during that second experiment would likely confirm that green jellybeans correlate with acne.

But what's the point of having run that second experiment, when they could have just reached the same conclusion by testing additional hypotheses from the first experiment's data?

It seems like regardless of whether you just ran one experiment and did "p-hacking", or instead ran a follow-on experiment, you end up with the same refinements to the model you're working on.

</comment></comment></comment><comment><USER44> IMO the expression 'statistical significance' is a big part of the problem. Popular reporting of research translates a tiny but discriminable effect size into a SIGNIFICANT effect. Changing the nomenclature to 'statistically discriminable' would go a long way to improving popular understanding.

<comment><USER45> > _Changing the nomenclature to 'statistically discriminable' would go a long > way to improving popular understanding._

I think you overestimate the intelligence of people prone to misunderstanding. I don't think they're likely to understand big words like "statistically" or "discriminable" when they already don't understand big words like "statistical" or "significance".

<comment><USER46> _when they already don 't understand big words like "statistical" or "significance"._

They do understand what "significant" means, they use the world every day. The problem is that it means something different than the intuitive every day meaning when used in context of p-values. Using a word like "discriminable" might help clear things up since it's a word that doesn't have have so much meaning packed into it already.

It's like when a mathematician says that something is "almost always" true, they mean something very different than when a non-mathematician says something is almost always true.

<comment><USER45> > _The problem is that it means something different than the intuitive every > day meaning_

Yes that's my point. Using words that are hard to understand or only understandable in the context of P-values won't solve the problem; the problem being that the general public won't understand the subtle differences in meaning

<comment><USER46> I'm not sure. I think much of the confusion comes from people instinctively applying their every day understanding of the word "significance" and falsely believing they understand what it means in the statistical context. Had it been called statistical confliburance or some other made up term then they wouldn't think they knew what it meant and might find out what it actually meant.

</comment></comment></comment></comment></comment><comment><USER47> I always thought p-values were arbitrary.

Frequentism is antiquated.

</comment><comment><USER48> tl;dr:

> Is there a better way to judge if a study is solid?

> Unfortunately, there is no single alternative that everyone agrees would be > better for all experiments.

<comment><USER49> How about replication?

<comment><USER50> Replication until statistically significance is found?

<comment><USER49> In a way yes, because replication lowers the risk that the findings in a single experiment are due to random luck. Anyway there's no way around avoiding replication when you want to prove something.</comment></comment></comment></comment>


Millennials more likely to use Google Apps than Office 365 - <AUTHOR> http://blog.bettercloud.com/google-apps-vs-office-365/?utm_source=hackernews&utm_medium=hackernews&utm_content=gapps_v_o365&utm_campaign=sharing_contest <comment><USER2> No surprise here. I've tried both of these online services, and Google Apps way more usable than its Microsoft counterpart.

<comment><AUTHOR> Yeah, I think the argument really boils down to power vs. usability. Google Apps may lack the powerful features the desktop Office provides (particularly Excel and Outlook), but if you know how to use Google Apps, it can be really powerful. Drive especially is really on a different level in terms of collaboration / usability than OneDrive imo.</comment></comment>