Learn Ruby Science – Book in progress - <AUTHOR> https://learn.thoughtbot.com/products/13-ruby-science

<comment><USER2> I respect Thoughtbot and their contributions to the Ruby community, but the section on smells glosses over way too much.

Here is the link to the sample: <https://learn.thoughtbot.com/ruby-science- sample.pdf>

And here are some counterpoints:

Long methods are not as easily testable, but overly short methods can make code much harder to read and follow and actually _increase_ complexity, because now there are many more entry points, leading to excessive nil checking, etc. for those practicing paranoid TDD.

Even the developers of Rails are not sold on the promise of the null object pattern, and as it states as almost an afterthought that "it can lead to confusion" (paraphrased). If you are a developer, _especially_ one that is a refugee from a more "type-safe" language, you are more likely to assume that:

an_object.a_method

Will fail if an_object is nil/null. By making an_object a null object, then you can end up with is_a?(NullSomething) when other programmers are using your API, defeating the whole purpose of trying to avoid additional try's and other checks in the code. It can be a bad code smell to _use_ null object pattern in many situations.

Case statements can be a bad code smell, just as is_a?(...), but not in every situation. Often they can be a clear and concise way to get the job done. In Java the switch statement was ridiculed, only to produce a whole generation of Java developers that either had chained if's or would create 3x the code just to introduce a pattern for simple logic!

So, if the rest of this book is like this, please take it with a grain of salt. It is a reference for another way of thinking about things, but if you are going to do that, read "Design Patterns" by the GoF and "Refactoring" by Martin Fowler also. And then forget all of that and try to write DRY Ruby code in as few lines as possible without tests to get a feel for that. Then give both up and seek a middle ground. In this way, you will be like Bhudda. Neither conservative "tests, patterns, and refactoring is the only way or you are shunned" nor liberal "it doesn't matter how you write it, just write what you like" are the ways to enlightenment; it is the way between them.

<comment><USER3> Agreed on method extraction; overuse will just introduce more hoops to jump through when trying to understand the code. Unless you're moving methods to other classes, though, you can avoid adding entry points to the API by extracting methods as private. We use private methods to reveal intent, break down large methods, and reuse behavior within a class.

Also agreed on Null Object. I tried to make it pretty clear in the chapter that it's not a one-size-fits-all kind of solution and must be used with care. I strongly advise against using is_a?, ===, or case statements to check for null objects.

You can define present? to be false on your null class if you NEED to check for a null object, but the pattern is only useful when the higher level code (views, etc) don't need to care about whether or not the object is null. If you have to add present? checks to everything, I'd advise against using null objects.

The book is also trying to highlight that "middle way" you're talking about. Each chapter tries to outline the benefits and drawbacks of using a particular approach. We've stressed that you don't need to "fix" every code smell you find, and that the solution depends on the specifics of an application. The book is designed to give developers a better understanding of the methods for finding and fixing problems, and the solution chapters try to give the developer the ability to decide what the best solution is for a specific situation, rather than trying to achieve an "if x then you always y" kind of approach which doesn't work in the real world.</comment></comment>


The End of the American Experiment Is Over. So What Can the World Learn? - <AUTHOR> https://medium.com/bad-words/the-end-of-the-american-experiment-9bc855ad0cc2 <comment><USER2> >"Thus, in America today, there are no broad, genuine, or accessible civilizing mechanisms left. As a simple example, America's best universities churn out…hedge-fund traders. It's economy is largely composed of…paper gains to the .01%. It's media debates…climate change. And so on."

At least we know how to distinguish "it's" from "its"...

But seriously, the whole piece is silly. Our society embraces diversity of thought, that's part of its design. Yet this guy interprets that diversity as a failing. I guess he fails to grasp one aspect of the American experiment; to construct a nation where people can live in freedom even when that freedom inevitably makes things uncomfortable from time to time.

He points to the disagreements and extremists and claims these are somehow the harbingers of America's end.

He clearly hasn't studied American history. We've been arguing since our founding. We've debated everything there is to debate. We suffered a civil war and have nearly torn ourselves apart many times throughout our history.

America is a tremendously diverse nation so we are bound to argue with each other since we bring so many different perspectives to the table. Just because we are more aware of these debates now, just because they are most visible and visceral, doesn't mean they are a new development.

Our companies are some of the most powerful and innovative in the world, and our universities are the best in the world. We have produced and continue to produce fundamental breakthroughs in science and technology.

The American experiment is not over, regardless of how much this guy wishes it was.

</comment><comment><USER3>
      its potential lies in ruins.

[https://en.wikipedia.org/wiki/The_Fox_and_the_Grapes](https://en.wikipedia.org/wiki/The_Fox_and_the_Grapes)</comment>


Show HN: React-wastage-monitor - <AUTHOR> https://github.com/MalucoMarinero/react-wastage-monitor <comment><AUTHOR> Heres a blog post explaining why we did this -> [https://blog.listium.com/introducing-react-wastage- monitor-4...](https://blog.listium.com/introducing-react-wastage- monitor-404565d679b2)</comment>


How to screw with those firesheep snoops - FireShepherd  - <AUTHOR> http://blogs.forbes.com/andygreenberg/2010/10/28/how-to-screw-with-firesheep-snoops-try-fireshepherd/

<comment><USER2> From what I've read of FireShepard, it's a really bad countermeasure. Basically as described it's doing a DoS attack on people using FireSheep, probably triggered by a coding error that could be fixed.

Two big problems

1) What if the DoS affects other parts of the infrastructure like the Wireless Access Point. Can't imagine hotspot owners will be too happy if people start doing this all the time.

2) False sense of security. Using FireShepard is unlikely to stop other means of getting access to the data (eg, kismet), it only stops FireSheep (for now).

<comment><USER3> Plus it probably can be fixed easely by FireSheep with an update.

If FireShepard were to flood the network with fake personalities and their cookies instead, it might help hiding real accounts.

<comment><USER4> yeah, and if each fake personality lead to a rick roll or worse...

<comment><USER5> Wouldn't be subtle enough.

</comment></comment></comment></comment><comment><USER6> This a naive question, but what would prevent Google from buying one of the trusted CAs (or fast tracking their own service into most browsers) and knocking the bottom out of the cert market with a free and easy SSL solution?

It doesn't make much business sense, but it fits in with some of Google's more philanthropic initiatives for a healthier net.

<comment><USER7> As I understand it, certificates are not the only problem. SSL requires significantly more overhead on the server as well, which is why it is commonly used just for logins.

<comment><USER8> The overhead of running your webserver itself of SSL isn't that huge a deal. But it usually means you also need to load all images and static assets off a HTTPS server, which makes things a bit more complicated than just throwing them on a cheap CDN. And, of course, using HTTPS means you skip any caching proxies that are between you and the user.

</comment></comment></comment><comment><USER9> A better solution would be for those sites targeted by FireSheep to force encrypted connections to login.

Also a simple fix for open networks is to enable WPA encryption with a simple password and give it to everyone that wants to use the network. It works the same to the end user (just one extra step) but at the same time protects them from unwanted snooping.

On a side note, all those coffee shops that don't like people solely using their networks and monopolizing tables, this news could push people to use unsecured networks less.

<comment><USER10> Actually, just encrypting the login is not enough. FireSheep steals session keys, not passwords. Everything that needs to have the session key needs to be served over SSL.

<comment><USER9> That's what I meant, but obviously didn't explain it correctly. Thanks for the correction.</comment></comment></comment>


Is SEO Dead? - <AUTHOR> http://www.startupwhisperer.com/2010/04/is-seo-dead.html

<comment><USER2> SEO is not dead it's just been entered by players with more money to spend for each search than this author. It's pretty irritating that so many searches on google are compromised by pseudo pages that contain shit and a link to what you are looking for. These companies mine google for searches where it's easy to get into the top 10 and then utilize their content farms to spew garbage on the net. It will be interesting to see what google can do to combat this. search results have really taken a turn for the worse in 2010.

<comment><USER3> The hope I can give you: Google employs a pretty smart guy, Matt Cutts, who heads a team of other smart people dedicated to breaking the problem you're complaining about. It's in Google's best interest, because if search results return crap, we'd all find something else. Good help us, we'd end up using Cuil or that Wolfram thing or something.

<comment><USER4> Or duckduckgo

<comment><USER3> DuckDuckGo! I have to check that out. Keep hearing about it.

