NSA: We're the heroes, we'll continue the surveillance of politicians [video] - <AUTHOR> http://www.youtube.com/watch?v=6Kc5Xvr24Aw

<comment><AUTHOR> This video was just released by the NSA. I couldn't find an english article discussing it, yet. There's a German summary though [1].

What's interesting is that it directly opposes what Obama said today, who claimed he'd stop the surveillance of politicians from partnering countries.

[1] [http://deutsche-wirtschafts-nachrichten.de/2013/10/29/wir- si...](http://deutsche-wirtschafts-nachrichten.de/2013/10/29/wir-sind-die- helden-nsa-chef-alexander-weist-europaeer-in-die-schranken/)

<comment><USER2> So maybe Obama needs to stop protecting them, as a first step, and allow real panel reviews and Congress to rein in on them, instead of opposing it as much as possible, and asking politicians like Dianne Feinstein to fighting against limiting NSA's powers.

But of course he won't do that, because all he does now is lie about everything NSA-related.</comment></comment>


Ask HN: Did knowing or learning a not-so-famous natural language benefit you? - <AUTHOR> I'm speaking about human languages, not Programming <comment><USER2> I made an effort to learn Dutch for around 6 months of last year. Although it's a well known as a language, it's only spoken natively by around 20 million(ish), so isn't massively useful outside of the Netherlands and Belgium, among a few other places in the world. My first language is English. I just wanted a second language under my belt and I enjoy spending time in the Netherlands. The problem with learning Dutch is, most people (that I came across at least) in the Netherlands are already fluent in English and from my experience it seemed like they'd much rather just speak to you in English. So to actually speak Dutch there, it's important to be clear that you don't want to converse in English and that you're trying to improve your skills. It was really important to me that I'd speak a bit of Dutch every day, ideally to native speakers. This requires a bit of effort (as I live and spend most of my time in England), but it's suprising how easy it is to either find Dutch people here to speak to and also online.

It benefited me in the sense that I ended up making some new friends out of it and had a lot of fun just learning (or trying to learn) a second language. I think learning a new language like this can open up some doors and can help you meet a lot of new interesting people you'd perhaps not have met otherwise. I'd love to pick it up again next year. So we'll see.

<comment><USER3> For what is worth, it's true of _all_ languages if you are a native English speaker - everyone wants to improve their English, and for them it's tiring trying to make sense of your attempts at speaking their language as you are learning.

Best thing is to pretend you are Finnish or Macedonian or something and say you don't speak English at all!

<comment><USER4> > everyone wants to improve their English

Your point is certainly valid for many people in many places, but in France I find it to be mostly false. Most people, even in computer science, will rather have me butcher French than switch to butchering English themselves.

<comment><USER3> Oh yeah, the French are, shall we say, "special"...

</comment></comment></comment></comment><comment><USER5> I'm by no means perfectly fluent in Irish, but I find it incredibly useful to have a language no-one understands to speak when travelling to maintain some privacy. My wife and I were buying clothes in a market Kathmandu some years ago, while haggling we were able to strategise without the stall holder knowing a word of what we were saying. Once we were done (and had acquired some nicely priced clothes) the guy took us aside and asked what language we were speaking - turned out he'd learned off basic vocabulary (esp numbers) in a ton of the languages popular with tourists but had been left baffled by us!

<comment><USER6> You have to be careful. My cousin and his friends were being rather rude (in Irish) about a woman on a Belgian train, she managed to keep a straight face throughout, before lambasting them before leaving.

Ach, ar aon nós, táim an-shásta bheith ag léamh faoi Ghaeilge ar hn. N'fheadar liom cé mhéad atá anseo a bhfuil in ann sí a labhairt.

<comment><USER7> > Ach, ar aon nós, táim an-shásta bheith ag léamh faoi Ghaeilge ar hn. > N'fheadar liom cé mhéad atá anseo a bhfuil in ann sí a labhairt.

I've wanted to learn it properly since I took classes in Paris, but never really dedicated enough resources to it. I still enjoy watching TG4 and listening to RnaG/Failté from time to time but never went the distance. Swedish and French, being so closely related to English, they came much faster :)

I can just about hack my way through the national anthem, for no good reason other than it's a cracking song. Maybe when all my free time isn't spent on 'asset building' I'll get back into some of the fun stuff!

Tell me, how do you get on with (Scottish) Gaelic? I understand there's a large degree of mutual intelligibility between certain dialects and it'd be a fascinating area to study, like Welsh/Cornish/Breton also. I've seen some BBC Alba programming aimed at music-lovers/youth where an Irish performer was interviewed in Scottish Gaelic, replying in Irish. How set-up it was, I don't know.

<comment><USER6> I've watched a couple of programmes on BBC Alba, and understood a good bit. It was somewhat like hearing Dutch as a German speaker, except maybe easier.

There has been talk of an "Idir-Ghaeilge" reunified language. The Irish online magazine Nós had a nice article on this recently [http://nos.ie/gniomhaiochas/teanga/idir- ghaeilge/](http://nos.ie/gniomhaiochas/teanga/idir-ghaeilge/) (in Irish).

Could become a reality in the unlikely but beautiful event of a post-Brexit Scotland uniting with Ireland in the "Celtic Union".

<comment><USER7> Thanks, that's really cool. I'll try to make head or tails of the article and look a bit more into the reunification. If that could be carried off, interest levels in the language(s) would potentially rocket.

The example I thought of for mutual-intelligibility btw was Swedish/Norwegian/Danish - but perhaps it's not that close? With Swedish as a third language I can still understand most Norwegian TV in general use or those subject areas I'm more familiar with.

</comment></comment></comment></comment></comment><comment><USER4> I'm at six natural languages now. I have worked in three of them and could immediately go to work in my field in a fourth. I could refresh the two others within weeks to a level where I could go to work in them, with some initial difficulties.

I would say that, to some extent, knowing several languages helps you with learning the next one. Not just if it has features that I already know from other languages, but also if it has new "WTF" aspects. Those become easier to accept.

What I mean is this. My last relocation was to France, for which I had to learn French. French has a bunch of things that make me go "WTF", but knowing that _every_ language has such things makes it easier for me to shrug them off, accept that French is weird, and carry on. On the other hand, some other expats I know, who know fewer languages, question everything: Why does French do this or that? I have the feeling that some people get caught up in such issues and develop (or reinforce) an internal resistance to learning.

TLDR: Learning languages may make it easier to learn others by making you more accepting of weirdness.

</comment><comment><USER8> Depending on whom you ask, Hungarian probably qualifies as not so famous -- although among linguists it's pretty famous, as unlike all its neighbor languages it's not Indo-European.

Learning it has indeed brought me amazing benefits, chief among them a Hungarian wife. :-) Seriously though, all human languages have qualities unique to them, and once you speak a second language fluently you realize that there are entire ways of seeing the world that are only possible to describe in that language -- indeed, I believe that for every single natural language there are things it's only possible to think or conceive in that language.

This is probably less significant if the language is closely related to your own, but one of the thrills of learning a very very different language is that it opens your mind to concepts you realize you'd never have remotely understood beforehand.

As an added bonus, Hungarian is quite beautiful, and the Hungarian capital city of Budapest is a fantastic town.

So, if you're asking because you are thinking of learning a not-so-famous language then I encourage you to go for it. But understand that without immersion you'll never get far, so make a plan to go live in a place where they speak that language, at least for a year. And once you get there, don't slack off: some great places with unusual languages can easily accommodate you in some more common idiom.

</comment><comment><USER9> A friend of mine who has a passion for language tried to get me to learn Lojban with him for a while. It's a complete waste of time in terms of its usability. I have never even heard of someone other than this friend who has spent any time trying it out.

What _is_ interesting about learning a conlang, especially one with such an interest in being unambiguous, is that it aggressively points out how weird language actually is. I'm a native English speaker and the sort of person who just shrugged by all of public school English via the "it sounds good" argument. I really have no conception of what the structure of English is except in my own ability to use it.

Learning even just a small amount of Lojban helped connect my ideas of natural language to similar ones in logic and semantics. It did so even more effectively than learning Mandarin has even though I've learned far more Mandarin.

I think if you're interested in turning your analytical eye toward your own use of language in order to better understand what does and does not make any sense about it then learning a bit of a conlang is probably a good bet. It's the next best thing to having a linguist friend.

<comment><USER10> I studied Proto-Indo-European and fit into a similar box. It's entirely useless, day to day.

But, because it's not one of the earliest languages, and because it's a reconstruction, it is as simple as it can be.

It can make it difficult to express some ideas, like "innovation".

But it does allow you to understand the function of grammar, and the way we are limited by the words we have. If you can't express it, then though you may be able to think it, you can never truly convey it to anyone else. You can give endless analogies and stories, but no one can grasp the idea until it becomes a word that they also think.

One last analogy of the journey this opened up for me: imagine that the word 'colour' never existed.

Describe the Northern Lights.

</comment></comment><comment><USER11> I tried to learn Japanese once, only for half a year.

I think it benefitted me, even if I didn't learn much.

It let me look a bit deeper into Japanese culture. The politeness is baked deeply into the language and the sheer amount of Kanji told me that a Japanese person has to constantly be on track to not forget even the most important ones.

On the other hand Japanese seemed antiquated. 3 sets of symbols and one of them has thousands of items. The gramma seems kina straight forward, but the sentences simply get too long fast.

I speak German and English, which aren't drastically different. But while learning Japanese I found out how different languages really can be.

English is a bit compacter than German, no "der/die/das", just "the". Most words are not capitalized, no compound words, etc. but English is A LOT compacter than Japanese.

<comment><USER12> I studied only an entire year (2 semesters), and I have a fairly different view of Japanese. A Japanese person exerts no more effort to 'be on track' with their native language than anyone else. I'm not sure what you mean about sentences getting too long too fast. As a first semester student, perhaps more experience would better-inform your sense of sentence complexity.

<comment><USER13> Japanese expends a lot more syllables to say the same thing that English can say in fewer. Even more if you use the polite form (e.g., speaking in a business context, train announcements, etc.) Grandparent post was not the first person I've observed to notice this.

Japanese syllables are often shorter than English syllables, and a native speaker can articulate then quickly and fluently, but it seems to take much more linguistic "mass" to say a thing in Japanese compared to its English equivalent, unless you use a blunt direct form.

<comment><USER14> Yup, Japanese is a machine-gun language. Spanish, too.

<comment><USER15> No no no. Finish is a machine gun language. And a broken one at that. Everything sounds like ratatata ta ta. PS: Too long working for Nokia, I guess. ;)

