How I Embarrassed Myself in My Interview With Google - <AUTHOR> http://www.globalnerdy.com/2013/10/19/i-has-the-dumb-or-how-i-embarrassed-myself-in-my-interview-with-google/ <comment><USER3> Is this a serious article?

Iterating over a hash slightly wrong when writing code in a google doc during an interview is such a stupid, trivial thing to be judged on, whether it's you or someone else doing the judging. It's clear from the "My lame attempt" example that the basic concepts are understood, and if he's written a series of articles about the Enumerable module then he probably knows it better than the majority of professional developers working with the language.

If this is a serious article, then it really highlights everything that's wrong with tech interviewing.

<comment><AUTHOR> Yup, it's serious. I'm don't know for certain that I've been ruled out of a follow-up interview, but I got that vibe by the end.

<comment><USER4> Do you have any open source projects? The first thing i'm looking for as a developer when I visit your websites is a link to any code you have written. Which as far as I can tell doesnt exist?

A programmer without a portfolio of source code is like a painter without a portfolio paintings.

I assume Google scouts are usually looking to hook the exceptionally rare "Monet" and "Picaso" software engineers swimming around in an ocean overcrowded by "PC techs".

There is a quote by Linus Torvalds that is fairly relevant here. "Talk is cheap. Show me the code."

Your resume is nice... Cute even. But without the code to back it up, there is nothing to critique your actual skills.

<comment><USER5> As a Google Engineer, I can assure you that nobody who interviews you will give a damn about your code in github. Unless you're James Gosling or someone at that level. (But then again I don't think they interviewed James Gosling in the same way they interviewed me, so the point is moot.)

Google interviewers are interested in how well you can code (or design a solution) in a whiteboard for 45 minutes. I'm not claiming that it's the best way, and who knows, it might be the absolutely horrible way to interview candidates, but that's the way it is here.

<comment><USER6> (Non snark ahead) Could this be why working at Google is no longer the prize it once was? And why developers would rather go to Facebook, Twitter, Dropbox, et al?

<comment><USER5> (Completely idiotic response ahead) Umm, really? Every day I see thousands of developers who would rather work in Google than Facebook... :)

(Non snarky response) I dunno. I joined Google in 2008, and as far as I know Google was always like that. So, unless you claim developers have preferred Facebook etc. to Google for more than 5 years now, it's probably not related to the interview process.

<comment><USER6> From Glassdoor's data, it appears Facebook employees rate their experience better than Google employees from 2009-2012:

[http://www.glassdoor.com/press/wp- content/files_mf/133228554...](http://www.glassdoor.com/press/wp- content/files_mf/1332285549Infographic.JobWars.PNG.png)

Also base rate is higher at Facebook, and interview difficulty is rated lower at Facebook.

Somewhat disappointing, as I'm a huge fan of Google.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Don't sweat it. I find those Google interviews to be very discouraging and I felt dumb after not doing great on one when I was in school. Looking back, the whole interview was a mess. I got the call from the engineer 45 minutes late, I couldn't access the Google Doc because he was trying to send it to my university email address, and the coding portion started off with him writing "!(x & (x - 1)) && x" at the top of the empty document and asking "What does this do?".

Looking back, it was pretty silly but man did it really kill the confidence of 19 year-old me when it took me 10 minutes to work out that it detected numbers that were powers of 2. It really gave me a negative impression of Google's interview process (that and the complete radio silence afterwards), which I still think about when they send me their bi-annual recruiter emails. Funnily enough, the last email I got specifically mentioned that I had "done really well in the recruiting process in the past".

<comment><USER8> ...did they at least tell you beforehand that they were coding in JavaScript? In pretty much any other language, that wouldn't compile, but those logical and bitwise operators are used in multiple languages from C to Ruby.

</comment></comment><comment><USER5> > When your bread and butter is crunching through large amounts of data with > MapReduce, it only makes sense that you tend to take a more functional > approach and think in terms of single-operation mapping, filtering, folding, > and sorting.

Umm, sorry, no. You wouldn't believe what kind of 5-level-nested-if C++ statements you could find in Google's codebase. Google might be known for its technical abilities, but "affinity to functional programming ideas" is generally not one of them.

</comment><comment><USER9> I don't think anyone could succeed in a coding test without rehearsing before taking it, just like any kind of live performance.

Programming languages are powerful things with which you can do a lot of very different things and tackle very different issues. Sometimes it's database querying, sometimes complex data structures, sometimes parallelism, genericity, business data modeling, etc. etc.

There should be a list of "warm up" exercises somewhere to help people prepare for general tests and make sure they've touched at least every subject once before going live.

</comment><comment><USER10> I doubt that you were rejected (even if you were, which it seems like you don't know) based on needing to be prompted about select, and getting syntax wrong, especially for a non-dev position and in a phone screen. If I were doing a phone screen, I'd honestly be probing more for whether you know how code works in general, and if you knew what select _was_ (i.e. when I prompted you, your response wasn't "uh...what's select?")

Also, did you not sign an agreement with Google that you wouldn't share interview questions before you started interviewing? I think sharing questions is generally considered somewhat uncool.

<comment><AUTHOR> I didn't sign any agreements of any sort, and the question was about as generic as "FizzBuzz" that I wasn't giving away anything. If it's a problem, I can make it right by editing the article.

<comment><USER10> I guess that's fair enough. I'm just personally squeamish about sharing most interview details this publicly, but perhaps you're right.

</comment></comment></comment><comment><USER11> True story: I sort-of-interviewed at Google. The interview ended because the interviewer, after having been told that I had already completed the project they were trying to recruit for, became agitated and told me that I was just a hobbyist and my product did not exist -- this while he was being shown it in motion. I put a spare PCB for my product in his hand and asked him if it didn't exist, why was it making him bleed. Then I closed his hand hard around the PCB and told him to keep it, it's under GPL, and go ahead and crib from the design.

People who reject physical reality should receive a bit of negative conditioning about doing so...

<comment><USER8> I'm sure they're upset that they didn't hire you.

<comment><USER11> That particular guy eventually was, enough to want to make amends. I believe that there is more luster in having "scooped Google" than "worked at Google" on a resume, though.

</comment></comment></comment><comment><USER12> _I am terribly out of Ruby practice._ Choosing Ruby as his language, presumably because it is the language he is best at, and then whiffing on the basics is probably what did him in. The brevity of phone interviews and the need to whittle down a massive pool of applicants to a manageable stream means that the interviewer is going to infer a lot from a little.

He should have chosen a language he is better at. If Ruby is indeed his top language, and he's rusty at that, then perhaps OP just isn't fit for a coding job at this point in time?

<comment><AUTHOR> I wanted to use:

\- A language with a REPL so that I could check my ideas in a terminal window. \- A language that would reduce the amount of typing I'd have to do \- A language I that I was half-decent at (at lease at one point)

And Ruby fit all those criteria.

</comment></comment><comment><USER13> I didn't get as far as a full interview, but an internal recruiter reached out to me and we chatted for about 20 minutes or so for a specific position she was trying to fill. It was no better than a standard recruiter, really - I was expecting more.

"So, I found your resume... blah blah blah, you say you've done XYZ, blah blah blah, send me a copy of your resume."

WTF?

I said "um... you're _google_ \- don't you already have all my information?" a bit jokingly, and she laughed a bit. I then told her I wasn't at my computer, but if she Binged my name, my site would come up, and she could grab a resume from there. A few mumbles later, I got "OK, got it! I'll get back with you in a couple days with the answers to those questions!" I'd asked a couple questions about the job. That was early August - no followup. As unprofessional as any other hack recruiter imo. I guess I shouldn't have expected more, but I did.

tldr: I told Google to Bing me.

<comment><USER14> To be fair, it was reasonable for her not to assume that whatever she found on a search would be up-to-date. Some people also like to tailor their resumes for the recipient.

<comment><USER13> to be fair, they had more than a week to go google me and see that the resume was the latest one. there are exactly 2 people with my name on the planet, and only one does much of anything on the internet (me).

"Do you have a more recent resume available? The one I have looks like was last updated in 2007" would be far more respectful - it would show you're looking at it, parsed it out, and are giving the other person a chance to polish things up if they want.

"HEY! I just found your resume! .... Send me your resume!"

"Waiter... I was just looking at your menu... things look really good. Could you please bring me your menu?"

It just sounds stupid.

</comment></comment></comment><comment><USER4> If im ever being interviewed by Google, i'm going to say "hold up let me google the solution to that real quick."

A good engineer spends about 95% of their time discovering new things to learn about their craft. An even better engineer uses what other engineers have already discovered and shared with the world to further their understanding.

If the world only consisted of the "even better" engineers things like this wouldnt ever exist. [http://swtch.com/~rsc/regexp/regexp1.html](http://swtch.com/~rsc/regexp/regexp1.html)

When I hear, "I want you to develop a mini google.", I feel that the only right answer to the question is, "No thats not a problem that needs to be fixed anymore. Lets actually fix a real world problem that affects real world people."

There are very few new generation software engineers that are truly hackers at heart. Its really sad when a company like Google doesnt even know how to look for them anymore.

<comment><USER15> > If im ever being interviewed by Google, i'm going to say "hold up let me > google the solution to that real quick."

If Google just wanted people to take existing publicly known parts and hook them together, they would be recruiting people fresh out of community college instead of fresh out of masters and PhD programs, and they'd be offering around $50k/year salary.

Google is trying to find people who can create the parts that ordinary programmers hook together.

<comment><USER16> I can't hire IT in Chicago for $50k/yr.

</comment></comment></comment><comment><USER17> How is that a good answer at all? If I was asking a candidate that question, I'd expect them to make an inverted index

<comment><USER18> I imagine that might have been a follow-up. Given that he was specifically asked to write a "search" method (and not something more open-ended), the more direct search through the docs might have been what the interviewer intended (though it might have been a plus if the author had said something about some sort of indexing off the bat).

</comment></comment><comment><USER19> On a related note, given that Google has been using their hiring and employee performance data to try to improve their interview process ([http://www.linkedin.com/today/post/article/20130620142512-35...](http://www.linkedin.com/today/post/article/20130620142512-35894743-on- gpas-and-brain-teasers-new-insights-from-google-on-recruiting-and-hiring)), I wonder whether they have also managed to identify good and bad interviewers.

</comment><comment><USER20> not a bad read but please less "failcatz" pics on the body next time. maybe they can be tiled on the side or something?

<comment><AUTHOR> I tend to go with more humourous bits like that on weekend posts; that's my style.

</comment></comment><comment><USER21> +1 for "get up and deal with it".

</comment><comment><USER22> Well since he was asked to make a " _mini_ google" speed and parallelism are non-concerns.

</comment><comment><USER23> So your plan for your mini Google was to iterate through every entry in the index? (Setting aside the ludicrous idea of iterating through a hash when you can just ask it for a value by key... or am I missing something? Please enlighten me if I am.)

<comment><USER7> I think you misunderstood the problem statement. The hash is keyed by the URL and the value is the body of the HTML page. The input to `search` is a term, so you would need to check all of the items to see which one contained the term in the HTML. The subject could not just index directly into the hash.

<comment><USER24> If you're just doing keyword matching, you're best off building one of these first:

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

As for the interview, I really wouldn't sweat it. Even if you didn't do well in the eyes of your interviewer, 1. there are several interviews that they are looking at, not just one, 2. people understand that folks get nervous and can screw things up sometimes, and that whiteboard (or google document) coding isn't the best measure of intelligence. Because of this, they're usually more interested in how you respond to feedback than the merits of your first attempt, and 3. there's a lot of luck to any interview process - <USER2> questions get picked, etc. and even if you don't do well I wouldn't discourage you from trying again in the future.</comment></comment></comment>


How to post Facebook status update of more than 420 characters? - <AUTHOR> http://www.indyarocks.com/blogs/blog_visiterview_comments.php?post=221237

<comment><USER2> <http://apps.facebook.com/unrestrictedstatus/></comment>


Apple Invents a Killer 3D Imaging Camera for iOS Devices  - <AUTHOR> http://www.patentlyapple.com/patently-apple/2012/03/apple-invents-a-killer-3d-imaging-camera-for-ios-devices.html

<comment><USER2> <http://en.wikipedia.org/wiki/Nintendo_3DS#Cameras></comment>


Why New York City Stopped Building Subways - <AUTHOR> https://www.citylab.com/transportation/2018/04/why-new-york-city-stopped-building-subways/557567 <comment><USER3> NYC should stop building subways with tunnel boring. Instead, tear up the street, build the darn thing and then rebuild the street over it. This method is called cut and cover and it's what many countries do because it's substantially cheaper and faster:

[https://ny.curbed.com/2017/9/19/16335068/nyc-subway-mta- stat...](https://ny.curbed.com/2017/9/19/16335068/nyc-subway-mta-state-of- emergency-solution)

Imagine if the 2nd ave line was done this way - sure you'd get a lot of pissed Upper East Siders, but their property value is going to skyrocket from the project anyway. As far as I'm concerned, they could deal with a year of inconvenience instead of getting it built over decades for magnitudes of money more.

Of course, the City Council would never agree to this plan. It's easier for them not to disturb anyone if they want to be re-elected...

<comment><USER4> You may be overestimating how easy cut and cover is. I live in the city of Antwerp where they decided to dig up the central crossing that connects the main shopping street with the main traffic hub, to redesign it so cars would go underneath and shoppers can walk across the crossing unimpeded. It was planned for 18 months, and now is projected to be closer to 3 years.

This is what it looks like when you do such a thing:

[https://gvacdn.akamaized.net/Assets/Images_Upload/2017/08/18...](https://gvacdn.akamaized.net/Assets/Images_Upload/2017/08/18/12224bba-837c-11e7-b40e-532a965b2906_web_scale_0.0592116_0.0592116__.jpg?maxheight=465&maxwidth=700)

The stores in the neighborhood are complaining that they'll probably go out of business before the works are done.

<comment><USER5> > You may be overestimating how easy cut and cover is.

You're right. In fact, the Market Street passage of BART/Muni in San Francisco was a cut and cover. The closure of Market Street and delays in construction caused a lot of damage. Not the least of which the collapse of businesses[1]

The Theaters went out of business, became porn cinemas and liquor stores. Much of what Civic is today was a result of that era.

Not to say Cut and Cover was the 100% cause - but it was a major, major contributor.

1: [https://hoodline.com/2016/07/in-their-words-the- convergent-h...](https://hoodline.com/2016/07/in-their-words-the-convergent- histories-of-mid-market-and-civic-center)

<comment><USER6> Vancouver too. The Canada line expansion killed the vast majority of cambie's family owned / small businesses.

<comment><USER7> Having recently witnessed the boom in construction around the Canada Line stations, I'm not sure I agree. Many businesses on Cambie are doing very well, including some that hung on through the difficult time when the line was being built. Yes, some went out of business and that is sad, but many survived and fortunes seem to be up as a result.

<comment><USER8> These are the vultures who got fat on the carcasses of those that didn't survive.

</comment></comment></comment></comment></comment></comment><comment><USER9> Beyond the constant delays and overcrowded trains, the biggest impediment I experience is the lack of _subways to the airports_. LGA doesn't have any train lines, while JFK and EWR have "airtrains" separate from the MTA or PATH.

Chicago's "L" goes directly to both ORD and MDW. My brief time there showed that things could be far more connected than New York's system.

<comment><USER10> American cities are the worst when it comes to this.

Seattle just built a train to the airport (yay) but for bureaucratic reasons, it doesn't actually go _in to_ the airport. It goes to the far edge of the airport, so you have to lug your luggage outside through the entire parking lot.

Meanwhile, everyone who took an Uber can step right into the departures area.

And, as you mention, New York is much much worse in this regard. The AirTrain from JFK costs $5, more than it costs to go from _anywhere to anywhere else_ in all of NYC on the subway.

<comment><USER11> Airport transit investments are, sadly, incredibly hard to justify. Since airports tend to be located in far-flung, less-populated parts of cities (or entirely outside of cities), it faces the deadly combination of being expensive to build (greater length/mileage of line) and having low ridership (relative to the rest of the transit system).

It's a highly salient point of failure for visitors, and generally is bad PR. But besides _looking bad_ , it's not clear that investing in single-seat-to- terminal trains to the airports are actually the best use of very limited dollars.

The JFK AirTrain for example has a ridership of ~11,000 per day. There's an argument to be made that those riders have greater economic impact than average, but ultimately that ridership resembles some of the more far-flung residential neighborhood subway stations (see: Graham St L, Bergen St F, 145th St 1 in Harlem, etc).

Compare that with parts of the system that are in dire need of maintenance/renovation with much greater ridership (see: Herald Square - 125,000 riders a day, Union Square - 106,000 riders a day, Times Sq - 202,000 riders a day).

In a world where costs are under control and funding abundant, I am all in on airport links, but right now? Right now I'm not convinced this is where money should be going, as much as it sucks for someone who flies a lot like me.

<comment><USER12> > Airport transit investments are, sadly, incredibly hard to justify.

Somehow other countries manage to justify it. Tokyo, London, Paris (TGV too!), Amsterdam, Frankfurt, Beijing... the list goes on. But somehow building infrastructure is hard to justify in the US. Pennywise and pound foolish.

<comment><USER13> Very few of those places built the airport extension first, or spent the entire bank account on just the airport extension. Given limited dollars, airports are at best a middling concern.

<comment><USER14> Limited dollars you say? How are the limited for the most powerful country in the world with the strongest economy?

<comment><USER13> A combination of low appetite for taxes, poor spending, and the disadvantages of being the first movers when it comes to infrastructure.

China is able to rapidly build infrastructure because it didn't have very much. In twenty to fifty years when everything is dur for replacement, that will be the true test of infrastructure.

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> This article touches on but doesn't explore in great detail the history of elevated lines in NYC. Some of their traces have been incorporated into the current system, most notably as the 7 train in Queens and the J/M/Z (including the Ridgewood/Middle Village spur), but many were torn down.

Some lines in Brooklyn that people aren't even aware of (beyond the 2nd and 3rd Ave lines):

* The Myrtle Ave elevated, running from Downtown Brooklyn down Myrtle and connecting with the M's Ridgewood spur. Torn down in the 1960s.

* The Lexington Ave elevated, running from the Brooklyn Bridge waterfront across Downtown Brooklyn and Bed Stuy, connecting to the current J/Z line near Broadway Junction. Torn down in the 1950s.

* The Fulton St elevated, since replaced by the A train, that ran over Fulton St all the way into Downtown Brooklyn. Torn down in the 1940s.

You can see these elevated lines crossing Northern Brooklyn in this map from 1949: [https://www.nycsubway.org/perl/caption.pl?/img/maps/system_1...](https://www.nycsubway.org/perl/caption.pl?/img/maps/system_1948.gif)

I personally would have found these lines quite useful, but what took their place was a collection of bus routes, running along old streetcar routes (read: weird routes that stop suddenly at borough and neighborhood boundaries). And NYC buses cannot be trusted...

<comment><USER16> > You can see these elevated lines crossing Northern Brooklyn in this map from > 1949: > [https://www.nycsubway.org/perl/caption.pl?/img/maps/system_1...](https://www.nycsubway.org/perl/caption.pl?/img/maps/system_1948.gif)

One of the commuter tips is "Try to shop between 10 and 4". Were shoppers overwhelming the peak-hour commuters?

EDIT: other interesting things on the map: the 5-digit telephone number.

<comment><USER17> > other interesting things on the map: the 5-digit telephone number.

It's not 5 digits, it's 7: MAin 5-6200. The first two digits are 6 (M) and 2 (A): 625-6200. Telephone exchanges used to be named, this particular one was called MAin.

See also [https://en.wikipedia.org/wiki/Telephone_exchange_names](https://en.wikipedia.org/wiki/Telephone_exchange_names)

</comment></comment></comment><comment><USER18> As a native Detroiter one of the saddest things to me was that the city never got a subway. I don't believe you can have a truly world class city without a subway.

There were multiple efforts to create a Detroit subway starting in 1910 but each one fell short. Finally in late 1928 the subway was approved! Two stations were built but construction stopped with the great depression. Today sadly no one even knows the location of the two stations.

Here's the winner of a dream subway contest for Detroit:

[http://jackson-woods.net/transit/wp- content/uploads/2014/01/...](http://jackson-woods.net/transit/wp- content/uploads/2014/01/DM1800_b.png)

<comment><USER19> I don't know the detailed history at all, but in an intuitive & oversimplified way, I wouldn't think big transit projects ever had much of a chance in the home of the auto industry. Seems like they would want to demonstrate what an automobile utopia looks like.

<comment><USER18> Well the auto industry did fight the subway which is why despite overwhelming support it took so long.

Detroit did have an extensive trolley system. I found out that when the trolley's were secretly purchased and discontinued by GM in 1956 that 25% of Detroit families didn't have a car. The majority switched over to the bus lines which were expanded. Course the buses were made by GM ;<).

[https://en.wikipedia.org/wiki/General_Motors_streetcar_consp...](https://en.wikipedia.org/wiki/General_Motors_streetcar_conspiracy)

<comment><USER20> My god, did that happen to _every_ trolley line? Makes me want them back all the more.

<comment><USER21> That makes sense to me? Buses are environmentally equivalent to trolleys, cheaper, both have to deal with traffic, etc. In most cases the fact that buses are more flexible is good but inflexibility can sometimes be useful in terms for getting people to believe you're really going to stick with a new route and therefore it makes sense to start a business on it.

Now if they were replacing subways or light rail with buses that would be horrible.

<comment><USER14> Having a dedicated line to travel on helps and preference at traffic lights helps a bunch. I think you underestimate the amount of delays buses have to deal with when they also have to be in traffic.

<comment><USER21> Both trolleys and buses can have dedicated lines of travel or you can force them to share their lanes with other traffic. And both both buses and trolleys can be given light priority or they can wait with everybody else. The issues you're raising are totally orthogonal to bus versus trolley. Cities with good bus or trolley systems do these and cities with worse but cheaper systems don't. And another good way to speed up buses or trolleys is not forcing them to pull out of traffic when they stop to pick up customers by having special islands or having the curb extend into what would otherwise be parking spaces.

<comment><USER14> It probably does depend on the infrastructure choices the city implements. I don't see a lot of buses systems that have isolated islands, dedicated lanes, etc. I do see them frequently for street trolleys.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER22> One of the things the NYC region could do is unify operations and planning of NJ transit, LIRR, and Metro North into one through running network with a tunnel from GCT south with two more Manhattan stops then across the Hudson to another main station where the Hoboken terminal is (a bit more inland likely). Overtime the systems and fleets can merge.

Instead you get this absurd patchwork of expensive stand alone projects, ARC, the huge building over of of a cap on the LIRR Hudson railyards which required maybe a billion in spending. Talks about a new Penn Station. Etc.

As a plus you reduce the demand on the existing Penn tunnels used by Amtrak.

If this had all be planned as one system the money already spent or being proposed to be spent on these disparate/disconnected things could provide do wonders.

<comment><USER23> Does any cross state combined public transit effort even exist in the US? Maybe DC, I am not familiar with Washington DC.

It's a nightmare in my city just between neighboring counties. Only 2 counties were included in the initial build out of public trains and not any significant expansion since. The other counties vehemently reject any such proposals. One county is going through expansion talks again but the train will only go one stop to their bus hub. I bet they will end up rejecting all of it.

NIMBYism isn't very strong in my city but it certainly is regarding public transport, trains especially.

<comment><USER24> There's not a lot of places in the country with "true" interstate integrated transit needs. Places like Chicago have far suburbs and exurbs within the commute shed in other states but are still generally within state. Even cities like St. Louis generally have a clear dominant locus in one state, which limits the ability of the other state(s) to play off the other state.

The general exceptions to this rule are Kansas City and Washington, DC, where the workplace loci are truly distributed among multiple jurisdictions so that no one state is dominant. In DC, the standard subway (WMATA) runs across all three jurisdictions, although there is some amount of political football over funding. The commuter rail systems are not integrated, but that is largely due to limited capacity over the Long Bridge. (MARC, the Maryland system, is participating in the Long Bridge replacement project in part because they do intend to extend service to Alexandria once there's capacity to do so).

NYC is a truly special case because it's simply so massive. In terms of geographical boundaries, there are roughly three natural independent sheds: trans-Hudson, trans-East, and trans-Harlem rivers. Each of these sheds is massive enough to let each of the three commuter systems that focus on their own sheds to not have to coordinate. These sheds also happen to largely coincide with different states: NJ is trans-Hudson, NY (or, rather, Long Island) is trans-East, and CT (as well as parts of NY) is trans-Harlem.

<comment><USER25> Even in DC, there is a lot of public transit not managed by WMATA. While WMATA runs the MetroBus system, each jurisdiction also has its own bus system beyond that, in part because none of the jurisdictions wants to have to negotiate with all their neighbors to make service changes to routes that start and end within their own borders.

DC's MetroRail system has a very large share of rides that begin in one jurisdiction and end in another, so it makes a lot of sense for it all to be managed centrally by WMATA. But I suspect there aren't a lot of commuter train rides that begin in Connecticut and end in Suffolk County (or that start in Baltimore and end in Prince William County). Given that, just how would a MetroNorth/LIRR merger help riders?

<comment><USER24> The main benefit from the proposed merger would be solving issues with Penn Station: you could eliminate some of the separate concourses, easing overcrowding; by through-running trains, you could also increase the number of trains serviced without having to build an expensive new station.

</comment></comment></comment></comment></comment><comment><USER26> It's a decent article but at the end I found it glaringly silent on the current state of the "lure of the suburbs." Isn't that waning? That seems important here.

To summarize, the article is premised on "three broad lines of history":

\- lure of the suburbs

\- battles over control

\- deferred maintenance costs

It concludes by noting how battles and costs are still big factors, but nothing on the "lure of the suburbs." It just mentions in passing that the city population is growing, but doesn't connect any dots. The diagram makes it seem like that yellow "line of history" is still sky high off the charts.

But there is in fact a big migration back into the cities. People don't want McMansions in the burbs as much. Empty nester baby boomers are moving back too. This is undoubtably why the article is written in the first place and what is placing more pressure on overcoming the other two problems.

<comment><USER27> Everyone slices the numbers differently, but it's pretty hard to say the suburbs are dying out based on the data. [https://www.vox.com/2015/1/22/7871687/death-suburbs- myth](https://www.vox.com/2015/1/22/7871687/death-suburbs-myth)

"This shows that at almost every age level, the country continued to de- urbanize from 2000 to 2013. Various trend pieces about empty nesters moving to the big city simply aren't reflected in the data."

My experience is that people are overall more willing to trade space for urban convenience than they used to be, but still not so willing/able to trade both space and _affordability_ for it. In places where the suburbs are also stupidly expensive - NY and CA - you don't see it as much. Everywhere else in the US - where property in the suburbs gets dramatically cheaper once you're five, ten, fifteen miles outside the city center - that's hard to resist.

<comment><USER26> Didn't say that. I said that _lure_ of the suburbs is waning. Skyrocketing costs in cities are a symptom of that and the Vox article concedes as much.

<comment><USER27> You said "there is in fact a big migration back into the cities" and that's the part that the numbers disagree with.

Instead, there has been a slowdown in the continuing move to the suburbs. And a suburb-centered population is one that still won't move so quickly on transit and the like, at a state and national level.

<comment><USER26> No, population growth in the burbs alone does not disprove migration into the cities. As I said, skyrocketing costs in the cities are evidence of this. With respect to city transportation infrastructure, wealthier people moving in and developers building up capacity are significant forces in affecting policy.

</comment></comment></comment></comment></comment><comment><USER28> What's fascinating to me about this history is that most of NYC's subways system was built by two private competing firms, the IRT and BRT. The city then became heavily involved first by creating the competing but government financed IND, then with price controls, and finally a full takeover. Once it was a publicly owned monopoly the NYC Subway's long decline began.

Pretty much the same thing happened in SF but with street cars instead of subways.

<comment><USER29> This is spot on and the same observation I had, yet I'm puzzled as to why it was downvoted. A system that profits simply runs better. The best rail systems in the world in Japan are for-profit.

[https://www.citylab.com/transportation/2012/05/secret- tokyos...](https://www.citylab.com/transportation/2012/05/secret-tokyos-rail- success/2044/) (<\-- also from citylab.com)

[https://www.quora.com/Is-Japan-rail-profitable](https://www.quora.com/Is- Japan-rail-profitable)

<comment><USER30> The big difference is not for-profit status, but the fact that Tokyo's and Hong Kong's subway operators own much of the property around the stations, and make a ton of money leasing it: [http://money.cnn.com/2015/03/30/news/hong- kong-mtr-subway-pr...](http://money.cnn.com/2015/03/30/news/hong-kong-mtr- subway-property/index.html). Economically that makes a lot of sense. Transit infrastructure creates a positive externality: it benefits not only the rider, but the shop or office that the rider goes to. NYC's MTA can only recover from one side of the transaction: the rider. JR and MTR, as major landlords around the stations, can recover from both sides, capturing some of the positive externality.

</comment></comment></comment><comment><USER31> A name mentioned twice might have warranted a paragraph. Robert Moses, the subject of "The Power Broker" a Pulitzer Prize-winning biography (worth an audiable credit).

He ran the Triborough and build a lot of bridges, parks, parkways etc. Most of those bridges do not have rail decks, because he also believed the future was cars, and rail would compete with his source of revenue, toll fees.

It is hard to overstate the impact that one person had on the NY infrastructure, but this article very much understates his impact.

</comment><comment><USER32> User costs for transit were pretty low in the early 1900's. The article says that in 1947 they finally increased the fair from 5¢ to 10¢ -- $0.61 to $1.12 in 2018 dollars. New York's fare is now $2.75, and in my city it's closer to $5.

<comment><USER33> On one hand, transit should be heavily subsidized and not profitable because profit motives in infrastructure choke the force multiplier economic effects of having said infrastructure. You need some kind of mechanism to disincentivize overuse though, so the 5 or 10c fare worked at the time for that purpose.

On the flipside, the NY metro is so decrepid and underbuilt for its demand if you didn't have inflating fares driving potential travelers to clog up other, less efficient transit systems the lines for trains would be out in the streets nearly 24 hours a day.

<comment><USER34> Profit motives in infrastructure don't necessarily choke anything. If you want cheap fares, ensure there is some competition. And if you really want to, you can subsidize fares. They don't need subsidies in Tokyo though, all of the companies running train lines are generally profitable.

</comment></comment></comment><comment><USER35> It's remarkable that an article that in-depth managed to not make a single mention of the word "union", when unions played the central role in driving up costs.

I think that points to the meta problem hamstringing development of subways, and so many other things: the hold unions have over not just politics, but culture, and especially academic culture.

</comment><comment><USER36> This was an April fools joke but hit's every good policy idea NYC could do spot on. [https://pedestrianobservations.com/2018/04/01/new-york- area-...](https://pedestrianobservations.com/2018/04/01/new-york-area- governments-to-form-a-coordinated-transportation-planning-agency/)

From a local controlling agency, from unifying our commuter rails, from joining with the path. All these things would be good for the city and people who live here but I cry because I'll never see a sliver of it in my lifetime.

</comment><comment><USER37> If you want to compare the development of Moscow subway from 1935 till now and planned 2020 [https://stroi.mos.ru/mobile/metro](https://stroi.mos.ru/mobile/metro)

And the map as a pdf [https://stroi.mos.ru/uploads/media/file/0001/61/81fbd34f4412...](https://stroi.mos.ru/uploads/media/file/0001/61/81fbd34f4412d3cdbb341d4f3589e1820974344c.pdf)

</comment><comment><USER38> Apologies for the strong tone, but how many articles do we need to actually get something done? It's exhausting to see article after article without action.

<comment><USER39> Ah. You've not lived the experience that's Toronto transit:

1\. Eglinton Crosstown started in the 1990s. They started boring, and when Mike Harris became premier he cancelled the project, so they filled in the existing tunnel.

2\. Sheppard subway (aka. the Stubway) built despite objections of planners, who said that it would be woefully underused. Built anyways because of political pull. 16 years later, still woefully underused.

3\. Transit City proposed and supported by provincial government. First, funding was reduced by the provincial Liberals. Then, Rob Ford, claiming a "war on the car!" cancelled it, pushing all the money into...

4\. The Scarborough Subway. Originally estimated at a 3-stop 2B line, it's now a 1-stop 3.5B+ line - and its cost keeps climbing. All politicians support it because Scarborough is vote-rich territory, despite its ridership projections being _lower_ than that of the Sheppard subway. It's a frickkin mess.

5\. Meanwhile, the Relief Line (which everyone acknowledges is needed) languishes because of the perception that it'll serve the "downtown elite".

I mean - it's not all doom and gloom I suppose: the Crosstown is finally being built, again, 25 years later.

</comment></comment><comment><USER40> That's a pity. NYC subway could greatly benefit form circular lines or lines that go from west to east in addition to those from north to south. It's often required to take completely convoluted subway routes because of lacking connections.

</comment><comment><USER41> Is there an possibility of a smarter above ground (read: bus) system? What would be the effect of small buses running more often? Perhaps with a technology component that allows them to effect the timing of the traffic lights?

If you could cut back on car traffic - which is a positive regardless - <USER2> buses are going to benefit.

<comment><USER42> A bus can carry about 100 people max. A subway train can carry 1,000.

About 5.7 million people ride the NYC subways every day, buses aren't going to cut it.

For a real-world NYC example, check out the planning for buses to temporarily replace the L train: [https://www.nytimes.com/2018/04/03/nyregion/l-train- shutdown...](https://www.nytimes.com/2018/04/03/nyregion/l-train- shutdown-14th-street.html)

<comment><USER41> Yes. But other than rush hour or special events how often is that 1000 ppl capacity reached? Shouldn't the whole system be more flexible? Does everyone have to leave work at the same time? How economical is it to run subway trains with few passengers?

It seems that a whole lot of resources (i.e., money, including ongoing maintenance) is being tossed at outlier situations.

<comment><USER42> > But other than rush hour or special events how often is that 1000 ppl > capacity reached?

A single train can carry 1,000 people. It's not a "rush-hour event."

> Shouldn't the whole system be more flexible? Does everyone have to leave > work at the same time?

The work day is still roughly 9-5, nothing the MTA does is going to change employers' opinions on scheduling. Good luck telling your boss you want to come in 2 hours late to avoid subway overcrowding.

> How economical is it to run subway trains with few passengers?

Train frequency is slowed down significantly during non-peak hours.

Don't get me wrong, there are efficiencies to be had -- like not having a live human at every station 24/7 -- but unions fight those measures.

> It seems that a whole lot of resources (i.e., money, including ongoing > maintenance) is being tossed at outlier situations.

I'm not sure what you're proposing. Buses? Again, buses won't work -- see above.

They could massively increase fares but that is essentially a tax on poor people.

What they need is for both the state and city to cough up more money to address crumbling infrastructure and overcrowding.

<comment><USER41> > A single train can carry 1,000 people. It's not a "rush-hour event."

> Train frequency is slowed down significantly during non-peak hours.

Agreed. So with the exception of the outlier events there is A LOT of idle capacity. Capacity that was VERY expensive to build and maintain.

Traditional buses? Or a rethinking of above ground transportation, congestion, flexible work hours, whatever, etc.

BTW, I didn't notice anything here about off-hours / peak-hours pricing.

[http://web.mta.info/metrocard/mcgtreng.htm](http://web.mta.info/metrocard/mcgtreng.htm)

Given the cost to add more (excess) subway capacity, I don't see the warm in a pause and asking "what if"? What they tried once, where the only goal was a twist on the status quo, isn't the type of mindset I'm proposing.

p.s. If climate change goes as planned, (lower) Manhattan is going to be prone to more and more flooding, etc. Does it make sense to sink more money into the ground, for unrealized capacity?

I understand your example. Unfortunately, it's red ocean. We need a blue ocean approach at this point.

<comment><USER42> > there is A LOT of idle capacity

The MTA's biggest problems right now are overcrowding and old, crumbling infrastructure, not idle capacity.

This article just pointed out we're chasing our tails so much on those 2 problems we don't even think about (gasp) adding new subway lines, although it argues because we're more committed to cars as a form a transit.

> rethinking of above ground transportation, congestion, flexible work hours, > whatever, etc.

Since the Bloomberg Era the city transportation dept has added thousands of miles of bike lanes but there's not much more it can do to "rethink" above- ground transportation.

Flexible work hours are just a nonstarter for most companies. Starbucks going to let you start your shift late? Goldman Sachs? No.

> where the only goal was a twist on the status quo,

What constitutes a twist? What specific policy proposals would change the reality of public transit? DeBlasio proposed a Brooklyn trolley line -- the kind of "out of the box" thinking you're proposing -- and it's gotten nowhere.

> I didn't notice anything here about off-hours / peak-hours pricing

The pricing is always the same it's just that the trains run at different frequencies. During rush hour they can come every 3-4 minutes, in the middle of the night every 30 minutes.

There are no magical fixes to NYC's transit problems. It just requires more money (via higher taxes) and better management.

</comment></comment></comment></comment></comment></comment><comment><USER43> I suspect that once we have switched fully to autonomous cars on the road, the subway will cease to exist.

<comment><USER14> If recent events are any signal, that won't happen for a while. Here's a good sobering reading[0].

[0] [https://spectrum.ieee.org/cars-that- think/transportation/sel...](https://spectrum.ieee.org/cars-that- think/transportation/self-driving/toyota-gill-pratt-on-the-reality-of-full- autonomy)

</comment></comment><comment><USER44> Private US money didn't just build NY subway lines, London's Central Line was also built by an American.

</comment><comment><USER45> On the average morning or evening commute, there's at least 2 - 3 lines with delays, and even a couple with "planned work". My commute tends to blow up twice a month, and I have to take a Juno/Uber/Lyft.

</comment><comment><USER46> Cost per mile has risen 10-20x in inflations adjusted dollars? That's your problem right there.

</comment><comment><USER47> Why not just dedicated bus lanes to avoid the need to go underground?

<comment><USER48> There are already bus lanes. The bus can't move people nearly as far nearly as fast as an underground transit system.

</comment></comment><comment><USER49> CMD + F "union" 0 results CMD + F "corruption" 0 results

<comment><USER50> Could you write the article which explains the problem through those lenses?

<comment><USER24> The NYT already did so: [https://www.nytimes.com/2017/12/28/nyregion/new-york- subway-...](https://www.nytimes.com/2017/12/28/nyregion/new-york-subway- construction-costs.html)</comment></comment></comment>


Siberian unicorns existed at same time as humans, new fossils confirm - <AUTHOR> http://www.syracuse.com/us-news/index.ssf/2016/03/siberian_unicorn_real_new_fossil_discovered.html <comment> semi-extrinsic My bullshit detector is going off big time here: a popsci article citing another popsci article on phys.org, which cites the original paper but with a broken DOI link, and the original paper being published in what looks like a really crappy journal, whose publisher is on Beall's list of predatory publishers.

Maaaybe the science is good, I don't know since I can't find the paper. But if it's good science, and this is a new and cool result, why is it published in a really crappy journal?

Edit: as itcrowd below says, and the paper conclusions also state, this study only confirms the dating of these remains. The first paper giving this dating is from 2014. Otherwise the paper looks like decent science, although I'm not a paleontologist. Publishing non-novel results is very difficult, and I now believe this is the reason for the choice of journal.

<comment><USER2> Link works for me: [http://thescipub.com/PDF/ajassp.2016.189.199.pdf](http://thescipub.com/PDF/ajassp.2016.189.199.pdf)

[http://thescipub.com/abstract/10.3844/ajassp.2016.189.199](http://thescipub.com/abstract/10.3844/ajassp.2016.189.199)

<comment> semi-extrinsic The DOI link doesn't: [http://dx.doi.org/10.3844/ajassp.2016.189.199](http://dx.doi.org/10.3844/ajassp.2016.189.199)

</comment></comment></comment><comment><USER3> I know the title says that this fossil _confirms_ that the species were alive much later than anticipated, but it is not quite clear from the text of the article on Syracuse (or I misread?) that there was an earlier discovery of this species [with the same young age]. Below are the relevant passages from the scientific article.

From the discussion:

> _Earlier, a series of the same young radiocarbon dates was obtained by our > colleagues from Ekaterinburg (Kosintsev, 2014) on the bones of > elasmotheriums from localities southwest of the West Siberian Plain._

From the conclusion:

> _Our study following the data by Kosintsev (2014) confirmed the longer > existence of Elasmotherium sibiricum within the territory of the West > Siberian Plain._

edit: link to scientific article is in the Syracuse article, or here [pdf warning]: [http://thescipub.com/PDF/ajassp.2016.189.199.pdf](http://thescipub.com/PDF/ajassp.2016.189.199.pdf)

<comment><USER4> It was named in 1808, so it must have been discovered before then.

[https://en.wikipedia.org/wiki/Elasmotherium#Discovery](https://en.wikipedia.org/wiki/Elasmotherium#Discovery)

The news is about the recent finding of a skull in Siberia, which they were able to use to date the species to only 29,000 years ago.

<comment><USER3> Sorry, my post might not have been clear enough. What I meant is that (Kosintev, 2014) already dated the species to ~30,000 years old two years ago. This new publication merely confirms that.

</comment></comment></comment><comment><USER5> Are these fossils the origin of the unicorn myth? None of the articles I've stumbled across have an image of the actual fossil, I'm curious how similar it is to a horse skull. They were surely extinct well before the mythology, but their bones were around. The unicorn myth comes from the Indus Valley, which isn't too far away, relatively speaking.

Reminds me of the ancient Greeks turning elephant skulls on Crete into the cyclops.

<comment><USER3> There are images of a single skull fragment in this scientific article, but it's just one piece from multiple angles.

</comment></comment><comment><USER6> I'm a little skeptical of this since it is not appearing in a major national publication such as the New York Times, a peer-reviewed journal such as Nature, or a well-respected blog such as Laelaps. Also, it is too close to April Fools Day to be certain it was mean to be taken seriously.

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

</comment></comment><comment><USER7> April fool's day reminder: give it a couple of days, assume it's a joke until then.

</comment><comment><USER8> There is no way that animal is worth $1billion. Not even close to a unicorn.

</comment><comment><USER9> This is great. I can now win bets that unicorns were real.

<comment><USER2> They're short and fat, and people call them rhinos.

<comment><USER10> Don't rhinos have two horns?</comment></comment></comment>


House of Cards: Why Analysts Fear $1 Trillion Credit Card Market Could Be Next Crash - <AUTHOR> http://washingtonindependent.com/26372/house-of-cards

<comment><USER2> The headline is pretty misleading. The article is largely about the problem of consumer credit being curtailed by the banks, not about anything crashing. It does say that there are fears that the credit card default rate could rise above 8%. 8% of one trillion is 80 bn, which seems pretty managable to me compared to what's happened in the mortgage market.

<comment><USER3> Like mortgages, credit card debt that has been securitized has leverage on top of leverage, so even an 8% default rate will do very bad things to banks and other companies who have purchased it using leverage. (Often, the securitized product _itself_ is leveraged.)

People were saying things like this in the early stages of the sub-prime crisis, when the default rate was still well below 10%, and everyone was saying, "The default rate is so low; why in the world is it causing all these problems?"

Welcome to the wonderful world of leverage.

<comment><USER2> Credit card debt is much less securitised than mortgage debt.

<comment><USER3> You're right. Only about half of credit card debt is securitized, while about 90% of mortgage debt was.

However, the banks are in much, much more fragile condition than they were before, and this will have a disproportionate impact right now.

While it's not the end of the world, it's another thing piled on a whole heap of bad things.

It'd be a mistake to underestimate the impact of this, just as we've as a society so far made mistake after mistake in underestimating how bad this financial crisis would prove to be.

<comment><USER2> I completely agree about the compounding effect of the credit card problem and I'm really far from being optimistic about the financial crisis. I think this has a long way to go.

If banks get deeper into trouble and smaller countries have to rescue them, eventually people will ask whether those countries are going to default and who gets hit by that and so on.

</comment></comment></comment></comment></comment><comment> puzzle-out Anecdote: when I started uni in 1999, and went to the freshers fair, there were four major high street banks with stalls offering credit cards. The average credit card debt is now £2,000. I've never had a personal credit card, only a business card, but the complete lack of education/awareness in the UK over credit card debt is worrying.

</comment><comment><USER4> Personally, I don't see it happening. I think it's terrible the credit card debt that people have gotten into, but I don't think it will crash.

Why? How hard is it to make minimum payments on a few credit cards? A hundred a month? Credit cards have terms that allow borrowers to just keep going. Typically, it means that people end up paying way more than they should, but in this case it also means that they're unlikely to default.

Plus, what are credit card bills as a percentage of one's budget? Usually a much lower percentage than housing. So, it would be easier to pay credit card bills than mortgage bills even if they were to be on the same terms.

The level of credit card debt is very worrisome and I hope people reevaluate that situation, but I don't think we're going to see massive default rates simply because the way that credit card agreements are structured allows the borrower to make very low monthly payments for a long time rather than creating a confrontation that could lead to default (as mortgages do).

</comment><comment><USER5> this isn't really a new argument.. see this NYT article from October, which was one of the first major outlets to pick up on the story.. <http://www.nytimes.com/2008/10/29/business/29credit.html>

having said that, i completely agree that the CC storm is something to be concerned about

<comment><USER6> _the CC storm is something to be concerned about_

as is the commercial real estate crash that is in the process of unfolding... [http://www.calculatedriskblog.com/2009/01/cre-when- reserve-r...](http://www.calculatedriskblog.com/2009/01/cre-when-reserve-runs- dry.html)

many local and regional banks have larger exposure to commercial real estate and construction loans than to residential mortgages

</comment></comment><comment><USER7> _In 2008, the average credit card balance was $11,212_

This has got to be skewed badly by those people who cleverly have 250,000 dollars at 1.7 percent (introductory) interest.</comment>


Show HN: DatPaw – Bitcoin Price Prediction with Tweet Analytics - <AUTHOR> https://datpaw.com/ <comment><USER2> Did you try trading on this data?</comment>


Kaspersky Lab cybersecurity firm is hacked - <AUTHOR> http://www.bbc.co.uk/news/technology-33083050

<comment><USER2> I can only hope that the 0days used were reported.

<comment><USER3> From their pdf report [0]

>>> In the case of Kaspersky Lab, the attack took advantage of a zero-day (CVE-2015-2360) in the WindowsKernel, patched by Microsoft on June 9 2015 and possibly up to two other, currently patched vulnerabilities, which were zeroday at that time.

[0] [https://securelist.com/files/2015/06/The_Mystery_of_Duqu_2_0...](https://securelist.com/files/2015/06/The_Mystery_of_Duqu_2_0_a_sophisticated_cyberespionage_actor_returns.pdf)</comment></comment>


Show HN: Curated list of resources that provide creative commons media - <AUTHOR> https://github.com/shime/creative-commons-media

<comment><USER2> How about archive.org?

Google image search has an option for usage rights.

<comment><AUTHOR> I didn't add archive.org because it's not a collection of only CC licensed stuff.

Google has the option, but you have to find it in the advanced search section and search.creativecommons.org already supports Google.

<comment><USER2> Archive.org is arguably the world's largest repository of public domain content, which is even better than CC.

You can search for CC licenses on archive.org, with a bit of effort on URL queries, [https://archive.org/post/54525/search-by- license](https://archive.org/post/54525/search-by-license)</comment></comment></comment>


Three Sins of Authors in Computer Science and Math - <AUTHOR> http://www.cs.cmu.edu/~jrs/sins.html <comment><USER2> Sin #4: no date on most papers.</comment>


NIST's policy on hash functions - <AUTHOR> http://csrc.nist.gov/groups/ST/hash/policy.html

<comment><USER2> Git uses SHA-1 to identify commits. Does this policy indirectly prevent the government from using Git (or similar systems) for version control?

<comment><USER3> No. This is an extremely misleading title. The "US Government" could care less what hash functions you use.

It's also not an interesting article. SHA1 has been suspect as a security primitive for years.

<comment><USER4> *couldn't care less

<comment><USER5> Oh, don't start with this. <http://incompetech.com/gallimaufry/care_less.html>

</comment></comment></comment></comment><comment><USER6> _SHA-224, SHA-256, SHA-384 and SHA-512_

is any one better than another? for instance, the way AES-256 and -192 are considered potentially less secure than 128, at least according to something i read from Schneier a while back.

<comment><USER3> There are attacks against AES-256 that haven't been extended back to smaller key sizes.

If you're typing the letters S-H-A-2-5-6 into your code, you're doing something wrong; you should be using GPG, or Keyczar, or some other high-level interface that has chosen the algorithms for you and deployed them safely.

That said, the standard practice today in new software that will be audited is SHA256.

All this web page says is "don't use SHA1".

<comment><USER7> _If you're typing the letters S-H-A-2-5-6 into your code, you're doing something wrong..._

Oh come on. This comment wasn't entirely unreasonable when it was about AES, but saying that nobody should use SHA256 directly is just plain silly. How do you verify that the FreeBSD ISO image you downloaded is intact if not by typing

      # sha256 FreeBSD-7.3-RELEASE-amd64-disc1.iso</comment></comment></comment>


PHP Design Patterns Reference and Examples - <AUTHOR> http://www.fluffycat.com/PHP-Design-Patterns/

<comment><USER2> I like how they call this MVC:

<http://www.fluffycat.com/PHP-Design-Patterns/Non-OO-MVC/>

No. That is called "calling functions".

As an aside, I really hope that nobody who reads this site uses PHP or goes out in search of design patterns to add to their application.

<comment><USER3> PHP is very fast..

OO deficiencies have mostly been solved by 5.3.

Your blanket generalizations will not get you anywhere.

<comment><USER2> _PHP is very fast.._

If by very fast you mean the second-slowest:

[http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...](http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=all)

I agree that it doesn't matter much. But why use a slow language with poor syntax when you could be using a fast language with beautiful syntax? (I won't go in to detail about how horrible PHP's object model is, or how it doesn't have lexically-scoped variables, or how it doesn't have closures or even anonymous functions, ... or a host of other features that most programmers have been enjoying for the last 30 years.)

<comment><USER3> No question PHP is weak in some areas, although trying to compare languages is sometimes like trying to compare cats and dogs.

Also, second slowest? Compared to what? And in what scope, and trying to solve what problem? Last I checked, there were more than 25 languages, and only a few of the ones listed there are suitable for the web.

<comment><USER2> Which ones aren't suitable for the web? Maybe Fortran, but I know of people with successful production web apps in most of those languages; Perl, Ruby, Python, CL, OCaml, Haskell, Lua, C++, and Java.

</comment></comment></comment></comment></comment><comment><USER4> nice one!</comment>


Sean Parker's email to Daniel Ek and Shakil Khan [Spotify] - <AUTHOR> http://www.scribd.com/doc/67465758/Sean-Parker-s-Email-to-Spotify-s-Daniel-Ek

<comment><USER2> _"While you could have built a "thin" client that runs in the background and powersweb based streaming, why go to all the trouble of building and distributing client software when you could build the real experience? There is tremendous value in controlling the client software real estate and it allows for a much snappier experience"_

I wonder where else he thinks this might apply</comment>


Man Finds His Photography Used Around the World Without His Knowing - <AUTHOR> http://www.petapixel.com/2011/03/09/man-finds-his-photography-used-around-the-world-without-his-knowing/

<comment><USER2> Sorry for that. But I came to know about tineye.com which can help victims lile you.</comment>


Tradeoffs in Cyber Security - <AUTHOR> http://geer.tinho.net/geer.uncc.9x13.txt

<comment><USER2> Dan is always worth reading. It seems to take me 6 months an average to process what he's saying and see it in the real world but he consistently adds to my knowledge.</comment>


GopherCon 2019 Liveblog - <AUTHOR> https://about.sourcegraph.com/go/ <comment><USER2> Not about the protocol :(

For those that don't know, apparently gopher is also some sort of programming language for surfer dudes.</comment>


FP vs. OO, from the trenches - <AUTHOR> http://blog.fogus.me/2013/07/22/fp-vs-oo-from-the-trenches/ <comment><USER2> For all those hating on this blog post: It's short, but it doesn't have to be long to be useful, and apparently it is useful given a substantial chunk of the comments here. If it wasn't news to you then ignore it, otherwise appreciate that not everybody is quite as enlightened as you are.

HN has a tremendous reach these days, from pioneers in the field to total (and often clueless) newbies. Fogus felt compelled to write down his thoughts, someone else saw fit to post it and as of this moment 100+ people thought it was useful enough to vote it up. If that's not validation enough for you then remember that time when you spent half a day tracking down an endless loop and you had to ask a more seasoned programmer to point it out to you.

Fogus is a respected member of the community because he tends to write down what he thinks in a way that others _much_ further down on the totem pole can grasp it too, his articles are not upvoted because he's 'well known' but mostly because people find them useful.

If you feel like this article was 'devoid of content' or whatever slur you feel like directing at it then please, write a better one.

<comment><USER3> That's not a real argument. You're essentially saying "respect because I said so."

The irony is your argument is just as flimsy and opinionated as everyone else's.

This article is devoid of content AND is written by a respected member of the community but neither of those things make it worth reading.

The great moral of the story here is, if you let the internet bother you, the internet will definitely bother you.

<comment><USER2> Content is not determined by the quantity of words on a page.

Some of the deeper links between linguistics and programming can be quite eye opening and it does not require a large number of words to put those down. If you find one of these, especially through your own work (as in 'from the trenches') then that should carry some weight with you.

If you're doing this independently and re-discovering something that apparently a lot of people such as you have already found out or learned about elsewhere then indeed it is devoid of content. But I'll bet that it wasn't the case for the majority of those that read it.

Lots of programming wisdom is so terse that we have acronyms for it (DRY for instance), that does not mean there is no content there.

Anyway, enough said, I think it is worth reading, and worth 'grokking' for want of a better word, in case you had not already discovered this. Naming stuff is one of the harder things in programming, that different streams of programming should lead to different groups of words being used to describe the code should probably come as no surprise and yet I find myself amazed that there are such deep connections.

<comment><USER4> For me, the big confusion comes from the fact that if you simulate people, you almost inevitably have to deal with data about people. How can those two be mutually exclusive?

Without a clear definition or concrete examples of what the OP meant by "simulate people" versus "data about people", the post is almost devoid of information (to me; apparently, a lot of people understood what OP meant).

<comment><USER5> _For me, the big confusion comes from the fact that if you simulate people, you almost inevitably have to deal with data about people. How can those two be mutually exclusive?_

They're not mutually exclusive: the inverse is not necessarily true. This is basically the entire point of the article. When you're just working with data, don't use constructs which are meant for simulation. It's a subtle way of saying "Don't model data about people (or any other piece of pure information) with mutable objects; prefer values instead."

</comment></comment></comment></comment></comment><comment><USER6> I have a version of this that I've used for years. _Objects make good nouns. Closures make good verbs._

Software organized around nouns looks different than software organized around verbs. Not better. Not worse. Different. Use what is appropriate.

<comment><USER7> _" Objects make good nouns"_

most 'objects' as they exist in today's OOP have methods, which makes them both nouns and verbs. Idiomatic code in most of today's mainstream OO languages doesn't make heavy use of closures, mostly only Javascript.

Anyway, the closures vs methods debate has been going on for decades is not a closed topic[1], and the answer certainly depends on the language you're using.

[1] [http://www.c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent](http://www.c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent)

<comment><USER8> I don't believe this is a nitpick, but fully encapsulated OO provides only nouns and verb _phrases_ that have a pre-specified noun. This is different from data structures (nouns) with collections of functions (verbs) that can act on many data structures in a consistent way.

</comment></comment></comment><comment><USER9> This post is nearly devoid of information. At least an example of what the author means by modeling data about people v.s. stimulating people might have helped. Most problems I encounter don't relate to people at all but maybe I'm to just replace 'people' with 'things'?

<comment><USER10> I'm puzzled why this is currently at the top of HN. I'm assuming the author must be someone well known who I've missed out on, as that seems to be the only way posts devoid of value push forward around here.

<comment><USER11> I posted it. Someone passed it to HN. People hit an arrow pointing upward. That's how anything gets to the top of Hacker News.

<comment><USER10> I'm not criticizing you at all. You're of course free to write whatever you want. HN's tendency to upvote stuff from well known people just because they are well known is a little annoyance I have with the site.

<comment><USER11> If that were the case for me then anything I would write would get upvoted in bulk, but that's just not been the case. I wrote it because I thought it might be useful to _some_ people and presumably it has been for those who've upvoted it. On the other hand, those who have found it worthless have expressed so very strongly in this comment thread. So it goes.

<comment><USER12> I do agree with bluehex: an example would definitely helped. It seems you have a new perspective on the topic, which is great but the current version sounds more mystic than informative. Here are one most confusing thought: Why are you bringing in people into the equation? Are these end-users? Or programmers? If they are end-users, why do they care what programming paradigm is used?

The idea about mixing OO and FP at different levels is a good one. Have had similar experience.

<comment><USER11> I specifically tied simulation and people together to mean simulated-people. I apologize that was not made clearer.

<comment><USER4> I still don't understand. If you're writing SimCity ("simulated-people") you should use OOP and if you're writing genealogy software ("data about people") you should use functional programming!? I assume I misunderstood what you meant because otherwise I have no idea how you arrived to that conclusion.

<comment><USER13> You're highlighting the immaturity of software construction.

Anecdote-Driven-Development will justify almost any approach, especially to vague problems.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> I'm a bit confused.

I always thought that FP and OO were orthogonal concepts and never considered them mutually exclusive. To me, the antitheses of FP would be imperative programming. Maybe I'm missing something?

CLOS, OCaml, Scala, I can think of many examples of languages that include components of both FP and OO. Or maybe we're simply considering that OO means this special paradigm used in C++/C#/Java (that really only claims to be the true and only OOP by the commercial entities backing these languages)?

PS: I googled around a bit, this Clojure article [1] seems relevant.

[1]: [http://clojure.org/state](http://clojure.org/state)

<comment><USER15> Actually, FP and OO _are_ mutually exclusive to some degree:

OO comes from the imperative end of the spectrum (after all, objects are an abstraction over mutable state), whereas FP comes from the declarative end (a pure function is a relation between sets and mutability is a foreign concept).

However, most programming languages are impure and support both paradigms, so you can get away with thinking about OO and FP as orthogonal ways to reason about and structure your code; language syntax and semantics may of course favour one concept over the other...

<comment><USER16> OOP is not about hiding / dealing with mutable state, although it can be used that way, but that's a perverted idea of what OOP is.

OOP is about subtype polymorphism [1] by means of runtime single-dispatch [2] and modularity, as in abstract modules or components that help with decoupling, a notion supported explicitly by SML, or exemplified beautifully in the Cake-pattern used in Scala.

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

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

<comment><USER15> For me, OO means stateful objects communicating by message passing, and same as asdasf, I consider it a way to structure imperative code. I don't consider this a perversion - it goes back to Kay.

Your definition is of course an equally valid one that might be more appropriate in certain contexts - it just doesn't fit my mental model of computation equally well.

<comment><USER17> I've developed the opinion, based in large oart on Kay's thinking, that the biggest wins of OO are better represented as a form of protocol design. The point of impedance comes in when you discover that not all protocols map cleanly to OO systems - some are synchronous and others asynchronous, some require more polymorphism than others, etc. Async message passing happens to be one of the more flexible mechanisms for protocol design, but it's only been relatively recently that industry languages have been considering it more carefully, and then it's framed as "concurrency" and not a general architectural consideration.

Likewise I see FP as a reactionary mechanism to write fewer and simpler protocols, because when the data is immutable the problem can usually be greatly simplified.

</comment></comment></comment></comment></comment><comment><USER18> The lambda calculus was the first object-oriented language. [http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf](http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf) explains this and proposes a crisp distinction between OOP and abstract data types.

<comment><USER19> I read that paper a couple years ago and it changed the way I see object- oriented programming. All of a sudden, the dependency inversion principle just clicked.

I hope I hit the upvote button instead of the downvote button. I'm typing this on a shaky train and my browser will only zoom in so far.

</comment></comment><comment><USER20> If you have a simulation, where the outcome is not known and individual Objects are keeping track of their own data and behavior...

VS.

...you already have data about a set of things and those things aren't going to be changing their own data.

Think, Video Game VS. Data Visualization

<comment><USER20> If I have a run loop/game loop, I always use OOP.

I'm curious, has anyone ever implemented a run loop in a functional style? I know there are recursive approaches to passing the time deltas and what not, but it seems rather difficult to make video games with a purely functional approach... Can anyone offer any insight?

<comment><USER21> It is hard. At least that's what I read in:

[http://prog21.dadgum.com/23.html](http://prog21.dadgum.com/23.html)

EDIT: but not _that_ hard, according to [http://prog21.dadgum.com/37.html](http://prog21.dadgum.com/37.html) ;)

<comment><USER20> Wow, thanks for that link!

The author's explanation was incredibly clear and I feel like I got a handle on it!

Just 'lift' the relevant game state and pass mutatations along in a simular way to how you might pass exceptions along with a promise based system... Then it eventually feeds to a makeSounds() or an updateAnimations() or whatever! That way the code can keep all related functionality in one place, instead of spreading sound or animation related methods all over the code base encapsulated in each object with its own logic! Brilliant!

<comment><USER20> And pass the previous frame state to the same functional pipeline, recursively... Now I need to make an OOP vs FP game loop/physics engine in javascript and compare and contrast the approaches! (Feel free to leave the votes alone on this one, or down vote to oblivion, because I am just using HN for note keeping so I leave the thought in context...)

</comment></comment></comment></comment></comment><comment><USER22> I find this post suggestive. The title—"from the trenches"—makes the important point that this is a reflection _from experience_ on what seems to work best where. That's more valuable and harder to come up with than it sounds, because if you identify with a paradigm then you don't easily notice it getting in your way.

I would like to hear a more detailed treatment of the distinction between "dealing with data about people" and "simulating people". If these overlap (and surely they do), then you get into a circularity where your favorite paradigm leads you to see a problem its way, just as much or more than the problem nudges you toward a paradigm for solving it.

On the other hand, my experience matches the OP's that OO's sweet spot is close to its origins in simulation--where you have a working system that exists outside your program, your job is to model it, and--critically--you can answer questions about how it works empirically. When you aren't simulating anything, OO is cumbersome because it requires you to name and reify concepts that become "things" in your mind; these ersatz "things" continually draw attention to themselves and get between you and the problem.

</comment><comment><USER23> I don't think you have to choose one or the other. They are not mutually exclusive. Furthermore, I still use Structured programming ideas along with OOP and FP.

</comment><comment><USER24> Kinda weak post, though what he said in point four vibes with me, where he argues for using OO on the lower level with a functional API / abstraction.

This is a really underutilized design strategy. Much too often architecture is discussed in OO vernacular, and as a result is made much too complicated. I think we'll come to see OO as a low-level technique more and more.

<comment><USER25> Gary Bernhardt has a screencast [1] on DAS that proposes the opposite architecture of functional core, imperative shell.

[1] [https://www.destroyallsoftware.com/screencasts/catalog/funct...](https://www.destroyallsoftware.com/screencasts/catalog/functional- core-imperative-shell)

</comment></comment><comment><USER26> Anyone care to expand on the reasons for the guideline?

<comment><USER27> Functional programming works great for processing data - you don't want to change the data, and there isn't a lot of state. You largely write various transforms and filters, which is right in FP's wheelhouse.

On the other hand, simulation is quite state-full, often has tons of little details that you don't want to expose to the world (encapsulation), the thing that you are simulating usually has a collection of varying behaviors that you can represent via polymorphism or composition, they have attributes, and the 'engine' is often easier to write if you use dynamic(virtual methods)/static(generics)/duck polymorphism to get your things to do their, well, thing.

Which is not to say that either is undoable or really hard in the other paradigm, but if I am simulating something I am often thinking of 'objects' and doing things to them; the OO paradigm helps you program about that in a very expressive way. Ditto for FP and functional programming - I'm thinking about filtering and transforming data.

That is just my view of the author's article, with a caveat. I've seen terrible, beastly simulations done in OO that basically thought that single inheritance is how you spell OO. A single type hierarchy bites you so hard: 'Oh, I'm make everything a widget with draw/eat/process/whatever methods'. Then requirements change, and widgets in this subtree need to do something you thought only widget in that other subtree would do, next requirement has you needing to reflect on who can do what, and so on. You end up with a huge Blob object at the top of your hierarchy, or you endlessly end up with huge blocks of RTTI/reflection to figure out what kind of thing you are dealing with, or otherwise try to work around the problem that the world is not easily decomposed into a single hierarchy.

In practice I find all of this terribly reductive. Need some small thing whose behavior varies in well defined ways? Use polymorphism. Have a bunch of stateful stuff that you need to keep track of? Encapsulation is nice. Want to perform some operation on a large collection of data? Look to transform(). Need to make a lot of inferences and conclusions? Perhaps logic programming will work there. Need to provide a framework where people can build larger systems? Hopefully you are using component or services based ideas. And so on. A programmer should have a bunch of tools handy, and use the best one for the job. On the other hand, just about every person I interview opines that we should inherit for re-use, and I silently despair.

<comment><USER5> _Have a bunch of stateful stuff that you need to keep track of? Encapsulation is nice._

I think this one is open for debate. There are other models for managing state which make things simpler to reason about than classical OO with encapsulation. One such example is Clojure's epochal time model.

[http://www.infoq.com/presentations/Value- Values](http://www.infoq.com/presentations/Value-Values)

<comment><USER27> I think everything I wrote is a matter for debate. It's impossible to capture all of software design in two paragraphs. Ten minutes ago I was writing some code to display a baseball game - a quick Python hack, not a game or anything. To me a class plus a bit of encapsulation for things like players, ball, the field is 'just right' in a Goldilocks way. A bigger problem, a different domain, and your link may make a lot more sense. My real point was that you pick and choose based on your needs, not that some incredibly hastily written list is immutable and not open to argument.

I would also suggest you (perhaps through equal haste in writing) made a category error. Encapsulation != OO. For example, I can achieve encapsulation in C just by putting variables in my .c file, and not distributing the .c, but only the headers and a lib. I am not trying to nitpick, but wondering if 'classical OO' is part of your assumption.

In any case, I have never programmed in Clojure, and know nothing about epochal time models. It looks interesting enough, but is it a tool I can readily reach for if I am programming in C++, Python, or what have you? Will others understand it? Googling provides only a dozen or so relevant links. I think all in all I stand behind "Encapsulation is nice". It is nice, it is not the only way or necessarily the best.

<comment><USER5> _I would also suggest you (perhaps through equal haste in writing) made a category error._

Yes, indeed it was haste. Where I really want to draw a distinction is between values and mutable objects (which may or may not use encapsulation). Encapsulation is a leaky abstraction when applied to mutable objects because the hidden state of some object may impact other parts of the system in various ways. Values (and functions of values) are a much sounder abstraction because they are referentially and literally transparent.

 _know nothing about epochal time models_

The epochal time model is a mechanism used to coordinate change in a language which otherwise uses only immutable values (e.g. Clojure). It provides the means to create a reference to a succession of values over time. This means that any one particular list is immutable but the reference itself is mutated to point to different lists over time. The advantage of this is that these references can be shared -- without locks, copying or cloning -- because the succession of values is coordinated atomically.

</comment></comment></comment></comment></comment><comment><USER28> You know what has a lot less information than the blog entry? All the comments about how little information it has.

Well... and this post, now.

I always come to the comments to throw a little balance or extrapolation into my reading, and its disappointing to find people mostly just complaining.

Got a few interesting nuggets, though. So not all bad.

</comment><comment><USER29> Fogus makes the same point in Functional JavaScript (I highly recommend it).

</comment><comment><USER30> If you're doing something like agent based modeling, FP is great since you get snapshots of your simulation "for free".

And whats the difference between e.g.

agents[0].location.x += 5;

versus

(update-in agents [0 location x] + 5)

</comment><comment><USER31> Long story short: the next big thing is a language which mixes both FP and OO.

<comment><USER32> Then your next big thing is (especially) Scala

<comment><USER33> Or Rust. Or D. Or Ruby. Or C#. Or Dylan. Or Lua. Or OCaml.

Lots of languages have concepts from multiple paradigms. What is the correct mix of concepts is up for debate.

I honestly believe that Rust has the potential to become the perfect mix for me, but OCaml and D are pretty good second places with the benefit of exponentially greater stability/maturity.

<comment><USER32> Sure, a lot of those languages (Ruby, C#, Lua) borrow some FP ideas, but I think sprinkling in some FP ideas is different from F#, OCaml, and Scala where FP seems to be more "font-and-center".

<comment><USER34> My litmus test for whether a language really succesfully marries OO and FP is: how well does a language blend pattern matching syntax and inheritance?

OCaml - basically only gives you pattern matching on primitive types. Object types end up having dramatically different code style

Scala - any syntax that deals with types quickly becomes so complicated that you can't explain it to non-experts

I don't know much about F#.

I've heard that Clojure's core.match grants pattern matching over abstract interfaces in a nice style. It's not an official part of the language, yet, though.

<comment> chris-martin What is complex about Scala's pattern matching? x matches the value x, x:A matches instances of A, A(x) matches if A.unapply(x) evaluates to a Some, and _ matches anything. Erasure throws a wrench into it, but otherwise it's pretty straightforward.

</comment></comment></comment></comment></comment></comment><comment><USER35> Four footnotes on a two paragraph article?

Guidelines seem sensible though.

<comment><USER13> Think of it as four powerpoint slides with one "source" each.

</comment></comment><comment><USER36> I've always viewed OO as a nice optional UI for most programmers. Given an object to mutate and call methods on seems to click for most people. I tend to go for a more functional style internally for the composibility and maintainability properties you gain.

</comment><comment><USER37> For actor-based programming in Clojure (complete with real lightweight processes, selective receive and an Erlang-like API), look no further than Pulsar:

[http://puniverse.github.io/pulsar/](http://puniverse.github.io/pulsar/)

</comment><comment><USER38> FP makes an excellent backend -- architecturally speaking -- for OO-, REST-, front-ends, and a most excellent front-end for Relational systems. (Haskell, for example, would be a dream language for sprocs.)

</comment><comment><USER39> I would propose the opposite.

</comment><comment><USER40> is facebook.com about people or simulating people?

</comment><comment><USER41> One thing that bugs me in the imperative vs. functional debate is that we (functional programmers) often show people a side-by-side comparison with 20 lines of imperative code, 6 lines of functional code, and say, _see, the functional code is so much better!_ Well, to us, it is. Filtered through our biases, it's much more intuitive.

I think we're wrong on one thing. Personally, I think imperative code is more intuitive. It matches how people think of operational behaviors.

For a 20-line program that will never grow, I'd rather see an imperative straight-line solution. FP wins when things get a lot more complex: various special cases and loops within loops. Stateful things compose poorly. Debugging a 300-line inner for-loop is no fun. Functional programming, done right, means people factor long before it gets to that point.

Factories and Visitors prove what hellishness comes into being when one _doesn 't_ have those functional primitives, but this does not make the superiority of FP intuitive or obvious.

Now, OO is so variable in definition that it's very hard to know exactly what people mean. There's the good OOP (Alan Kay's vision; encapsulate complexity) and then there's bad OOP (overuse of inheritance, auto-generated classes, Factories and Visitors).

One can conceive of core.async as an OOP win in Clojure; lots of complexity (macroexpand a go block at some point) is being abstracted behind the simpler interface of a channel.

<comment> chris-martin > Personally, I think imperative code is more intuitive. It matches how people > think of operational behaviors.

The masses agree with you, apparently. That's why they sit in their cubes all day writing the same god damn re-implementation of map over and over again

        List<String> result = new ArrayList<>();
        for (int i = 0; i < list.size(); i++) {
            result.add(input.get(i).toString());
        }

instead of

        input.map(_.toString)

because functional programming is confusing.

<comment><USER42> Quite true.

I still don't understand why recursion is confusing to learn, as for me it was obvious from day one. Then again I am good at maths.

Additionally, I had lots of fun doing Caml and Prolog when I was at the university.

So even though I tend to do the typical boring enterprise JVM/.NET/C++ stuff, I do welcome the FP contamination of those ecosystems. :)

However on my last project, I had to rewrite some LINQ stuff back to plain imperative code, because few people on the team could manage it (LINQ). :(

<comment> chris-martin I don't think recursion itself is difficult for most people to learn. The hard part is translating recursive functions into procedures. The imperative coding is what makes it confusing.</comment></comment></comment></comment>