</comment></comment></comment></comment><comment><USER5> In 2010, search engine traffic continued to rise aggressively. More searches have been conducted each month, more people are using search engines each month. The growth may not be as stratospheric as Facebook's, but the rise of social media has not in any way affected the fortunes of web search.

Until I can use Facebook to find everything I need and it does a much better job than Google, I can't see how they're going to kill SEO... That, and SMM (Social Media Marketing) is essentially an offshoot of SEO and something web marketers pioneered when they realized they could get SEO value from it (back in 2004-2005 before "social media" was a buzzword).

Danny Sullivan has written excellently on this topic many times: [http://searchengineland.com/an-open-letter-to-derek- powazek-...](http://searchengineland.com/an-open-letter-to-derek-powazek-on- the-value-of-seo-27680) [http://searchengineland.com/is-seo- dead-1997-prediction-meet...](http://searchengineland.com/is-seo- dead-1997-prediction-meet-2009-reality-32113)

</comment><comment><USER6> No, it's not. Social networking and traditional search are orthogonal. Of course Google wants a piece of that action, because it's obvious that social networking traffic is big, and has more growth potential than traditional search at this point. But the value of ad inventory on Facebook is absolute horseshit, so it's not as if they'll be dwarfing Google profits any time soon. No amount of social features can replace search, and search will always be more intentioned then the kind of viral loop that Facebook has made a science of.

</comment><comment><USER7> Search engine traffic is and always will be the best traffic source as it is most targeted. But the worst is a lot of spam that google is showing more and more often...</comment>


Ask HN: My first Startup Weekend - <AUTHOR>

Hello all,
I work for a small newspaper on the Central Coast of California. Santa Maria, Ca to be exact.
Someone has organized the first ever Start-up Weekend in my city (that I'm aware of). Since joining the hacker news community I have always wanted to attend one, but my geographic location and the feeling that my skills are sub-par has always stopped me. Now that this event is in my backyard, I don't have an excuse to not attend.
Being in an Agricultural/ Farming community I don't know how big of a tech community there is here.
I don't have an idea to pitch, but I am very interested in getting involved in a start-up.
Any advice on what to expect, or how to approach the whole event?
Thanks in advance.
http://santamaria.startupweekend.org/ <comment><USER2> I wrote about this a few months ago : [http://www.lengrand.fr/2012/12/how-we- won-our-first-startup-...](http://www.lengrand.fr/2012/12/how-we-won-our- first-startup-weekend/)

Basically, No need to be technical. I would even say that being not technical is better than being too much. The whole experience is awesome. You meet so much cool people.

Just go and enjoy, you'll surely get inspired :).

</comment><comment><USER3> Just be yourself. Though you should make an effort to talk to people, shake hands. Join in group conversations. Buy a beer or two to people you find interesting. That's pretty much it. Oh, and have fun.</comment>


Neural network intuition - <AUTHOR> https://medium.com/@ruchitrawal22/neural-networks-intuition-ad1f8efcaada <comment><AUTHOR> A short overview of why DL is taking off and why neural networks kick ass</comment>


DIY Masters in Computer Science - <AUTHOR>

I have been experimenting with Do-It-Yourself learning. This year I thought of actually doing a self-study masters in Computer Science and understand if it is possible for someone to be able to do a DIY masters, to gain knowledge and build credentials.
If successful I am also hoping that my experiment will demonstrate a process which can be used by self learners.
What do you think of this experiment, and the process? Can you suggest any changes in either?
Here is the main page where I am consolidating everything.
http://opencs.wikidot.com <comment><USER2> Clickable: <http://opencs.wikidot.com>

<comment><USER3> Very cool idea. I do not have a formal degree in comp. science and most times I feel that there so many things that I don't know which I ought to know. Is there any place where I can do a DIY undergraduate comp science degree?

<comment><USER4> Well I don't think an UG DIY degree would be a good idea. The UG degree has more courses than the PG (as they should be, so you have atleast a basic survey of the key topics in CS). This increases the workload on the student. Further more, the UG degree is not only about getting the knowledge. Its an essential part of social life one must go through. Joining clubs, games, groups build your character. This is likewise true for Masters courses. Its not only about the knowledge, its also about the exposure you get out of the Uni. campus.

<comment><USER5> Useful part of social life, perhaps. Essential, I disagree. Furthermore, someone could get these experiences elsewhere. Finally, the poster didn't state that they didn't have ANY degree, just that they didn't have a CS degree.

Of course, your post might be satirical; in that case, just ignore me ;-)

</comment></comment></comment></comment><comment><USER6> Of what is worth careful study in computer science, your old Master's in CS likely is still just fine.

For what you want to learn now, e.g., Web site development, profs in a Master's program in a CS department likely won't know it either. Uh, they don't spend their time doing Web development! So, what you want now really isn't an up to date Master's or a Master's in Web site development.

If you want 'credentials', then give people the URLs of some Web sites you've developed -- in the job market, that's mostly regarded as the best 'credentials' anyway.

Like essentially everything else in such 'practical' computing, if you want to learn Web development, then develop some Web sites and read and learn what you need to know as you need it.

My Web site is based all on Microsoft software. So, the Web site itself is based on ASP.NET and the .NET version of Visual Basic. When I need to interact with SQL Server, I use ADO.NET.

To start, I got a copy of Buyens book, 'Web Database Development, Step by Step, .NET Edition', which is quite well written for an introduction.

I also have the Belena's book on Visual Basic 2005, and it is helpful.

For most of the rest, I've downloaded about 1000 Web pages of documentation from Microsoft's MSDN, etc. sites. As I keep developing, I keep downloading: If do anything a little new, then I download another 30 pages or so.

To store the downloaded pages, I have one directory for each of Visual Basic, ASP, ADO, etc.

Then, in each directory, to find things, I have a file I maintain with my favorite general purpose (programmable) text editor that has an 'abstract' of each Web page I've downloaded. So, those directories are my main source of what I need to know.

In addition, for some questions, I search Google and find other Web pages and download and abstract those similarly.

The Express version of SQL Server Management Studio can be helpful when getting started, e.g., setting user names.

I do my Visual Basic programming and ASP.NET programming just using my favorite text editor, In my source code, I document what I'm doing, e.g., often will give a reference to documentation details. So, when I download a page, the HTML part goes to a file, and I can put the tree name of that file in a source code comment and, with one keystroke of my editor, have my favorite Web browser display the file. Or if the detail is in Buyens, etc., I can put the page number in a comment.

In the end, code samples are good, and there many of those.

For SQL Server, I'm mostly just using the MSDN pages. So far I just write simple T-SQL code, executed via ADO.NET or just the command line SQLCMD.EXE that comes with SQL Server.

Yes, one 500 page book, another 600 page book, 1000+ Web pages is a lot to work with, but I've had no trouble understanding what I've read and making corresponding code work.

If you want to develop with Microsoft's .NET, etc. the above is a good outline and should be enough to get you started and, then, self sufficient for as about as far as you want to go. For versions of Unix, likely something similar would work.

Uh, in the history of the US computer industry, actually university courses have had relatively little to do what what the workers learned that they needed to know.

</comment><comment><USER4> Why not make a UofReddit course out of it? Rope in a mentor for what you want to learn. Make a four/five week study plan and do social learning. While that would somewhat give you the credentials and openness that you want, it will take away some of the flexibility.

<comment><AUTHOR> UofReddit seems very interesting. Will check it out.</comment></comment>


Show HN: Managed Contracts and ICO as a Service - <AUTHOR> https://crowdsale.express <comment><USER2> Is this the same as tokensale.pro? Token Sale as a Service.

I came across them yesterday. I've seen at least one job posting for a dev to code a token sale/ICO. Seems like there _may_ be demand for this type of thing.

</comment><comment><USER3> Wish there was more clarity on how they manage the tokens. Assuming this is ERC20 compliant but do they add their own backdoors to manage the tokens on your behalf? They should publish their token source at least.

</comment><comment><USER4> I am trying to be objective, but how is this on the first page?

<comment><USER5> It takes time for mods to see and sort a new story. In this case I think they'll realize it's just a signup page, remove the "Show HN" from the title, and bump it to near the bottom of the page.

It's better to give new stories some time near the top, otherwise legitimately interesting stories will fall through the cracks.

<comment><USER2> They didn't change the title from a fake-news title with the 'Digital coins may be on the verge of going mainstream' story. 15 hours ago!

I think the mods are on holiday.

</comment></comment></comment><comment><USER6> Rad gradients!</comment>


The Rule of 72 - oscar-the-horse http://www.horsesaysinternet.com/other/the-rule-of-72/ <comment><AUTHOR> There's an interesting lecture from Albert Bartlett [ _] on the same subject, but he uses the value of 70 to calculate the years to double. [_ ] <http://www.youtube.com/watch?v=F-QA2rkpBSY></comment>


C++ Programming Questions to Ask on Interview (2017) - <AUTHOR> https://tests4geeks.com/cpp-interview-questions/ <comment><USER2> I write c++ high frequency trading systems, but I think I'd have to look up the answer to most of these. I've heard of all of them, though, and I know roughly what the point of them is.

Your problem when interviewing someone is that in real life, you are relying on the person being quick to learn, since they are unlikely to have the answer in cache. Maybe if they'd just read Stroustrup they'd know some of the specifics, but most coders would know what the point was and google it.

You have to wonder that a fair question is. I supposed you should know of a bunch of things about c++ (why you're using it, major features like templates), without knowing all the specifics (SFINAE/CRTP examples). For instance it's fair to ask someone what a memory barrier is. But not to list all the varieties (relaxed, acquire, etc).

I've hired a number of c++ devs in the last few months, and all of them have turned out fine. I never asked anything particularly specific like this list of questions, just poked around the very large house that is c++. What does the candidate think changed in c++11? Why are we using it for HFT? What kind of thing will slow us down?

I think if I'd asked these questions I'd have dropped a lot of perfectly fine candidates.

<comment><USER3> Regarding HFT, how much is C++ and how much is FPGA? I always thought even CPUs often turn out too slow for that.

<comment><USER4> There's HFT systems in Java, and OCaml. I'm not an _expert_ in these domains but since markets are only open for certain hours of the day, you can pre- allocate enough memory and just not collect till after the bell rings. In my understanding.

</comment></comment></comment><comment><USER5> Some of this is straightforward. The rest.... eesh.

I mean, yeah, I guess you can quiz your candidates on their knowledge of stuff like enable_if and ability to write templates based on traits like is_integer, but don't expect that to be a good filter for anything but language minutiae.

And question 10... what on earth is a "max heap". I'm gathering from context that they are asking about a heap in the sense of the packed tree data structure. I've used those, and written those on multiple occasions, so it's not an impractical subject. But (1) if you asked me the question the way it's phrased here I'd look at you blankly and wonder if you were talking about some kind of custom allocator, and (2) _they don 't even want the candidate to talk about the data structure!_ They just want a class definition written for the thing with a handful of obvious interfaces (add, get maximum, y'know... it's just a heap). How is that useful to anyone?

<comment><USER6> A "max heap" is a heap that has O(1) access of the maximum priority element, as opposed to a "min heap" which returns the lowest priority. It's largely a semantic distinction, as a max heap = a min heap with negative keys. Also a heap isn't just a packed tree, it's referring specifically to a heap data structure [1] (which is often implemented using a packed tree, but not necessarily).

This is very common terminology, and honestly I'd expect any CS grad past an sophomore undergraduate level to understand exactly what a max heap is, especially in an interview setting.

[1] [https://en.wikipedia.org/wiki/Heap_(data_structure)](https://en.wikipedia.org/wiki/Heap_\(data_structure\))

<comment><USER5> > I'd expect any CS grad past an sophomore undergraduate level to understand > exactly what a max heap is

Never once heard the term, and I've written several heap-based priority queues over the course of more than two decades of professional work.

So... yeah, I'm too dumb for that filter I guess.

<comment><USER7> Surely you've heard the distinction between the max-heap and a min-heap before...

And honestly, I'm sure if you asked what it was in an interview, you would get a straight answer and not be dinged for it. I would filter based on your saltiness level though.

<comment><USER8> Sounds like their would be mutual filtering.

</comment></comment></comment></comment></comment><comment><USER9> Slightly off topic, but a candidate applying for a _general_ programming position who claims knowledge of C++ in their CV is presenting an absolute gift for interviewers: because, if they actually do know their C++, then they are likely to be a strong candidate overall; conversely, if they are bullsh1tting you it is very easy to find this out quickly.

True story: once interviewed a guy who claimed to know C++; set him a challenge that he couldn't answer, simplified it a bit, still couldn't answer, we iterated down until I discovered he didn't even know how to declare an int variable. Turns out he had been a _tester_ on a system _written_ in C++ ...

<comment><USER10> I'm a C# developer and I've been strongly considering learning C++ in detail because I feel like it would make me a better programmer in general. However getting started with such a complex language seems daunting. Anyone know where one should start? C++11? C++14? Something even older?

<comment><USER11> I very much agree that it helps you understand the "programming stack" much more intimately. If that's what you are after, you'll also have the parts that are relevant to you covered relatively quickly (compared to fully "knowing" C++ which would probably take at least a decade).

I also agree with the other reply that the strongest learning experience is basically in the chronology of the language development. It takes running into a case where they are the best solution to really grasp "why include guards?", "why templates?", "why smart pointers?", "why iterators?" and so on, and you also gain a lot of appreciation for what compilers in other languages do for you behind the scenes.

I also highly recommend [https://godbolt.org/](https://godbolt.org/), which allows you to see what machine code is produced in the end. Seeing all the template magic getting distilled to clean asm is quite amazing.

</comment></comment></comment><comment><USER12> > cannot return 0 from a void [main] function

"A conforming implementation may provide more versions of main(), but they must all have return type int." ~ Bjarne Stroustrup - [http://www.stroustrup.com/bs_faq2.html#void- main](http://www.stroustrup.com/bs_faq2.html#void-main)

</comment><comment><USER13> So in the first question, they test to make sure the candidate knows the minutia that std::unique_ptr<> has no copy constructor.

And in the followup, they assume the candidate will just assume that "SearchQuery", whose header is not shown, _will_ have a copy constructor.

Just no.

<comment><USER12> I looked at that first one and didn't realize it wouldn't compile simply because I would never write something like that anyways. That function should just take an int&.

However, understanding that SearchQuery is broken is pretty important. Breaking the Rule-of-3 is probably the #1 mistake made by junior C++ developers trying to write object-oriented code, and the consequences are pretty nasty. You'll get corruption and crashes from use-after-free and double-free errors and nothing will make sense because the problem will move around as you create temporary copies while trying to debug.

That being said, I wasn't familiar with that sort of stuff when I was first hired as a C++ developer. I was very fortunate to start my career with a company that was willing to hire people and train them.

<comment><USER14> Right now one of the major gripes I have about Modern C++ is RAII / Rule-of- five. After going through all of this stuff I felt it brought too much complexity for what it tried to accomplish...

RAII basically assumes that your objects are always going to be in the init- use-free pattern (you read a file, you use it, and close it after you're finished) In reality not all things work this way, as objects have various different states according to their state machines and will use and free resources depending on that state. But in Modern C++ you're forced to think only in the on/off paradigm, which results in lots of small unnecessary classes with their own on/off state. (If you try graphics programming you'll understand right away...) Now when you add rule-of-five this becomes a monstrosity to handle, as you have to ensure about memory copying/moving for every little RAII class you make.

So why not let normal assignment be shallow copy by default, but have an explicit copy() method? Why is everything so implicit in Modern C++ where you can't assure that by simply looking at a = b you can't tell how memory is allocated/freed...

Nowadays I have lost hope in Modern C++ and are looking for alternatives: Rust (complex but at least memory safe) Orthodox C++ (not memory safe but at least sane for graphics/game programming), or Jai/Zig/other experimental lnguages (which claim to be a better C)

<comment><USER12> I'm a graphics programmer myself. To be honest, my strategy for OpenGL-related resources is to allocate everything I'll ever need at program start and leak everything at program shutdown. It's simple and efficient and all copies are indeed shallow. However, if I was writing more generic code, I would probably make extensive use of movable but non-copyable containers for my OpenGL resources.

You're right that the RAII model sometimes feels a bit limiting for the complexity sometimes found in graphics, but I think part of that was self- inflected by our API design. That seems to be changing. The best-looking technique I've seen for handling Vulkan/DX12 is to make your program more like a compiler. You take a scene as input and you compile it into a command buffer to give the GPU. Your resource handling for stuff like texture slots thus looks more like register allocation. State shadowing is a trivial optimization pass when your GPU code is data.

The problem is that when you write RAII classes for GPU resources in the traditional way, C++ sees the GPU state through a tiny pinhole and thus can't optimize very well. When you treat your GPU commands as a program that your C++ program is building, you have more global information about GPU state available, which allows you to make more efficient choices.

</comment></comment></comment></comment><comment><USER15> These questions seem pretty good!

In the max heap question, I'd argue that add _should_ take a parameter by value, rather than a const reference, since this prevents having to needlessly copy temporaries (and is less verbose than overloading for T&&).

List of iterator categories is missing input iterators.

</comment><comment><USER16> My reading of their moving assignment operator is that it is wrong, or at the very least unclear.

Basically they do std::swap on query field. In that case you are relying on the destructor of the moved object performing the delete (if necessary). I would argue that that falls into the "too clever" spectrum, and also kind of assumes that no one is going to refactor the destructor at some point in such a way that some other property will result in them incorrectly thing that the query is null, and so leaking it.

Having now read through this, I agree with others assessment - these questions are questionable at best. What is it they're proven to do?

<comment><USER7> I think relying on the destructor of the moved-from object running feels idiomatic to me. That's what the destructor is there for after all.

<comment><USER16> The destructor deleting its /own/ data. But here we are moving a bunch of the fields (and so clearing them) but swapping one of them. That seems like bad coding, and doesn't match any idiom I've seen :-/

<comment><USER17> for vectors it makes std::move a very fast operation

<comment><USER16> std::move on vector zeroes out the source element array.

e.g. (pseudo-ish code)

operator=(vector&& foo) {

delete [] elements;

elements = foo.elements;

foo.elements = nullptr;

}

what the example code they have as an answer does is something morally equivalent to this:

operator=(vector&& foo) {

swap(elements, foo.elements);'

}

relying on the knowledge that because it's being moved the ~vector is going to be called immediately afterwards.

This strikes me as being "clever" in the "potentially confusing code, for no real reason" sense

<comment><USER18> actually that move assignment operator is not ideal. The foo parameter won't be destroyed immediately but only at the end of whatever scope (if any) it was at the call site.

The idiomatic copy and swap is like this:

T& operator =(T x) // note pass by value { std::swap( _this, x); return_ this; }

This acts both as a normal and move assignment operator (if T is not copy constructible);

edit: how do you get HN to show asterisks? There should be one before each 'this'

<comment><USER19> Prefix each line with 4 spaces:

        T& operator =(T x) // note pass by value
        { std::swap(*this, x); return *this; }

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> Wow. Haven't gone near C++ for 12+ years. It done got weird.

<comment><USER21> This is why Go and Rust are coming into their own. C++ is a clusterf*ck of complicated design decisions (note, I didn't say bad, just complicated). It's certainly a powerful language for systems development but one has to wonder if it needs to be. Anytime I see a language overdo it on the features, my sense is that they need to step back and survey the landscape of developers before they decide to add more stuff.

</comment></comment><comment><USER22> I like that each question has a purpose. It's an interesting problem to determine a (small) set of questions that "cover" the (large) space of C++ knowledge in the sense that if someone can answer them all, they likely have a strong knowledge of the language.

> The interview candidate might think that returning a noncopiable object from > a function is also a compiler error, but in this case it's allowed, thanks > to copy elision. You can ask the candidate under what conditions copy > elision is performed.

This isn't copy elision. Copy elision isn't even permitted here because the returned expression is the name of a function parameter. The two-stage overload resolution that tries a move constructor first is defined in the same section of the spec, [class.copy.elision], as copy elision but the rules are different and it is always performed, even if the implementation doesn't do copy elision.

</comment><comment><USER23> Writing safe, idiomatic C++ is hard.

Most C++ code found in college books is outdated and not idiomatic, driving students away from the language.

But it is true that C++ can also be your worst nightmare if you don't have discipline.

C++ will turn your bad coding habits into infinite frustration... and that is great. C++ is the proof you really like programming.

</comment><comment><USER24> I wrote C++ for relatively complex embedded guidance/positional apps for 5 years. I think I did it reasonably well - definitely better than 80% of my colleagues. Since then (10 years or so) I've been C# almost exclusively.

This makes me hope I never have a need to go near that language ever again.

</comment><comment><USER25> I remember a time where mastering Stroustrup and the two Scoot Meyer was enough to be considered an expert. Even as a Perl lover, the level of intricacy of modern C++ makes me very reluctant to choose it on a new project.

</comment><comment><USER26> These questions are quite simple. I wouldn't use them to find good C++ developers.

However, it's quite hard to come up with good C++ interview questions. You want to test for fundamental knowledge of C++, for the practice of using C++ for developing code, but avoid impractical cases that nobody remembers in their right mind.

Every interviewer has his own favorite C++ trick. The fact that an interviewee doesn't know or use that trick doesn't mean that his C++ skills are inadequate. It means that the interviewer's trick may not be as commonly used as he may think.

</comment><comment> Const-me OK I'll bite.

1 - knowing this is 100% useless information, in reality I have a compiler to tell me that.

2 - Seriously? new/delete in 2018? In very rare cases when I need a raw pointer I call unique_ptr::release().

5 The question is so-so but the answer's wrong. Iterators don't need to point anywhere. You can make an iterator generating values instead of referencing container. Not necessarily a good idea but still.

6 Same. Just because it's not specified in C++ standard doesn't mean it's bad, or should be avoided. E.g.

        const uint32_t n = 11;
        printf( "Eleven: %d\n", n );

is UB but the code is 100% fine to my standards. Stuff like OpenMP or intrinsics is not specified either, does it mean we should avoid them?

8-9 IMO template metaprogramming should be avoided. If you want your template data structure to behave differently for pointers and non-pointers, expose another template argument for that, there's too many corner cases like handles (technically pointers, logically values) and smart pointers (the opposite).

10 I don't think the sorted vector listed in "possible answer" is a max heap.

Conclusion: if the OP claims the questions are "Proven", I'm curious about provement methodology.

<comment><USER27> > is UB but the code is 100% fine to my standards

Strongly disagree - I'd never let that through code-review. When living in C/C++ land, we should be extremely aware of the differences between the integer types, and handle their conversions carefully and explicitly.

Given that the "%d" format-specifier maps to `int`, not to `int32_t` (let alone `uint32_t`), that code really could wreck things if your platform has an `int` type which isn't 32 bit - [https://stackoverflow.com/a/3168293/](https://stackoverflow.com/a/3168293/)

<comment> Const-me About int vs sint32, why exactly you should be aware about the differences? The only cases when I encounter these differences, they look like broken C++ compiler: [https://stackoverflow.com/q/50552347/126995](https://stackoverflow.com/q/50552347/126995)

Similar about %d and unsigned. Technically UB, practically works fine in 100% of cases. If you ask "but how do you know it works?" I'll answer "because I read assembly".

<comment><USER27> > why exactly you should be aware about the differences?

Because they aren't assured to be the same. They might happen to be the same on your current platform.

C++ isn't like Java. It's the programmer's job to be very aware of these sorts of platform-specific points of variation.

I don't see why you'd deliberately write undefined behaviour when there's no benefit to doing so. This isn't a purely academic concern - I've seen a malformed printf call wreak absolute havoc, presumably because it was stripping too much or too little data off the stack. Was a nightmare to track it down.

I don't want to think about which particular families of dangerous type-based mistakes are permissible in my codebase -- I'd rather write code which is correct.

> The only cases when I encounter these differences, they look like broken C++ > compiler

If you write dangerous, non-portable code that invokes UB, you may well find that it works on plenty of real-world platforms. Your code is still wrong. For the specific case of assuming that `int` is 32-bit, you'll _probably_ get away with this sort of clumsiness, yes, but 'ILP64' targets exist, even if they're rare.

Additionally, using `int` as a dangerous alias for `int32_t` is not expressive when it comes to readability.

> Technically UB, practically works fine in 100% of cases

UB can bite you in bizarre, unpredictable, intermittent ways, especially with optimising compilers.

Why argue that a bad habit isn't _that_ bad, when you could just avoid doing it?

> If you ask "but how do you know it works?" I'll answer "because I read > assembly".

That's a very fragile assurance of correctness. Unless you explicitly embed that assembly code, the compiler is free to generate different code at any point in future. Can you guarantee that you'll never change or upgrade your compiler, tweak its flags, or target another platform? Can you guarantee the optimiser will never change its mind and generate different code for that function?

<comment> Const-me > They might happen to be the same on your current platform.

Good, and I'm not writing STL. I develop user-facing software, and I know the platforms I support. It just happened so that in the last couple of decades, all my current platforms have 32-bit integers, and I don't expect that to change within my remaining lifetime.

> It's the programmer's job to be very aware of these sorts of platform- > specific points of variation.

Exactly. I'm writing platform-specific code in C++, and I don't expect compiler to interfere. When I want to abstract these things away I don't code C++, there're better languages out there for such requirements.

> why you'd deliberately write undefined behaviour when there's no benefit to > doing so.

Read the comments in the link I've posted. Because clang authors share your opinion on the subject, I had to write a couple of pages of boilerplate code, changing ~50 C++ functions for absolutely no value. That's one of the reasons why I prefer MSVC, by the way.

> ILP64 targets exist, even if they're rare.

Why should I care? As you see from this example, caring is not free, it has costs.

> Additionally, using `int` as a dangerous alias for `int32_t` is not > expressive when it comes to readability.

Additionally, typing int is 3 keypresses, typing int32_t is 8. Given how much code I type every day, and how many integers are there in my code, the difference is not insignificant. Even Nintendo did it better on CodeWarrior toolchain, with u8, u32, u64, etc.

> UB can bite you in bizarre, unpredictable, intermittent ways, especially > with optimising compilers.

I think you're demonizing UB. Different cases are different. Some will crash your app right away, the worst of them will silently give incorrect results with 0.001% probability, but the code from my original comment is harmless.

Also C++ compilers aren't perfect, couple times in my career I found bugs in them. Many times, I found bugs in standard libraries or OSes. If you think writing 100% standard compliant C++ code guarantees correct programs, I have bad news for you.

> Can you guarantee that you'll never change or upgrade your compiler, tweak > its flags

Do you have an example of specific compiler version, or flags, that will break my code above, when targeting i386, amd64 or arm32 platforms?

</comment></comment></comment></comment></comment><comment><USER28> Good way to weed out bad employeers who treat programmers like janitors with no hope of career advancement.

</comment><comment><USER29> Why is checking for self assignment necessary?

<comment><USER7> There are pathological cases where due to layers of abstraction (in a data structure say), an element gets moved to itself. The algorithm is unaware of this but it happens anyways. If you fail to check for self assignment, you will clear the "other" owning pointer/resource and this will result in a leak, as well as resulting in an ill-formed object.</comment></comment>


Small-town America fights for its life - <AUTHOR> https://www.washingtonexaminer.com/opinion/small-town-america-fights-for-its-life <comment><USER2> Environmental destruction is the story here, but with one misunderstanding.

> _Rural America is eroding. If you talk to farmers such as Short and Roger, > they lament it. But almost nobody thinks it can be prevented. More efficient > farming..._

The new farming isn't more efficient physically, chemically, or biologically. It consumes without replacing resources like topsoil, biodiversity, water, etc. It looks more efficient financially only by neglecting the future costs to restore those resources.

I wouldn't call willful, determined overuse "erosion," though. I would call it destruction.

We've created financial incentives to eat our seed corn as a culture and the article presents one place it's playing out. Destroy the environment and people will leave it.

<comment><USER3> > The new farming isn't more efficient physically, chemically, or > biologically. It consumes without replacing resources like topsoil, > biodiversity, water, etc. It looks more efficient financially only by > neglecting the future costs to restore those resources.

B.S. Farmers aren't stupid, they still remember the lessons of the 1930s. They all plan to farm until they're physically unable to, and hope that the family farm will stay in the family for generations to come. Their biggest asset is that land, and they'll be relying on it for decades to come.

That's why they're adopting methods like zero-till and cover crops to prevent soil erosion, why they carefully manage their straw cover et cetera.

They also don't listen to city folk who think obviously silly things like "organic is better for the environment". The alternative to glyphosate is tillage, and farmers have first hand experience with how destructive tillage is to the soil, how it erodes the soil and the subsequent erosion destroys the waterways.

<comment><USER4> > They all plan to farm until they're physically unable to, and hope that the > family farm will stay in the family for generations to come.

And small family farms are an ever-decreasing share of where our food actually comes from. Over 70% of the farm acreage was held by the top 10% of the largest farms in the US in 2011[1].

Most of our agriculture today is not good old Farmer John and his wife and eight kids going out to hoe the beans at dawn. It's massive operations with hundreds or thousands of acres, huge agricultural machines, and, yes, loads of chemicals treating the soil to make it produce even when we've stripped it bare of nutrients by forcing it to grow the same crops year after year. (It's also many thousands of migrant farm workers doing the actual physical labour, but that's a separate issue...)

There _are_ good permaculture movements springing up that seek to return to more sustainable methods, but they're almost exclusively individuals or small- community groups.

As for glyphosate...OK, sure, it can help to reduce the mechanical damage to the ground caused by repeatedly tilling the soil. But count me in the Extremely Skeptical camp as to it being "totally harmless" to humans, particularly given how influential Monsanto's money is in shaping the research into the subject. (And that doesn't even touch on the effects on the environment from spraying it all over the place, year after year, and letting it run off into waterways...)

[1] [https://www.washingtonpost.com/news/wonk/wp/2014/09/16/the-d...](https://www.washingtonpost.com/news/wonk/wp/2014/09/16/the- decline-of-the-small-american-family-farm-in-one-chart/)

<comment><USER3> > And small family farms are an ever-decreasing share of where our food > actually comes from. Over 70% of the farm acreage was held by the top 10% of > the largest farms in the US in 2011[1].

Those large farms are also small family farms. I know a guy who owns 15,000 acres but it's a 3 man operation: him, his wife and a single hired man. That's the norm in Saskatchewan.

> as to it being "totally harmless" to humans,

Of course it's not "totally harmless". It's just better than the alternatives.

<comment><USER4> > Of course it's not "totally harmless". It's just better than the > alternatives.

Not using herbicides is totally harmless to humans. It just reduces profits.

Personally, I'm for options that prioritize humans over money.

<comment><USER3> Not using herbicides destroys the land which is where this discussion started.

<comment><USER4> If you assume that herbicides and tillage are the only possible options ever.

</comment></comment></comment></comment></comment></comment></comment><comment> ur-whale For the lazy, here's a streetview of the church. It is indeed quite nice:

[https://goo.gl/maps/2cToS5cmVitVJLgY8](https://goo.gl/maps/2cToS5cmVitVJLgY8)

</comment><comment><USER5> TLDR;

"You've got better genetics on the seeds," Roger explained. "You've got fantastic technology on the equipment. And so you don't need as many people."

</comment><comment><USER6> There is no article there. Is there a _Magic Button_ I'm missing, other than "subscribe"?

It seems content is also fighting for its life.

Here's a similarly-name article that's open-able, at least to me: [https://www.nytimes.com/2018/12/22/opinion/rural-america- eco...](https://www.nytimes.com/2018/12/22/opinion/rural-america-economy- revive.html)

<comment><USER7> Working fine for me on Firefox 70.0.1 w/ ublock, noscript, privacy badger and a bunch of other privacy extensions enabled.

<comment><USER6> It's working now for me. I've seen that multiple times lately: an article is _intermittently_ hidden. It may be marketing games whereby they make it open to attract links from commenting forums such as Reddit and this one, and then switch on "subscriber only" mode when traffic comes. If intentional, that's evil in my book.

</comment></comment></comment><comment><USER8> No judgement on this particular opinion piece, but just for sake of clarity in case people are unaware, the Washington Examiner has a rather pronounced conservative and Republican bias.

<comment><USER9> Neutral source: [https://mediabiasfactcheck.com/washington- examiner/](https://mediabiasfactcheck.com/washington-examiner/)

<comment><USER10> > Neutral source: [https://mediabiasfactcheck.com/washington- > examiner/](https://mediabiasfactcheck.com/washington-examiner/)

Neutral, perhaps, but also poorly qualified:

[https://en.wikipedia.org/wiki/Media_Bias/Fact_Check](https://en.wikipedia.org/wiki/Media_Bias/Fact_Check):

> The Columbia Journalism Review describes Media Bias/Fact Check as an amateur > attempt at categorizing media bias and Van Zandt as an "armchair media > analyst."[2] Van Zandt describes himself as someone with "more than 20 years > as an arm chair researcher on media bias and its role in political > influence."[3] The Poynter Institute notes, "Media Bias/Fact Check is a > widely cited source for news stories and even studies about misinformation, > despite the fact that its method is in no way scientific."[4]

<comment><USER9> Totally fair, thank you. But you left out some important bits from your response, including that several academic groups have used the site for building fake news classifiers:

> _The site has been used by researchers at the University of Michigan to > create a tool called the "Iffy Quotient", which draws data from Media > Bias/Fact Check and NewsWhip to track the prevalence of 'fake news' and > questionable sources on social media. The site was also used by a research > group at the Massachusetts Institute of Technology in initial training of an > AI to fact check and detect the bias on a website._ [3]

Despite publications in academia using the site, you may also note the following:

> _In 2016, Kyle Pope, who had served as the editor in chief of The New York > Observer, was announced as the new editor and publisher of [Columbia > Journalism Review]_. [1]

> _In 2016, the New York Observer became notable for being one of only a > handful of newspapers to officially endorse United States presidential > candidate Donald Trump in the Republican Party presidential primaries.[18] > The newspaper 's owner and then publisher, Jared Kushner, is Donald Trump's > son-in-law._ [2]

...I'm not sure what to think of the above pedigree for CJR's editor, but IMO I suspect he either fell to one end of the political spectrum or the other.

1 - [https://en.wikipedia.org/wiki/Columbia_Journalism_Review#Edi...](https://en.wikipedia.org/wiki/Columbia_Journalism_Review#Editor)

2 - [https://en.wikipedia.org/wiki/The_New_York_Observer](https://en.wikipedia.org/wiki/The_New_York_Observer)

3 - [https://en.wikipedia.org/wiki/Media_Bias/Fact_Check](https://en.wikipedia.org/wiki/Media_Bias/Fact_Check)

<comment><USER10> > But you left out some important bits from your response, including that > several academic groups have used the site for building fake news > classifiers

No I didn't. My quote from Wikipedia included this: "The Poynter Institute notes, "Media Bias/Fact Check is a widely cited source for news stories and even studies about misinformation, _despite the fact that its method is in no way scientific_ [emphasis mine].""

The fact that some AI group used it to train a classifier is not a very strong endorsement in my opinion. AI researchers aren't journalism subject matter experts, and Media Bias/Fact Check is obviously a very _convenient_ data source, but covenience is not good indicator of quality.

> Despite publications in academia using the site, you may also note the > following:

> ...I'm not sure what to think of the above pedigree for CJR's editor, but > IMO I suspect he either fell to one end of the political spectrum or the > other.

You seem to be trying to synthesize two disparate observations to imply the idea that Kyle Pope is some kind of conservative and therefore too untrustworthy to evaluate Media Bias/Fact Check, but that betrays a poor understanding of how newspapers operate. In a well-run paper, there's a separation between the newsroom and the opinion/editorial pages. For instance, the WSJ has a famously conservative editorial page. You might think its reporters have the same ideology, but (IIRC) _its newsroom staff is even more liberal than that from the NYT_ , a fact that seldom shows because they're so professional. The newsroom exists to report the facts, and the editorial pages to voice the opinions of the owner/publisher. That Jerod Kushner had his paper endorse Donald Trump in no way reflects on Kyle Pope's judgement as a journalist.

Furthermore, Kyle Pope's own Wiki page has him saying:

> In an interview with Brian Stelter of CNN, Pope stated that after the > election of President Donald Trump, the news media needs to rethink how it > covers the news in order to "retake the agenda from this man who so hungers > for attention, and how do we tell stories in a way that reflects the scale > and sweep of the moment we're in?" > ([https://en.wikipedia.org/wiki/Kyle_Pope](https://en.wikipedia.org/wiki/Kyle_Pope))

The tone of that kinda confirms to me that your quotes are two puzzle pieces that don't actually fit together.

I'm inclined to trust the CJR's editor's judgement on journalism topics (topics which include the Media Bias/Fact Check website), because the CJR is the professional journal of the most prestigious American school of journalism.

<comment><USER9> Excellent points. I'll concede my arguments were pretty speculative and weak re: Pope.

At the end of the day I suppose I am still curious where/how I can gauge the political bias of a given news source? Does CJR do something like this on their own?</comment></comment></comment></comment></comment></comment>


AP Credit Will No Longer Be Accepted At Dartmouth - <AUTHOR> http://www.npr.org/blogs/thetwo-way/2013/01/17/169637369/ap-credit-will-no-longer-be-accepted-at-dartmouth <comment><USER3> Maybe the AP system has degraded over the years. When I was in school it helped immensely and I was able to enter college as a mid-year sophomore and graduate early. And the level of material and rigor in AP courses seemed roughly comparable to 100 and 200 level college courses. The cynic in me sees this as a money making move, as it means that more incoming students will have to pay more to graduate.

I'm really curious whether Dartmouth performed any studies on the matter or if this is just a spontaneous decision based on anecdotal evidence.

P.S. Also, in my experience and observation taking 100 and 200 level classes in college is a pretty significant ripoff outside of perhaps the top 20 universities in the nation. Almost all of the time such courses tend to be taught by assistants and are heavily textbook based. For the vast majority of people pursuing a college education getting an AA at a community college and then transferring to a local state college is a far, far better option financially.

<comment><USER4> From the linked Associated Press article:

 _Rather than award credit for an introductory course to incoming students who got the highest score on the AP test, the department gave those students a condensed version of the Dartmouth course's final exam. Ninety percent failed, Tell said. And when those students went on to take the introductory class, they performed no better than those who did not have the high AP test scores._

[http://www.npr.org/templates/story/story.php?storyId=1696110...](http://www.npr.org/templates/story/story.php?storyId=169611082)

<comment><USER5> You know what I'd like to see - is a _second_ study, in which students who got the highest scores on the _Dartmouth course_ , with the _same interval of delay_ also take that same final exam.

I was surprised at the number of fellow students at my University who openly admitted that within a month or two of the final exam, they couldn't recall much of anything about some of the courses in which they had scored an A or higher in.

It's entirely possible that the issue isn't the AP courses, but the significant delay taking (and doing well in the course) - and retesting again.

Alternatively - take a student from another Ivy League, Yale, Harvard - <USER2> see how they would do on a Dartmouth Final exam with some delay between taking the course and testing out again.

<comment><USER3> Indeed. A lot of education in the western world is remarkably shallow. Blitz through a lot of "material" and busy work, then cram so you can pass the test the next day, then forget everything. It's a horrible way to "learn" anything.

<comment><USER6> I found the issue was just building on my education. You could teach me concept X until you were blue in the face, and I wouldn't remember a whole lot a few months later. But give me a half-decent education on concept X and then soon after move to something that builds on concept X, and I will retain a far greater understanding of concept X for far longer.

I think it is related to a similar effect I have noticed- when I teach something, I again retain that information much better.

</comment></comment></comment></comment></comment><comment><USER7> Some of the more cynical responses to this article ignore the fact that AP credits at Dartmouth were already strictly limited by departments on a case- by-case basis. I went in with 11 AP credits and was able to graduate at most a term early.

Here are some more concrete numbers on how this change affects early graduation:

\- Students arrive with an average of three credits;

\- Nonetheless 80% of students take 4 years;

\- 20% of students will be required to enroll for an extra term.

The net result is $4 million in extra income. [1] As a point of reference, Dartmouth's endowment is over $3.4 billion.

I also want to point out that this discussion ignores reasons against AP at the high school level, which has caused some high schools to stop offering them.

[1] <http://www.dartblog.com/data/2013/01/010556.php>

</comment><comment><USER8> College math instructor here; I've taught Calculus III for the past three years. I always feel bad for my freshman students, particularly those in the fall semester. Some of them are prepared, and some aren't, but almost none of them have a mature understanding of mathematics that we expect in a sophomore- level course.

The problem with AP from my observation (at least in math) is that it encourages teaching the test. I'm certain many of them have never seen \lim_{h->0}\frac{f(x+h)-f(x)}{h} before, so how can they suddenly expect to understand the limit definition of a partial derivative either?

I took a Calculus course in high school, skipped on taking the AP test, and then took an honors section of Cal I when I got to college to get a deeper understanding (and an easy first-semester A). I feel I made the best decision.

</comment><comment><USER9> Possibly worth throwing into the discussion: Caltech does not accept any AP credit. However, classes can be tested out of with Caltech's own tests (which were considerably more difficult than AP tests in my opinion). Testing out of these classes removes these classes from graduation requirements.

Is it possible Dartmouth is just trying to raise their academic standards rather than milk students for more money?

</comment><comment><USER10> If AP classes don't give credit, I wonder if this will lead some students to graduate high school after three years.

<comment><USER11> And get a jump start working on their Bachelor's degrees which now take six years.

Seems like the high schools need to add some more rigorous classes for seniors.

<comment><USER12> A high school degree ought to be good for something. Students are entitled to four years of effective free education. If high schools can't engage them I think the government should be on the hook for the bill for the first year of college.

<comment><USER13> I would prefer they figure out why High School has become so devalued and fix that. We should respect both the student's time we are requiring and the taxpayers who are paying for a defective product. Buying students a year of college doesn't fix the problem and acknowledges that we wasted their time.

</comment></comment></comment></comment><comment><USER14> Accompanying headline: My Kid With AP Credits Will No Longer Be Applying to Dartmouth

<comment><USER15> Or, what's more likely for most people: Kids with AP Credits Will Now Have Slightly More Debt After Graduating From Dartmouth.

<comment><USER14> Wait, why will they have more debt than non-AP credited kids?

<comment><USER16> Not "more debt that non-AP credited kids", "more debt than they otherwise would have if Dartmouth took their AP credits".

<comment><USER15> Yes, pardon my slight ambiguity there.

</comment></comment></comment></comment></comment><comment><USER17> AP credits have never been a particularly great ROI. My wife went the different route of signing up for classes at the local community college. You get a lot more out of them (in the rush to keep up with the joneses, high school administrators are calling everything "AP" these days), and also colleges are quite willing to accept those credits for lower-level classes.

<comment><USER18> My high school offered a joint enrollment with a nearby public university. Taking my senior year there was by far the best decision I made in high school, and way more illuminating and engaging than if I had signed up for all AP courses.

</comment></comment><comment><USER19> As a current student at an Ivy League school, it's interesting to see that this is getting much backlash now. My school hasn't accepted AP credit for a while now, and it's never been a problem. Students grouse superficially, but for the most part, it's understood that they're just prerequisities to get in to the schools you want to go to.

<comment><USER20> So my daughter is in High School and she's doing IB (International Baccalaureate) does that have any benefit for those aspiring to the Ivy League or similar?

<comment><USER19> It does, AFAIK IB is respected more than AP on campus. Of course, the more rigorous subject matter will be better for her in the long run anyways.

</comment></comment></comment><comment><USER21> The relevant pages on the Dartmouth College website

[http://www.dartmouth.edu/~upperde/firstyear- students/credit_...](http://www.dartmouth.edu/~upperde/firstyear- students/credit_and_placement.html)

[http://www.dartmouth.edu/admissions/apply/thinking/credit.ht...](http://www.dartmouth.edu/admissions/apply/thinking/credit.html)

[http://www.dartmouth.edu/~upperde/firstyear- students/advance...](http://www.dartmouth.edu/~upperde/firstyear- students/advanced_placement_2016.pdf)

don't appear to be updated to match what is reported in the AP article.

What's really news here is that Dartmouth ever granted credit for AP courses-- that is unusual in the Ivy League, of which Dartmouth is one of eight members. On the other hand, there are hundreds upon hundreds of other colleges all around the country that continue to offer AP credit for AP scores on specified tests of a specified level, so each high school student who decides whether or not to take an AP test is deciding to do so based on what colleges the student is considering attending. This is no big deal. Each college decides its own policy. The policy of Harvard

[http://apo.fas.harvard.edu/icb/icb.do?keyword=k73580&pag...](http://apo.fas.harvard.edu/icb/icb.do?keyword=k73580&pageid=icb.page388448)

[http://www.admissions.college.harvard.edu/apply/transfer/tra...](http://www.admissions.college.harvard.edu/apply/transfer/transfer_credit.html)

will continue to be different from the policy of (for example) Rutgers,

<http://soe.rutgers.edu/oaa/academic-credit>

<http://sebs.rutgers.edu/new/aptests.asp>

[http://sasundergrad.rutgers.edu/academics/academic- credit/ad...](http://sasundergrad.rutgers.edu/academics/academic- credit/advanced-placement)

and students will continue to compare the varied college policies on AP credit

[http://www.collegeboard.com/student/testing/ap/exgrd_get.htm...](http://www.collegeboard.com/student/testing/ap/exgrd_get.html)

[http://collegesearch.collegeboard.com/apcreditpolicy/index.j...](http://collegesearch.collegeboard.com/apcreditpolicy/index.jsp)

among a lot of other trade-offs the students consider when deciding where to attend college, including whether or not they are admitted to the college in the first place.

<comment><USER22> On the contrary, it is actually very common for Ivy League schools to offer AP credit, or at the least allow you to use AP credit to fulfill a requirement / prerequisite. Princeton, Brown, Columbia, and the University of Pennsylvania all offer AP credit or allow fulfilling prerequisites. Outside of the Ivy League, Stanford offers AP credit. MIT offers AP credit for 2 classes and elective credit for humanities AP classes.

None of these schools, however, will offer AP credit for _all_ AP classes, since there is a lot of variability in the rigor of each AP class. Three of the AP classes that I've observed tend to be accepted for credit are BC Calculus, Physics C, and Economics. Physics C (for Mechanics and Electricity) was the most challenging AP test I ever took.

</comment></comment><comment><USER23> I know that the AP system is under-fire, but this just screams money grab technique to me...

</comment><comment><USER24> I don't get it. You can't make things harder than they are by their nature; sure, you can make interestingly problems, but in a discipline is a discipline. For example, general calculus hasn't changed that much in decades. The same stuff I learned in AP calc senior year of highschool, people learned freshman year of college. The only thing was, in highschool the exam questions were actual problems and not proofs of Stokes theorem or some other wildly pure math question.

<comment><USER25> I found my intro-level college calculus course to be fairly dissimilar from what we did in AP CS in high school, though I assume both can vary considerably. The main difference was that the high school course was much more calculation-oriented: a huge portion of it was just computing integrals and derivatives. I didn't find memorizing patterns for computing integrals or derivatives particularly interesting or useful: if all I need to do is compute one, Mathematica can do that much for me. What I learned in university calc, but not high-school calc, was more of the rigorous foundations of what calculus is and how it works. Part of it might be context, though: the freshman calc class was synchronized with the freshman physics and chemistry courses, so there were immediate applications where we had to figure out how to use calculus as a tool, rather than just as a standalone exercise (my high- school physics and chem courses were not calculus-based, so there was no similar synergy).

</comment></comment><comment><USER26> It always felt like you were robbing yourself of really interesting college courses if you skipped them due to AP.

I always saw AP as more of a gateway to college due to the prestige/GPA-boost they gave your application, rather than a real way of getting significant college credit.

<comment><USER27> Actually, it's the reverse. If you score well on AP and then elect to take the class, you'll probably get a high grade. However, if you take the class and realize you're in over your head, you damaged your GPA. AP credits didn't count at my school for your final GPA, so fewer classes meant each class counted more.

I skipped almost 30 hours of credit with AP. It still took me 5 years to graduate after switching my major 2nd year. If I had to re-take those classes I skipped, I would be 1) bored, and 2) loaded with busy work instead of being able to take classes I wanted. I have friends that had to take Calc 1, whereas I went right to calc 2. Can't say I would have wanted to take it again.

</comment></comment><comment><USER28> The AP gradations are useless. If I remember right the calculus exam has about 120 possible points and you only need about a 56 to score a 5.

<comment><USER29> I took an exam where the median score is typically zero

[http://en.wikipedia.org/wiki/William_Lowell_Putnam_Mathemati...](http://en.wikipedia.org/wiki/William_Lowell_Putnam_Mathematical_Competition)

<comment><USER30> Also the subject of the funniest HN thread ever:

<http://news.ycombinator.com/item?id=35079></comment></comment></comment>


The 3 + 2 Rule - <AUTHOR> http://blog.101ideas.cz/posts/the-3+2-rule.html

<comment><USER2> Thank you! I'll be trying this starting in the morning!</comment>


Congrats to PG on getting hitched - <AUTHOR> http://twitter.com/kn0thing/statuses/824631187 <comment><USER2> I'm sure they took out no more than $20,000 for the first three months of marriage, to see if they can make it work and produce someone who can make something that people want. :D

<comment><USER3> That should be $15,000: $5000 for each co-founder, and $5000 for the startup.

<comment><USER4> They managed to weasel an extra $5000 out of YC for their (future) third founder, PG Jr.

<comment><USER5> too male centric. how about JL Jr./PG Jr.

<comment><USER6> well, their child is likely to be a boy. statistics show most hackers are male.

<comment><USER5> Hmm. I think the statistics says "Attractive couples have more female children". (Edit: see the "Engineers Have More Sons, Nurses Have More Daughters: An Evolutionary Psychological Extension of Baron-Cohen's Extreme Male Brain Theory of Autism and Its Empirical Implications." and "Beautiful Parents Have More Daughters: A Further Implication of the Generalized Trivers- Willard Hypothesis")

Ok, we might just admit our stereotype that hackers are not that good looking. But for each individual, he/she may be a black swan.

Someone may start to build a model to predict the probability distribution of genders of Leah Culver's children?

<comment><USER7> My wife and I had a daughter, and while my wife is certainly beautiful, I'm not sure I'd qualify:-)

Your use of "Black Swan" isn't correct though, IMO, because black swan refers to things that are decidedly _un_ bell curve like, and while most hackers probably aren't lookers, it's easy to reason that a few will be.

<comment><USER5> I agree. it is incorrect. Quantitatively it is the high sigma in Gaussian distribution.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Congrats PG and Jessica!

<comment><USER9> Livingston?

<comment><USER8> yep!

<comment><USER10> nickb=pg?

<comment><USER11> Easy answer: no.

<comment><USER12> Easy answer: yes.

<http://news.ycombinator.com/item?id=152559>

<comment><USER13> Or is it: no?

<http://news.ycombinator.com/item?id=152477>

</comment></comment></comment></comment></comment></comment></comment><comment><USER2> I always had the thought in the back of my mind that there was something between pg and rtm. pg just speaks exceptionally warmly of rtm, so I considered it a possibility. I am not trying to be insulting or be understood in the wrong way, its just something that came to mind.

But anyway, enough with silly thoughts, congrats to pg and jl!

<comment><USER14> "pg just speaks exceptionally warmly of rtm, so I considered it a possibility"

Speaking "warmly" of someone's technical skills/intelligence is an indicator of a sexual interest? I don't get it (seriously).

I just did a site search of paulgraham.com for all mentions of rtm, and the "warmest" mention I found was at <http://www.paulgraham.com/heroes.html>, which does not seem to me (a heterosexual male if that is of any interest) to indicate anything remotely sexual. Positive? Sure. Exceptionally so? I guess I just don't see it.

Maybe you were referring to some verbal communication you witnessed?

<comment><USER2> I don't know why you took it so personally. Not to mention that pg dedicated a book to him and always speaks extremely highly of him, it is definitely possible. There's nothing wrong with homsexuality and I intended that post as a joke, so relax.

<comment><USER14> "I don't know why you took it so personally. "

oh I didn't "take it personally". :-)

I am just trying to follow the thought process (which you have explained above ("intended as a joke") . I was wondering whether this tapped into something culturally specific. No insult of any kind intended.

</comment></comment></comment></comment><comment><USER7> Congratulations!

Now remember to do the laundry, get the groceries, and load the dishwasher. And get that stuff off the floor!

Joking aside, getting married, together with our recent baby is one of the best things I ever did.

<comment><USER15> Shouldn't that be "sudo make me a sandwich"? ;P

Congratulations, you two! May you have many happy years together.

</comment></comment><comment><USER16> Congrats! Any pics?

</comment><comment><USER17> Oh frabjous day! Callooh, callay!

</comment><comment><USER18> Good for you two, Paul and Jessica. Congratulations.

Expecting a new essay on how this event change your life :)

</comment><comment><USER19> Funny how even INT(P) types and such enjoy celebrity gossip, just in a different bubble.

</comment><comment><USER20> Wow, I had no idea! Best wishes to the newlyweds. Is it Jessica Graham now? JG?

<comment><USER5> Professional women usually reserves the right to keep their maiden name unchanged. At least I've been seen a lot of women in NYC's financial/media circle who never change their name even after marriage.

I never understand the purpose of name change of women after marriage. The ownership doesn't change lately in first world in 21st century.

<comment><USER15> Never underestimate the power of tradition.

</comment></comment></comment><comment><USER21> I'm really happy for Paul and Jessica, but I do find it a bit odd to have the event announced on Hacker News (and even then via Twitter; though not private, Alexis's tweet was probably not intended for general distribution). This is news about a particular (albeit prominent) hacker's private life, not 'hacker news' per se; it doesn't seem general enough to be posted here.

<comment><USER22> Normally I'd agree. But without PG there'd be no Hacker News, and many of us would like some avenue to wish him well on a very significant occasion. So here's to the newlyweds :) Cheers.

</comment></comment><comment><USER23> Paul and Jessica: best wishes!

</comment><comment><USER24> Congratulations, Paul!

</comment><comment><USER25> GratZzz!

This explains why he's been inactive on the arclanguage forums.

</comment><comment><USER26> Congrats! After a marriage things changes a bit. PG and Jessica are involved with YC so, lets hope there is no side effects on YC :)

</comment><comment><USER27> I'm a little late. But quite honestly, this really is the most beautiful investment yet. Congratulations pg.

</comment><comment><USER28> If Paul didn't announce this himself on this site, I don't think a secondary source of a Tweet should be on here.

</comment><comment><USER29> Congratulations you guys! Let us know if you need to syndicate or label wedding photos. ;)

</comment><comment><USER30> Congratulations. Looking forward to the extra insight this produces in your essays.

</comment><comment><USER31> Congratulations to you both!

Neat, I share my wedding anniversary (1 year today!) with pg.

<comment><AUTHOR> Me too, sorta -- we got married this Sunday a year ago, but the date is 2 days off

</comment></comment><comment><USER32> Congratulation paul. Third startup from pg after viaweb and ycombinator

</comment><comment><USER33> Congrats Paul and Jessica. Best wishes for a long and happy marriage :D

</comment><comment><USER34> Congrats and Best Wishes to the both of you!!!!!!

</comment><comment><USER35> awesome news - congrats folks - so where is the happy couple taking their honeymoon? did anybody else know they where a couple?

</comment><comment><USER36> Congratulations!

</comment><comment><USER37> Congratulations!

</comment><comment><USER38> Congratulations!

</comment><comment><USER39> Congrats Paul!

</comment><comment><USER40> Congratulations to PG & JL!!!

</comment><comment><USER41> That's a great news, congrats ;)

</comment><comment> Xlp-Thlplylp Many happy carriage returns!

</comment><comment><USER42> Awesome!

</comment><comment><USER43> Congrats to PG and Jess!!!

</comment><comment><USER44> Congrats PG!

Best wishes to the both of you.

</comment><comment><USER45> Congrats Mr. and Mrs. PG.

</comment><comment><USER46> Congratulations PG !

</comment><comment><USER47> Congratulations PG!

</comment><comment><USER48> Congratulations :)

</comment><comment><USER49> Congratulations!

</comment><comment><USER50> Congratulations!

</comment><comment><USER51> Congratulations

</comment><comment><USER52> Congratulations on launching the biggest startup yet!

</comment><comment><USER53> Congrats! :-D

</comment><comment><USER54> Best Wishes!

</comment><comment><USER55> Congrats PG!

</comment><comment><USER56> great news, congratulations!

</comment><comment><USER57> i'm kind of jealous

of pg of course

grats

</comment><comment><USER58> Congrats!!

</comment><comment><USER59> congrats pg and jessica!

</comment><comment><USER10> congrats paul!!!

who's the lucky girl?

</comment><comment><USER60> Congrats PG and RTM!!

<comment><USER5> Hmm, I guess PG and RTM have been hitched through all their partnerships in business/startup/hacking ventures.

Maybe the best way to get around same sex marriage issues in U.S. is to allow all same sex couples to form small business partnerships? We know all founders are in fact like couples married to each other.

</comment></comment><comment><USER61> Congratulations, Paul! Way to go!

Now does this mean she owns half of Hacker News? ;)

<comment><USER6> I think she owned a third to begin with.

<comment><USER62> I assume YC owns "Hacker News".

YC's partners are pg, rtm, tlb, and jl. I don't know whether they all have an equal share.

<comment><USER6> I thought YC only had three partners. Sorry, my bad.

</comment></comment></comment></comment><comment><USER63> congratulations PG and Jessica! :)

</comment><comment><USER64> No PG comment. Too busy already?!</comment>


Don't Simply Build a More Open Facebook: Build a Better One - <AUTHOR> http://theharmonyguy.com/2010/05/10/dont-simply-build-a-more-open-facebook-build-a-better-one/

<comment><USER2> This is a really good set of UX advice for any social network. I particularly like #4—it's what I've been calling Facebook's fundamental problem all along, concisely put.</comment>


Startup Quote: Joel Spolsky, co-founder, Stack Exchange - <AUTHOR> http://startupquote.com/post/5540425619

<comment><AUTHOR> Listen to your customers, not your competitors.

\- Joel Spolsky (@spolsky)

<http://startupquote.com/post/5540425619></comment>