<comment><USER13> Finnish and Japanese have enough in common (agglutinative, SOV word order, double consonants and vowels) that some linguists think they might be distantly related.

Listen to some spoken Japanese; you might find it sounds a lot like Finnish.

</comment></comment></comment></comment></comment></comment><comment><USER16> Learning Latin in school helped me to understand what this grammar thing is. Before I didn't even understand/cared about the grammar rules of my mother language, so learning Latin did improve my German.

</comment><comment><USER17> I came from several not-so-famous languages to learning English and I am not the right specimen for your questions. However, I wanted to say that learning a completely different language has changed my understanding of what communication is. I started understanding how spoken words are just tags to ascribe abstract ideas that both the speaker and the listener can relate to. At the same time, there are parts of the communication that gets lost and that's why people are not completely understood-something quite common in the internet. Learning a language can help bridge that gap in communication and most importantly, help an individual get a better perspective of the culture the said language is attached to. Because, as it is repeatedly said most of the human communication happens through body-language and tone alone which is only possible in a face-to-face interaction with good attention and focus from both parties.

</comment><comment><USER18> Was stuck in the Paris train station at 5 AM at the end of a Eurail-pass trip. Needed to get a tram ticket to get to the airport in ~1 hr. Tickets cost €18 in _coins_ , or a chip card; I had only paper money. After ½ hr of panicking, I found a shop that had just opened and I asked the shopkeep, while holding up a paper bill, what basic (and probably incorrect) French I remembered from high school:

"Avez-vous du coin?"

Caught the plane with 3 minutes to spare.

</comment><comment><USER19> I studied in Copenhagen and did some Danish courses which at the time I considered a total waste of time since pretty much all Danes I knew spoke perfect (if sometimes heavily accented) English. I used it once when I got lost in Iceland and the only person we could find in the vicinity was an old lady who didn't speak a word of English. Danish though, even as rudimentary as mine, was just fine.

</comment><comment><USER20> Fluent or just basic? Personally I think it's not worth it unless you really commit to trying to get fluent. I "learnt" Latin + French at school and it's basically useless knowledge that's drifted away in the years, I can barely understand even the most basic French now.

As for knowing it fluently, my Mum and various of her friends are all Dutch living in the UK. Many of them earned some money from it in some way, including:

        - doing translations
        - getting jobs in the local port because they were bilingual
        - teaching night classes in the language
        - emergency translator for customs

And that's Dutch, where even 20 years ago a lot of them spoke English fluently. It can be useful.

My friend's wife is a US Bulgarian who speaks French and got a grant from her uni to go to Bulgaria this summer to interview Bulgarian software companies (I think including Chaos/XCom maker Julian Gollop who lives there now).

Then again I know others who never use their 2nd or 3rd language.

Basically, it opens doors to experiences if you want to leverage it.

<comment><USER21> It baffles me how anyone can consider Latin 'useless knowledge'. I know of no other language which opens so many doors to so many European languages, and most certainly to English as a second one.

<comment><USER4> Latin grammar doesn't help you with English grammar, of course. Latin vocabulary can help you with English vocabulary, but the effort of learning Latin, then transferring that knowledge to English, is much larger than the effort of just learning English.

I had some Latin in school, and yes, from time to time it comes to mind when encountering a new French or Italian word. But even if you want to learn several Romance languages, I'd guess that just learning them and recognizing/exploiting relationships is easier than _also_ learning Latin. It does add a common denominator, but it also adds a lot of cruft.

</comment></comment></comment><comment><USER22> I grew up as a bilingual since early age. One of my languages was an ancient language only spoken by about a million people who all spoke other, more popular, languages rendering their own language pretty useless in economic terms. Yet there are few things I think this gave me.

I believe growing up as a bilingual with two completely different languages gave me an edge in learning other languages when compared to my monolingual peers. When we started learning a foreign language in school, my monolingual peers didn't seem to grasp just how different the languages can be. All through school they tried to apply the grammar and phonology of their native language to the language they were learning. For me it was always a given that even similar sounds like consonants are often vastly different, that words can be in whatever position they have to, not just where I'd like them to be. Though, truth be told, I had no preferences in that matter to begin with since I was constantly switching in my mind from one language to another with a different word order. I am quadrilingual today, and I am not even a big fan of learning languages per se.

This might be far fetched, but I think it also made me more organized and disciplined, or at least it helped to do so early on. This mental context switching forces you to pay attention to the details for one thing. For another, it also gives a sense of "protocol" early on. You understand that you should speak one language to some people and another to the rest. In process you see that this thing is even more subtle because you have to choose styles withing the same language to match the social situation.

Last but not least, knowing the languages gave an early access to two different and often clashing cultures. This, I believe, made me less judgmental and more accepting of other people, at least when it comes to cultures. Not because it was the moral thing to do, but because noticing all the commonalities and differences between people became an exploration on itself for me as a kid. I am genuinely curious about people that are different from me, either by origins or mindsets. Being a typical white nerd and health- junky, I am easily bored by other nerds and health-junkies, but give me an alcoholic and I can talk to him for hours straight despite never being drunk myself.

</comment><comment><USER23> Learnt a bit malay and indonesian during my school time, I got hired as a programmer recently because I can code decently and translate english to malay/indonesian for the targeted countries.

</comment><comment><USER24> I had a Japanese conversation course for only 1 year at the Japanese embassy in Berlin. I forgot everything except "tenki wa ii desu ne". Still it was a very good experience, because the politeness system built into the language is very interesting and there were many other interesting phenomena (like particles for count systems, topic marker, etc.) that helped me later for my work in the philosophy of language and semantics. I also learned a lot about Japanese culture in that short year.

</comment><comment><USER25> Partly as a result of the current political climate, I've decided to try to learn Yiddish, which doesn't currently have a large number of native speakers, in the US at least. I've never been very good at learning languages (nearly failed French and Latin in high school (both required), took a course in Japanese that did not go well). But if nothing else, I can probably use it to annoy neo-nazis on the internet.

<comment><USER26> You want to annoy neo-nazis by learning a dialect of german?

</comment></comment><comment><USER27> My first job was at a large casino as a systems analyst. The casino switched CMS software and went to an AS400 RPG based application named ACSC. I took it upon myself to learn the database of the application and also to learn RPG programming (shudder).

This lead to my first software development position at a large international bank.

I worked as an RPG developer for three years then I pivoted to SQL Server/C#.

So yes knowing a not so famous language benefited me.

<comment><USER28> You're being downvoted, but the original uncorrected title was "Ask HN: Did knowing /learning a not-so-famous language benefited you?" (copied and pasted from browser cache) and didn't have the caveat that this was not a programming question. So have an upvote for an interesting story in the spirit of the original question.

</comment></comment><comment><USER29> I'm going into year 4 of learning Vietnamese (75MM natives speakers vs English's ~400MM). I wouldn't say it's helped me professionally, but I do think it's benefitted me personally. If nothing else, learning a language causes you to meet lots of people you never would otherwise and makes it easier to empathize with people from a completely different background and culture.

</comment><comment><USER30> Sometimes it is just fun, I used to speak some Behasa (Malaysian and Indonesian or vice-versa) and it was helpful to read menu in local restaurant or be able to speak with locals. I picked up some Berber when I was backpacking in Morocco and it did open tons of doors in countryside.

But honestly it doesn't benefit me currently other than some trivia knowledge.

</comment><comment><USER31> I lived ten years in the Faroe Islands. You can do just fine with Danish, but learning to read and understand spoken Faroese was of course a great advantage. Too old to learn speaking it, but conversations where I spoke my mothertongue and the other part their mothertongue worked great.

</comment><comment><USER32> At my university when I was attending, they were using PowerBuilder to teach object oriented programming. It landed me my first job at a big oil and gas company supporting a legacy app.

</comment><comment><USER33> Interested in the answer to this. I'm interested in learning Catalan, but the reward to effort ratio seems a bit low to justify it.

<comment><USER34> As someone that speaks five languages (one of them being Catalan), I have to concede it's the less useful. And only get to use it when I travel back to Spain.

But that being said, I find that there's never a good reason not to learn a new language if you are in a situation where you're going to be exposed to it on a semi-regular basis. So if that's why you're considering learning Catalan, I would recommend you to go for it. Even though it's by far the least useful language I know, I still think it's been a rewarding investment.

Some reasons why I consider it was rewarding, in no particular order: \- It sometimes helps me infer the meaning of a word I've never heard/read before. \- I've read a some good books from Catalan authors. \- I sometimes enjoy playing a game where I try to find words that share the same root in most of the latin languages I know but not in one of them (e.g.: for 'window', it's 'finestra' in italian and catalan, 'fenêtre' in french but 'ventana' in spanish !). This seems dumb, but it's actually my favorite reason for learning new languages.

</comment></comment><comment><USER35> People in my former home of Padova were always amused that I could speak some of the local dialect.

</comment><comment><USER36> Can you explain what you mean with "famous"?</comment>


Solving protein folding by playing a computer game - <AUTHOR> http://www.nature.com/nature/journal/v466/n7307/edsumm/e100805-10.html

<comment><USER2> I did this for a little while when it first came out and actually ranked pretty well, however the novelty wore off quickly. You basically just fold it into the basic shape, attach bands in a certain places and then have it attempt to optimize it. Then you shake it and let it optimize again hoping to get it out of a local max. Repeat, a lot. Not much fun or much of a game compared to other such applications i've seen (there was a google techtalk on using human computation via games for object detection in photos and other things).</comment>


Open Labware: 3-D Printing Your Own Lab Equipment - <AUTHOR> http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1002086

<comment><USER2> See also _Open-Source 3D-Printable Optics Equipment_ published March 2013. The article is available as an open access PDF as well:

        http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0059840
        http://www.plosone.org/article/fetchObject.action?uri=info:doi/10.1371/journal.pone.0059840&representation=PDF

<comment><USER3> I've seen that one before. My optics prof was planning on testing it out for the undergrad classes, where the precision was within tolerances. It was gonna free up a few grand worth of optics equipment to go into the grad level labs and the research labs. He seemed pretty pumped about it.</comment></comment>


Modern PHP without a framework - vanilla-almond https://kevinsmith.io/modern-php-without-a-framework <comment><AUTHOR> While it's good in some respects, all this enterprisization is exhausting and can, perversely - counter to its intentions, be a significant drain on productivity. Once upon a time, we were focused on the important things - problem-solving, domain data, and business logic. But now we're almost entirely focused on abstraction, generics, and boilerplate while the important objective-related stuff that pays the bills just gets whatever scraps of time are leftover (if any).

We used to spend 90% of our time determining the right nail to use, the right wood to use it on, and where best to place it, and only 10% of our time on selecting and wielding the hammer. Now we spend 90+% of our time figuring out which GenericAbstractToolFactoryManagerFactoryInterface to invoke and how to properly invoke it a in such a way as to coerce it to ultimately generate something that eventually might generate something else that will hopefully drive some sort of fastener into something in such a way that will possibly hold it together, and the rest debugging why instead it is generating a generator that generates chisels that are chopping away at the foundation.

Yes, that's an exaggeration, but how much so? We are smart people, we do figure out how to use these complex combinations of systems to build functioning (bloated monstrosities of) applications. But are they really reducing technical debt or adding to it?

Are these systems really going to be easier to maintain in a few years when they have 357 dependencies that have each evolved over time (and or been abandoned)? Easier to optimize, when that means modifying what's going on under the hood of those dependencies? Easier to extend, when doing so would lead to conflicts with those dependencies?

I'm predicting that the next wave of discovery and hype in the field will be focused on improving productivity while reducing technical debt by removing the cruft that we're building now and replacing it with something simpler and more to-the-point.

<comment><USER2> In my current job I inherited a 7 years old php project that's marked as legacy and scheduled to be phased out in 2020. Until then its mostly maintenance and adaptions to changes in stuff it interacts with.

It's built with php5, uses pretty static file structure, no namespaces but an autoloader. It has around 150 source files. I must say that it was surprisingly easy to get into the code base. The fact that there are no namespaces means class names have been picked carefully, no generic stuff like "dataholder". About half the classes are entirely static and there is still a lot of assoc arrays being passed around while in other places proper classes are used. The front end is just bootstrap with a little bit of additional js and ajax where it makes sense. Still it is really easy navigating the code base and finding the right spot to extend. I hardly ever felt constrained by the project's design, if ever rather by the inconsistencies of php(5) itself. Yes, sometimes it's annoying to implement a dynamic page update via ajax by hand without fancy abstraction, but if you're not building a modern spa it's not that bad and you actually get what's going on.

That other java code base I'm involved with is about 4 years old and really modular and fancy and maven and every time something needs to be added a discussion starts on how to do it, which parts to abstract away in which way, which library or framework might be suited best, and after five trillion years coding might actually start. I might have exaggerated a bit here but that's somehow the feeling I have more and more in modern software development.

<comment><USER3> > class names have been picked carefully

Boom. You can stop here. This has nothing to do with PHP or your project.

It's just the previous devs were good professionals. This is why "it's easy to navigate and extend".

Proper naming is one of the most important tell of a code work well done. You got lucky.

But a (good) framework will enforce a reasonable structure that will drive even less skilled professionals in a unperfect but sane direction. It's still possible to take bad decisions, but less often, and the cost of it is reduced.

<comment><USER4> Came here to say something similar. Not sure if you were downvoted or what, but I've inherited projects with function names like "runFunc()" and "doit()" which then have 18 global variables imported, then 1000+ lines of "if(foo=='j' && (barfoo!='f' && foo_old2=='ff') || 7) { // do j stuff v3".

You did indeed have a more professional set of folks developing that.

I just inherited a small PHP project written 2 years ago:

* no version control * running as root on apache 2.2 in /var/www/html * php 5.5 * about 12 "pages" each with a healthy mix of html/php ('header/footer' are abstracted to external incudes)

the problem with the 12 "pages" is there's around more than double the logic states and I need to add more. there's a bunch of

if($_SESSION['step3done'] && $_SESSION['step3errors']!="") {}

interspersed all over the place. Do I continue the pattern? Or refactor? The previous developer would add 'new' stuff in a matter of a few hours, because they'd just expand on that pattern; it's now unwieldy, and I need to add 'new' stuff, and expectations are "a few hours".

FWIW, it's probably what I'll do, but am migrating code in to version control, adding items in an issue tracker, and documenting my concerns in tickets, a README, and some code comments. It may come across as a bit passive-agressive, but it's not meant to; just trying to keep a history of concerns while also hitting their short deadline.

PHP needs to be upgraded regardless.

<comment><USER5> Don't worry about the possible "passive aggressive" interpretation. You are doing the best that can be done in your position. If they don't see it... well, that's their problem, not yours. You are already being more than enough accommodating by just accepting to work on such a mess of a project!

</comment></comment></comment></comment></comment><comment><USER6> I started a startup in 2013, and I picked PHP for a core language since I had a decade~ experience with it by then and it was a good enough reason to use it. PHP 7 wasn't available yet and nodejs was only starting to take off and didn't seem like the future yet.

Taking learning from previous companies, I've found the main thing PHP was lacking at the time was a good routing mechanism. We obviously don't want to rely on Apache hitting .php files to handle requests. So we used ToroPHP ([https://github.com/anandkunal/ToroPHP](https://github.com/anandkunal/ToroPHP)) for routing, which is a seriously lightweight routing lib. Indeed we used composer and a lot of dependencies, but for our own codebase we used manual includes instead of the autoloader. With the usual PHP production setup like APC with opcode caching enabled and file stat'ing off (later on opcache + APCu), we handled scale extremely well. (mentioning this because a counter- point for manual includes is that many requests would unnecessarily load way too many code files)

As far as codebase maintenance and growth go, that PHP codebase was actually very easily manageable even with manual includes. Having routing solved frees you up to organize your code files in any ways you want. Even today, I have a mini-framework structured this way for myself to start side projects and test ideas with. (Yes, using PHP5 for side projects in 2018 ;)

My point in bringing all this up is that the architecture this article is trying to take you in, seems unnecessarily complicated for PHP.

This past year I've been working in a full nodejs shop and this entire architecture (from this article) reminds me heavily of how a node/express app is structured. Someone else on this thread mentioned modern languages have their architectures converging. This is exactly what's happening. Even as a PHP fan, it makes me feel a bit of "Why use PHP at this point, instead of nodejs/go/python?" while reading this. It feels like if you wanted to go this route, nodejs is a better option on almost all fronts -- language syntax brevity, availability of packages, community, developer-availability. The only reason to use PHP at this point is nostalgia/sticking to PHP syntax.

<comment><USER7> The reason to use PHP over JS/Python or Ruby is that PHP supports strict typing and that makes code both more maintainable, understandable (Find Usage feature only works reliably when types are inferrable which is not always the case in those other theee langs) and refactorable.

Now the reason to use PHP over Java or Go is that PHP at this point has a type system that's on par with Go's but at the same time it gives you an advantage of fast development process thanks to the lack of need for compilation and/or restarting the container after each change in the code. I'm currently working with Java and before that I had a long experience of PHP, while I personally would choose Java over PHP almost in any case because I value type system features perhaps a bit too much, but I do suffer from those slow turnaround times (compile/restart TomCat) and I can see how it could potentially be bad for the business at early stages especially.

So the bottom line is PHP at this point has a nice balance which is hard to find atm in any other popular languages with evolved ecosystem

<comment><USER8> > PHP supports strict typing

Still missing types for object properties :(

<comment><USER9> As a work around you can use a private member variable with type hinted setter and getter.

</comment></comment></comment></comment><comment><USER10> I'll go against the flow and say hell no!...

I've been part of teams that pride themselves on using propel + klein to build an app in a non-framework.

If you want a light framework just go with lumen, flask, sinatra. Ymmv.

All new devs wasted a lot of hours learning propel and klein and it didn't always do what they wanted/needed, and the code wasn't the prettiest, where as most knew laravel, and longed for the comfort/sanity of coding in laravel.

Sure, for a hobby project/side project this is a good practice to become a better dev, and understand how a mvc framework is built, but for a large code/team it's best to go with something established so new devs hit the ground running without having to learn a ton of stuff.

It's easier to find a 'laravel dev', than it is to find a 'custom built mvc dev with extensive experience in x, y, z packages'.

<comment><USER11> I've worked in countless languages and used plenty of frameworks (and done a ton of PHP development) but I really don't understand Laravel.

You have to do a big dance of putting files in all right places and implementing all the right interfaces -- as you would with any framework -- but Laravel doesn't seem to give you anything for your trouble. Take, as one example, validation -- you still have to write virtually everything yourself! There are some very basic hooks and some wire but that's all. For all the trouble, I expect more actual features from my framework.

<comment><USER12> The opinionated flavour makes a lot more sense in a large team - I can pickup a Laravel App, and if it has followed convention, run composer install and be productive within a matter of minutes.

<comment><USER13> Tbh, a developer should be able to do the same thing if PSRs are used for the project.

</comment></comment></comment></comment><comment><USER14> One of the great developments in the PHP eco-system is the use of components and the inter-op standards developed around them [1].

For many years now, "frameworks" such as Symfony and Zend have been mainly been a set of components with an optional thin framework layer. So, not frameworks in the traditional sense.

For those interested, another great resource is "Create your own framework on top of the Symfony Components":

[https://symfony.com/blog/create-your-own-framework-on-top- of...](https://symfony.com/blog/create-your-own-framework-on-top-of-the- symfony-components)

[1] [https://www.php-fig.org/](https://www.php-fig.org/)

<comment><USER15> As a former php dev (15 years ago), it fills my heart with joy every time I see PHP-FIG and composer related innovation. They are the best things which could have happened to PHP.

<comment><USER16> Yes, clearly composer was a huge step for PHP, there is a before and after composer.

</comment></comment></comment><comment><USER17> 3 years ago, I made a (not so successful) youtube series of building a website from scratch using php[1].

I'd basically record myself coding for 1h then add a voice over it as I speed up the video 3x.

Although my English falls apart fairly quickly, (if you ignore that) it is a good way to see the entire process of building a framework and understanding what each part does.

A lot of the things in this article are covered there, with a little bit of the why.

[1]: [https://www.youtube.com/watch?v=0sYFo92sFLs&index=2&list=PLr...](https://www.youtube.com/watch?v=0sYFo92sFLs&index=2&list=PLrAi51U4eF_GdbhoQNqXkDlru4C0p5f1D)

<comment><USER18> I wanted to improve my PHP skills so I researched and taught myself how to build a PHP framework myself, without composer or any third party libraries. This was a while ago so it was for PHP5 and I used CodeIgnitor and CakePHP as my inspirations because that was what was chosen in the previous places I had worked at so I was familiar with them. I enjoyed the process and I learned a lot.

I encourage people to build their own framework without composer __as a learning experience __if they 're looking to level up their PHP knowledge. I plan on going through it again from scratch but following modern standards: PHP7, PHP-FIG, strict_types

</comment></comment><comment><USER19> PHP has been in a weird place for nearly a decade now in technical forums like HN where it is mocked endlessly often to signal a superior technical understanding by people who would not deign to use it. As if its the only language with shortcomings.

Yet it continued to be used in some of the most scalable and widely used apps of our generation from Wikipedia, Wordpress, Facebook, Slack and more.

It often feels other languages marketing teams have preyed on it in many ways to gain attention. And there has been some kind of war against simplicity that places an unearned respect for 'clever' abstractions under the guise of scalability often in pursuit of resume padding, or 'best practices' entryism and gaining influence in projects via package managers and the like.

</comment><comment><USER20> Anyway, if this is how people use PHP these days, why not just use Java? I guess deployment is different (PHP is not compiled), but code/concepts seem pretty much the same at this point if you want to use this style of programming.

<comment><USER21> PHP handles null better than Java. That's the one thing that kept me from switching to Java tbh.

<comment><USER22> Implying that having null is a good idea at all.

<comment><USER23> So how would you represent an absence of a value? In an enum that'd be easy, but there is a semantic difference between an empty string and a null string.

Or would you propose sending a boolean to indicate null as well as a string in a data type?

<comment><USER24> See the Option/Maybe pattern, which uses sum types rather than unions or sentinel values.

[https://www.lucidchart.com/techblog/2015/08/31/the-worst- mis...](https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of- computer-science/)

</comment></comment></comment></comment></comment><comment><USER25> There's no such thing as web application development "without a framework".

There is only a choice between using someone else's framework, and inevitably building your own. If you reject all third-party frameworks, you _will_ end up reinventing a bunch of design patterns from other frameworks. You _will_ end up writing your own libraries to do the things the framework would have done. And you _will_ \-- no matter how good or fast it feels to you -- end up spending more time in the writing and maintenance of your private "non- framework" than you would have spent in deploying an existing one off-the- shelf.

<comment><USER21> That's not true. I've worked on large applications with frameworks (CodeIgniter, Symfony) and without frameworks (but with composer packages). In the beginning you might spend a little more time on wiring things together, but on a large enough application your framework will always get in the way somehow and you will have to find workarounds.

For large projects, I strongly prefer a frameworkless approach. If you do throwaway apps for an agency, then a framework is probably the better choice.

<comment><USER25> You chose a set of libraries. You installed them. You used them. And by "used them", I mean you wrote code which called into them and which wired together all the various pieces to make a coherent web application. I know you did this, because if the libraries had come with a magical "make all these things work together" function for you to use instead, you would have dismissed that as a framework.

You don't want to call that combination of libraries and in-house wiring- together code a framework. I get that. But that's what it is, whether you want to call it that or not.

And I'm sure that you don't see it as a maintenance burden right now. It never feels like a framework or a burden at first, because it's all made up of this code that you wrote and that you understand and that you control, and it feels great! For a while, at least.

But sooner or later you will realize you have built your own in-house web framework, and that now part of your business is to be a web-framework developer, instead of a whatever-your-company-actually-needed-to-make developer, and that being a web-framework developer is not a very fun business to be in.

And you will hire more people, and they will have to be trained on this thing- you-refuse-to-call-a-framework, but they'll recognize the patterns sooner or later, and will wonder out loud why it's missing this or that feature that the off-the-shelf frameworks have out of the box, or why this particular part of its API is so weird and cumbersome (it made sense back when the codebase was much smaller and only a couple people worked on it, you'll tell them, sheepishly).

And maybe some of them will roll up their sleeves and try to add what's missing or clean up the historical weirdness, and maybe some of them will get tired of working on this thing that won't add to their résumé and leave, and others will just do their best to get work done, but at a much slower pace because they're working with a framework built by people who hate frameworks, and still others will start to agitate for just going and getting a proper framework off the shelf and using it already, and you will end up having some very interesting and perhaps very heated team meetings, and you'll realize that you're spending way too much time as a team talking about tools and technologies and not nearly enough talking about products and bugs and features and this is not going as well as it was back when everything seemed so simple and easy in the world of "frameworkless" development.

This is the iron-bound web developer's counterpart to Greenspun's Tenth Rule, and in my experience there is no escaping it.

</comment></comment></comment><comment><USER26> Was hoping for a built-in mechanism for HTML-aware, injection-free templating given PHP is invoked via an SGML processing instruction from otherwise static HTML. Instead what's shown is massive Java-ish meta boilerplate for trivial HTTP request/response abstractions.

<comment><USER27> See something like [https://www.slimframework.com](https://www.slimframework.com) or [https://lumen.laravel.com](https://lumen.laravel.com)

</comment></comment><comment><USER28> For learning, this is great. For actual apps, this is plain stupid. Not to mention that no one has the time to cook up a framework every time one wants to build an app. Or all the rest of the components that are missing here. This whole PHP without a framework--whether it be creating your own framework or using raw PHP--trend seems like it's promoted only by inexperienced devs who don't need to work on real project in real companies in real life. I would literally fire someone if the insisted on doing this for wasting company resources and time unnecessarily.

</comment><comment><USER29> I'm seriously not sure if this is satire. It starts off with a simple example, and then goes down a rabbit-hole of massive complexity to ultimately do the same thing. This reminds me of the many OOP articles that were common shortly before the turn of the century, which would take as an example a perfectly straightforward and simple-to-understand piece of code and then bloat it into an asinine multilayered monstrosity by applying a generous amount of "OOP best practices and patterns" while straight-facedly enumerating all the alleged benefits.

 _When you first started with PHP, you may have used includes or requires statements throughout your app to bring in functionality or configuration from other PHP files. In general, we want to avoid that because it makes it much harder for a human to follow the code path and understand where dependencies lie._

 _Autoloading just means that when your application needs to use a class, PHP knows where to look for it and automatically loads it when it 's called for._

How in $deity's name can you say that specifying immediately the exact path to the file included, in the file that includes it, is "much harder to follow" than hiding it behind the indirection of the autoloader and whatever it does!? Honestly, _WTF!?_

(Maybe the joke here is that everyone is just pretending to admire the emperor's new clothes, in which case I apologise.)

Edit: here's an example of the OOP articles I mentioned: [https://csis.pace.edu/~bergin/patterns/ppoop.html](https://csis.pace.edu/~bergin/patterns/ppoop.html)

<comment><USER30> I get downvoted when I say anything remotely negative about PHP, in threads devoted to PHP, but perhaps my thoughts will make sense if I emphasize that I used to love PHP. It was my first real language, and I built my first business around it. That was in the year 2000. That was in the era before modern package managers, when PHP's huge standard library was a tremendous benefit, because the alternative meant using something like Perl, where you had to download every module from CPAN and cobble it together yourself. PHP was a dream compared to that.

But 18 years have passed. Every language now has very good package managers. There is an abundance of dynamic languages, most of whom are more consistent than PHP.

I'm not going to waste your time with a long PHP rant. I just hope that everyone is aware that the huge benefits that PHP offered in 2000 are no longer valid. If you are programming in PHP, you owe it to yourself to explore some of the many options that are out there. There has been incredible innovation among software languages since 2000, but PHP has mostly tended to follow a conservative path, mostly imitating Java.

For anyone who won't be bored by another PHP rant, I wrote my thoughts on this subject back in 2014:

[http://www.smashcompany.com/technology/why-php-is- obsolete](http://www.smashcompany.com/technology/why-php-is-obsolete)

<comment><USER31> A lot has changed since 2014. PHP 7 is blazing fast, frameworks like laravel are putting the joy back into rapid development.

<comment><USER30> Laravel has been around since 2011. PHP 7 is slow and continues to perform badly in all reasonably done comparisons:

[https://www.techempower.com/benchmarks/](https://www.techempower.com/benchmarks/)

But even if both of your points were true, the point is to look at what is happening in other languages and frameworks. Every day you spend learning about PHP is a day that you are not learning about the languages that are really moving the industry forward to interesting new places. Ask yourself, honestly, how many interesting new ideas will you learn from studying PHP, versus the more versatile (as in more platforms, and also the frontend) languages such as Javascript/Node, or the more innovative such as Go or Rust or Clojure or R or Julia? And I'm not even mentioning the more experimental languages, such as Shen or Lux.

<comment><USER29> _Every day you spend learning about PHP is a day that you are not learning about the languages that are really moving the industry forward to interesting new places._

I continue to be baffled by this sort of "novelty-chasing" \--- do I really care about "interesting new places" or "interesting new ideas"? No; and in fact I'd rather not, because it takes time and energy away from actually solving useful practical problems, besides the ones you create yourself in chasing after the latest cruft.

PHP is slow on an absolute scale, but chances are that a minimal, straightforward application written with it can perform better than something with a bloated framework on top in a different language. That takes true skill and experience, not something you can get if you're continuously jumping around trying to chase the fashion trends.

As someone who has witnessed several major trends in programming come and fall, the amount of churn (and encouragement thereof) in the web community is astoundingly unsettling.

"It's not about the tool, it's how you use it."

<comment><USER32> > I continue to be baffled by this sort of "novelty-chasing" \--- do I really > care about "interesting new places" or "interesting new ideas"?

Is this a troll? No you don't need to care. Feel free to go live off roots and tubers in the forest. Or write some COBOL. Anything is justified if you're putting "interesting new ideas" in quotes.

I worked with PHP full-time for several years and energetically rationalized away the time I invested into building that expertise. I liked it, I was getting things done, it would help me get jobs in the future. Utter nonsense. What a waste of my life.

Eventually I snapped out of it. Turns out you can just move to places Silicon Valley, there are jobs at awesome companies working with the cool modern technologies. You don't need anybody's permission, just do it. Want to write Haskell/Go/Rust/Elixir/Clojure every day? Want to work with ML or robots or big data or whatever floats your boat? _Just go do it._ You don't need to sit there writing PHP as the world passes you by.

PHP is a backwater. People live there and tell themselves that it's fine, good as any place really, can't imagine anything better, probably wouldn't like it anyway. Or they just stop thinking about it.

<comment><USER33> Some people could care less about SV. Or maybe they want to ship products their clients can handle after launch. Whether you like it or not PHP has created more value than any of those languages you mentioned. It's like you're saying it's better to be a Ferrari mechanic than a Toyota mechanic. The user does not care. So ship stuff that matters in whatever tool of choice.

<comment><USER22> Then however we're on a platform made by Paul Graham which stated that lisp delivers more value than any other language.

<comment><USER10> DHH says the same thing about rails/ruby.

Taylor Otwell says the same thing about laravel/php.

Mark Zuckerberg says the same thing about React / HHVM / Hack (PHP variant).

I'm sure Steve Jobs said the same thing about Objective C or Swift.

It's called an opinion, just because one person who spends more time investing in VCs, and just because we're debating an issue on a site, doesn't mean we have to take the creator of the site's past essays as the absolute truth...

Go, php, ruby, python, lisp variants ALL are the best script if A. it's the only one you know and you just want to launch something or B. You've done your due dilligence to figure out what you need, is it just a crud app? PHP is fine, is it a chat app? Well you might need erlang or elixir on the backend, or something with concurrency.

If you're spending 100+ hours debating on platform instead of building shit, then that's time you can't get back and that's wasted opportunity acquiring customers to a platform you could've had built last week -- if you weren't stuck in...confusion about what framework to build in, or spending all your time in tutorials because you picked the shiniest framework or language that is above your pay-grade so you have to learn everything.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER34> wow, PHP is on the front page, and it's positive

We have come a long way!

</comment><comment><USER35> For one project, I used slim. It has routing, a simple container and that's about it. I made my own controllers and integrated them in. Super fast, for anything more I used composer packages.

<comment><USER36> I did a personal side-project in Slim. It's lovely and I map it in my mind to Sinatra as a bare-boned framework for just getting stuff done.

</comment></comment><comment><USER37> I read this article and found it to be a great example of why we should NOT adopt modern PHP techniques at our company.

50 lines of code and contrived examples (is HelloWorld class a view or controller? AwesomeClass is a model?) get one line of HTML emitted in a barely readable way.

This article fails to motivate why each layer of complexity is added. It basically starts with the assumption that you want to use a framework and says "hey look you can do the same thing with 50 lines of boilerplate, not really, but kind of."

I would be much more impressed with an article that starts with the obvious way to write a PHP application (.htaccess, index.php, products.php, library/database.php, library/*.php) and then explains the actual problems that would make you want to opt for more complexity/organization/modern techniques.

</comment><comment><USER36> In my day job, I work on an application based on Drupal 5. It's not necessarily "without a framework", but really it might as well be.

It has absolutely made me a better developer because I've had to delve into how the system works more than I ever did with Laravel (or Ruby on Rails, in a previous life). Things don't just work (hell, sometimes they don't work at all) and poking around until I really understand why is a healthy thing for any mid-level dev to do.

That being said, I do miss a lot of the modern niceties and it can be really frustrating to work this way. I'm glad for the opportunity, but I would also like to be able to use more modern dev tools in the future.

<comment><USER38> Drupal _5_? Wow! I began my Drupal journey on the 4.6/4.7 'cusp' after working with J2EE & although I like Drupal because I can see the 'bigger picture' of the business logic being infused into the API, i.e. business problems solved = code as opposed to using something like Laravel & creating new untried, untested code all the time, I only really started liking coding with Drupal 8 as it's almost a complete rewrite from procedural to mostly OO.

The major problem over the years of fire-fighting various dubious installs of Drupal is people hack core and contrib modules making it impossible to maintain - if you use the APIs, grow modules & extend instead of hacking then it makes life a whole load easier - all I do to update my sites now is 'composer update --with-dependencies' (well, there's a few more lines to update the db if needed, export config from db to code, etc. but it's super- simple).

I hope you have applied a patch to protect against the latest security issue found, here's a link to an unofficial patch for 5:

[https://www.drupal.org/files/issues/2018-03-28/sa- core-2018-...](https://www.drupal.org/files/issues/2018-03-28/sa- core-2018-002-d5.patch)

</comment></comment><comment><USER21> I like to use the same approach, I even wrote a tutorial [0] and a book [1] about it.

That being said, I am still forced to use Symfony at my current job. It only gets in the way sometimes, it's not too bad.

On my previous job we went from CodeIgniter to frameworkless and I really liked that. Not having framework constraints working against you was really enjoyable to work with.

[0] [https://github.com/PatrickLouys/no-framework- tutorial](https://github.com/PatrickLouys/no-framework-tutorial)

[1] [https://patricklouys.com/professional- php/](https://patricklouys.com/professional-php/)

<comment><USER39> I recently gave Sylius, based on Symfony, a spin. I wanted to add a field to a product, editable in the admin area. The additional code and the extensions were ok. Some of the config changes are understandable but I thought it a bit much when the number of additions to configuration outstripped the amount of code required.

<comment><USER21> I feel your pain. That's my biggest gripe with Symfony. Sometimes it feels like I am spending more time configuring that programming.

<comment><USER40> Rewind to 2005. Isn't this why Rails was born?

<comment><USER39> Funnily enough, I chose a Rails e-commerce solution, Solidus. I added the same feature, 0 configuration, similar if not less code required.

Unfortunately I'm the only one who knows Ruby but I have every faith that my colleagues can pick it up.

</comment></comment></comment></comment></comment><comment><USER41> > So there you have it. With just 44 lines and the help of several widely- > used, thoroughly-tested, reliably interoperable components, we have the > bootstrap for a modern PHP application.

Uhm .. so ... a framework?

<comment><USER42> No, just components that handle certain things.

</comment></comment><comment><USER43> I haven't used PHP for almost a decade, but I agree with the sentiment of this article.

I built a web app back in 2009 in PHP and didn't use Code Igniter or Zend (basically the only two frameworks back then), opting to do it all by hand. And it ended up being a really valuable and formative experience. No matter what language I use, I understand how a web application really "fits together" under the hood and I think there's value there.

As a side-note, compared to Node.js or Rust or what-have-you, PHP just seems needlessly verbose.

<comment><USER44> I'm someone who uses a custom framework at work, and it's not verbose at all. Maybe I'm doing it wrong?

I just spl_autoload_register on a controllers directory.

Then based on the url, it creates a class for the first part of the url and passes in the rest... $class = new $class_name(); $class->index($url_parts);

That class always extends an output class which uses a template system to render a component. I also use an ORM with a models folder that has a bunch of static functions to get data in each model class.

I would love to hear from someone more knowledgable about the disadvantages of my approach or why this articles is a better way of doing it. Of course I use composer and use a bunch of libraries for aws, oauth, Google APIs... but for the actual framework I keep it simple and haven't had problems so far.

<comment><USER43> > I'm someone who uses a custom framework at work, and it's not verbose at > all. Maybe I'm doing it wrong?

Probably, not, it was just my sentiment by looking over the code in the article :) I haven't used PHP for almost 10 years, so I have no inkling of what "modern" PHP looks like.

<comment><USER45> Symfony 4 looks and feels like a slightly odd java Spring setup.

Annotations are ugly as hell in PHP but thats a result of not having annotations supported in the language itself (you need an annotations preprocessor and they're all in comment blocks).

There is an rfc for annotations in php as a language feature, so maybe someday. When that happens, Symfony may as well be Spring for PHP.

</comment></comment></comment></comment><comment><USER27> Good article, and hopefully contrasts today's php with yesterday's php.

To me, it's no worse than any other dynamically typed language now. And arguably better than similar peers because the barrier to entry is so low.

FastCGI and user space caching like apcu mitigate the old "one process per request" complaint.

It's a true workhorse. Sure, node.js and Golang have advantages, but so does modern php.

<comment><USER46> What would you say are the advantages to php over node, python, or golang?

<comment><USER5> \- Sane, easy to use package/dependency manager that just works, every time (none of node/python/golang really have that, for entirely different reasons).

\- Large stdlib that, while inconsistent, frees you from searching packages for everything (vs nodejs).

\- I'm sure some will disagree, but php's documentation is top notch, easy to navigate, and with nice completion from user examples (you could say it is a mini-stackoverflow by itself). Golang's docs are good, python's are good but hard to navigate, node's are typically worse.

\- PHP's ordered, possibly hash-backed possibly plain arrays are an abomination from a data structures point of view, but god are they handy! Golang is terrible here with its static types (fine) but lack of generics (just check how to sort a list of a non-primitive type).

<comment><USER47> 1\. I rarely have problems with package management in Python. I know pip has flaws but it's not enough of a pain point for me to see it as an issue.

2\. I'd say Python is an easy match in this regard

3\. Agreed about the docs - I still find the organisation of Python's docs a bit peculiar.

4\. Handy data structures, you say? I think Python might have the edge here.

It's strange you don't mention PHP's biggest strengths: deployment and learning curve: You can begin on almost any commodity hosting with a simple text editor and no knowledge of Unix internals. The amount of extra stuff I had to learn to be productive in Python was huge at the time. It's got a bit better now with various simple deployment options but PHP still wins out for the beginner.

</comment></comment></comment></comment><comment><USER48> Wait, this is far from vanilla PHP, is this not gloryfing "Composer" as the new meta-framework?

<comment><USER49> Only if you consider gem and npm to also be frameworks. Or by further abstraction, Github.

<comment><USER48> Well, if a project depend on them to actually work, yes, kind of, I consider them frameworks.

</comment></comment></comment><comment><USER47> Curious about the use of Dependency Injection here. I'm a Python guy and it rarely gets mentioned in my world as far as I'm aware. I always assumed it was mostly an artefact of static type systems.

Can anyone share their insight? Either in the context of Python or PHP.

<comment><USER50> How well are your codebases unit tested?

I shiver thinking about trying to add good tests to a project in any language without good di/ioc.

<comment><USER51> The dynamicness of languages like Python make it relatively easy to do so. For example, it's difficult in Java to mock an http request if you can't inject a `HttpRequestor` (or so) to the object you're testing.

In Python, it is common practice to patch objects, which means that even though the code calls `requests.get()`, the call will actually be patched through to a mock. (in the Java world, this is possible with e.g. PowerMock, but generally frowned upon)

</comment></comment></comment><comment><USER52> What the.. PHP has a built-in server now?

<comment><USER53> It's not multithreaded so it's impossible to use in production.

<comment><USER54> It's not meant for use in production. It's a lighter-weight substitute for a full Apache stack on development systems.

</comment></comment></comment><comment><USER55> Really random question, but if I were to make a REST API wrapper with PHP, is it possible to use cURL and keep it PSR-7 compliant?

Been trying to learn more about the Composer/PHP ecosystem and am pretty confused.

In contrast, I was able to create and publish packages in Python and Node with relative ease with little to no experience with these languages.

<comment><USER56> [https://github.com/guzzle/psr7](https://github.com/guzzle/psr7)</comment></comment>


A Climate Change Paper So Depressing It's Sending People to Therapy - <AUTHOR> https://www.vice.com/en_us/article/vbwpdb/the-climate-change-paper-so-depressing-its-sending-people-to-therapy <comment><USER2> This article raises a lot of suspicion, and it has many of the hallmarks of bad reporting.

\- The Vice piece is shallow and didn't investigate the claims and arguments of the cited article (And what's with the authors photo? Is Zing Tsjeng really serious about this?);

\- The author of the paper, Jem Bendell, is not an academic in climate science nor in sustainability, but in "Sustainability Leadership", a field in Management;

\- The paper reads like an opinion piece.

\- The paper, as provided in the author's website, makes reference to the journal to which it was intended in the past tense, which raises the question of whether it is the original or an edited version;

\- Many of the references cited in the paper are from news websites, and only a few are proper scientific articles: I was expecting a lot, lot more;

And the worst red flag of them all:

\- After being rejected by a not exactly relevant yet serious journal, the author made it public nonetheless, hinting at some form of censorship of an inconvenient opinion.

<comment><USER3> It's Vice that's all you need to know these days, this isn't journalism period.

</comment></comment><comment><USER4> Don't let tales of a collapse of civilization lead to an immediate collapse of your judgement and focus.

This article is full of doom and gloom. Many predictions are made, and they are conveniently quoted as someone else's:

"Some of the people who believe that we face inevitable extinction believe that no one will read this article because we will see a collapse of civilisation in the next twelve months when the harvests fail across the northern hemisphere" (written around 12 months ago)

I for one won't hold my breath.

<comment><USER5> From my perspective, the paper reads like a far-right "survivalist" piece from the early 90s. It's almost laughable in the way it presents the view.

That said, the 90s anti-authoritarian survivalists _did_ nail some things, especially in light of Snowden. I think it would be wise to take it under advisement and pay attention to what's going on, but to go buy a farm and a bunch of heritage seeds based on this paper would be pretty ridiculous.

</comment></comment><comment><USER6> Until we include the cost on the environment within the cost of our goods things will not change. When we do we will encourage a wave of environmentally friendly innovation. It will take a lot of courage for any government to do this.

I've started the seed of a small political party in the UK which will push for Envionmental Economics - [https://weOptimise.it](https://weOptimise.it) / [https://twitter.com/weoptimiseit](https://twitter.com/weoptimiseit)

<comment><USER7> I don't think any kind of consumer driven environmental activism is even close to enough to stem the tide.

To really drive home the severity of the situation, understand that if we ceased all greenhouse gas emissions tomorrow, the global mean temperature would continue to rise for another century before hitting equilibrium. We are past the point of no return.

The only way civilisation continues existing as we know it, is if over the next decade we roll out a heap of nuclear power and dedicate a significant portion of it to carbon sequestration. Fusion would be great but even fission is sufficient. Anything less, including geoengineering projects like space based mirrors or albedo boosting aerosols, are at best a 50/50 gamble on the outcome.

Feel-good activism like using less plastic straws or rolling out renewable power at meaningless scales is a distraction from the real and only course we have left.

I am really worried that a large number of people still believe that renewables can unfuck this situation and so put their guard down after watching some feel-good news segment about Germany hitting an arbitrary target. It's not Europe or USA you need to worry about, it's China India and Afrtica. Renewables would have helped 20-30 years ago. Today we are so far gone that we need to greatly exceed our total energy demand and channel the excess into sequestration.

I strongly suggest that everyone read the 2018 IPCC report. It should be mandatory reading material at all schools universities and workplaces. [https://www.ipcc.ch/sr15/](https://www.ipcc.ch/sr15/)

<comment><USER8> You are right. As Judith Curry has pointed out. 'even if all the states respected (the current commitments) —an unlikely prospect—the temperature reduction in 2100 would be an insignificant two-tenths of a degree. And this assumes that climate-model predictions are correct.'. No one would even be able to sense a difference.

She also points out the fact that "almost half of the warming observed in the twentieth century came about in the first half of the century, before carbon- dioxide emissions became large.". Natural factors thus had to be the cause. None of the climate models used by scientists now working for the United Nations can explain this older trend. Nor can these models explain why the climate suddenly cooled between 1950 and 1970, giving rise to widespread warnings about the onset of a new ice age.".

<comment><USER7> Your post conveys confusion and suggests a bad actor. Let me try to clear up a few points in good faith:

1: The impact of the united states and Europe is now negligible. They have undergone their transition and have emitted most of the greenhouse gases they were going to. There was a time delay between those emissions and the associated global temperature rise. The incoming transition of China/India/Africa dwarfs that.

2: Atmospheric CO2 is not the only and not the most potent greenhouse gas we are emitting. It is just the most abundant.

3: We are in fact overdue for an ice age. We are experiencing a relatively extremely young climate period called the Holocene[1]. It is a warm gap in the middle of an ice age. This warm gap for the last few thousand years is what allowed civilisations to form. Given what we know about historical trends, we should have plunged back into the ice age right about now. It is entirely possible that anthropogenic climate change is the only reason we are not in an ice age today.

4: We are uncovering new positive feedback effects in the greenhouse loop on a monthly basis now. Whatever climate models exist, no matter how alarmist, are actually turning out to be conservative due to all the new feedback mechanisms we're discovering.

5: We face a double threat. Either a runaway greenhouse effect that turns earth into Venus 2.0, or a natural reversion to the ice age which brings an end to civilisation. The only way we continue to thrive as a species is if we get good at predicting and manipulating the climate of our host planet. One way or another, it will end us if left unchecked.

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

</comment></comment></comment></comment><comment><USER9> I came to the realisation that human world is fucked about 3 years ago. Haven't seen anything in the last few years to change my mind. We might be able to push it a few decades into the future but there will be a reckoning as the real choice is to let a few hundred million die today or few billion in the future.

<comment><USER10> I tried hard for a very long time to maintain my baseline "retro-futuristic" optimism for progress and a Jetson's Future but about a couple of years ago, probably owing to stress in my life (family business difficulties caused by my father with evident narcissism but that I cannot break away from) I basically 'crumbled' to your realisation: that all this unhappiness and anxiety I see everywhere around me is not some local bubble of despair but the actual preamble to dire things to come, the growing awareness, the creeping alarm as the effects start to ripple through. I think the last time humanity really had much of a chance to pull through with a close scrape (in economic, financial, social, and environmental terms) was somewhere back in 2010 or thereabouts. We collectively missed that turning and we've stuck to the road to perdition ever since.

<comment><USER11> "probably owing to stress in my life" Sounds more like depression, hope you're in a better place now.

To more directly answer your point. Things always seem to be bad until they're not. And we are on virtually any measure you'd care to look at, better off than we were a century ago. The temperature may rise x celcius, empires may fall, there may be wars, but this has been an unusually peaceful period of history, wars happen anyway, and people probably wont mourn the non existent ice caps that they heard used to exist, just like we don't mourn the dodo.

If we say went back to something equivalent to 1918 Europe. Yes we would have lost a lot, both life and infrastructure, with Spanish flu still on the horizon, but we will rebuild and get on with life, would you expect climate change to be worse than that? And look where we are, a century later.

<comment><USER10> I know it's not garden-variety depression because I've been treated for that. There's several people around me that are subject to the same influence that are in remarkably similar emotional states, including my sister and some senior executives in the firm. Unfortunately, no, I am not in a "better place". But I really appreciate the effort to be understanding.

Turing to your comparison between 1918 and now, I daresay global climate change will be a great deal more severe than the cumulative effects of both the First World War and the Spanish Influenza combined. The magnitude of geopolitical strife we have set ourselves up for is of an almost unimaginable scale.

<comment><USER11> "But I really appreciate the effort to be understanding"

The worst thing about depression is that you can't see a way out, until you are out, and then the path is astoundingly obvious, and the journey so easy. I could say it will get better, but you probably wouldn't believe me. Please do believe me when I say it doesn't take effort to be understanding though.

On to a sunnier subject. I can't see us going mad max, I think worst case doesnt interrupt civilization, which implies keeping at least our current know-how. Could there be a lower standard of living, yes. Lower than a century ago? (while keeping antibiotics, computers etc) Maybe. But that would still be a higher standard of living than we've had for the majority of human history.

</comment></comment></comment></comment></comment><comment><USER12> Direct links to the paper:

[http://www.lifeworth.com/deepadaptation.pdf](http://www.lifeworth.com/deepadaptation.pdf)

(audio version) [http://lifeworth.com/DeepAdaptation.mp3](http://lifeworth.com/DeepAdaptation.mp3)

</comment><comment><USER13> > _How near? About a decade._

Okay Al. Still waiting on that dramatic increase in frequency and ferocity of hurricanes, but I guess I'll add this one to my calendar.

> _ou only needed to step outside during the record-breaking heatwave last > year to acknowledge that 17 of the 18 hottest years on the planet have > occurred since 2000._

Wildly untrue. Perhaps if you add "since records began in 1850" it could maybe be valid.

<comment><USER14> Note that I haven't really researched this past personal perception, but:

This year NC was hit by a couple of hurricanes, both more severe (and to be honest, 2 more in frequency) than I ever remember growing up here, and for sure more than in the last 5-6 years.

Also, does your second comment imply that one of the 18 hottest years was in 1843, or like, well before humans were practicing agriculture?

<comment><USER13> I'm not implying anything. The Cretaceous was 10-15°F warmer than current temperatures. There was lots of life.

~1000BC was 2-4°F warmer than today, and there were plenty of humans doing just fine.

<comment><USER15> I dont think youre really factoring in natural disasters, displacement, refugees. 4 out of 5 people displaced are in Asia right now.

Even right now, Miami is underwater, and we are pumping it back out. Florida, New York, and California will become economic disasters far before 10 degrees.

Of course we could build new spare cities inland now, for much cheaper, but of course we will wait for destruction before people will move.

[https://www.theguardian.com/cities/ng- interactive/2017/nov/0...](https://www.theguardian.com/cities/ng- interactive/2017/nov/03/three-degree-world-cities-drowned-global-warming)

<comment><USER5> > 4 out of 5 people displaced are in Asia right now.

Your link does not support this assertion. Instead, it says that 80% of Asian people would be displaced in the next eight decade given a 3ºC rise in global temperature.

> Even right now, Miami is underwater, and we are pumping it back out.

Miami was built on a sandbar. A good portion of the west side of the city is built atop the Everglades - it was never exactly a safe place to build.

Also, Miami is not "under water". You article refers to "king tides" \- caused by the alignment of Earth, Luna, and Sol - which are exactly the same as they were at any point in human history, as measured against the mean tide. They're astronomical events, and are unrelated to climate. Unless you can show that "king tides" are objectively higher today than they were in the past, I don't see what they have to do with anything whatsoever. Measuring the height of king tides is exactly equivalent to measuring the mean sea level.

> Of course we could build new spare cities inland now, for much cheaper, but > of course we will wait for destruction before people will move.

This doesn't even make sense to me. Why would building spare cities be cheaper now than in twenty years, or fifty? Remember the time scale we're talking about here; your article is projecting out eighty years. If you built these cities today, they'd be fifty to eighty years old before people needed them. How many urban dwellers live in fifty to eighty year old houses, especially without updates?

Further, if we take for granted that there will be a need for spare cities in the future, it would make much more sense to build them as needed. That would spur growth in the construction industry, which in turn would lead to economies of scale. Construction technology would have additional time to improve as well, which means fewer resources used in building and more sustainable design to boot.

In short... if this is going to be an issue, from a public policy perspective reaction to it should be just that - reaction. Have resources on hand, sure, but trying to move the populations of entire cities two generations ahead of an anticipated issue is folly.

<comment><USER15> The subtitle of one of the sections is "The regional impact of these changes is highly uneven, with four out of five people affected living in Asia."

</comment></comment></comment></comment></comment></comment><comment><USER16> Just my two cents: Climate change threats are being over-hyped by those people/companies who stand to benefit from "green" energy/society.

These orgs are spreading propaganda to high-school teens by telling them lies sprinkled with a bit of truth and causing them to protest because the teens on average cannot make a better judgment then people with decades of experience.

Nothing is going to happen. I for one wont hold my breath.

<comment><USER14> For what it's worth, it seems the companies that have been benefiting from the not "green" tech and society have been and still are spreading propaganda to minimize the fear/awareness/etc of climate change.

I mean, look at Trump and this coal stuff. Look at how much money Oil companies spend on this. One large difference, I think, is that the money being spent by the oil giants is influencing the opinions of fewer, but more powerful, people, such as congress-persons and other political figures.

I guess technically your guess about nothing happening is as good as anyone's, but it really doesn't seem like that is the case. I'd love for climate change theorists to be wrong and actually it turns out that the Earth is fine and we haven't caused irreversible effects to the climate and planet, but wouldn't you rather we work on cleaner energy and be wrong, than do nothing and be wrong?

</comment></comment><comment><USER17> I'm currently about half-way through "The Uninhabitable Earth" by David Wallace-Wells [1] and it comes to similar conclusions: its too late to stop this thing, it's going to be very bad, and it's going to happen sooner than you think. Its a very hard thing to honestly face, and I'm not entirely sure I have yet.

[1] [https://www.penguinrandomhouse.com/books/586541/the- uninhabi...](https://www.penguinrandomhouse.com/books/586541/the- uninhabitable-earth-by-david-wallace-wells/9780525576709/)

<comment><USER18> I haven't read it (though I saw his talk), but I'm sure there are arguments to be optimistic as well. It can be a mistake just to focus on the negative stuff.

<comment><USER19> This is addressed in the paper the article is about. One of the main points is that the 'optimistic stuff' does not address the negative already baked into the system right now.

The point is: too little, too late. If that's true I don't know, that's the whole question I guess.

</comment></comment></comment><comment><USER20> It might be that big-picture thinking and the future, generally, is terrifying rather than climate change in particular.

It is challenging to construct a realistic long-run scenario of a happy future that is sophisticated and meaningful. And at the global scale even the recent past sounds pretty horrific if you spell it out. The fact that the global situation is improving rapidly doesn't balance out the fact that being subjected to a 1950s standard of living would be potentially abusive today (no mobile, no connection to the internet, questionable access to goods, etc, better or worse depending on where you live).

Part of the trouble I have with climate change as an imminent emergency is there are actually quite a few civilisation-level threats at the 200-500 year timeframe. Resource depletion, progress in weapons research, fragility of logistic chains to disruption, disease. The actual impacts of climate tend to be contributing aggravations to what are honestly concerns more driven by overpopulation.

<comment><USER21>
      It is challenging to construct a realistic long-run
      scenario of a happy future that is sophisticated and
      meaningful.

It's simple enough: Pick a reference point in the past that makes most things look pretty good, and extrapolate from there.

Compared to the 1800s, everything seems to be going in the right direction. Medical technology? Much better! Childhood mortality? Lower than ever! Science? Much more advanced - and much better funded! Democracy? Many fewer limits on who can vote or serve in government! Women's rights? LGBT rights? Much improved! War? Fewer and smaller wars than ever! Long distance communication? Faster and cheaper than ever! Average education levels? Higher than ever! Prices of books? Lower than they've ever been. Availability of food? We literally have an obesity epidemic! Quality of food? More people have access to salt and spices than ever! The average westerner today eats better than a king would have in 1800! Access to education? More university lectures than you could ever watch, on a screen in your pocket.

Then just gloss over any negative changes as temporary blips, and you've got a pretty positive outlook!

<comment><USER20> That type of extrapolation form the past is extremely simplistic though. And a bit like saying that you feel pretty good at 50 years old so it'll be easy to make it to 100. Everything winds down and dies eventually; we should resist entropy as best we can but realistically one day humanity is going to fall over and not get back up. The question is how long until then, and the order of magnitude number of years probably doesn't have 5 zeros on the end.

And anyone who extrapolated 2019 from 1800 was correct but also undeniably delusional; there was no evidence it would turn out as it has, and the journey was largely uncontrolled. Anything could have happened.

</comment></comment></comment><comment><USER22> [https://en.wikipedia.org/wiki/Geologic_temperature_record#/m...](https://en.wikipedia.org/wiki/Geologic_temperature_record#/media/File:All_palaeotemps.svg)

When the dinosaurs lived the world was 10 celcius warmer. ~200 million years later the world was 14 celcius warmer than today. Life thrived worldwide. [https://en.wikipedia.org/wiki/Eocene](https://en.wikipedia.org/wiki/Eocene)

Global warming is good for the earth.

Every 200,000 years there's a huge spike in warming. Which if you look at: [https://en.wikipedia.org/wiki/Eemian#/media/File:Carbon_Diox...](https://en.wikipedia.org/wiki/Eemian#/media/File:Carbon_Dioxide_400kyr.png)

Notice the CO2 circle showing the last 1000 years; but if you circled the entire green line from about ~20,000 years. There's huge spike that couldn't possible be human activity.

It doesn't even appear like we are in control.

<comment><USER23> This is denialist propaganda. We are the cause of the current warming cycle [1] and what this leaves out is timescales. The prior cycles took millennia, this is decades, and natural systems can't adapt that fast.

[1] [https://www.google.com/amp/s/www.usnews.com/news/politics/ar...](https://www.google.com/amp/s/www.usnews.com/news/politics/articles/2019-02-25/study- evidence-humans-are-causing-global-warming-reaches-gold- standard%3Fcontext%3Damp)

<comment><USER22> I provided sources and facts. If you refuse to look at scientific facts by asserting I am denialist and/or propaganda. That's fine, keep your blinders on.

For the record I'm not a denialist. I do believe global warming is happening. I just think there's absolutely nothing wrong.

</comment></comment></comment><comment><USER24> I used to get depressed thinking that I wouldn't live long enough to see the sci-fi future where we're all immortal cyborgs with minds in the cloud.

So in a purely selfish sense, I guess "right now is the peak of human civilisation, the future is all melting ice caps and resource wars until we die off completely in 2500" is reassuring?

<comment><USER25> Keep in mind, that vast swathes of Earth were uninhabitable even before global warming was even a concept.

To illustrate this - look at Egypt and the earliest civilizations. The only place where life existed permanently was in a narrow band alongside a river. Life will still exist after a 4C warming, but in much narrower bands than it currently does.

The global population of people will be reduced probably by a factor of 10, eventually, settling on a sustainable level of around maybe 800-900 million. This, in turn, should reduce the burn rate of unsustainable resources by a lot, letting us coast for another couple of centuries.

The only question is - how violently will we go down from 8 billion to 800 million?

Disclaimer: this is all wild speculation and my personal opinion.

<comment><USER26> How violently? Well, 7.2 billion people will die. Is that violent enough?

Then there's the _additional_ violence that all 8 billion will do, trying to be one of the 800 million rather than one of the 7.2 billion.

My own gut feel is that we will muddle through much better than that, with less than 500 million dead. On this subject, that seems to make me the crazy optimist...

<comment><USER25> I strongly believe that every currently living person on this planet will die, hopefully just because of old age.

Not sure why you assume there will be 7.2 billion violent deaths.

<comment><USER26> If you're going to go from a planetary population of 8 billion to one of 800 million due to global warming, I'm pretty sure that there's going to be a lot of "not because of old age".

<comment><USER25> I believe in the goodness of people and our ability to resolve things in a less violent way, even during times of scarcity and global warming.

Maybe that's too optimistic.

</comment></comment></comment></comment></comment></comment><comment><USER27> I've been through similar bouts of lethargy and depression over climate change as described in the article. It can really get overwhelming when thinking of the future to come, what can we do but just try move forwards with our lives?

<comment><USER28> Why is it that only now you are depressed? Did you not know you were going to die anyway and human beings as a whole were going to evolve into some species completely different from us, even if there was no climate change? I believe we have conjured up a depression about this topic because we believe that our ability to stop climate change will be amplified by the pressure of sadness, all the while not logically understanding that we are destined to be replaced either way.

You should therefore have been depressed from the very beginning, but you probably weren't. That proves that this idea of humanity being erased is not inherently depressing, nor is moving on with our lives. It's simply the news you are reading that is depressing, not the philosophy behind it.

<comment><USER27> I'm not really depressed now as I've kind of come to accept similar ideas to what you're getting at. However it took me a long time to reckon with it all, and unfortunately many loved ones and younger people might not be able to just accept the bad news as easy as you can.

</comment></comment></comment><comment><USER29> I'm relaxed about climate change. Photovoltaics have grown at a compounding average rate of 40.5% over the last 20 years, going from 0.566 GW in 1998 to ~512 GW in 2018.

World power use (all forms, not just electricity) are currently around 18 TW. At current trends, we exceed this in June 2029. By June 2034, we should be overproducing by a factor of 5, which makes up for the difference between nameplate capacity and actual average output. By 2037 you do that _and_ have enough overproduction you don't need batteries to store energy at night, just make interconnections between existing power grids worldwide, because you can afford 75% losses (if you want to, which you might not).

On the other hand, I am concerned with biodiversity loss, nitrogen cycle issues, antibiotics resistance, and non-renewable use of phosphorus.

</comment><comment><USER30> It is so strange to me the effort people will go to with things like guns to protect themselves from the highly unlikely.

Yet we're having these debates about what to do about climate change which is looking very likely.

We should be working on it, if we end up being wrong then the very worst case is we've gotten ourselves off our dwindling fossil fuel supply a bit early.

<comment><USER13> > _protect themselves from the highly unlikely._

Tyrannical governments are unlikely?

<comment><USER30> Taking up arms against a government in your lifetime? Yes I'd call it unlikely.

<comment><USER13> You assume my nationality? How do you know I'm not Syrian, Iraqi, Afghani, Palestinian, Egyptian, Libyan, Yemeni, Ukrainian, Somali, Chechen, Georgian, Venezuelan, or Mexican?

Get out of here with your racist assumptions that this forum is solely populated by Silicon Valley residents.

<comment><USER30> I think you may have just done the same.

I'm Australian. You know, the place where gun control actually worked pretty well.

<comment><USER31> Does anyone outside of Australia believe that?

<comment><USER29> Hi, I'm British, even our police don't have — or want — guns. [1]

[1] not as standard, but there are some exceptions.

</comment></comment></comment></comment></comment></comment></comment><comment><USER32> Time to start terraforming with sulfur?</comment>